Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: Only root can mount usb media

  1. #1

    Default Only root can mount usb media

    I have an issue with not being able to mount usb media as a normal user on OS 12.2 x86_64 Kde, asks for the root password every time

    Tried all the things I found on this during searches both on google and this forum

    Currently I have the default entry OS installation adds to fstab for usb commented out:

    Code:
    #usbfs                /proc/bus/usb        usbfs      noauto                0 0
    I get the same behaviour with or without the comment in front of that line, numerous web results suggest there is no need for it to be there

    Here's my complete fstab:

    Code:
    LABEL=Suse           /                    ext4       nodiratime,noatime,discard,acl,user_xattr        1 1
    LABEL=Home                                         /home                ext4       nodiratime,noatime,discard,acl           1 2
    LABEL=Linux          /linux               ext4       noatime,user,acl,user_xattr,exec 1 2
    LABEL=Var            /var                 ext4       acl,user_xattr        1 2
    LABEL=Srv            /srv                 ext4       acl,user_xattr        1 2
    
    none    /tmp    tmpfs    defaults    0 0
    
    proc                 /proc                proc       defaults              0 0
    sysfs                /sys                 sysfs      noauto                0 0
    debugfs              /sys/kernel/debug    debugfs    noauto                0 0
    #usbfs                /proc/bus/usb        usbfs      noauto                0 0
    devpts               /dev/pts             devpts     mode=0620,gid=5       0 0
    
    # entry for vbox usb subsystem
    #usbfs /proc/bus/usb usbfs defaults,devmode=666 0 0
    I've made a change to policykit as suggested on a bugzilla report I got directed to from a previous thread on this forum, this didn't work either, the change I made is:

    Code:
    Open org.freedesktop.udisks.policy in an editor and find the entry:
     <action id="org.freedesktop.udisks.filesystem-mount-system-internal"> 
    
    Then change this line: <allow_active>auth_admin_keep</allow_active> To this: 
    <allow_active>yes</allow_active>
    
    Save and reboot

    Any idea on what else I might try greatly appreciated, any other info I need to provide please ask

    Incidentally around the same time this started happening networkmanager also started asking for the root password to make any changes, not sure whether the two are related

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,136

    Default Re: Only root can mount usb media

    You fail to explain what you do as normal user to get it mounted. Thus we can not know if you do that correct or not.
    I use KDE and when I connect an USB storage device, I get a pop-up telling me. I then can click on the entry shown and am offered different possibilities. One of them being "open with file manager" (or similar). When I choose that, Dolphin is atrted and show the contents. Which mean of cours that it is mounted then.

    How about you?

    BTW, I have never touched fstab in this aspect. I suggest tthat you change this exactly into what it was. And may be you should change everything you changed, back to "normal" Because it works for most people without any fiddling.
    Henk van Velden

  3. #3

    Default Re: Only root can mount usb media

    Quote Originally Posted by Ecky View Post
    I have an issue with not being able to mount usb media as a normal user on OS 12.2 x86_64 Kde, asks for the root password every time
    I think we have to clarify whether the USB media is an permanent external hard drive or a removable USB stick. Certainly if is the latter, then it would be a very bad idea to try and automount it with fstab.

    The suggestion above of using the media icon and opening it in Dolphin (for KDE) is the most convenient way I know of mounting a USB stick. If you want to do this from command line, the mount command (though not not necessarily umount) always requires root privileges to my knowledge. I find this slightly irritating when I'm in a console of a virtual terminal, especially as this is inconsistent with the ability to mount a USB device in KDE without root privileges. But I know of no convenient workaround.

  4. #4

    Default Re: Only root can mount usb media

    Quote Originally Posted by hcvv View Post
    You fail to explain what you do as normal user to get it mounted. Thus we can not know if you do that correct or not.
    I use KDE and when I connect an USB storage device, I get a pop-up telling me. I then can click on the entry shown and am offered different possibilities. One of them being "open with file manager" (or similar). When I choose that, Dolphin is atrted and show the contents. Which mean of cours that it is mounted then.

    How about you?

    BTW, I have never touched fstab in this aspect. I suggest tthat you change this exactly into what it was. And may be you should change everything you changed, back to "normal" Because it works for most people without any fiddling.
    Open with file manager is exactly what I do when the notification pops up, or I just click on the entry in the device list in the left-hand pane of dolphin if I already have dolphin open

    A bug report exists for the issue so while it works for most people there must be scenarios other then mine where it doesn't for there to have a bug report filed (https://bugzilla.novell.com/show_bug.cgi?id=784175). It doesn't work for me with everything set as 'normal' or with the recommendations I found in searches, hence my asking

    I am talking about removable usb 'pen' drives using 'normal' kde practices rather than the mount command in a console, I also get asked for the root password when I click the 'Safely remove' open on dolphin's context menu

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,136

    Default Re: Only root can mount usb media

    Quote Originally Posted by Ecky View Post
    Open with file manager is exactly what I do when the notification pops up, or I just click on the entry in the device list in the left-hand pane of dolphin if I already have dolphin open

    A bug report exists for the issue so while it works for most people there must be scenarios other then mine where it doesn't for there to have a bug report filed (https://bugzilla.novell.com/show_bug.cgi?id=784175). It doesn't work for me with everything set as 'normal' or with the recommendations I found in searches, hence my asking

    I am talking about removable usb 'pen' drives using 'normal' kde practices rather than the mount command in a console, I also get asked for the root password when I click the 'Safely remove' open on dolphin's context menu
    That makes it much clearer to understand what you do. Thanks.

    To begin with the last. When you have it mounted using root, you of course has to be root to unmount. But that is "only" a side effect of your problem.

    I read through the bug report. I remember it, there was a thrtead about it here.

    It talks about update (of some form) to 12.2 vs. fresh install. What did you do?

    It also talks about systemd vs. sysvinit. Are you using the default for 12.2: systemd?

    I doubt, but it being a desktop feature, could you try a new users to see if it is reproducable there?

    Just a few suggestions. The bug report does not realy provide a solution and that is not nice at all.

    BTW, I have a 12.2 fresh on a test system here and it works as expected.
    Henk van Velden

  6. #6
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,136

    Default Re: Only root can mount usb media

    Quote Originally Posted by flymail View Post
    I think we have to clarify whether the USB media is an permanent external hard drive or a removable USB stick. Certainly if is the latter, then it would be a very bad idea to try and automount it with fstab.

    The suggestion above of using the media icon and opening it in Dolphin (for KDE) is the most convenient way I know of mounting a USB stick. If you want to do this from command line, the mount command (though not not necessarily umount) always requires root privileges to my knowledge. I find this slightly irritating when I'm in a console of a virtual terminal, especially as this is inconsistent with the ability to mount a USB device in KDE without root privileges. But I know of no convenient workaround.
    As explanation.
    You always need root privileges to (u)mount. But the "you" there is only a way of saying. It means that only a process running with root as owner can do (u)mount. We all know this when we do it from a shell. But there are more processes doing this. Think about the processes that mount at boot and unmount at shutdown. They all run with owner root.
    And desktop environments can communicate with a deamon program running with owner root and ask that deamon to (u)mount. Thus it only looks as if an end-user can do (u)mount. In fact the end-users asks via a very restrictive way (guarded by policykit) to do this. And the deamon checks for all sorts of security issues also. Thus this combination of programs makes it possible that a user can ask for (u)mount in another way then calling his system manager (which she/he is often him/herself btw) to do this for him as root. It is an automation of the system manager in a strictly controled environment.
    Henk van Velden

  7. #7

    Default Re: Only root can mount usb media

    Quote Originally Posted by hcvv View Post
    You always need root privileges to (u)mount.
    Code:
    user@dhcppc0:~> cd /media/
    user@dhcppc0:/media> ls
    user@dhcppc0:/media> lsusb
    Bus 001 Device 006: ID 1307:0165 Transcend Information, Inc. 2GB/4GB Flash Drive
    Bus 002 Device 002: ID 058f:6362 Alcor Micro Corp. Flash Card Reader/Writer
    Bus 005 Device 002: ID 1038:1360 Ideazon, Inc. 
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    user@dhcppc0:/media> # Mounting USB stick using "Open with File Manager" (Dolphin)
    user@dhcppc0:/media> ls
    USB
    user@dhcppc0:/media> umount /dev/sdd1
    user@dhcppc0:/media> ls
    user@dhcppc0:/media>

  8. #8

    Default Re: Only root can mount usb media

    Quote Originally Posted by hcvv View Post
    It talks about update (of some form) to 12.2 vs. fresh install. What did you do?
    I started with a textmode/server install then kde was added afterwards, I did leave out a couple of things like kde-pim, chat and graphics/camera software, nothing I'd expect to cause this behaviour and originally it behaved normally when opening usb removable media in dolphin

    I did use this entry in fstab for about half an hour, it's a known 'fix' for virtualbox usb support and usb drives have opened 'normally' since using it

    Code:
    # entry for vbox usb subsystem
    #usbfs /proc/bus/usb usbfs defaults,devmode=666 0 0
    Quote Originally Posted by hcvv View Post
    It also talks about systemd vs. sysvinit. Are you using the default for 12.2: systemd?
    Systemd as per the default

    Quote Originally Posted by hcvv View Post
    I doubt, but it being a desktop feature, could you try a new users to see if it is reproducable there?
    A newly created user experiences the same behaviour

  9. #9
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,136

    Default Re: Only root can mount usb media

    Quote Originally Posted by flymail View Post
    Code:
    user@dhcppc0:~> cd /media/
    user@dhcppc0:/media> ls
    user@dhcppc0:/media> lsusb
    Bus 001 Device 006: ID 1307:0165 Transcend Information, Inc. 2GB/4GB Flash Drive
    Bus 002 Device 002: ID 058f:6362 Alcor Micro Corp. Flash Card Reader/Writer
    Bus 005 Device 002: ID 1038:1360 Ideazon, Inc. 
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    user@dhcppc0:/media> # Mounting USB stick using "Open with File Manager" (Dolphin)
    user@dhcppc0:/media> ls
    USB
    user@dhcppc0:/media> umount /dev/sdd1
    user@dhcppc0:/media> ls
    user@dhcppc0:/media>
    Hm, interesting. The following is from the man umount page:
    The uhelper (unprivileged umount helper) is possible to used when non-root user wants to umount a mountpoint which is not defined in the /etc/fstab file (e.g devices mounted by HAL).
    Apart from the obselete mentioning of HAL (replaced by other software) This might point to what you succeed to do. But the sentence is not quite clear. Badly formulated and the whole section where this is part of is not realy understood by me .
    Henk van Velden

  10. #10
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,136

    Default Re: Only root can mount usb media

    @Ecky.
    Thus it seems that the system did function correct earlier. The obligatory questin is tthhn: What was chnged? I have no doubt you contemplated about the same. But we have to ask.
    Henk van Velden

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •