add an exixsting user to an existing group

add an exixsting user to an existing group

am 10.12.2004 08:29:47 von kaushal

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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: add an exixsting user to an existing group

am 10.12.2004 13:13:38 von Martin Klier

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

Hi list,=20
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-=20
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: add an exixsting user to an existing group

am 10.12.2004 16:26:21 von Glynn Clements

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
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: add an exixsting user to an existing group

am 11.12.2004 10:45:18 von Robert N Wood

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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: add an exixsting user to an existing group

am 12.12.2004 07:49:50 von Glynn Clements

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
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html