Users and Groups

The concepts of users and groups are extremely important, because they have a direct influence on all other ideas this chapter will introduce.

Linux is a true multiuser system, and in order to use your GNU/Linux machine, you must have an account on the machine. When you created a user during installation, you actually created a user account. In case you do not remember, you were prompted for the following items:

The two most important parameters here are the login name (commonly abbreviated to login) and password. You must have these in order to access the system.

When you create a user, a default group is also created . Later on, we will see that groups are useful when you want to share files with other people. A group may contain as many users as you wish, and it is very common to see such a separation in large systems. For example, in a university, you could have one group per department, another group for teachers, and so on. The opposite is also true: a user can be a member of one or more groups, to a maximum of thirty-two. A math teacher, for example, can be a member of the teachers' group and also of his math students' group.

Now that we have covered the background information, let's look at how to actually log in.

If you chose to have X automatically start on boot up, your start-up screen will look similar to Figure 1.1.

Figure 1.1. Graphical Mode Login Session

Graphical Mode Login Session

In order to log in, you must first select your account from the list. A new dialog will be displayed, prompting you for your password . Note that you will have to type in your password blindly, because the characters will be echoed on screen as stars * instead of the characters you type in the password field. You can also choose your session type (window manager). Once you are ready, press the Login button.

If you are in console or “text mode, your screen will look similar to Figure 1.2.

Figure 1.2. Console Mode Login Session

Console Mode Login Session

To log in, enter your login name at the Login: prompt and press Enter. Next, the login program (login) will display a Password: prompt and wait for you to enter your password. Like the graphic mode login, the console login will not echo the characters you are typing on the screen.

Note that you can log in several times with the same account on additional consoles and under X. Each session you open is independent from the others, and it is even possible to have several X sessions open concurrently. By default, Mandrake Linux has six virtual consoles in addition to the one reserved for the graphical interface. You can switch to any of them by pressing the Ctrl-Alt-F<n> key sequence, where <n> is the number of the console that you want to switch to. By default, the graphical interface is on console number 7. Hence to switch to the second console, you would simultaneously press the Ctrl, Alt and F2 keys.

During installation, DrakX also prompted you for the password of a very special user: root . root is the system administrator which will most likely be yourself. For your system's security, it is very important that the root account always be protected with by good password!

If you regularly log in as root, it is very easy to make a mistake which can render your system unusable –– one single mistake can do it. In particular, if you have not set a password for the root account, then any user can alter any part of your system (even other operating systems on your machine!). Obviously this is not a good idea.

It is worth mentioning that internally, the system does not identify you with your login name. Instead, it uses a unique number assigned to the name: the User ID (UID for short) . Similarly every group is identified by its Group ID (GID) and not by its name.