LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 07-20-2007, 01:31 AM   #1
byebyebilliegates
LQ Newbie
 
Registered: Jul 2007
Distribution: PCLinuxOS2007, openSUSE 10.2, experimenting with other distros
Posts: 10

Rep: Reputation: 0
Question 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!
 
Old 07-20-2007, 05:57 PM   #2
manwichmakesameal
Member
 
Registered: Aug 2006
Distribution: Slackware
Posts: 804

Rep: Reputation: 110Reputation: 110
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.
 
Old 07-21-2007, 02:05 AM   #3
byebyebilliegates
LQ Newbie
 
Registered: Jul 2007
Distribution: PCLinuxOS2007, openSUSE 10.2, experimenting with other distros
Posts: 10

Original Poster
Rep: Reputation: 0
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.
 
Old 07-21-2007, 09:08 AM   #4
manwichmakesameal
Member
 
Registered: Aug 2006
Distribution: Slackware
Posts: 804

Rep: Reputation: 110Reputation: 110
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
 
Old 07-21-2007, 11:33 AM   #5
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Manjaro
Posts: 963

Rep: Reputation: 36
strange as HAL seems to handle my USB key fine so i never need to manually mount,

check that if you plug it in it dousent pop up in the sysinfo: page
 
Old 07-22-2007, 12:24 AM   #6
byebyebilliegates
LQ Newbie
 
Registered: Jul 2007
Distribution: PCLinuxOS2007, openSUSE 10.2, experimenting with other distros
Posts: 10

Original Poster
Rep: Reputation: 0
Smile

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.

Thanks for all the help Manwich.
 
  


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
can't access 2 media devices DBabo Linux - Hardware 8 10-09-2006 03:35 PM
granting permissions to a few users in a group grondar69 Linux - General 7 06-22-2006 06:51 PM
Granting user access to devices like a jumpdrive tleadley Fedora - Installation 0 02-17-2005 07:02 PM
Granting users full internet access!? adham1sa Linux - Networking 3 12-22-2004 06:08 AM
Allowing users to mount and access devices katanastab Linux - General 1 02-14-2002 03:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

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