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!

only mount certain FS as normal user?

Status
Not open for further replies.

ksas025

Technical User
Jun 3, 2004
92
US
I want to allow normal users to mount some remote filesystems but not be able to mount (or unmount) local filesystems. I understand that if a regular user is in the system group it will have access to un/mount any filesystem in /etc/filesystems that it has write access to. In my opinion this is too much authority.

Is there are way to allow a user to un/mount one or two configured filesystems and deny mount rights to the remainder of the filesystems?

Thanks!

A.
 
One way i can think of for now is to use sudo!

You can write a script (make it owned by the user) and inside that script you can use the mount command called by sudo!

But within the script you can specify the only allowed filesystems to be mounted by that user!?! (even simpler, the filesystems that the user can't mount or unmount)

Regards,
Khalid
 
Thanks for the response khalidaaa.

That is not a bad idea but I think might be one problem. If the script is owned by the regualr user calling it, what prevents that user from modifing the script to allow for any mounts? Do you agree or am I missing something?

Currently I have never used sudo but I hear good things. Is sudo a package I can install? I am running AIX 4.3.3.
 
or make the script owned by root, with execute (not read or write) permissions for any user.
 
ngxGraz, if the user can't read a shell script, they can't execute it.

You could, however make a single script owned by root, chmod it 700, and grant the user sudo privileges to run the script.

Another option, if you already know all possible remote directories, would be to give the user sudo permissions to execute the exact commands to mount them.

- Rod


IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

A Simple Code for Posting on the Web
 
RodKnowlton said:
Another option, if you already know all possible remote directories, would be to give the user sudo permissions to execute the exact commands to mount them.

Yep...this is how I do it.
 
Thanks for all your responses.

It seems that sudo is the way to go here. I only wish AIX had something similar to Linux in which /etc/fstab specifies what filesystems regular users have un/mount permission on.

Anyways, Thanks again!

Alex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top