LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-11-2004, 02:47 PM   #1
dokterneo
LQ Newbie
 
Registered: Jun 2003
Posts: 15

Rep: Reputation: 0
Must be superuser to use mount... fstab is correct, however.


Ok,

Before you say read the man for mount, I already did, the whole thing. For non-root/superusers to use mount, either user or users needs to be in the correct place in /etc/fstab. Mine is:

/dev/hda3 swap swap defaults 0 0
/dev/hda4 / reiserfs defaults 1 1
/dev/scd0 /mnt/cdrom iso9660 ro,users,noauto,unhide
/dev/sd0 /mnt/floppy auto rw,users,noauto 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
/dev/hda1 /mnt/hd/c ntfs auto,ro,umask=0
/dev/hda2 /mnt/hd/d ntfs auto,ro,umask=0
/dev/sda1 /mnt/memkey vfat rw,users,noauto

The bolded line is exactly per what the man pages say what to do about fstab, yet I still receive the error:

dokter@yoyo:/bin$ ls -la mount
-rwxr-sr-x 1 root bin 68868 Aug 25 19:06 mount

dokter@yoyo:/bin$ ls -la /sbin/mount
lrwxrwxrwx 1 root root 10 Dec 13 04:30 /sbin/mount -> /bin/mount

dokter@yoyo:/bin$ mount /mnt/cdrom
mount: must be superuser to use mount

I do not get the error message: only root can use mount.


device permissions are:

dokter@yoyo:/dev$ ls -la scd0
brwxrwxrwx 1 root disk 11, 0 Jul 18 1994 scd0

dokter@yoyo:/dev$ ls -la cdrom
lrwxrwxrwx 1 mperreca root 9 Dec 18 16:35 cdrom -> /dev/scd0


I know this is not an fstab issue, but I still don't know what it is. I have granted myself full rx permissions to the devices as well as the mount binary.

Would someone point me in to the right direction?
 
Old 02-11-2004, 02:50 PM   #2
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
Is there a 'cdrom' directory under your 'mount' directory? If not, create it and try again.

Also, the 'users' option in fstab is to allow any user to unmount something that may have been mounted by another user. Not sure if that's what you want... 'user' might be more appropriate (but either will get the job done).

Last edited by wapcaplet; 02-11-2004 at 02:51 PM.
 
Old 02-11-2004, 02:55 PM   #3
dokterneo
LQ Newbie
 
Registered: Jun 2003
Posts: 15

Original Poster
Rep: Reputation: 0
Unhappy sure do

Yes, I do have a directory called /mnt/cdrom with 777 rights.

Here are the permissions:

dokter@yoyo:~$ cd /mnt
dokter@yoyo:/mnt$ ls -la
total 5
drwxr-xr-x 8 root root 200 Feb 2 18:08 .
drwxr-xr-x 17 root root 840 Feb 3 08:03 ..
drwxr-xr-x 3 root root 72 Jan 8 10:27 bc
drwxrwxrwx 2 root root 48 Mar 16 2002 cdrom
drwxr-xr-x 2 root root 48 Mar 16 2002 floppy
drwxr-xr-x 4 root root 96 Dec 14 09:30 hd
drwxr-xr-x 6 root root 144 Feb 2 13:15 hsbrtserv01
drwxrwxrwx 2 root root 48 Feb 4 12:51 memkey

Any ideas?
 
Old 02-11-2004, 03:14 PM   #4
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
Problem is possibly here:
Quote:
dokter@yoyo:/bin$ ls -la mount
-rwxr-sr-x 1 root bin 68868 Aug 25 19:06 mount
That's set +s on the group "bin" not the user "root". It should be:
Code:
-rwsr-xr-x    1 root     bin         68868 Aug 25 19:06 /bin/mount
 
Old 02-11-2004, 03:14 PM   #5
nesware
Member
 
Registered: Jan 2004
Location: belgium
Distribution: Slackware
Posts: 117

Rep: Reputation: 15
add 0 0 to the end of the line in fstab like all the others have (keep the 1 1 at the hda4 though!)

like
Code:
/dev/hda3 swap swap defaults 0 0
/dev/hda4 / reiserfs defaults 1 1
/dev/scd0 /mnt/cdrom iso9660 ro,users,noauto,unhide  0 0
/dev/sd0 /mnt/floppy auto rw,users,noauto 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
/dev/hda1 /mnt/hd/c ntfs auto,ro,umask=0  0 0
/dev/hda2 /mnt/hd/d ntfs auto,ro,umask=0  0 0
/dev/sda1 /mnt/memkey vfat rw,users,noauto  0 0
if it works slowly change all the drwxrwxrwx back to sane settings like:
Code:
-rwsr-xr-x    1 root     bin         68868 Aug 26 02:06 /bin/mount
lrwxrwxrwx    1 root     root            3 Dec 30 18:54 /dev/cdrom -> hdc
brw-------    1 nes      disk      22,   0 Jun  9  2002 /dev/hdc
lrwxrwxrwx    1 root     root           10 Dec 16 23:17 /sbin/mount -> /bin/mount
drwxr-xr-x    2 root     root           48 Mar 16  2002 cdrom
these settings should work, cos there work for me as a user.. i can even use a cd ripper and dvd software
 
Old 02-11-2004, 03:17 PM   #6
nesware
Member
 
Registered: Jan 2004
Location: belgium
Distribution: Slackware
Posts: 117

Rep: Reputation: 15
ah.. now i see why my cd ripper works... i've chaged the user to my self.. hehehe.. well ignore that part.... THAT IS NOT A SANE SETTING... its a lazy one... still i think the rest will work..
 
Old 02-11-2004, 03:17 PM   #7
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
Yeah, just tried it here the way you have it and that is the problem.

Do this as root:

chmod g-s /bin/mount
chmod u+s /bin/mount

Last edited by DaHammer; 02-11-2004 at 03:20 PM.
 
Old 02-11-2004, 03:37 PM   #8
dokterneo
LQ Newbie
 
Registered: Jun 2003
Posts: 15

Original Poster
Rep: Reputation: 0
Talking SWEET ASSCHEEKS!

It worked! Man. What is funny is that I had to do the same thing to umount. Is this something that slackware started doing in ver9.1? I've never had this problem before with the earlier releases.

weird...

But thanks again.
 
Old 02-11-2004, 04:01 PM   #9
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
Hmm, no not to my knowledge, on both my installs of 9.1, mount & umount were setup by default to set +s on the user, at least I don't recall ever changing them. You sure someone else hasn't been fiddling with it? hehe...Anyway, glad you got it going.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 06:15 AM
Superuser for Mount? Jskill007 Slackware 5 08-29-2004 10:53 PM
Why a FSTAB entry will mount using -a switch but will not mount automatically at boot mjen Linux - Newbie 3 05-19-2004 07:45 AM
What is the correct method to change mount point? davidas Linux - Newbie 4 04-19-2004 03:54 PM
Alright, I have correct output for ' cdrecord -scanbus ', but can't mount drive lostboy Linux - General 9 05-09-2003 11:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration