目录
/etc下常用
用户相关:
/etc/passwd
[root@oldboyedu ~]# cat /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
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
operator:x:11:0:operator:/root:/sbin/nologin
games:x:12:100:games:/usr/games:/sbin/nologin
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
nobody:x:99:99:Nobody:/:/sbin/nologin
systemd-network:x:192:192:systemd Network Management:/:/sbin/nologin
dbus:x:81:81:System message bus:/:/sbin/nologin
polkitd:x:999:998:User for polkitd:/:/sbin/nologin
tss:x:59:59:Account used by the trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin
abrt:x:173:173::/etc/abrt:/sbin/nologin
sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
postfix:x:89:89::/var/spool/postfix:/sbin/nologin
chrony:x:998:996::/var/lib/chrony:/sbin/nologin
zy:x:1000:1000:try to add a user:/home/zy:/bin/bash
oldboy:x:1001:1003:busy myself,happy my family:/home/Linux:/bin/bash
oldman:x:6666:1004:I am studying Linux:/home/oldman:/bin/bash
/etc/shadow
[root@oldboyedu ~]# grep -Ev "^#|^$" /etc/shadow
root:$6$heI06zg750GKAkh5$KYFlo8LHLoFVkiDKUXz5baAwdo3lQmleslINB7XpLoNiIKWdSR7QCRDc31G1VRc28M.UwNY.CBPbOaqLgDv7y0::0:99999:7:::
bin:\*:17834:0:99999:7:::
daemon:\*:17834:0:99999:7:::
adm:\*:17834:0:99999:7:::
lp:\*:17834:0:99999:7:::
sync:\*:17834:0:99999:7:::
shutdown:\*:17834:0:99999:7:::
halt:\*:17834:0:99999:7:::
mail:\*:17834:0:99999:7:::
operator:\*:17834:0:99999:7:::
games:\*:17834:0:99999:7:::
ftp:\*:17834:0:99999:7:::
nobody:\*:17834:0:99999:7:::
systemd-network:!!:18101::::::
dbus:!!:18101::::::
polkitd:!!:18101::::::
tss:!!:18101::::::
abrt:!!:18101::::::
sshd:!!:18101::::::
postfix:!!:18101::::::
chrony:!!:18101::::::
zy:!!:18113:0:99999:7:::
oldboy:!!:18113:0:99999:7:::
oldman:!!:18113:0:99999:7:::
/etc/default/useradd
[root@oldboyedu ~]# grep -Ev "^#|^$" /etc/default/useradd GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel
CREATE_MAIL_SPOOL=yes
/etc/login.defs
[root@oldboyedu ~]# grep -Ev "^#|^$" /etc/login.defs
MAIL_DIR /var/spool/mail
PASS_MAX_DAYS 99999
PASS_MIN_DAYS 0
PASS_MIN_LEN 5
PASS_WARN_AGE 7
UID_MIN 1000
UID_MAX 60000
SYS_UID_MIN 201
SYS_UID_MAX 999
GID_MIN 1000
GID_MAX 60000
SYS_GID_MIN 201
SYS_GID_MAX 999
CREATE_HOME yes
UMASK 077
USERGROUPS_ENAB yes
ENCRYPT_METHOD SHA512
/etc/group
[root@oldboyedu ~]# cat /etc/group
>root:x:0:
bin:x:1:
daemon:x:2:
sys:x:3:
adm:x:4:
tty:x:5:
disk:x:6:
lp:x:7:
mem:x:8:
kmem:x:9:
wheel:x:10:
cdrom:x:11:
mail:x:12:postfix
man:x:15:
dialout:x:18:
floppy:x:19:
games:x:20:
tape:x:33:
video:x:39:
ftp:x:50:
lock:x:54:
audio:x:63:
nobody:x:99:
users:x:100:
stapusr:x:156:
stapsys:x:157:
stapdev:x:158:
utmp:x:22:
utempter:x:35:
input:x:999:
systemd-journal:x:190:
systemd-network:x:192:
dbus:x:81:
polkitd:x:998:
ssh_keys:x:997:
tss:x:59:
abrt:x:173:
sshd:x:74:
postdrop:x:90:
postfix:x:89:
chrony:x:996:
try:x:1000:
inclass:x:1001:zy,oldboy
room:x:1002:zy,oldboy
Linux:x:1003:zy
student:x:1004:
type:x:1005:oldman
/etc/gshadow
[root@oldboyedu ~]# cat /etc/gshadow
root:::
bin:::
daemon:::
sys:::
adm:::
tty:::
disk:::
lp:::
mem:::
kmem:::
wheel:::
cdrom:::
mail:::postfix
man:::
dialout:::
floppy:::
games:::
tape:::
video:::
ftp:::
lock:::
audio:::
nobody:::
users:::
stapusr:!::
stapsys:!::
stapdev:!::
utmp:!::
utempter:!::
input:!::
systemd-journal:!::
systemd-network:!::
dbus:!::
polkitd:!::
ssh_keys:!::
tss:!::
abrt:!::
sshd:!::
postdrop:!::
postfix:!::
chrony:!::
try:!::
inclass:!::zy,oldboy
room:!::zy,oldboy
Linux:!::zy
student:!::
type:!::oldman