You are not logged in.
Pages: 1
Hi,
my first post here is about users, their groups and default permissions.
I created a user thomas according to the beginners guide.
# useradd -m -G users,audio,lp,optical,storage,video,wheel,power -s /bin/bash thomas
Now, the new user also belongs to the group thomas(gid=1000) - is this ok? Every file or folder I create is owned by thomas. I always thought that these new files automatically belong to the group users by default, but the group is also thomas. Is this the default behaviour and I was wrong all the time?
Thanks!
Offline
The default behavior is setup up so any new file you make belongs to the same user in both users and group. However you can set up your user to have the files automatically belong to the users group if you have files you want to share with other users in the same system.
Offline
I believe that is the default behaviour.
Offline
useradd --help
-g, --gid GROUP name or ID of the primary group of the new account
-N, --no-user-group do not create a group with the same name as the user
You may set these options.
useradd -m -g users -G audio,lp,optical,storage,video,wheel,power -N -s /bin/bash thomas
Offline
Thanks for the swift replies.
I assume this doesn't work if the user already exists?
Last edited by thms (2010-02-01 13:37:12)
Offline
Pages: 1