This is Alan Pope with the thirteenth screencast
in the Ubuntu Month of Screencasts.
All the screencasts in this month can be downloaded for free from our website,
which is screencasts.ubuntu.com
In this screencast we are going to look at creating new users
and managing those users.
And using a new funky tool called the Fast User Switcher.
Now I'm using Ubuntu Gutsy, which has recently been installed.
And I'm logging on with the user that was created when I first installed Ubuntu.
So I created a user called ubuntu.
Now this user has some rights over the system,
has some administrative rights on the system.
This user is able to apply updates, create printers
and do other kind of administrative tasks.
And one of the tasks that this user can do is create other users.
Now this might be useful in an environment
where you have more than one person using one PC,
for example at home.
This allows you to keep everyone settings and email
and other preferences separate from each other.
Now when we log on you can see up here there's a little icon
or applet on the panel which has got my name in it, ubuntu user.
And if I click on About Me in System -> Preferences,
the About Me application comes up.
Now this machine is not the quickest in the world,
so apologies for some delays here.
Now the username here is ubuntu, which is what I typed in when I logged on.
But the real name of the user is ubuntu user.
And here we have the opportunity to set a little photo, an avatar or icon
and you'll see in the Fast User Switcher at the top of the screen,
there's a little tick to show that I'm currently logged, that's this session.
and on the left end of that icon, that line, you can see a picture
and the picture is the same one as in the About Me window,
and we can change that picture.
There's some pictures supplied with the standard install of Ubuntu
and I can just choose one and click Open.
You can also go and find pictures, do a search
or find pictures in your own home directory,
if you've downloaded some pictures from the Internet
or from a digital camera for example.
You could use one of those as your icon,
sometimes called an avatar or face.
So I just choose this cup of coffee
and close the About Me program.
Now I'm not sure if this is a bug or feature,
but it doesn't actually show my avatar straight away,
it looks like the Fast User Switcher only loads the avatars, the faces
at the point when the applet is loaded.
So if we remove it from the panel by right-clicking the fast user switcher
and choosing Remove From Panel.
Then right-click the panel and choose Add to Panel...
We can add it back in again, which causes it to reload,
and it will reload my little face.
So I choose Fast Switcher from the Add to Panel dialog.
Click Add and in a couple of moments you will see the Fast User Switcher
will appear on the panel.
If I click my name, you can see, possibly can see
there is a little grayed out coffee cup there.
It's not vital that you do this,
next time you log out and log back in that will happen anyway.
But it's just nice to show that the icon does get reflected
within the Fast User switcher.
In the Fast User Switcher there is only one user listed,
and that's because in a standard install you only get one user that's usable.
If we go to System -> Administration -> Users and Groups,
we can create more users.
Now when I run this application it prompts me for a password,
it's prompting for my password.
We'll talk more about this in just a minute.
But this is to ensure that only someone who knows my password
is able to make administrative changes to the system.
So that should be just me, because I'm the only person who knows this password.
Although I don't mind telling you the password is ubuntu on this system,
so it's not exactly secure.
Now you can see here in the user settings,
there are two users listed.
There's me ubuntu user and if I click properties,
you can see some information about this user.
Now the absolute basics in here is Username, Real Name and Password.
and that's all you really need to set.
We'll look at this generate random password in a minute.
There's some other tabs, which we'll look at a little bit later
and you can see there's multiple users listed here.
But I said there was only one usable,
because this is the user that gets created,
The Ubuntu user gets created during the install and you can choose what it's called,
but there's also this extra user called root that gets created.
Now we don't actually use the root account
Well we do and we don't, we don't generally log on as the root user,
but there may be some tasks, some administrative tasks,
that we use the root user for
and we'll look at that in later screencasts.
But I'll just show you a bit of documentation about this whole root user.
and you'll find it on-line at help.ubuntu.com/community/RootSudo
and there's a paragraph here that details about the root account.
And it says that it's locked, you generally don't use it.
But since the root account does exist,
it is possible to run users with root level privileges.
What that means is when you try to run administrative tasks,
this program sudo is used to elevate your privileges,
to give you the rights to do what it is you want to do.
And sudo, by default, is allowed for the first user
that's created on an Ubuntu system.
There's lots more documentation on that page, I strongly recommend you read it,
especially if you've ever used Linux before and you're familiar with root accounts,
because the way Ubuntu does it is different from some other LInux distributions.
So in effect we have two users here,
my user that I am logged on with and the root user.
We can of course delete and create users in here.
Incidentally if you delete a user,
their home directory and all of their files do not get deleted,
it's only the user account itself that gets deleted.
So let's create a new user for someone in this house.
Let's create one for me.
So we'll give it a username, alan
and the real name, my name Alan Pope.
I'll leave the profile as desktop user for now, we'll come back to that in a minute,
but just remember I set that to desktop user.
And down here we can choose a password.
If you're creating your own account, you can choose your own password.
If you're creating it for someone else,
you might want to generate a random password
and then let them change it themselves afterward.
Using this generate a random password button
by clicking the generate button ensures that you get a
more secure password than just
the password I have for my account, which is ubuntu.
I'm just going to type password for now and click Ok.
Now when I do that, that's going to create a new user on my Ubuntu system.
You can see there the name of the person is Alan Pope
and the log in name is alan.
And it's set a home directory, /home/alan
so that's where that user's file will be located.
Now if you look at the Fast User Switcher, you can see Alan Pope is listed,
but there's no tick next to him.
And the lack of a tick means that user is not currently logged in.
If I click on the user it takes me to the log on screen
and this is the Fast User Switcher switching between users.
It takes me to the log on screen and prompts me for that user's password.
So I don't have to type in the username, I just have to type in the password.
I type in the password that I just set when I created the user
and now I'm logged in as alan.
So the interface looks pretty much exactly the same as the other user,
because this is a standard install.
But this user could customize the look and feel and change the settings
and those would all be kept separate from other users on the system.
And you can now see the Fast User Switcher shows two users that are logged on.
They've both got a tick next to them.
So the ubuntu user might have programs running and so might I.
I'll set my face in the About Me application
in the same way that I did for the ubuntu user
and I'll choose a different icon.
Now you'll notice again,
when you click on the Fast User Switcher the icon doesn't appear,
but it will appear the next time this person logs on
or if someone else logs on to the system.
Now remember I created this user as a desktop user,
so this user doesn't have very many rights over the system.
doesn't have rights to do much in terms of administration.
So if we look under the System -> Administration menu,
you can see it's somewhat shorter than it was for the ubuntu user.
There's a lot of stuff missing here, because this user doesn't have right to make changes
and this is useful if you're creating accounts for other members of the family
and you don't want them running amok with the system.
So this user is unable to install software,
can't create other users, there are lots of things he can't do.
If we switch back to the ubuntu user, using the Fast User Switcher,
you can see that it pops up the password prompt.
This is actually the screensaver.
So when you switch from one user to the other,
the one you switch from, the screen gets locked.
So that no other member of the family or no other user of the computer
can switch to another persons account
So I type in the ubuntu user's password
and we are now back on the ubuntu users desktop.
As you can see it's pretty quick at switching between one user and another.
Now this system has plenty of memory
to be able to run all the application that each user needs to run,
but obviously if lots of users run lots of applications
then it might not be as quick.
Let's create another account, this one is for my wife Clare.
So we create a username Clare and her real name Clare Pope.
And we'll change the profile to be administrator.
So you can see the difference between alan and clare on this system
I wonder if this tells us anything...?
So I'll set a password for Clare.
and click Ok.
You can create any number of accounts,
I'm sure there is an upper limit, but it's probably very very high.
Probably more users than you have children or family members in your house.
Now you'll notice again under the fast user switcher,
alan and ubuntu user are both still logged in,
but clare is not yet logged in, clare has not been switched to,
so she doesn't have a little tick next to her name.
If I click on clare, again we get taken to the log on screen,
where we can type in clare's password
and then we'll be taken to clare's desktop.
There, that works nicely.
Again this system is not the fastest in the world,
doesn't have lots and lots of memory,
so every time you switch and you have multiple users logged on,
there's lots of extra programs running,
because there's multiple copies of things running
for each of the different users.
So here we go, we've got all three users logged on.
You can see clare's name is grayed out,
because we are currently logged on as clare.
Whereas I could click on alan or the ubuntu user
and switch to either one of those accounts, if I know their password.
Now if we go to System -> Administration, you'll see the menu is slightly longer,
because I created clare as an administrative account,
not a desktop user.
And you'll notice clare has further rights to create other users.
So this might be useful if you have for example,
multiple responsible people in a household.
So maybe two adults in a household could both have rights to create users
and maybe the children or visitors won't have those kind of rights.
Now again when you run these administrative tools
sudo is used to grant you temporary rights.
I think it lasts for about 5 minutes.
You won't get asked for your password again for about 5 minutes,
when you are doing these administrative tasks.
So now clare can administer the users.
Lets make this window a little bit bigger.
And if we highlight a user and click properties,
You can see the difference between these users,
if we go to the user privileges tabs.
You can see these little check boxes,
where we can define what the user is allowed to do.
So here we have settings for
are they allowed use the audio card, the CD-ROM and so on.
Some of the more interesting ones include, right at the top,
access external storage devices automatically, means
what happens when someone plugs in an external hard drive or a memory stick.
You might not want people to be able to do that,
so you could turn that off.
If you connect to the Internet using a modem,
you might want to restrict access to that.
And you can also see there's also a tick mark at the top
next to administer the system.
So the ubuntu user has a tick mark next to administer the system.
And if we look at alan's account, which was set up as a desktop account,
you can see that is the only thing he doesn't have,
which is administer the system.
You can of course tick the box and make changes to users privileges,
after you've created the user account.
And those changes will take effect the next time that user logs in.
or starts a new session or the next time you switch to that account
and they log on again.
You can see here clare has all the boxes ticked,
so she has been set up as an administrative account.
Now there's another tab over here, Advanced.
and in here we define where the user's home directory is.
the default is /home/ and then their username
and pretty much everyone uses that convention,
but in other environments you might want to set that somewhere else.
There's a group as well, the user is a member of a number of groups
and this is the first, initial, main group the user is a member of.
And then there's the User ID, which is a unique number on this system
I'll just show you that each user has their own unique number.
So clare is User ID 1002, alan is User ID 1001
and the first user that is created on an Ubuntu system is User ID 1000.
Now we'll look at that maybe in a little bit more detail in a later screencast.
But it's useful to know that that's the way in which the users are identified internally
inside Linux is by this User ID.
Now there's another setting here for the shell and /bin/bash
means there is a program called bash, in a directory called /bin
and it's what gets executed when you choose
Applications -> Accessories -> Terminal.
Now we're not going to talk about this, because this is a very lengthy subject
and I try to avoid the terminal wherever possible in these screencasts.
But maybe in a later screencast we'll cover this in more detail.
But that setting defines what program gets executed
when you open a terminal under this user account.
And there are multiple different shells you can choose from
and people have different preferences for whichever shell, what they're familiar with.
But generally we leave that as bash on Ubuntu.
So again let's go down to Users and Groups.
and we'll create another account.
This time we'll create an account for our daughter, Sophie.
So we'll put a username in here, called sophie and real name, Sophie Pope
and this time we'll choose a profile which is unprivileged.
Sounds a bit harsh really.
We'll give sophie a password and click Ok.
Now what this will do is create a user that has even less rights than alan has.
So under user privileges, nothing is ticked.
So Sophie can't even use the audio card,
she can't play any music, she can't play any CDs.
So we probably want to modify this if I want to allow Sophie to be able to
listen to music on-line or maybe use a CD-ROM device.
I've got a wired network, so I don't need to worry about the
connect to Internet using a modem.
So I'm not going to tick that one.
I don't necessarily want her to be able to plug-in USB sticks
So I'll leave that one off.
and we'll just turn on use audio devices and use CD-ROM drives.
What that actually does is put Sophie's User ID into a number of groups
and it's those groups that grant her access to do these various things,
like play CDs and listen to audio.
We'll cover groups in a bit more detail in a later screencast.
So now using the Fast User Switcher I can click on Sophies's name
and it takes me to the log on screen where I type in Sophies's password.
And Sophie is now logged in.
And she can again customize her display
and all her favorites and configuration is saved in her home directory.
Separate from everybody else's.
Now you can see everyone's logged in, so everyone has a little tick next to their name
and only two of the users have set a face, an avatar.
And if we go to System -> Administration, you can see again,
Sophie has a short Administration menu.
She can't. for example, use Synaptic Package Manager to install new software.
So if she learned about a new game, for example, that runs under Ubuntu.
She wouldn't be able to use it.
She would be able to use the CD-ROM drive though,
and the audio card, so she can listen to music,
put CDs in and listen to those
and maybe rip those CDs on to the hard disk.
And she can use any of the applications that are installed on the menu.
Notice missing from the bottom is the Add/Remove programs,
so she can't install programs via that method either.
So this is a good way of creating multiple user accounts,
multiple personalities, on a system.
And switching between those account quickly with the Fast User Switcher.
This is useful if you have a common PC that lots of people
in one household or in one office might use.
Each person is able to log out of course and this is a good idea,
because it gives the memory back to the system that you were using,
so other people can use it.
So it makes sense for you to log out.
And when you do log out, it takes you back to one of the other accounts
that was already logged on.
and it takes you to their screensaver.
Remember when you switch from one user account to another,
the user account you switch from gets locked.
And so you need to know the password to get into that account.
Alternatively you can click the Switch User button
and switch to an account that you do know the password for.
So we'll type in the password for the ubuntu user, because we know that
and now we're back to the ubuntu user session that we started with.
You can see now that alan, clare and the ubuntu user are still logged in
and Sophie is now no longer logged in.
It makes sense for people to log out, not just to give the memory back,
but also they may have had programs running
and other users on the system might not know what programs other people have running.
You can find out, but it's just easier if you don't have to go and find out,
when you want to shut the system down.
So if the ubuntu user were to shutdown now,
it would close all the applications that all the other users were running.
Which might not be what the other people who use the computer want to happen.
Now there's one other thing I want to show you, which is the log in window.
The log in window so far we've typed in our username and typed in our password.
Or if you've chosen a name from the Fast User Switcher, you just type in your password.
What we are going to do now is change the log in screen,
so that instead of people typing in their username,
they get to choose their user from a list.
So I went to System -> Administration -> Login Window and we get this program,
which configures the logon screen.
You can see here, this is the default theme that the logon screen has
and there are a number of other themes available.
The one at the bottom, Human list,
says Ubuntu default welcome theme with face browser.
And the face browser is a little window that appears on the logon screen,
allowing you to choose which user you want to logon with,
by clicking with the mouse rather than typing a name.
Now what I'm going to do is just reboot the PC,
So there's no users logged on at all
and we'll get back to the logon screen.
And the logon screen looks slightly different.
Notice here we have the face browser at the top
and we can scroll through the list of users who exist on this system.
And if we click on them, the prompt at the bottom just asks for the password.
If you choose a different user, then enter the password,
then obviously it's going to accept that as the password for
whichever user you've clicked on.
So you obviously need to match the right user with the right password.
There, simple as that.
Now in the environment I've got here, I got one user called ubuntu,
which I don't actually use for anything other than these screencasts.
And we can have separate users for all the other people that use this computer.
That way if we mess up the user accounts that other people use,
we've still got a user account called ubuntu that we can log on with
and we can do some maintenance and recovery
and fix the system in the event of a problem.
One other thing that is quite cute that I'll show you is, if we lock the screen,
all I did there was click the power button in the corner of the screen
and choose lock.
It initiates the screensaver, which I've got set to blank screen
and here it shows me the standard unlock screen.
Where I can switch to another user account
or someone can leave me a message.
So if I've locked my screen and walked away,
another member of the family can come along and leave me a message on the computer.
So here's Sophie typing in, hey dad please install some games for me, love Sophie.
and hits save.
I come back to my screen some time later,
and I go to unlock the computer, I type in my password
and when I hit unlock, I see little pop-up at the bottom of the screen,
with whatever message has been left for me.
That's quite cute, I like that.
So there we go, how to manage some users
and use the Fast User Switching tool in Ubuntu.
Remember I've been showing you Ubuntu 7.10,
which is not out for a little while.
You can see the rest of our screencasts on our website,
screencasts.ubuntu.com