LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 08-12-2006, 04:15 PM   #1
Mercurius
Member
 
Registered: Jul 2005
Distribution: Slackware 11, Solaris 10
Posts: 143

Rep: Reputation: 15
Mount problem


How do I give acces to a user to commands such as mount and shutdown, poweroff etc.?
 
Old 08-12-2006, 06:41 PM   #2
xode
Member
 
Registered: Aug 2003
Distribution: Mandrake 9.0; FC4; FC8; SUSE 10.3; SUSE 12.1; SUSE 13.2
Posts: 638
Blog Entries: 1

Rep: Reputation: 52
For the mount command, you can add entries to /etc/fstab to allow regular users to mount and unmount specific devices by specifying only the directory that the device is assigned to in /etc/fstab. For details on how you add entries to /etc/fstab, do "info fstab" at any terminal prompt.
 
Old 08-12-2006, 06:56 PM   #3
Mercurius
Member
 
Registered: Jul 2005
Distribution: Slackware 11, Solaris 10
Posts: 143

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by xode
For the mount command, you can add entries to /etc/fstab to allow regular users to mount and unmount specific devices by specifying only the directory that the device is assigned to in /etc/fstab. For details on how you add entries to /etc/fstab, do "info fstab" at any terminal prompt.
Cam you be a little more specific please? Here is my fstab file.

Code:
/dev/hda3        swap             swap        defaults         0   0
/dev/hda2        /                ext3        defaults         1   1
/dev/hda1        /dos/c           ntfs        ro               1   0
/dev/hdb1        /dos/d           vfat        defaults         1   0
/dev/cdrom       /mnt/cdrom       auto        noauto,owner,user,ro  0   0
/dev/hdd         /mnt/dvdrom      auto        noauto,owner,user,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
 
Old 08-12-2006, 07:00 PM   #4
AAnarchYY
Member
 
Registered: Sep 2004
Location: Carlisle, MA
Distribution: Debian 8
Posts: 419

Rep: Reputation: 30
you will need to edit your /etc/sudoers file. the format is:

user machine=full/path/to/command1,/full/path/to/command2

then as the user just type sudo /full/path/to/command1, it will ask for the users pass, and upon correct password, will execute the command.

Last edited by AAnarchYY; 08-12-2006 at 07:03 PM.
 
Old 08-13-2006, 01:21 AM   #5
xode
Member
 
Registered: Aug 2003
Distribution: Mandrake 9.0; FC4; FC8; SUSE 10.3; SUSE 12.1; SUSE 13.2
Posts: 638
Blog Entries: 1

Rep: Reputation: 52
In your /etc/fstab file, I see the user option present for the lines for /dev/cdrom and /dev/hdd (your dvdrom I presume). It would therefore follow that a regular user can mount and unmount the cdrom and dvdrom drives. Do you have a problem doing this on your system? If you don't, simply add the user option to the corresponding place in those other lines that belong to devices that you want a regular user to be able to mount and unmount. In general, you don't want a regular user to be able to mount or unmount any non-removable devices.
 
  


Reply



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
Mount problem - device already mounted or mount point busy zahoo Linux - General 7 08-28-2009 05:02 PM
NFS mount of smb mount of windows share: permission denied problem :( Bagatur Linux - Networking 4 07-07-2009 11:34 AM
DVD (auto)mount problem, gnome-mount, hal, Fedora C 5 lazarion Linux - Hardware 5 01-10-2007 04:45 AM
mount:not a directory. Suse dvd mount problem tzanis Linux - General 8 11-06-2005 11:30 AM
weird kernel problem and fs mount problem intense Slackware 5 03-16-2004 12:36 PM

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

All times are GMT -5. The time now is 03:39 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