CentOS can’t remove user from group

groupusers

Asked and answered many times, but I can't get it working!!!

(On CentOS) I have the user userA and I want to remove it from group sftponly.

#groups userA
userA : sftponly
#id -Gn userA
sftponly
#gpasswd -d userA sftponly
Removing user userA from group sftponly
gpasswd: unknown member userA

#tail /etc/group
userA:x:509:
sftponly:x:510:
#tail /etc/passwd
userA:x:509:510::/home/userA:/bin/bash/

so gpasswd not working. Also:

usermod -G fourpoints fourpoints 

No result.

I don't know really what to do, I'm not sure about editing /etc/group either…

Best Answer

Ran into the same issue. Was able to do the following to resolve this:

gpasswd -d user group

Related Question