On Friday 25 July 2003 02:26 pm, Matthew Miller wrote:
On Fri, Jul 25, 2003 at 02:33:30PM -0400, James Olin Oden wrote:
> > One thing I haven't found, is a simple util to add users to
> > supplementary groups.
>
> usermod will do this. The key is that the -g is for their primary
> group (i.e. the one that shows up in the /etc/passwd file, and the
> -G (the big Gee!) edits the supplementary groups for the user.
> So to add user john to the doe group you would type:
> usermod -G doe john
Yeah, but now you've removed him from any other supplementary groups. You'd
have to do something sick like:
usermod -G doe `groups john|cut -d' ' -f 3-` jon
Or instead, "gpasswd -a john doe" does what you want.
Thanks! gpasswd is what I want. Now, all that's missing is the man pages
should be updated to point to it. In particular, 'man group' doesn't mention
this command.