Re: usermod

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 07:55 AM 3/30/2005, Caner Baydemir wrote:
I know you can use "usermod" on RedHat Linux to add a user to another group by typing:
usermod -G sam,frank steve
This would effectively add steve to the "frank" and "sam" group. How do you remove them from those groups without editing the /etc/group file manually? I can do:
usermod -G steve steve
That will remove him from "sam" and "frank" groups but would add steve to his own group so the /etc/group file would look like:
steve:x:590:steve
instead of just:
steve:x:590:
For the life of me, I can't figure this one out. Does anybody know?

try the gpasswd command. Example:

adding user:
gpasswd -a sam steve

deleting user:
gpasswd -d sam steve

simple isn't it? it's writing both /etc/group and /etc/gpasswd file

Thanks. I will look into this.

Steve

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux