add an exixsting user to an existing group

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.

-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
kaushal [ Fr, 10 Dezember 2004 08:29 ] [ ID #529629 ]

Re: add an exixsting user to an existing group

--Boundary-02=_3LZuBnLLdm+K28y
Content-Type: text/plain;
charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi list,
kaushal wrote:

> I want a command instead of manually =A0editing 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...

=2D-
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

--Boundary-02=_3LZuBnLLdm+K28y
Content-Type: application/pgp-signature
Content-Description: signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQBBuZL2VKZfihvnEcQRArcmAKDCWSSI963URt7MfX3Yp5JJcE+42QCf d6c8
H9IolCVcFA95l1x9lIaBKuU=
=RVq4
-----END PGP SIGNATURE-----

--Boundary-02=_3LZuBnLLdm+K28y--
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Martin Klier [ Fr, 10 Dezember 2004 13:13 ] [ ID #530012 ]

Re: add an exixsting user to an existing group

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 [at] gclements.plus.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Glynn Clements [ Fr, 10 Dezember 2004 16:26 ] [ ID #530014 ]

Re: add an exixsting user to an existing group

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
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Robert N Wood [ Sa, 11 Dezember 2004 10:45 ] [ ID #531448 ]

Re: add an exixsting user to an existing group

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 [at] gclements.plus.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Glynn Clements [ So, 12 Dezember 2004 07:49 ] [ ID #532427 ]
Linux » gmane.linux.admin » add an exixsting user to an existing group

Vorheriges Thema: libpcap
Nächstes Thema: chroot MySQL