1. Users and Groups

Since they have a direct influence on all other concepts, this section will introduce the concepts of users and groups which are extremely important.

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 an account. In case you don't remember, you were prompted for the following items:

The two most important parameters here are the login name (commonly abbreviated to login) and the password. You must have both of 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, at a university, you could have one group per department, another group for teachers, and so on. The opposite is also true: a user may be a member of one or more groups. A math teacher, for example, could be a member of the teachers' group and also of his math students' group.

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

If the graphical interface (X) is automatically started on boot up, your start-up screen will look like Figure 1.1, “Graphical Mode Login Session”.

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 may also choose your session type (window manager). Once you're ready, press the Login button.

If you are in console or “text” mode, you will be presented with something similar to the following:

Mandrakelinux Release 10.2 (CodeName) for i586
Kernel 2.6.10-1mdk on an i686 / tty1
[machine_name] login:

To log in, type 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, but there will be no stars echoed.

Note that you can log in several times with the same account on additional consoles and under X. Each session you open is independent of the others, and it is even possible to open several X sessions at the same time (although this is not recommended since it consumes a lot of resources). By default, Mandrakelinux 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. Therefore, to switch to the second console, you would press the Ctrl, Alt and F2 keys.

During the installation, DrakX also prompted you for the password of a very special user: root. This is the system administrator who will most likely be yourself. For your system's security, it is very important for the root account to be always protected by a good and hard-to-guess password!

If you regularly log in as root, it can be very easy to make a mistake which could render your system unusable: one single mistake can do it. In particular, if you did not set a password for the root account, then any user can alter any part of your system (and 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 by your login name. Instead, it uses a unique number assigned to the name: the User ID (UID) . Similarly every group is identified by its Group ID (GID) and not by its name.