In this section, we'll take a look at the Linux account management
mechanism. I'll start by introducing the /etc/passwd file, which
defines all the users that exist on a Linux system. You can view your own
/etc/passwd file by typing "less /etc/passwd.
Each line in /etc/passwd defines a user account. Here's an
example line from my /etc/passwd file:
drobbins:x:1000:1000:Daniel Robbins:/home/drobbins:/bin/bash
As you can see, there is quite a bit of information on this line. In fact,
each /etc/passwd line consists of multiple fields, each separated
by a :.
The first field defines the username
(drobbins)), and the second field contains an x. On
ancient Linux systems, this field would contain an encrypted password to be
used for authentication, but virtually all Linux systems now store this
password information in another file.
The third field (1000)
defines the numeric user id associated with this particular user, and the
fourth field (1000) associates this user with a particular group;
in a few panels, we'll see where group 1000 is defined.
The fifth
field contains a textual description of this account -- in this case, the
user's name. The sixth field defines this user's home directory, and the
seventh field specifies the user's default shell -- the one that will be
automatically started when this user logs in.