Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Groups

Status
Not open for further replies.

Kinl

Programmer
Mar 19, 2001
168
US
I've searched through the past forums and this is probably a newbie question by far, but I cant seem to see how to assign rights/priveledges to groups. How do I make a user a Superuser? I have 3 unix books, but they dont seem to delve into that area. I would basically like to lock certain users out of certain area's and allow them to create other things in other areas, basically permissions. But I would like to do this at a group level.

Can anyone help me out here? I've searched all over.

Thanx

donn
 
Let's do a scenario:

You have a filesystem called /opt/chem and you want users from the "chem" group to read, write and execute files in that directory. Say that currently that filesystem looks like this:
drwxrwxr-x 12 root bin 4096 Apr 30 09:10 .
drwxr-xr-x 20 root root 4096 Apr 30 09:10 ..
-rwxrwxr-x 512 bob staff 188 May 3 12:20 periodic


But, you don't want everyone in the "staff" group to be able to write to bob's files. Create the group "chem" in /etc/group by adding the line "chem:" and add bob to the group by putting his name next to it "chem:bob". If you want anyone else to write to bob's files you add them to the "chem" group and the line looks like "chem:bob,someone". Now you go to /opt/chem and run "chgrp chem bob" and only those in the "chem" group can write to the file.
It now looks like this:
drwxrwxr-x 12 root bin 4096 Apr 30 09:10 .
drwxr-xr-x 20 root root 4096 Apr 30 09:10 ..
-rwxrwxr-x 512 bob chem 188 May 3 12:20 periodic


This will also work for directories, but if the parent directory has permissions set only readable by the owner the other users in the directory can't access the directory. Because they have to be able to "read" the directory to see what files are in it for them. I hope this helps a bit. A good book to get for this type of work is the Unix System Administration Handbook ISBN:0-13-020601-6, but the price is about $68.00US. Another good book is Essential System Administration ISBN: 1-56592-127-5. :) d3funct
vanya43@yahoo.com
The software required `Windows 95 or better', so I installed Linux.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top