linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Glynn Clements <glynn@gclements.plus.com>
To: Robert Wood <rob@rnwood.co.uk>
Cc: admin <linux-admin@vger.kernel.org>
Subject: Re: add an exixsting user to  an existing group
Date: Sun, 12 Dec 2004 06:49:50 +0000	[thread overview]
Message-ID: <16827.59918.165350.872874@cerise.gclements.plus.com> (raw)
In-Reply-To: <200412110945.18452.rob@rnwood.co.uk>


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@gclements.plus.com>

      reply	other threads:[~2004-12-12  6:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-10  7:29 add an exixsting user to an existing group kaushal
2004-12-10 12:13 ` Martin Klier
2004-12-10 15:26 ` Glynn Clements
2004-12-11  9:45   ` Robert Wood
2004-12-12  6:49     ` Glynn Clements [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16827.59918.165350.872874@cerise.gclements.plus.com \
    --to=glynn@gclements.plus.com \
    --cc=linux-admin@vger.kernel.org \
    --cc=rob@rnwood.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).