Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
10-18-2005, 02:22 PM
|
#1
|
Member
Registered: Aug 2005
Distribution: Ubuntu 7.10, Slackware 12
Posts: 270
Rep:
|
Normal user being able to mount cdrom
Hi all,
sorry for this basic question but when i log in as my normal user i cant execute any of the commands i need, such as being able to mount the cdrom, iwconfig, installpkg and a few others.
Any help appreciated.
|
|
|
10-18-2005, 02:34 PM
|
#2
|
Senior Member
Registered: May 2004
Distribution: Slackware15.0 64-Bit Desktop, Debian 11 non-free Toshiba Satellite Notebook
Posts: 4,301
|
Mounting a cdrom drive as a normal user is understandable, and the way to do it is to review your fstab, and under it look for the entry for your cdrom, and change the part that says "noauto,owner,ro" to "noauto,users,ro" , and that should enable you to mount your cdrom drive. As for the others, such as iwconfig, and installpkg, you do NOT want normal users to be able to do that, because that is a major risk, and you only want the adminstrator (you) to be able to install and remove things, and change system settings, not any other user, even though you are the only user on the machine, it is still good practice.
|
|
|
10-18-2005, 04:17 PM
|
#3
|
LQ Veteran
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
|
You may want to investigate using sudo to grant normal users the ability to run specific commands that you specify with root privileges. I do that for a few things like iwconfig.
|
|
|
10-18-2005, 04:43 PM
|
#4
|
Senior Member
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482
|
Here are my fstab entries. First CD drive is a writer, second is read-only.
/dev/sr0 /media/cdwriter iso9660 noauto,user,rw,unhide 0 0
/dev/hdd /media/cdrom iso9660 noauto,user,ro,unhide 0 0
I'm using the 2.4.28 kernel.
I also use GRUB and I added the hdc=ide-scsi switch to the boot options.
I use KDE as my GUI and I enable the KDE desktop device icons for the floppy and CD drives. There are two device icons for each device: mount and umount. But you always see only one icon or the other, depending upon the status of the device. When a CD or floppy is mounted a small green triangle appears in the device icon. These icons, along with my fstab, means I mount and umount my CDs, as well as eject, directly from the KDE desktop. All without hitches. Works well.
I hope this helps.
|
|
|
10-18-2005, 04:49 PM
|
#5
|
Senior Member
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721
Rep:
|
you can also use autofs to auto-mount cd and floppy .
look here :
http://www.linuxquestions.org/questi...ghlight=autofs
a little down the thread is how it was explained to me.
and it works ok.
egag
|
|
|
10-21-2005, 03:38 PM
|
#6
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
If you decide to use sudo, you are supposed to use the root program "visudo" to edit the /etc/sudoers file. There are examples, in the comments of the file, on allowing users to execute certain commands. There is a commented example using the "shutdown" command. You might consider making the changes for members of the wheel group, and only allowing it to be done locally. These are covered in the examples. Also read through man sudo or info sudo. I'm not sure but sudo may be documented in the coreutils manual also.
One last thought. The /sbin directory may not be in the path of a normal user, so you may need to give the full pathname for some commands in the sudoers file. Or maybe in the /etc/profile script, you could conditionally add "/sbin" and "/usr/sbin" to the PATH variable only for wheel group members.
Last edited by jschiwal; 10-21-2005 at 03:41 PM.
|
|
|
10-21-2005, 05:21 PM
|
#7
|
LQ Newbie
Registered: Oct 2005
Distribution: Slackware
Posts: 6
Rep:
|
An easy way to mount cdrom as user is to add the user to the cdrom group.
edit /etc/group
add your username to the cdrom entry
ex:
cdrom::19:myusername
Then you will always be able to mount and unmount cdroms with that user.
hth.
|
|
|
All times are GMT -5. The time now is 04:42 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|