View previous topic :: View next topic |
Author |
Message |
tyreth Apprentice

Joined: 27 May 2002 Posts: 238 Location: Melbourne, Australia
|
Posted: Sat Jul 13, 2002 9:50 am Post subject: Changing default group for old and new users |
|
|
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 |
|
 |
ElCondor Guru


Joined: 10 Apr 2002 Posts: 520 Location: Vienna, Austria, Europe
|
Posted: Sat Jul 13, 2002 1:23 pm Post subject: Re: Changing default group for old and new users |
|
|
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 |
|
 |
tyreth Apprentice

Joined: 27 May 2002 Posts: 238 Location: Melbourne, Australia
|
Posted: Sat Jul 13, 2002 2:42 pm Post subject: |
|
|
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 |
|
 |
pjp Administrator


Joined: 16 Apr 2002 Posts: 20589
|
Posted: Fri Nov 01, 2002 5:47 pm Post subject: |
|
|
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 |
|
 |
|