We know that modify the shadow files directly using vi isn't a good idea, and so vigr, vipw and visudo were developed to better perform this action. How can I remove a admin from a group? Is it possible to do this without editing gshadow directly?
[root@server230 ~]# gpasswd -A user1 -g linuxadm [root@server230 ~]# !grep grep linuxadm /etc/gshadow /etc/group /etc/gshadow:linuxadm:!:user1: /etc/group:linuxadm:x:6000: [root@server230 ~]# gpasswd -d user1 -g linuxadm Removing user user1 from group linuxadm gpasswd: user 'user1' is not a member of 'linuxadm'