On Sat, Apr 09, 2011 at 08:04:47PM +0000, Stuart Henderson wrote:
> Considering the current behaviour of OpenBSD's usermod(8) I agree
> it's dangerous to change this now. But it's certainly something
> people need to do on occasion (for example some of Samba's features
> need this), and usermod(8) is the natural place to implement it.
> Having the capability there in some form would discourage scary
> things like http://marc.info/?l=openbsd-misc&m=129232689002840
> So I would like to see this in usermod, in some way that doesn't
> change existing behaviour of -G.

I have a diff here which I need to do some clean up on and I still have
to do the diff for the manpage but here's what it is like:

# id test
uid=1001(test) gid=10(users) groups=10(users), 9(wsrc)
# usermod -G dialer,network test
# id test
uid=1001(test) gid=10(users) groups=10(users), 9(wsrc), 69(network), 117(dialer)
# usermod -S dialer,network test
# id test
uid=1001(test) gid=10(users) groups=10(users), 69(network), 117(dialer)

so -G *adds* the user to secondary groups while -S *sets* the users
secondary groups. Right now it's possible to specify -G and -S which of
course doesn't make any sense so I have to get rid of that and the
manpage needs to be adjusted. I think I have a good looking diff ready
by tomorrow.

Frank.

-- 
Frank Brodbeck <f...@guug.de>

Reply via email to