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

Re: command to add user to supplementary group



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.

-- 
Matthew Miller           mattdm mattdm org        <http://www.mattdm.org/>
Boston University Linux      ------>                <http://linux.bu.edu/>




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