[ILUG] adding users to groups

Lisa Muir 34.24.34 at gmail.com
Fri Feb 29 09:27:47 GMT 2008


On Fri, Feb 29, 2008 at 8:04 AM, Paul Mullen <mullen.paul at gmail.com> wrote:
> On Fri 29 Feb 2008, Brian Foster wrote:
> >   | Date: Fri, 29 Feb 2008 06:10:54 +0000
> >   | From: "Lisa Muir" <34.24.34 at gmail.com>
> >   |[ ... ]
> >   | I can hand edit /etc/group to add [a new user to an existing group].
> >   | but I'd like to do it through groupadd or useradd.  [ ... ]
> >
> >  `useradd -G ...'  or  groupmod(8) ?

Looked at both of these before posting, groupmod lets you change group
names and group id's and not add users to groups, and the useradd -G
would change apache from one group to another without leaving them in
the existing group unless all existing groups were specified... or
that could be just my bad interpretation of the man file.

> gpasswd -a <username> <group>
>
> gpasswd(1)

Perfect.... exactly what I was looking for, thanks Paul,

Lisa.



More information about the ILUG mailing list