You are not logged in.

#1 2004-08-08 03:55:01

longhornxtreme
Member
Registered: 2004-07-10
Posts: 131

Mounting CDROM as normal user about to pull hair out....

Hi everyone....

I'm about up to my wits end trying to allow my normal user to mount and unmount my cdrom drives...

Here's my /etc/fstab

# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
none                   /proc         proc      defaults            0      0
none                   /dev/pts      devpts    defaults            0      0
none                   /dev/shm      tmpfs     defaults            0      0
tmpfs                  /tmp          tmpfs     defaults            0      0
sysfs                  /sys          sysfs     defaults            0      0
usbdevfs               /proc/bus/usb usbdevfs  defaults            0      0

/dev/cdroms/cdrom0     /mnt/cd1  iso9660  ro,user,noauto,unhide    0      0
/dev/cdroms/cdrom1     /mnt/cd2  iso9660  ro,user,noauto,unhide    0      0
/dev/cdroms/cdrom0     /mnt/dvd  udf       ro,user,noauto,unhide   0      0
/dev/floppy/0          /mnt/fl   vfat      users,noauto,unhide     0      0

/dev/discs/disc0/part2 swap swap defaults 0 0
/dev/discs/disc0/part3 / reiserfs defaults 0 0
/dev/discs/disc0/part1 /boot ext3 defaults 0 1

I also added a new group called "mount" and added both root and my normal user to it.

I then did

chgrp mount /bin/*mount    to change mount and umount to the mount group

then i did a

chmod 774 /bin/*mount

I also made sure that the 3 mount directorys in fstab existed and gave them 777 permissions...

Did a complete reboot...  and the normal user still can't use mount... I get this error...
mount: must be superuser to use mount

I'm at my wits end.  I believe fstab is correct.  I believe my permissions are set correctly...  Is there anything else I need to do?

Thanks in advance for any replies...

James

Offline

#2 2004-08-08 04:27:47

aCoder
Member
From: Medina, OH
Registered: 2004-03-07
Posts: 359
Website

Re: Mounting CDROM as normal user about to pull hair out....

Personally, instead of using the 'user' option in fstab, which implies noexec and something else, possibly causing problems, I like to include a group name, like users or mount as an option.  You should also make sure the permissions are correct on your mount points.  If you're not on a large-scale network or anything like that, you can probably get away with running mount and umount suid root without any real security issues, and this could make things simpler for you.


If you develop an ear for sounds that are musical it is like developing an ego. You begin to refuse sounds that are not musical and that way cut yourself off from a good deal of experience.
  - John Cage

Offline

#3 2004-08-08 04:42:09

longhornxtreme
Member
Registered: 2004-07-10
Posts: 131

Re: Mounting CDROM as normal user about to pull hair out....

I have set all the permissions on the mount point to 777... thats about as lenient as I can make them. 

I don't have any experience using suid, I"ll go read about it...


The whole goal is to be able to use KDE's CD device desktop functionality as well as not having to type su in a console if i want to use a CLI command. 

How would I add a group to my fstab entry?   I'm coming up with a miss on the search function...

Offline

#4 2004-08-08 09:08:11

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: Mounting CDROM as normal user about to pull hair out....

You shouldn't have changed the permissions on the mount binary.

chmod u+s /bin/*mount

Then it will work.


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#5 2004-08-08 10:27:21

longhornxtreme
Member
Registered: 2004-07-10
Posts: 131

Re: Mounting CDROM as normal user about to pull hair out....

THANK YOU SOOO MUCH! Solved everything!!!!!!!!!


If it isn't too newbish... I'm having trouble finding out what the +s parameter did with chmod..

man chmod doesn't say what s does.... so I'm kind of at a loss of understanding...

Can you tell me what the +s param means?  Or show me where to RTFM?

Thanks in advance for any replies!
James

Offline

#6 2004-08-08 18:09:30

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,751

Re: Mounting CDROM as normal user about to pull hair out....


Mr Green

Offline

#7 2004-08-08 20:46:59

neotuli
Lazy Developer
From: San Francisco, CA
Registered: 2004-07-06
Posts: 1,201
Website

Re: Mounting CDROM as normal user about to pull hair out....

longhornxtreme wrote:

man chmod doesn't say what s does.... so I'm kind of at a loss of understanding...

The man page says exactly what it does...read more carefully

the chmod manpage wrote:

The letters `rwxXstugo' select the new  permissions  for  the  affected
       users:  read  (r),  write (w), execute (or access for directories) (x),
       execute only if the file is a directory or already has execute  permis-
       sion  for  some user (X), set user or group ID on execution (s), sticky
       (t), the permissions granted to the user who owns  the  file  (u),  the
       permissions  granted to other users who are members of the file's group
       (g), and the permissions granted to users that are in  neither  of  the
       two preceding categories (o).


The suggestion box only accepts patches.

Offline

Board footer

Powered by FluxBB