5.3 Password File Entry |
ls
command (for looking up user names). An
example /etc/passwd
file entry follows:
ltaber:IOVa/L/AmhI3U:505:10:Louis Taber:/home/ltaber:/bin/tcsh
I have shortened this entry so it fits on a screen. I will look
at each field in turn. Note that the fields are delimited with ":
",
colons.
ltaber
This is the name that the user uses to login to the system with.
IOVa/L/AmhI3U
UNIX systems do not store the actual password. Only the encrypted password.
If the UNIX platform is running a shadow password system then this field will
be replaced by an asterisk "*". The actual encrypted
password will be stored in a file that can only be read by root. This
is much better for a secure system. Logins can be
disabled by placing an asterisk as the first character in the password file.
The encryption algorithm never generates an asterisk.
505
This is the number that the system uses internally for the user.
It is in the users process tables and in the i-nodes associated with the
user. To convert from this number to the text name the system looks at
the /etc/passwd
file.
10
This is the number that the system uses internally for the user's group.
It is in the users process tables and in the i-nodes associated with the
user. To convert from this number to the text name for the group
the system looks at the /etc/group
file.
Louis Taber
This is the entry that has the "real" name of the user. This
is also the field that I shortened. My real entry looks like this:
Louis Taber,BUS R5A,(520) 884-6039,(520) 327-4133
It is a comma separated into subfields; name, office, office number, home number.
/home/ltaber
This is the directory that the newly logged in users starts at. It
is also the directory that the cd
command will take a user
to when given without arguments.
/bin/tcsh
This optional field is used for the login shell program. It
does not need to point to a shell at all. This is how turn-key
systems are setup to run a specific program for specific users.
Most systems let individuals users change this field with the
the chsh
command (change shell). Both the shell
changed to and the shell changed from need to be in the
/etc/shells
file.
5.3 Password File Entry |