Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 19/20 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 30th July 2010, 02:46 PM
PryGuy Offline
Registered User
 
Join Date: Feb 2010
Location: Russia
Age: 36
Posts: 45
linuxfedorafirefox
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!
Reply With Quote
  #2  
Old 30th July 2010, 05:51 PM
droidhacker Offline
Registered User
 
Join Date: Oct 2009
Posts: 827
linuxfedorafirefox
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.
Reply With Quote
  #3  
Old 31st July 2010, 06:21 AM
PryGuy Offline
Registered User
 
Join Date: Feb 2010
Location: Russia
Age: 36
Posts: 45
linuxfedorafirefox
Re: AddHow do I add newly created users to supplementary groups automatically?

Quote:
Originally Posted by droidhacker View Post
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!
Reply With Quote
  #4  
Old 31st July 2010, 06:35 AM
ilja Offline
Registered User
 
Join Date: Apr 2004
Location: Euregio
Posts: 3,613
macosfirefox
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.
__________________
--
http://twitter.com/ik12
Reply With Quote
  #5  
Old 31st July 2010, 06:55 AM
PryGuy Offline
Registered User
 
Join Date: Feb 2010
Location: Russia
Age: 36
Posts: 45
linuxfedorafirefox
Re: AddHow do I add newly created users to supplementary groups automatically?

Sorry for the silly question but what file exactly?
Reply With Quote
  #6  
Old 31st July 2010, 07:37 AM
forkbomb Offline
Registered User
 
Join Date: May 2007
Location: U.S.
Posts: 4,851
linuxfirefox
Re: AddHow do I add newly created users to supplementary groups automatically?

Quote:
Originally Posted by ilja View Post
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
Reply With Quote
  #7  
Old 31st July 2010, 07:41 AM
PryGuy Offline
Registered User
 
Join Date: Feb 2010
Location: Russia
Age: 36
Posts: 45
linuxfedorafirefox
Re: AddHow do I add newly created users to supplementary groups automatically?

Quote:
Originally Posted by forkbomb View Post
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!
Reply With Quote
  #8  
Old 31st July 2010, 07:44 AM
ilja Offline
Registered User
 
Join Date: Apr 2004
Location: Euregio
Posts: 3,613
macosfirefox
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:
Quote:
GROUPID
default group ID
http://uw714doc.sco.com/en/SM_basics...t_useradd.html

However I am not sure, whether you can actually add additional groups there!
__________________
--
http://twitter.com/ik12
Reply With Quote
  #9  
Old 31st July 2010, 08:19 AM
PryGuy Offline
Registered User
 
Join Date: Feb 2010
Location: Russia
Age: 36
Posts: 45
linuxfedorafirefox
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 View Post
However I am not sure, whether you can actually add additional groups there!
No you can't!
Reply With Quote
  #10  
Old 31st July 2010, 04:08 PM
reallymeandean Offline
Registered User
 
Join Date: Oct 2007
Posts: 24
linuxepiphany
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....
Reply With Quote
  #11  
Old 31st July 2010, 10:39 PM
vallimar Offline
Registered User
 
Join Date: Jul 2008
Posts: 1,050
linuxchrome
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.
Reply With Quote
Reply

Tags
useradd, wheel

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
symlink /usr/lib/libGL.so.1 get's automatically created rav0r Using Fedora 11 19th June 2010 05:48 PM
Automatically created/deleted mountpoints Hrod Beraht Using Fedora 5 26th October 2007 09:23 PM
newly created user has home folder but its empty FriedChips Using Fedora 2 23rd September 2007 09:50 AM
How can I make newly created files available to everyone in a group ? OralDeckard Using Fedora 10 27th February 2007 05:24 PM


Current GMT-time: 20:14 (Monday, 22-09-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat