如何查看用户属组

来源:互联网 发布:最红的网络女主播排名 编辑:程序博客网 时间:2024/04/28 05:25
如题我建立了一个用户small并将其加入到sky组中[root@localhost sdb3]# useradd -g sky small如何查看此用户所在的用户组是否为sky呢?
[root@localhost sdb3]# cat /etc/group
root:x:0:root
bin:x:1:bin,daemon
…………………………
grp1:x:502:
grp2:x:503:
sky:x:504:
[root@localhost sdb3]# ls /home
small   test
[root@localhost sdb3]# cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
……………………………………
small:x:503:504::/home/small:/bin/bash
test:x:504:504::/home/test:/bin/bash
0 0
原创粉丝点击