You are not logged in.

#1 2006-12-12 08:56:57

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

[solved] Mounting usb devices as user.

I prepared a line in my /etc/fstab file for allowing users to mount usb devices. And sometime it works and sometime it does not. The point is that the OS randomly (from my point of view) assigns a different /dev/sda? device to the usb key.

Is there a way to allowing user to mount one usb key in any case?

Offline

#2 2006-12-12 09:07:48

Acid7711
Member
From: Chicago, IL
Registered: 2006-08-18
Posts: 300
Website

Re: [solved] Mounting usb devices as user.

Honestly, I was having trouble with mine in fstab. I removed all entries and let the automounts work their magic. No problems sense.

Offline

#3 2006-12-12 09:30:48

chrismortimore
Member
From: Edinburgh, UK
Registered: 2006-07-15
Posts: 655

Re: [solved] Mounting usb devices as user.

"pmount" may be of help to you.  Or you could use "udev" to give the devices persistent names.


Desktop: AMD Athlon64 3800+ Venice Core, 2GB PC3200, 2x160GB Maxtor DiamondMax 10, 2x320GB WD Caviar RE, Nvidia 6600GT 256MB
Laptop: Intel Pentium M, 512MB PC2700, 60GB IBM TravelStar, Nvidia 5200Go 64MB

Offline

#4 2006-12-12 13:35:22

Snarkout
Member
Registered: 2005-11-13
Posts: 542

Re: [solved] Mounting usb devices as user.

Search the wiki for udev - there is a very good article on persistant device naming with udev rules.  However, if you don't need that level of granularity and just want things to automount, load dbus and hal in your daemons array, and rock and roll.


Unthinking respect for authority is the greatest enemy of truth.
-Albert Einstein

Offline

#5 2006-12-12 21:28:56

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: [solved] Mounting usb devices as user.

I dislike automounting, so I'll try the udev using wiki article.

thanks everyone big_smile

Offline

#6 2006-12-13 01:12:09

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: [solved] Mounting usb devices as user.

Snarkout was refering to this article:
http://wiki.archlinux.org/index.php/Per … ice_naming

Offline

#7 2006-12-13 09:02:59

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: [solved] Mounting usb devices as user.

Ops... Thanks again.

Offline

#8 2006-12-14 08:47:21

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: [solved] Mounting usb devices as user.

My usb key, the one I use for testing, does not appear nor in /dev/disk/by-label nor in /dev/disk/by-uuid, and setting the fstab entry as by-id won't solve the problem since users have different usb keys...
I am missing something?

Offline

#9 2006-12-14 14:20:44

Snarkout
Member
Registered: 2005-11-13
Posts: 542

Re: [solved] Mounting usb devices as user.

Is the device detected at all?  Do a dmesg tail to see if it found it.  In this particular case, the easiest thing might be to use that article you linked to, and setup multiple aliases based on the serial # of the device.  The downside of this is that it generally means lots of rules, lots of mountpoints, and needing to know about every device plugged into your machine.

Why exactly are you against using hal, dbus, and (possibly) pmount?  It's a hell of a lot less effort for what it seems like you're trying to achieve.  Perhaps a better way for me to ask this question is "do you actually have a reason you need a separate static mountpoint for every usb device you plug into the computer?"  If all you want to do is allow different people to plug in and use usb devices/drives, then it really seems to me like pmount would be the way to go.


Unthinking respect for authority is the greatest enemy of truth.
-Albert Einstein

Offline

#10 2006-12-15 10:01:15

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: [solved] Mounting usb devices as user.

When I posted I did not tried pmount yet. Since adding a tool to my users is always a pain.

me:- no in this case you need to use pmount, not mount...
user:- what? Already you do not use Windows and I have even to understand?!?

But failing the persistent naming way, I tried it. It works flawlessly.
Thanks everyone.

Offline

Board footer

Powered by FluxBB