Linux System Administration
User Management
/etc/passwd
The /etc/passwd file maps login names to user IDs.
It has seven fields:
username, encrypted password or an x or a * or blank, User ID, Group ID, User's real name, User's home directory, User's shell.
[root@localhost UserManagement]# more /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
.
.
.
xfs:x:43:43:X Font Server:/etc/X11/fs:/sbin/nologin
named:x:25:25:Named:/var/named:/sbin/nologin
ntp:x:38:38::/etc/ntp:/sbin/nologin
gdm:x:42:42::/var/gdm:/sbin/nologin
mlevan:x:500:500:Mike LeVan:/home/mlevan:/bin/bash
If the second field is an 'x' then the password is encrypted in /etc/shadow.
If the second file is a '*', then the user can not login.
If the second field is blank, then there is no password on the account.
No comment or blank lines are allowed in this file.
Any user can view this file.
Prev
Page 2
Next