Find the answer to your Linux question:
Results 1 to 5 of 5
Hi all, I want to allow a specific user to manually mount a specific filesystem on RHEL6 I know I could do this using sudo, but I would like to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2013
    Posts
    3

    How to allow a non-root user to mount a specific filesystem?


    Hi all,
    I want to allow a specific user to manually mount a specific filesystem on RHEL6
    I know I could do this using sudo, but I would like to explore any other possible way.
    May I use zsh shell to invoke root script with setuid bit?
    Could you please provide me any example?
    Thanks
    Andrea

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,440
    Hi and welcome

    this can be done with a configoption in /etc/fstab
    Have a look at the user, users and owner options of
    Code:
    man mount
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    Mar 2013
    Posts
    3
    Quote Originally Posted by Irithori View Post
    Hi and welcome

    this can be done with a configoption in /etc/fstab
    Have a look at the user, users and owner options of
    Code:
    man mount
    Hi,
    I know that the options "noauto,user" would allow any user to mount and umount the filesystem, and "noauto,users" would allow any user in the "users" group to (u)mount the filesystem.
    How can I restrict a single user to (u)mount a particular device (in my case the decive is /dev/mapper/vg02-lvbck )?
    thanks
    Andrea

  4. $spacer_open
    $spacer_close
  5. #4
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,440
    With the owner option and chown-ing the device.
    You must always face the curtain with a bow.

  6. #5
    Just Joined!
    Join Date
    Mar 2013
    Posts
    3
    Thnks Irithori

    so the full plan is:
    - change the udev rules to change tho ownership of /dev/vg02/lvbck from root:disk to myuser:mygroup
    - change the /etc/fstab line to
    /dev/mapper/vg02.lvbck /backup noauto,owner 0 0

    Thanks
    Andrea

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •