Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 841
  • Last Modified:

Allow user to mount removable disk in Red Hat EL 6.4

Running Red Hat Enterprise Linux RHEL 6.4
How do i allow user patty to mount and unmount a RD1000 disk?

# /sbin/mount /dev/sdb /mnt/rd1000

when patty tries, get the error:
mount: only root can do that
0
penguins_rule
Asked:
penguins_rule
  • 2
  • 2
2 Solutions
 
ThomasMcA2Commented:
fstab needs a user entry to allow users to mount the device, like this:

/dev/sdb      /mnt/rd1000             ext4 discard,user,noatime,nodiratime,errors=remount-ro 0 1
0
 
Seth SimmonsSr. Systems AdministratorCommented:
as root, run visudo and go near the bottom to the line where you see it start with root ALL=(ALL)...

add a line under it like this:

patty ALL=/bin/mount

or to do without prompting for her password:

patty ALL= NOPASSWD: /bin/mount

then she just runs sudo /bin/mount /dev/sdb /mnt/rd1000 or for any device to be mounted
0
 
ThomasMcA2Commented:
@Seth's answer is an alternative to mine, but his answer gives the user mount authority to any/all devices. My answer only gives authority for /dev/sdb.
0
 
Seth SimmonsSr. Systems AdministratorCommented:
right, both methods work
just a matter of what context does the user want to give access
0
 
penguins_ruleAuthor Commented:
in my case, patty needed to be able to mount multiple devices, but as mentioned, both solutions work and handle different situations.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now