Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Setting group permissions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
IvanZD
Apprentice
Apprentice


Joined: 04 Jul 2005
Posts: 166

PostPosted: Sun Feb 05, 2006 5:32 pm    Post subject: Setting group permissions Reply with quote

Hi!

How to setup a group with custom permissions, for example, add group whose members can modify bind's zone files?

Thx
_________________
http://www.meteoadriatic.net/
Back to top
View user's profile Send private message
rdavl
n00b
n00b


Joined: 25 Jan 2006
Posts: 52

PostPosted: Sun Feb 05, 2006 6:27 pm    Post subject: Reply with quote

Papkuuuu

Would it not be the easiest way to add a user who needs to have a permision to a file in the group of that file, and if that group is root make new group and change ownership of the file...
_________________
"Meow" means "woof" in cat.
Back to top
View user's profile Send private message
mars-red
Apprentice
Apprentice


Joined: 15 Sep 2004
Posts: 204
Location: New Hampshire

PostPosted: Sun Feb 05, 2006 6:35 pm    Post subject: Reply with quote

Groups are defined in /etc/group - if you look at your existing /etc/group, you'll see a line for each group that exists on your system. The syntax of each line is Name:Password:ID:user,user,user(etc).
The Password field isn't used - gentoo has "x" in place of that field. You can add the group manually by editing this file, but there's an easier way if you want to add a new group. Use the "groupadd" command. To add a new group named bindzone, you would simply do:
Code:
groupadd bindzone


After doing that, go into your /etc/group file and find the entry for bindzone and you will see a line that says
Code:
 bindzone:x:[some id number]:
(where [some number] is whichever id the groupadd command assigned to the bindzone group)

Simply add the list of users you want to be members of the group to the end of that line, separated by commas. For example, if groupadd had assigned id number 30, and you wanted users "someguy" and "otherguy" to be group members, your bindzone line in /etc/group would look like this:
Code:
bindzone:x:30:someguy,otherguy


With your group and user members sorted out, use the chown and chmod commands to change permissions on the files. Use chown to change owner of the files to the group you set up, and use chmod to change permissions (if necessary).

I hope that helps you out some - if that didn't answer your question then let me know.
_________________
my wrench blog: http://www.digitaldownpour.com/blog
Back to top
View user's profile Send private message
IvanZD
Apprentice
Apprentice


Joined: 04 Jul 2005
Posts: 166

PostPosted: Mon Feb 06, 2006 5:24 pm    Post subject: Reply with quote

Both answers are appreciated, thx :wink:
_________________
http://www.meteoadriatic.net/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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