Re: add an exixsting user to an existing group

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

 



Robert Wood wrote:

> > >  Is there a command to add an existing user to an existing group?This
> > > will be a supplementary group for the user.He still has his main group
> > > unchanged.I want a command instead of manually  editing the /etc/group
> > > file.
> >
> > You can set the list of supplementary groups using usermod, e.g.:
> >
> >  usermod -G group1,group2 user
> >
> > AFAIK, there isn't a standard command to add or remove specific groups
> > while leaving the rest unchanged.
> 
> How about gpasswd?
> gpasswd (1)          - administer the /etc/group file
> 
> "gpasswd -a user group" adds user to a supp group, "-d" removes.

OK, that seems about right.

For some reason, if you pick any one of the manual pages from the
shadow package, and follow enough of the "SEE ALSO" cross-references,
you'll eventually come across all of the other manual pages. Except
the one for gpasswd, which isn't referenced from any of them.

-- 
Glynn Clements <glynn@xxxxxxxxxxxxxxxxxx>
-
: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Newbie]     [Audio]     [Hams]     [Kernel Newbies]     [Util Linux NG]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Device Drivers]     [Samba]     [Video 4 Linux]     [Git]     [Fedora Users]

  Powered by Linux