 |
 |
 |
 |
| Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc. |

30th July 2010, 02:46 PM
|
 |
Registered User
|
|
Join Date: Feb 2010
Location: Russia
Age: 35
Posts: 45

|
|
|
AddHow do I add newly created users to supplementary groups automatically?
Good day!
Not sure this question is in the right section, but anyway... The question is, as far as I know Ubuntu distro adds a user created with useradd to supplementary groups automatically. For instance, I want to enable sudo for all newly created users on my LiveCD and want them to be added to the group 'wheel' on creation.
I'm sure it is possible to do it in Fedora, but how?
Thanks in advance!
|

30th July 2010, 05:51 PM
|
|
Registered User
|
|
Join Date: Oct 2009
Posts: 824

|
|
|
Re: AddHow do I add newly created users to supplementary groups automatically?
I believe that what you are looking for *MAY* be the file /etc/login.defs
It has a manpage entry... "man login.defs".
As for sudo.... add the group to the sudoers file and you'll be all set.
This seems like some dangerous stuff though... you want to make sure that you don't give absolute sudo privileges to everyone, otherwise your users will be able to do some crazy stuff like "sudo su" and take over your whole system.
|

31st July 2010, 06:21 AM
|
 |
Registered User
|
|
Join Date: Feb 2010
Location: Russia
Age: 35
Posts: 45

|
|
|
Re: AddHow do I add newly created users to supplementary groups automatically?
Quote:
Originally Posted by droidhacker
As for sudo.... add the group to the sudoers file and you'll be all set.
|
Well, I know that, but the thing is I'm talking of the automatic addition.
Thanks for the answer!
|

31st July 2010, 06:35 AM
|
|
Registered User
|
|
Join Date: Apr 2004
Location: Euregio
Posts: 3,613

|
|
|
Re: AddHow do I add newly created users to supplementary groups automatically?
I would have a look at the directory /etc/skel
You can change the default initial group there.
|

31st July 2010, 06:55 AM
|
 |
Registered User
|
|
Join Date: Feb 2010
Location: Russia
Age: 35
Posts: 45

|
|
|
Re: AddHow do I add newly created users to supplementary groups automatically?
Sorry for the silly question but what file exactly?
|

31st July 2010, 07:37 AM
|
 |
Registered User
|
|
Join Date: May 2007
Location: U.S.
Posts: 4,852

|
|
|
Re: AddHow do I add newly created users to supplementary groups automatically?
Quote:
Originally Posted by ilja
I would have a look at the directory /etc/skel
You can change the default initial group there.
|

Huh?
Quote:
|
The /etc/skel directory contains files and directories that are automatically copied over to a new user's home directory when such user is created by the useradd program.
|
http://www.linfo.org/etc_skel.html
Sure, you could have certain files automatically copied to new users' home directories that start with certain perms and ownership, but that has nothing to do with the users' actual group membership as governed by /etc/group.
__________________
- Tom
"What is freedom? To have the will to be responsible for one's self." - Stirner
|

31st July 2010, 07:41 AM
|
 |
Registered User
|
|
Join Date: Feb 2010
Location: Russia
Age: 35
Posts: 45

|
|
|
Re: AddHow do I add newly created users to supplementary groups automatically?
Quote:
Originally Posted by forkbomb
Sure, you could have certain files automatically copied to new users' home directories that start with certain perms and ownership, but that has nothing to do with the users' actual group membership as governed by /etc/group.
|
Exactly!
|

31st July 2010, 07:44 AM
|
|
Registered User
|
|
Join Date: Apr 2004
Location: Euregio
Posts: 3,613

|
|
|
Re: AddHow do I add newly created users to supplementary groups automatically?
Sorry, my bad: I had at first written /etc/default/useradd and then deleted it. At least there you have the initial group:
http://uw714doc.sco.com/en/SM_basics...t_useradd.html
However I am not sure, whether you can actually add additional groups there!
|

31st July 2010, 08:19 AM
|
 |
Registered User
|
|
Join Date: Feb 2010
Location: Russia
Age: 35
Posts: 45

|
|
|
Re: AddHow do I add newly created users to supplementary groups automatically?
Yes, I know, thank you! But I'm talking of the supplementary groups.
Quote:
Originally Posted by ilja
However I am not sure, whether you can actually add additional groups there!
|
No you can't!
|

31st July 2010, 04:08 PM
|
|
Registered User
|
|
Join Date: Oct 2007
Posts: 24

|
|
|
Re: AddHow do I add newly created users to supplementary groups automatically?
On debian based systems you use adduser to add new users and the config file is /etc/adduser.conf and it allows you to define all sorts of thingys for new user creation.
I also would like to know how this is handled on fedora.
__________________
GNU/Linux development is truly a team effort, everyone else does all the work while ubuntu gets all the credit....
|

31st July 2010, 10:39 PM
|
|
Registered User
|
|
Join Date: Jul 2008
Posts: 809

|
|
|
Re: AddHow do I add newly created users to supplementary groups automatically?
Fedora doesn't have built-in support for this. The "adduser" command is just a symlink to the redhat "useradd".
You can add supplemental groups using the -G option, so either remember to specify that or you'll have to make
a wrapper script to handle the automatic parts you want. You could also try to patch the useradd command with
the extra functionality from the debian side or search around to see if someone has already done that.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 21:41 (Friday, 24-05-2013)
|
|
 |
 |
 |
 |
|
|