Default user groups

Aaron Konstam akonstam at sbcglobal.net
Sun Feb 6 14:16:58 UTC 2011


On Sun, 2011-02-06 at 11:46 +1100, Chris Smart wrote:
> On Sun, Feb 6, 2011 at 11:35 AM, Aaron Konstam <akonstam at sbcglobal.net> wrote:
> > When you use the user add gui it puts that user into a group with his
> > username as the group name. Then you can use chgrp to put that user into
> > any group you want to.
> 
> Sure, but I'm after a way to specify what groups a user should be
> added to by default, when a new user is created (in the same way that
> by default, a new user is added to their own group).
> 
> For example, /etc/default/useradd specifies what GROUP, SHELL, HOME,
> etc a new user should have, but it doesn't seem to have any option for
> what secondary GROUPS the user should have.
> 
> It would be great to be able to change the default behaviour, so that
> users are added to specific groups by default, without the need to
> manually apply this post useradd. This way all default Fedora scripts
> and tools which use the useradd command should just work..
> theoretically ;-)
> 
> There's also /etc/login.defs, but I can't see any option for
> specifying default groups there either..
> 
> -c

How about a shell script that envokes adduser and then one or more chgrp
commands.
-- 
=======================================================================
You are sick, twisted and perverted. I like that in a person.
=======================================================================
Aaron Konstam telephone: (210) 656-0355 e-mail: akonstam at sbcglobal.net



More information about the users mailing list