Find the answer to your Linux question:
Results 1 to 6 of 6
How can I have my non-root accounts be able to mount and umount /media/cdrecorder ( as well as /media/TRAVELDRIVE)? Currently, I can mount and umount only from root. I want ...
  1. #1
    Just Joined!
    Join Date
    Aug 2007
    Posts
    33

    Cannot mount /media/cdrecorder from non root user accounts...

    How can I have my non-root accounts be able to mount and umount /media/cdrecorder ( as well as /media/TRAVELDRIVE)?

    Currently, I can mount and umount only from root. I want to be able to do this from any user account.

  2. #2
    Linux Newbie reiko's Avatar
    Join Date
    Aug 2007
    Location
    Chennai, India
    Posts
    105
    Edit your sudoers file.......
    Code:
    #visudo
    and under the "# User privilege specification" add an entry
    Code:
    username ALL=(ALL) ALL
    and then when you want to mount/unmount
    Code:
    sudo /bin/mount devicename mountpoint
    Have a happy day!!!!!

  3. #3
    Linux Engineer Freston's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    1,047
    Which distro? User access to CD-ROM is usually enabled. Have you tried mounting it under another directory, such as /mnt/cdrom?

    For mounting your external drive, you need the target directory /media/TRAVELDRIVE to exist. I assume you have created it? Then it must also be put in /etc/fstab that you have permission to mount that drive in that directory. Many times a pre-made directory exists where a user can mount external drives. But if you step away from the defaults you have to add this to fstab.


    What I do is edit /etc/fstab to have something like this:
    Code:
    # CDROM, CDWRITER, DVD
    /dev/cdrom      /mnt/cdrom      iso9660         users,noauto,ro
    /dev/cdwriter   /mnt/cdwriter   iso9660         users,noauto,ro
    /dev/dvd        /mnt/dvd        iso9660         users,noauto,ro
    
    # user added:
    /dev/sda1       /mnt/disk       auto            users,noauto,rw
    Just adjust the first two columns to your needs. You need to be root to do this. The beauty is that you don't need to be root when you mount, but also mounting gets easier. You can now just type <mount $device> or <mount $location> instead of <mount $device $filesystem $location>. Or do this the graphical way if you prefer. KwikDisk for example, if you run KDE.
    Can't tell an OS by it's GUI

  4. #4
    Linux Newbie reiko's Avatar
    Join Date
    Aug 2007
    Location
    Chennai, India
    Posts
    105
    Mr.Freston i followed as u said but now i am encountering access control problem.
    Code:
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    defaults        0       0
    /dev/hda8       /               ext3    defaults,errors=remount-ro 0       1
    /dev/hdd        /media/cdrom0   udf,iso9660 user,noauto     0       0
    /dev/hdc        /media/cdrom1   udf,iso9660 user,noauto     0       0
    /dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0
    #my new entry added for windows partition
    /dev/hda1       /mnt/windows    ntfs    rw,user,noauto          0       0
    and now the error message
    Code:
    ls: /mnt/windows/: Permission denied
    So whats the solution for this now.

  5. #5
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,095
    Quote Originally Posted by sean04 View Post
    How can I have my non-root accounts be able to mount and umount /media/cdrecorder ( as well as /media/TRAVELDRIVE)?

    Currently, I can mount and umount only from root. I want to be able to do this from any user account.
    Check your /etc/group file too, and make sure your users are in the proper group for using/burning with optical devices.
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  6. #6
    Linux Engineer Freston's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    1,047
    Quote Originally Posted by reiko
    So whats the solution for this now.
    Did you mount it by entering this?
    Code:
    mount /dev/hda1 /mnt/windows
    Because that is a common error message. You'd think mount_2.12r would allow for that. But as it turns out, when specify both mountpoint _and_ device you bypass fstab and thus your permissions.

    Luckily, you don't have to type more, but les:
    mount /dev/hda1
    ---or---
    mount /mnt/windows


    It should work
    Can't tell an OS by it's GUI

Posting Permissions

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