LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-13-2004, 01:19 PM   #1
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
User mount ??


Is there a way to allow a normal user to mount and unmount a cd rom or a nfs share?? Im asking this from a slacware10 point of view . Main reason for this question is i can never mount a nfs share as root in something other then read only ??
 
Old 11-13-2004, 01:48 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
You will need to put the "user" option for that mount in /etc/fstab
 
Old 11-13-2004, 02:04 PM   #3
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Original Poster
Rep: Reputation: 87
mount

Ok testing what you said right now with the cd rom on the system.


Adding user to the fstab for the cd rom


this is what the entry looks like
------------------------------------------

/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro,user 0 0 \



saved the /etc/fstab and rebooted for good mesure.


upon reboot

user@compname# mount /dev/cdrom
mount: must be superuser to use mount


any ideas now ??
 
Old 11-13-2004, 02:28 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
You will need to make mount suid root:
chmod o+s /bin/mount
 
Old 11-13-2004, 03:00 PM   #5
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Original Poster
Rep: Reputation: 87
OK



here are the commands
--------------------------------------------------------

user@compname# su

root@compname# chmod o+s /bin/mount

root@compname# exit

user@compname# mount /dev/cdrom
mount: must be superuser to use mount

----------------------------------------------------------------

Damnit damnit damnit damnit damnit why the hell does slackware not allow a user to *#(#ing use mount?
 
Old 11-13-2004, 03:04 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Sorry - it's my mistake, drop the "o" from the chmod command and use "u":
chmod u+s /bin/mount

You should get this from an "ls -l":
-rwsr-xr-x 1 root bin 68868 Aug 26 2003 /bin/mount*

Last edited by david_ross; 11-13-2004 at 03:06 PM.
 
Old 11-13-2004, 03:12 PM   #7
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Original Poster
Rep: Reputation: 87
AHHH HA


that worked. thanks

But on another note why is this not the default permission for the mount program. And as obious as this would seam A: because normally a system admin wouldent want users to be able to mount. my answer would be 2 things


1. theres an option you can remove or add to fstab "user"

2. You need to mount nfs exports as a user because root is auto blocked.



Again i rehash my other question

Why in gods name does slackware not make mount with this option. Why put somone though the tramma of figuring out the permission?
 
Old 11-13-2004, 03:50 PM   #8
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Well I'm on slack 9.1 and that is the default. Perhaps Pat just made a mistake or decided to change it for some reason in 10.
 
Old 11-13-2004, 09:40 PM   #9
JCdude2525
Member
 
Registered: Mar 2004
Location: Berlinsville
Distribution: Slackware/Fedora
Posts: 103

Rep: Reputation: 15
well, if you take the owner option out of /etc/fstab, then you would have saved
some time, but of course there is probably some kind of backgire to that.
 
  


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
How to give not-root user ability to mount devices to any mount point??? jdupre Linux - General 8 02-04-2012 11:03 AM
user cannot mount? emanresu Linux - Newbie 4 12-08-2005 08:00 AM
User Mount LinuxNoob1234 Linux - Newbie 2 05-18-2005 11:58 PM
user cant mount after chmod 777 /bin/mount misterwiddle Linux - General 2 04-06-2005 06:36 PM
how to use 'mount' as user servnov Linux - Newbie 6 11-02-2004 03:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:19 PM.

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