Operating System - HP-UX
1846764 Members
5959 Online
110256 Solutions
New Discussion

mount/umount for normal users

 
SOLVED
Go to solution
igi
New Member

mount/umount for normal users

We are using a HP 40T Optical Disk Library with 32 Slot and 2 drives. Up to HP-UX 9.x it was possible to have virtual mounts, means to mount all slots simultaenously.
With HP-UX 10.20 this is not longer possible.
HP says in its DOCUMENT GDA9509115001: "The customer con choose to give users the ability to mount and unmount surfaces as needed. On HP-UX this requires a root login or a setuid-to-root script to access mount/umount commands".
But when setting the setuid-bit for users, the mount command still replys: Must be root to use mount. Does anybody know a solution?
Thank you!
3 REPLIES 3
Andreas Voss
Honored Contributor
Solution

Re: mount/umount for normal users

Hi,

you have to use a different mount:
Look in /sbin/fs
there are several subdirectories for different filesystems.
In these subdirs there are mount and umount commands.
Depending on the filesystem on your optical disks make a chown and chmod e. g.:
chown root:root /sbin/fs/hfs/mount
chmod gu+s /sbin/fs/hfs/mount
Now any user can mount with:
/sbin/fs/hfs/mount

Regards

Andrew
Rumen Ginev
Frequent Advisor

Re: mount/umount for normal users

Be carefull with this. Thus everyone can mount/umount each filesystem.
Intead of this I use 'sudo'. You can find it from a HP software porting center for free.
With sudo you can specify the commands to be used and arguments to it in order to prevent users to make mistakes (some time fatal).
For example you can limit with sudo users to mount/umount only filesystems on the optical library.
Tom Wittenberg_1
Valued Contributor

Re: mount/umount for normal users

Hi,

There is a better way to give a mount command to a user using restricted SAM.

Here is how to do a mount of a cd and should
be able to modify it for all applications of mount/umount. It also works with any root level command that can be limited to a command line like mount.

Perform the following steps to add your custom application and then
giving the privilege to a user to run the application:

1. SAM --> Routine Tasks --> Actions -->
Add Customize Application --> Label: user_mount -->

Command: mount -F cdfs -o cdcase /dev/dsk/c1t0d0 /cdrom

2. Go into restricted sam: sam -r

3. Actions --> Disable All Routine Tasks -->
Select Custom user_mount --> Actions --> Enable

Optional step: Actions --> Templates --> Save -->
Template Name: User_Mount

4. Actions --> Save Privileges --> select your users




Saving Buyers and Sellers money