Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Changing default group for old and new users
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
tyreth
Apprentice
Apprentice


Joined: 27 May 2002
Posts: 238
Location: Melbourne, Australia

PostPosted: Sat Jul 13, 2002 9:50 am    Post subject: Changing default group for old and new users Reply with quote

Anyone have an idea how I can change the default group that new files for a user are created under? The default for gentoo was all files to be in the group users. I want to set it up like other distro's that have a group that is the same as the users' name.

Or, perhaps, that files are created default with no permissions for the group. I have having everything in my home directory created as world readable by default.

So I guess I'm looking for ways to change:
a) when any user creates a file it uses the group named after the user and not the group users
b) new users automatically have a group named after them created.

Any ideas or alternatives, I'd love to hear thanks.

I did a search for this topic, but couldn't see anything - could be my poor search skills.
Back to top
View user's profile Send private message
ElCondor
Guru
Guru


Joined: 10 Apr 2002
Posts: 520
Location: Vienna, Austria, Europe

PostPosted: Sat Jul 13, 2002 1:23 pm    Post subject: Re: Changing default group for old and new users Reply with quote

tyreth wrote:
Anyone have an idea how I can change the default group that new files for a user are created under? The default for gentoo was all files to be in the group users.

you can do this by using the useradd -g somegroup, where somegroup must already exist. changing the default group for existing users can be done by simply editing /etc/passwd and changing the group-id of the user
tyreth wrote:
I want to set it up like other distro's that have a group that is the same as the users' name.

I don't know any outofthebox-tool for that, but as we use a unix, you can write a 3line wrapper script for that using useradd and groupadd :)
tyreth wrote:
Or, perhaps, that files are created default with no permissions for the group. I have having everything in my home directory created as world readable by default.

man bash - set the desired value in /etc/profile, you will probably like umask 072

have phun!

* ElCondor pasa *
_________________
Here I am the victim of my own choices and I'm just starting!
Back to top
View user's profile Send private message
tyreth
Apprentice
Apprentice


Joined: 27 May 2002
Posts: 238
Location: Melbourne, Australia

PostPosted: Sat Jul 13, 2002 2:42 pm    Post subject: Reply with quote

Woops, I hate it when i ask a question I know the answer to - the passwd file contains default group :)

Thanks for the /etc/profile hint for umask, thought that umask might be the way to go. umask 077 gives me perms I'm happy with.

So yeah, thanks :)
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20589

PostPosted: Fri Nov 01, 2002 5:47 pm    Post subject: Reply with quote

For a script on how to add users with a groupname of the same name, check Red Hat alike useradd shell script.

For general useradd questions, followup to Adding users.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum