Find the answer to your Linux question:
Results 1 to 6 of 6
hi ! i want to be able to mount drives as user. i wrote a little script Code: #/bin/bash mount /dev/hdc /mnt/cdrom1 mount /dev/hdd /mnt/cdrom2 i set the s-bit to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie robak's Avatar
    Join Date
    Jan 2004
    Posts
    136

    mounting drives as user


    hi !


    i want to be able to mount drives as user.
    i wrote a little script

    Code:
    #/bin/bash
    mount /dev/hdc /mnt/cdrom1
    mount /dev/hdd /mnt/cdrom2
    i set the s-bit to this script but when i run it as user i get the message that only root can mount drives.

    any ideas ?

    thx in advance
    greez robak
    make install not love

    Registered Linux user number 369245

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035

    Re: mounting drives as user

    Quote Originally Posted by robak
    hi !


    i want to be able to mount drives as user.
    i wrote a little script

    Code:
    #/bin/bash
    mount /dev/hdc /mnt/cdrom1
    mount /dev/hdd /mnt/cdrom2
    i set the s-bit to this script but when i run it as user i get the message that only root can mount drives.

    any ideas ?

    thx in advance
    greez robak
    why not add a line to your fstab:
    Code:
    /dev/hdc /mnt/cdrom1 auto users 0 0
    /dev/hdd /mnt/cdrom2 auto users 0 0
    which allows for them to be mounted by an average joe

  3. #3
    Linux Newbie robak's Avatar
    Join Date
    Jan 2004
    Posts
    136
    because both are hd

    there is an error in my postet script

    Code:
    #/bin/bash
    mount /dev/hdc1 /mnt/hdc
    mount /dev/hdd1 /mnt/hdd
    i use these hd only some times and i put them into sleep on boot with
    hdparm
    make install not love

    Registered Linux user number 369245

  4. #4
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    hmmm.
    well do this at your own risk but:
    Code:
    chmod u+s /bin/mount
    that should allow everyone to play with mount.

  5. #5
    Linux Newbie robak's Avatar
    Join Date
    Jan 2004
    Posts
    136
    hmm

    i think if there is no other way i stay on doing mount with root
    but thank for your posts
    make install not love

    Registered Linux user number 369245

  6. #6
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    no problem. sorry i couldn't be of much help...

Posting Permissions

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