PAUSE
PAGETURNER
ENCORE5
ENCORE
ENCORE3
BOX
ILLUSTRATION
GO
Let us look at the typical /etc/passwd file printed above:
root:sfshnNwQSjnpE:0:0::/:/bin/sh
cron:X:1:2::/:
admin::2:0::/:/bin/adminsh
bin:X:3:3::/:
uucp::4:4::/usr/spool/uucp:/usr/lib/uucp/uucico
network:X:7:7::/usr/spool/micnet:
yori:nRfPQoxTi52WI:101:100::/usr/yori:/bin/sh
michael:WCSLzdMC9uvsE:102:100::/usr/miked:/bin/sh
guest::150:200::/usr/demo:/bin/rsh
The login names are in the first field, that is,
preceding the first :.
root:sfshnNwQSjnpE:0:0::/:/bin/sh
cron:X:1:2::/:
admin::2:0::/:/bin/adminsh
bin:X:3:3::/:
uucp::4:4::/usr/spool/uucp:/usr/lib/uucp/uucico
network:X:7:7::/usr/spool/micnet:
yori:nRfPQoxTi52WI:101:100::/usr/yori:/bin/sh
michael:WCSLzdMC9uvsE:102:100::/usr/miked:/bin/sh
guest::150:200::/usr/demo:/bin/rsh
The passwords are in the second field (in a scrambled
or encrypted form:
root:sfshnNwQSjnpE:0:0::/:/bin/sh
cron:X:1:2::/:
admin:nRfNwQjn34SW:2:0::/:/bin/adminsh
bin:sfWCLz954iX:3:3::/:
uucp::4:4::/usr/spool/uucp:/usr/lib/uucp/uucico
network:X:7:7::/usr/spool/micnet:
yori:nRfPQoxTi52WI:101:100::/usr/yori:/bin/sh
michael:WCSLzdMC9uvsE:102:100::/usr/miked:/bin/sh
guest::150:200::/usr/demo:/bin/rsh
Note that the users uucp, network and
guest have no passwords!
The 3rd field in the file is the user ID field. The
users with lower user IDs have higher privileges. All user
IDs must be distinct!
root:sfshnNwQSjnpE:0:0::/:/bin/sh
cron:X:1:2::/:
admin:nRfNwQjn34SW:2:0::/:/bin/adminsh
bin:sfWCLz954iX:3:3::/:
uucp::4:4::/usr/spool/uucp:/usr/lib/uucp/uucico
network:X:7:7::/usr/spool/micnet:
yori:nRfPQoxTi52WI:101:100::/usr/yori:/bin/sh
michael:WCSLzdMC9uvsE:102:100::/usr/miked:/bin/sh
guest::150:200::/usr/demo:/bin/rsh
The 4th field is the group ID field. More
than one user may belong to one group!
root:sfshnNwQSjnpE:0:0::/:/bin/sh
cron:X:1:2::/:
admin:nRfNwQjn34SW:2:0::/:/bin/adminsh
bin:sfWCLz954iX:3:3::/:
uucp::4:4::/usr/spool/uucp:/usr/lib/uucp/uucico
network:X:7:7::/usr/spool/micnet:
yori:nRfPQoxTi52WI:101:100::/usr/yori:/bin/sh
michael:WCSLzdMC9uvsE:102:100::/usr/miked:/bin/sh
guest::150:200::/usr/demo:/bin/rsh
Note that users yori and michael
belong to the same group!
The 5th field may contain any data
and is usually filled with pertinent
information about the user.
root:sfshnNwQSjnpE:0:0::/:/bin/sh
cron:X:1:2::/:
admin:nRfNwQjn34SW:2:0::/:/bin/adminsh
bin:sfWCLz954iX:3:3::/:
uucp::4:4::/usr/spool/uucp:/usr/lib/uucp/uucico
network:X:7:7::/usr/spool/micnet:
yori:nRfPQoxTi52WI:101:100::/usr/yori:/bin/sh
michael:WCSLzdMC9uvsE:102:100: M. Deutsch:/usr/miked:/bin/sh
guest::150:200::/usr/demo:/bin/rsh
Note that in many instances no information
is contained in the information field!
The 6th field is the login or home directory field.
root:sfshnNwQSjnpE:0:0::/:/bin/sh
cron:X:1:2::/:
admin:nRfNwQjn34SW:2:0::/:/bin/adminsh
bin:sfWCLz954iX:3:3::/:/bin/sh
uucp::4:4::/usr/spool/uucp:/usr/lib/uucp/uucico
network:X:7:7::/usr/spool/micnet:
yori:nRfPQoxTi52WI:101:100::/usr/yori:/bin/sh
michael:WCSLzdMC9uvsE:102:100:M. Deutsch:/usr/miked:/bin/sh
guest::150:200::/usr/demo:/bin/rsh
The last field is the login shell,
the shell to use when the user first logs on.
root:sfshnNwQSjnpE:0:0::/:/bin/sh
cron:X:1:2::/:
admin:nRfNwQjn34SW:2:0::/:/bin/adminsh
bin:sfWCLz954iX:3:3::/:/bin/csh
uucp::4:4::/usr/spool/uucp:/usr/lib/uucp/uucico
network:X:7:7::/usr/spool/micnet:
yori:nRfPQoxTi52WI:101:100::/usr/yori:/bin/sh
michael:WCSLzdMC9uvsE:102:100:M. Deutsch:/usr/miked:/bin/csh
guest::150:200::/usr/demo:/bin/rsh
Note that for most users the login shell is either
sh or csh. On the other hand, the
login shell for the guest is /bin/rsh and
for uucp is /usr/lib/uucp/uucico.