LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-03-2009, 10:45 AM   #1
aes canis
Member
 
Registered: May 2005
Location: Finland
Distribution: Slackware 13.37, Ubuntu 10.10
Posts: 123

Rep: Reputation: 15
Cannout mount USB memory stick as regular user


I cannot mount a USB memory stick as a regular user.
I get the error message:
Code:
Rejected send message, 1 matched rules; type="method_call",
sender=":1.19" (uid=1000 pid=3397 comm="exo-mount --hal-udi
/org/freedesktop/Hal/devices/v")
interface="org.freedesktop.Hal.Device.Volume" member="Mount"
error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal"
(uid=0 pid=3055 comm="/usr/sbin/hald --daemon=yes ")).
It mounts when I'm logged in as the root user, so I assume it is something to do with permissions/groups.

I tried editing /etc/group, with no luck. I realised I do not know which group the USB device would be in! I don't want to add anything to /etc/fstab, as this is manged by udev, so shouldn't need fiddling with.

The content of the group file is:
Code:
root:x:0:root
bin:x:1:root,bin
daemon:x:2:root,bin,daemon,user
sys:x:3:root,bin,adm
adm:x:4:root,adm,daemon
tty:x:5:
disk:x:6:root,adm
lp:x:7:lp
mem:x:8:
kmem:x:9:
wheel:x:10:root
floppy:x:11:root
mail:x:12:mail
news:x:13:news
uucp:x:14:uucp
man:x:15:
dialout:x:16:uucp
audio:x:17:root
video:x:18:root
cdrom:x:19:root,users
games:x:20:
slocate:x:21:
utmp:x:22:
smmsp:x:25:smmsp
tape:x:26:root
mysql:x:27:
rpc:x:32:
sshd:x:33:sshd
gdm:x:42:
shadow:x:43:
ftp:x:50:
oprofile:x:51:
apache:x:80:
messagebus:x:81:
haldaemon:x:82:
plugdev:x:83:root
power:x:84:root
netdev:x:86:root
pop:x:90:pop
scanner:x:93:root
nobody:x:98:nobody
nogroup:x:99:
users:x:100:
console:x:101:
I modified the line plugdev:x:83:root to read plugdev:x:83:root,users but it had no apparent effect.

Last edited by aes canis; 12-04-2009 at 05:36 AM. Reason: Problem solved
 
Old 12-03-2009, 10:50 AM   #2
tux_dude
Member
 
Registered: Dec 2008
Distribution: Slackware64 Current
Posts: 251

Rep: Reputation: 34
You should add yourself to the plugdev group as well.
 
Old 12-03-2009, 02:48 PM   #3
aes canis
Member
 
Registered: May 2005
Location: Finland
Distribution: Slackware 13.37, Ubuntu 10.10
Posts: 123

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by tux_dude View Post
You should add yourself to the plugdev group as well.
Do you mean plugdev:x:83:root,users? I have tried that, but it did not seem to work. The copy of the group file, above, is after I removed it again. When I put it back in, I notice the error message is slightly different:
Code:
Rejected send message, 1 matched rules; type="method_call",
sender=":1.17" (uid=1000 pid=3371 comm="exo-mount --hal-udi
/org/freedesktop/Hal/devices/v")
interface="org.freedesktop.Hal.Device.Volume" member="Mount"
error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0
pid=3092 comm="/usr/sbin/hald --daemon=yes ")).
Or am I missing something else? Does the group file need to be reloaded somehow, like you do when you edit the lilo config file? I have rebooted the PC between edits.
 
Old 12-03-2009, 04:13 PM   #4
tux_dude
Member
 
Registered: Dec 2008
Distribution: Slackware64 Current
Posts: 251

Rep: Reputation: 34
Is your ID "users" or "user"? I notice you have both. You cannot add group to groups on *nix. You will need to add your specific user ID to the plugdev. I suggest using
Code:
usermod -G ...
Check the man pages for more infor on usermod.
 
