View previous topic :: View next topic |
Author |
Message |
IvanZD Apprentice
Joined: 04 Jul 2005 Posts: 166
|
Posted: Sun Feb 05, 2006 5:32 pm Post subject: Setting group permissions |
|
|
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 |
|
|
rdavl n00b
Joined: 25 Jan 2006 Posts: 52
|
Posted: Sun Feb 05, 2006 6:27 pm Post subject: |
|
|
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 |
|
|
mars-red Apprentice
Joined: 15 Sep 2004 Posts: 204 Location: New Hampshire
|
Posted: Sun Feb 05, 2006 6:35 pm Post subject: |
|
|
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:
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 |
|
|
IvanZD Apprentice
Joined: 04 Jul 2005 Posts: 166
|
|
Back to top |
|
|
|
|
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
|
|