|
|
/etc/passwd is a local source of information about users' accounts. The password file can be used in conjunction with other password sources, including the NIS maps passwd.byname and passwd.bygid and the NIS+ table passwd. Programs use the getpwnam.3c routines to access this information.
Each passwd entry is a single line of the form:
username:password:uid:gid:gcos-field:home-dir:login-shell
where
The password file is an ASCII file. Because the encrypted passwords are always kept in the shadow file, /etc/passwd has general read permission on all systems, and can be used by routines that map between numerical user IDs and user names.
Previous releases used a password entry beginning with a `+'
(plus sign) or `-' (minus sign) to selectively incorporate
entries from
NIS
maps for password. If still required, this is supported by specifying
``passwd : compat'' in
nsswitch.conf.4
The ``compat'' source may not be supported in future releases.
The preferred sources are, ``files'' followed by ``nisplus''.
This has the effect of incorporating the entire contents of the
NIS+
passwd
table after the password file.
root:q.mJzTnu8icF.:0:10:God:/:/bin/csh fred:6k/7KCFRPNVXg:508:10:% Fredericks:/usr2/fred:/bin/csh
and the sample password entry from nsswitch.conf:
In this example, there are specific entries for users root and fred to assure that they can login even when the system is running single-user. In addition, anyone in the NIS+ table passwd will be able to login with their usual password, shell and home directory.
If the password file is:
root:q.mJzTnu8icF.:0:10:God:/:/bin/csh fred:6k/7KCFRPNVXg:508:10:% Fredericks:/usr2/fred:/bin/csh +
and the password entry from nsswitch.conf:
all the entries listed in the NIS passwd.byuid and passwd.byname maps will be effectively incorporated after the entries for root and fred.
|
|
Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97