1. 程式人生 > >在Linux中如何將使用者從組中移除?

在Linux中如何將使用者從組中移除?

如何將使用者從一個組中移除?

gpasswd -d userName groupName

# id用來檢視使用者屬性
[[email protected] gl]# id root
uid=0(root) gid=0(root) groups=0(root),1000(gl)
[[email protected] gl]# gpasswd -d root gl
Removing user root from group gl
[[email protected] gl]# id root
uid=0(root) gid=0(root) groups=0(root)

歡迎補充指正!