Allow user to mount removable disk in Red Hat EL 6.4

Posted on 2014-08-14
Last Modified: 2014-08-14
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
Question by:penguins_rule
    LVL 14

    Assisted Solution

    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
    LVL 34

    Accepted Solution

    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
    LVL 14

    Expert Comment

    @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.
    LVL 34

    Expert Comment

    by:Seth Simmons
    right, both methods work
    just a matter of what context does the user want to give access
    LVL 1

    Author Closing Comment

    in my case, patty needed to be able to mount multiple devices, but as mentioned, both solutions work and handle different situations.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
    The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. Once you open the link you will see …
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now