在Linux中如何将用户从组中移除?

如何将用户从一个组中移除?

gpasswd -d userName groupName

# id用来查看用户属性
[root@gl gl]# id root
uid=0(root) gid=0(root) groups=0(root),1000(gl)
[root@gl gl]# gpasswd -d root gl
Removing user root from group gl
[root@gl gl]# id root
uid=0(root) gid=0(root) groups=0(root)

参考:
https://unix.stackexchange.com/questions/29570/how-do-i-remove-a-user-from-a-group


欢迎补充指正!

猜你喜欢

转载自blog.csdn.net/butterfly5211314/article/details/81592259
今日推荐