Old 12-03-2009, 04:57 PM   #5
JokerBoy
Member
 
Registered: Sep 2009
Posts: 140

Rep: Reputation: 24
Quote:
Originally Posted by aes canis View Post
Do you mean plugdev:x:83:root,users? I have tried that, but it did not seem to work.
how my /etc/group looks like:
Quote:
# grep -i bogdan /etc/group
wheel:x:10:root,bogdan
audio:x:17:root,bogdan
video:x:18:root,bogdan
cdrom:x:19:root,bogdan
games:x:20:bogdan
plugdev:x:83:root,bogdan
power:x:84:root,bogdan
netdev:x:86:root,bogdan
scanner:x:93:root,bogdan
vboxusers:x:102:bogdan
silly question: did you reboot your machine or at least logout?
 
Old 12-03-2009, 05:09 PM   #6
GazL
LQ Guru
 
Registered: May 2008
Distribution: CRUX
Posts: 5,605
Blog Entries: 5

Rep: Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465
Logging out won't help. It's actually the dbus daemon that you need to stop and restart to have it read in the new plugdev group definitions. "/etc/rc.d/rc.messagebus restart" ought to do the trick, though rebooting would also do that.
 
Old 12-03-2009, 07:14 PM   #7
abrouwers
Member
 
Registered: May 2005
Location: Michigan
Distribution: Slackware -current
Posts: 98

