SUSE / openSUSEThis Forum is for the discussion of Suse 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.
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.
Distribution: PCLinuxOS2007, openSUSE 10.2, experimenting with other distros
Posts: 10
Rep:
Granting users access to external media devices?
Hello. I'm new to Linux (1 week's experience). Have tried various distro's and have been surprised at how well they worked. Anyway, I decided to try openSUSE 10.2. I have it installed on my system now, and it works great.
My question relates to granting permanent access to removable storage media to users other than root. I've noticed that as a regular user, I can't mount or access files on my pen drive (nor CD's for that matter)without logging in as root. Other users (like myself) are denied access to even look at the contents, much less mounting or modding the media. I'm not intimidated by the idea of logging in as root, but I feel that it defeats the purpose of the security measure.
I went into root and modified the user permissions tab for the pen drive, but these permissions do not affect permanent changes (ie, I lose them when I log out of root). I figure this has something to do with the Yast Admin tool, but I'm not sure of how to use it, though I've been experimenting.
I like Linux very much. Have used PCLOS2007 for the most part, and experimented with others. Look forward to many years of satisfaction!
Notice the user entry after noauto. Try man fstab and you'll have a whole lot of info. Basically, the user option lets regular users in the same group as the device mount and unmount the device.
Distribution: PCLinuxOS2007, openSUSE 10.2, experimenting with other distros
Posts: 10
Original Poster
Rep:
Quote:
Originally Posted by manwichmakesameal
In /etc/fstab, you want something like
Code:
/dev/hdc /mnt/cdrom iso9660 noauto,user,ro 0 0
Notice the user entry after noauto. Try man fstab and you'll have a whole lot of info. Basically, the user option lets regular users in the same group as the device mount and unmount the device.
Okay. Sounds good. Since this is a USB Stick (a Lexar JumpDrive), it shows up as "sda1", so am I correct in assuming that I would just substitue the sda1 for whatever the device is? Also, since my drive is formatted as "vfat" (manufacturer's default), would I substitute the iso9660 with vfat?
One last question if I may. At the end of the line, you specified ro, 0 0. Because I don't yet understand the lingo, what exactly am I saying to the computer when I input those options? I can recognize noauto and user parameters, as well as the dev(for device I assume) and hdc (refering to the drive itself).
Thanks for your help. Like your ID... Manwich is a meal! Though I do like my fish.
The ro option says that the device is read-only, you can change that to rw if you want write access. The 0, 0 is just for fsck, if set to zero, fsck won't do anything. As for the device, yes you will want
Code:
/dev/sda1 /your/mnt/dir auto(or ext3,ext2, or vfat) noauto,user,ro 0 0
Distribution: PCLinuxOS2007, openSUSE 10.2, experimenting with other distros
Posts: 10
Original Poster
Rep:
Quote:
Originally Posted by manwichmakesameal
The ro option says that the device is read-only, you can change that to rw if you want write access. The 0, 0 is just for fsck, if set to zero, fsck won't do anything. As for the device, yes you will want
Code:
/dev/sda1 /your/mnt/dir auto(or ext3,ext2, or vfat) noauto,user,ro 0 0
Thanks for the info. Seems to have helped.
To dasy: here's the thing: my device starts to mount, but I get this weird message about how the device was unable to send some sort of message (can't remember the words right now). After I click okay, Konqueror goes blank. I do remember something about HAL being mentioned in the error message.
addedum:I can mount and read/write the device just fine under the root account. I had to reinstall SUSE after perusing an ARK Linux Live CD (don't know why, but it hosed my system...this is why I keep my docs on the pen drive...extra security measure for this type of occasion).
Anyway, I was looking further at the partitioning options on the SUSE 10.2 installer, and you can opt to assign specific users to groups. Certain groups (I haven't figured out what's what yet) can have access to the USB devices, while others cannot. I think this is a cool feature of SUSE for security purposes, but I wasn't prepared for it.
I'll be trying to read on the SUSE website to see if I can find out more info on this.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.