linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* add an exixsting user to  an existing group
@ 2004-12-10  7:29 kaushal
  2004-12-10 12:13 ` Martin Klier
  2004-12-10 15:26 ` Glynn Clements
  0 siblings, 2 replies; 5+ messages in thread
From: kaushal @ 2004-12-10  7:29 UTC (permalink / raw)
  To: admin

hi all,
	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.

thanks in advance.
bye.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: add an exixsting user to  an existing group
  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
  1 sibling, 0 replies; 5+ messages in thread
From: Martin Klier @ 2004-12-10 12:13 UTC (permalink / raw)
  To: admin

[-- Attachment #1: Type: text/plain, Size: 493 bytes --]

Hi list, 
kaushal wrote:

> I want a command instead of manually  editing the /etc/group
> file.

"usermod -G xgroupy xusery" for supplementary group(s) or
"usermaod -g 4711 xusery" for a new primary group.

Have a lot of fun...

-- 
Mit freundlichen Grüßen

Martin Klier
PC-Benutzerunterstützung / Linux-Server
Asset Management

A.T.U - Auto-Teile-Unger
Dr.-Kilian-Straße 11
92637 Weiden

Telefon:  (0961) 306-5663
Telefax:  (0961) 306-9345663

Internet: www.atu.de

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: add an exixsting user to  an existing group
  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
  1 sibling, 1 reply; 5+ messages in thread
From: Glynn Clements @ 2004-12-10 15:26 UTC (permalink / raw)
  To: kaushal; +Cc: admin


kaushal 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.

-- 
Glynn Clements <glynn@gclements.plus.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: add an exixsting user to  an existing group
  2004-12-10 15:26 ` Glynn Clements
@ 2004-12-11  9:45   ` Robert Wood
  2004-12-12  6:49     ` Glynn Clements
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Wood @ 2004-12-11  9:45 UTC (permalink / raw)
  To: Glynn Clements; +Cc: admin

On Friday 10 Dec 2004 15:26, you wrote:
> kaushal 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.

Rob

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: add an exixsting user to  an existing group
  2004-12-11  9:45   ` Robert Wood
@ 2004-12-12  6:49     ` Glynn Clements
  0 siblings, 0 replies; 5+ messages in thread
From: Glynn Clements @ 2004-12-12  6:49 UTC (permalink / raw)
  To: Robert Wood; +Cc: admin


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>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-12-12  6:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).