Rep: Reputation: 37
Unless you are changing dbus policies (you're not), restarting dbus will not be required (actually, it won't do anything for your situation. After you change the groups your user is in, logging out and back in will reload the stuff for your user, and the new groups will take effect. I'm guessing your when you edited /etc/group, you didn't quite get the format right.

To solve this, you should try the "gpasswd" command, like:

# gpasswd -a <your_user> group

So, to add my user (ajb) to the plugdev group:

# gpasswd -a ajb plugdev

Good luck!
 
Old 12-03-2009, 07:57 PM   #8
nick_th_fury
Member
 
Registered: Jun 2003
Location: Texas
Distribution: Slackware, NetBSD
Posts: 151

Rep: Reputation: 23
I just add a line for usb drives in my /etc/fstab. It's always been quick, simple & done. I realize the OP specifically asked to not do that, but I'm kinda curious why? Is there some problem with doing it that way that I have just never run across?
 
0 members found this post helpful.
Old 12-03-2009, 08:06 PM   #9
GazL
LQ Guru
 
Registered: May 2008
Distribution: CRUX
Posts: 5,605
Blog Entries: 5

Rep: Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465
Quote:
Originally Posted by abrouwers View Post
Unless you are changing dbus policies (you're not), restarting dbus will not be required (actually, it won't do anything for your situation.

From Slackware 12.0 CHANGES AND HINTS:

Quote:
Note that HAL will honor settings in /etc/fstab if a device is present there, so you could technically have removable devices defined in /etc/fstab, but if the fstab settings do not allow normal users to mount them (with the "user" or "users" option), then HAL/dbus will not allow them to be mounted either.
Also note that you will need to run "/etc/rc.d/rc.messagebus reload" after adding any users to plugdev, power, or video groups so that it re-reads the /etc/group file.
I'm not aware of this changing since 12.0, though it's possible it may have. Does dbus nolonger cache the group memberships at startup then?
 
1 members found this post helpful.
Old 12-03-2009, 09:32 PM   #10
abrouwers
Member
 
Registered: May 2005
Location: Michigan
Distribution: Slackware -current
Posts: 98

Rep: Reputation: 37
The problem has nothing to do with dbus's policies - they are doing what they should. It's that he has incorrectly changed the /etc/group file:

"plugdev:x:83:root,users"

is incorrect. It should be something like JokerBoy posted above. If you user is "gazl:"

plugdev:x:83:root,gazl

slackware 12.0 still shipped the old permissive branch of dbus. Since 1.2.4 or so, this changed from the dbus folks. Reloading the rules should not be necessary - once you add your user to the groups properly, just log out and back in for it to take effect.

As the "adduser" prompt suggests (you read that, right? ), good defaults include:

audio,video,cdrom,plugdev,power,netdev .

Good luck
 
1 members found this post helpful.
Old 12-04-2009, 12:24 AM   #11
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,487

Rep: Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108Reputation: 1108
Reloading the messagebus service (and logging out/back in) is still needed. If you make an edit to anything in /etc/dbus-1/, the daemon notices and reloads its configuration on its own, but edits to the group file are not noticed.
Hrmmm... that makes me wonder...
 
1 members found this post helpful.
Old 12-04-2009, 05:32 AM   #12
aes canis
Member
 
Registered: May 2005
Location: Finland
Distribution: Slackware 13.37, Ubuntu 10.10
Posts: 123

Original Poster
Rep: Reputation: 15
GazL - CHANGES_AND_HINTS has been updated to read:
Code:
HAL is not new anymore, but here are a few notes related to it:
  1. User accounts with permission to mount removable devices must be in at
     least the "plugdev" group.
  2. User accounts with permission to do power-management tasks, such as 
     suspend, hibernate, reboot, and shutdown, via HAL methods should be in
     the "power" group.
  3. HAL will honor settings in /etc/fstab if a device is present there, so
     you could technically have removable devices defined in /etc/fstab, but 
     if the fstab settings do not allow normal users to mount them (with the
     "user" or "users" option), then HAL/dbus will not allow them to be 
     mounted either.  In other words, for example, if your fstab line for the
     cdrom/dvd drive includes the "owner" option, you will not be able to 
     mount it as a normal user.
  4. If you find a need for modified fdi files, those should be placed in the
     relevant directories in /etc/hal/ instead of /usr/share/hal/
But thanks for pointing me there, I had read it some time back, but the bit about the plugdevgroup sort of passed me by...

tux_dude - when you first said "add yourself", I was just thinking about groups, not about the actual user account. I ran usermod -G and it mounts fine now.

abrouwers - cheers, that list of groups fixes a few other issues I had, but hadn't got around to looking into...

Thanks to all, for the info, it's been ages since I used Slack - I've got lazy, after being molly-coddled by Ubuntu
 
Old 12-04-2009, 07:11 AM   #13
GazL
LQ Guru
 
Registered: May 2008
Distribution: CRUX
Posts: 5,605
Blog Entries: 5

Rep: Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465Reputation: 3465
Quote:
Originally Posted by aes canis View Post
GazL - CHANGES_AND_HINTS has been updated to

But thanks for pointing me there, I had read it some time back, but the bit about the plugdevgroup sort of passed me by...
Yes, I was aware that the text had changed, I read it religously when a new release comes out, however, there's nothing in their that suggests that it's no longer necessary to restart messagebus to re-read /etc/groups, which was why I posted that in response to abrouwers' posting saying it was not necessary.


Anyway, it looks like your sorted now, so all's well.
 
Old 12-04-2009, 07:35 AM   #14
aes canis
Member
 
Registered: May 2005
Location: Finland
Distribution: Slackware 13.37, Ubuntu 10.10
Posts: 123

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by GazL View Post
I read it religously when a new release comes out
I have to admit, that despite working as a technical writer in the telecoms & other hi-tech industries for the past five years, I am ashamedly lax when it comes to RingTFM. I tend to only read the documentation when something breaks (usually after I've fiddled!)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
cannot mount my usb memory stick jbcolmena Slackware 4 09-07-2006 09:10 PM
mount, Usb memory stick amer_58 Linux - Newbie 2 03-25-2005 06:44 AM
usb memory stick mount nadroj Linux - Hardware 10 01-13-2005 11:41 PM
How do you auto mount a USB memory stick ? KiwiPingu Linux - Newbie 1 07-29-2004 06:44 PM
Want regular user to have memory stick mounting rights king8 Red Hat 3 11-10-2003 07:31 PM

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

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