On 10/28/06, Leonardo Rodrigues <[EMAIL PROTECTED]> wrote:
> Just edit the group itself, see /etc/group. Also take a look at
> usermod(8) again.
>
> -Nick
>
>

First, thanks for the help everyone =)

Actually, it wouldn't be practical to manually edit /etc/group. An
"userdel"-like command is needed in the smb.conf of the samba server
in order to graphically and easily manage users on the server by using
a Windows NT server tool.

Also, er, call me dumb, but after rereading usermod(8), I really see
no way to explicitly remove an user from a group... =(  By using -G or
-g, it seems to be only able to add groups to an user, and not remove
users from a given group...


You are absolutely correct. I'm not too sure on it myself.
As a hack, could you write a short script to edit it and call that?
My other idea was something along the lines of dumping the list of all
secondary groups the user is currently in and then running usermod
-G[list of groups minus the one to remove]

This is actually pretty tricky. There should be a way to do this. That
means we are probably all just missing it.

-Nick

Reply via email to