⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 passwd.5

📁 操作系统设计与实现源码
💻 5
字号:
.TH PASSWD 5.SH NAMEpasswd, group, shadow \- user and group databases, shadow passwords.SH SYNOPSIS.B /etc/passwd.br.B /etc/group.br.B /etc/shadow.SH DESCRIPTION.B /etc/passwdlists all the users of the system, and.B /etc/grouplists all the groups the users may belong to.  Both files also containencrypted passwords, numeric ID's etc.  Encrypted passwords may be hiddenin the file.B /etc/shadowif extra protection is warranted..PPEach file is an text file containing one line per user or group.  The datafields on a line are separated by colons.  Each line in the password filehas the following form:.PP.RS.I name:passwd:uid:gid:gecos:dir:shell.RE.PPThe.I namefield is the login name of a user, it is up to 8 letters or numbers longstarting with a letter.  The login name must be unique.The.I passwordfield is either empty (no password), a 13 character encrypted password asreturned by.BR crypt (3),or a login name preceded by two number signs (#) to index the shadowpassword file.  Anything else (usually \(**) is invalid.The.I uidand.I gidfields are two numbers indicating the users user-id and group-id.  Theseid's do not have to be unique, there may be more than one name with the sameid's.The.I gecosfield can be set by the user.  It is expected to be a comma separated listof personal data where the first item is the full name of the user.The.I dirfieldis the path name of the users home directory.Lastly the.I shellfield is the path name of the users login shell, it may be empty to indicate.BR /bin/sh .A Minix specific extension allows the shell field to contain extra spaceseparated arguments for the shell..PPLines in the group file consist of four fields:.PP.RS.I name:passwd:gid:mem.RE.PPThe.I namefield is the name of the group, same restrictions as a login name.The.I passwdfield may be used to let users change groups.The.I gidfield is a number telling the group-id.  The group-id is unique for a group.The.I memfield is a comma separated list of login names that are special members ofthe group.  If a system supports supplementary group id's then a user's setof supplementary group id's is set to all the groups they are a member of.If a system allows one to change groups then one can change to a group oneis a member of without using the group's password..PPThe shadow password file has precisely the same form as the password file,except that only the.I nameor.I passwdfields are used as yet.  The other fields are zero or empty.  A password inthe password file may have the form.BI "##" userto indicate the entry.I userin the shadow password file.  The password in this entry is then used forauthentication of the user.  The shadow file can only be read by theprivileged utility.BR pwdauth (8),so that the encrypted passwords in the shadow file are kept secret, and thussafe from a dictionary attack..SS "Special password and group file entries"There are several entries in the password and group files that arepreallocated for current or future use.  All id's less than 10 are reserved.The special password file entries are:.PP.RS.nfroot:##root:0:0:Big Brother:/usr/src:daemon:*:1:1:The Deuce:/etc:bin:##root:2:0:Binaries:/usr/src:uucp:*:5:5:UNIX to UNIX copy:/usr/spool/uucp:/usr/sbin/uuciconews:*:6:6:Usenet news:/usr/spool/news:ftp:*:7:7:Anonymous FTP:/usr/ftp:nobody:*:9999:99::/tmp:ast:*:8:3:Andrew S. Tanenbaum:/usr/ast:.fi.RE.PPThe.B rootid is of course the super user.The.B daemonid is used by some daemons.  Some devices are protected so that only thosedaemons can access them.The.B binid owns all sources and most binaries.The.BR uucp ,.BR newsand.BR ftpid's are for serial line data transfer, usenet news, or ftp if so needed.The.B nobodyid is used in those cases that a program may not have any privileges at all.The.B astid is the honorary home directory for Andrew S. Tanenbaum, the creator ofMinix.  You can also find the initial contents for a new home directorythere..PPThe special group file entries are:.PP.RS.nfoperator:*:0:daemon:*:1:bin:*:2:other:*:3:tty:*:4:uucp:*:5:news:*:6:ftp:*:7:kmem:*:8:nogroup:*:99:.fi.RE.PPGroups with the same name as special user id are used with those id's.The.B operatorgroup is for the administrators of the system.  Users in this group aregranted special privileges.The.B othergroup is for ordinary users.The.B ttygroup is for terminal devices, and associated set-gid commands.Same thing with the.B kmemgroup and memory devices..SH FILES.TP 15n.B /etc/passwdThe user database..TP.B /etc/groupThe group database..TP.B /etc/shadowThe shadow password file..SH "SEE ALSO".BR login (1),.BR passwd (1),.BR su (1),.BR crypt (3),.BR getpwent (3),.BR getgrent (3),.BR pwdauth (8)..SH NOTESThe.B nobodyand.B nogroupid's are likely to be renumbered to the highest possible id's once it isfigured out what they are..SH AUTHORKees J. Bot (kjb@cs.vu.nl)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -