一、group - user group file
group是个文本文件,它包含了一个系统的用户组。
每行一条记录,并且每行有这样的格式:
group_name:password:GID:user_list
字段描述如下:
group_name the name of the group. 组名
password the (encrypted) group password. If this field is empty, no password is needed. 组密码
GID the numeric group ID. 组ID,系统使用该ID号来识别该组
user_list a list of the usernames that are members of this group, separated by commas. 组内成员名字列表
二、passwd - 密码文件(摘自ubuntu12.04 man 5 passwd)
account:password:UID:GID:GECOS:directory:shell (帐号:密码:用户ID:组ID:一般的信息:目录:shell)
三、shadow - 隐蔽的密码文件
shadow is a file which contains the password information for the system's accounts and optional aging information.每行一条记录,每条记录包括9个字段,每个字段之间以":"隔开,格式如下:
login name:encrypted password:date of last password change:minimum password age:maximum password age:password warning period:password inactivity period:account expiration date:reserved field
字段描述如下:
password warning period
The number of days before a password is going to expire (see the maximum password age above) during which the user should be warned.系统会在密码需要更改前'password warning period'天,提示用户更改密码。
An empty field and value 0 mean that there are no password warning period.
password inactivity period
四、fstab - 文件系统信息文件
The file fstab contains descriptive information about the various file systems. fstab is only read by programs, and not written; it is the duty of the system administrator to properly create and maintain this file.
Each filesystem is described on a separate line; fields on each line are separated by tabs or spaces. Lines starting with '#' are comments, blank lines are ignored. The order of records in fstab is important because
fsck(8), mount(8), and umount(8) sequentially iterate through fstab doing their thing, though at boot time mountall(8) may process the file out-of-order when it believes it is safe to do so.
每行一条记录,每一行的格式如下:
fs_spec fs_file s_vfstype fs_mntopt fs_freq fs_passno
The first field (fs_spec).
This field describes the block special device or remote filesystem to be mounted. 挂载设备的描述
The second field (fs_file).
This field describes the mount point for the filesystem. For swap partitions, this field should be
specified as `none'. If the name of the mount point contains spaces these can be escaped as `\040'. 挂载点(挂载点的完整路径)
The third field (fs_vfstype).
This field describes the type of the filesystem. Linux supports lots of filesystem types, such as
adfs, affs, autofs, coda, coherent, cramfs, devpts, efs, ext2, ext3, hfs, hpfs, iso9660, jfs, minix,
msdos, ncpfs, nfs, ntfs, proc, qnx4, reiserfs, romfs, smbfs, sysv, tmpfs, udf, ufs, umsdos, vfat,
xenix, xfs, and possibly others. For more details, see mount(8). 文件系统类型
The fourth field (fs_mntops).
This field describes the mount options associated with the filesystem. 挂载选项,一般填defaults
It is formatted as a comma separated list of options. It contains at least the type of mount plus any
additional options appropriate to the filesystem type. For documentation on the available mount
options, see mount(8). For documentation on the available swap options, see swapon(8).
Basic file system independent options are:
defaults
use default options: rw, suid, dev, exec, auto, nouser, and async.
noauto do not mount when "mount -a" is given (e.g., at boot time)
user allow a user to mount
owner allow device owner to mount
comment
for use by fstab-maintaining programs
nofail do not report errors for this device if it does not exist.
The fifth field (fs_freq).
This field is used for these filesystems by the dump(8) command to determine which filesystems need to
be dumped. If the fifth field is not present, a value of zero is returned and dump will assume that
the filesystem does not need to be dumped. 该文件系统是否需要备份,允许的值为0/1,0表示不需要备份,1表示需要备份。
The sixth field (fs_passno).
This field is used by the fsck(8) program to determine the order in which filesystem checks are done at
reboot time. The root filesystem should be specified with a fs_passno of 1, and other filesystems
should have a fs_passno of 2. Filesystems within a drive will be checked sequentially, but filesystems
on different drives will be checked at the same time to utilize parallelism available in the hardware.
If the sixth field is not present or zero, a value of zero is returned and fsck will assume that the
filesystem does not need to be checked. 该文件系统是否需要被检查,允许的值为0/1/2,0表示不需要检查,根文件系统如果需要检查则是1,其他文件系统如果需要被检查则是2。