LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 08-13-2017, 03:02 PM   #1
Timatekore
Member
 
Registered: Mar 2013
Location: Planet Earth
Distribution: open SuSE, Knoppix, Android, Puppy
Posts: 37

Rep: Reputation: Disabled
Getting AutoMount to work under 13.2


Hello World,

whenever I attach a USB drive to my box, I can only mount it as "root".
Trying to automount it by clicking on the drive's icon in Dolphin or Konqueror errs out with a "not authorized to perform this action" error.
How can I fix that?

Here is my system info:
Distro: OpenSUSE 13.2
uname -a: linux <...> 3.14.14-cubox-i #1 SMP Wed May 20 21:09:01 UTC 2015 armv7l armv7l armv7l GNU/Linux
 
Old 08-13-2017, 03:24 PM   #2
Mill J
Member
 
Registered: Feb 2017
Location: 127.0.0.1 Sweet 127.0.0.1
Distribution: Void, LFS, Haiku, Quirky on Rpi and many others
Posts: 906
Blog Entries: 2

Rep: Reputation: 368Reputation: 368Reputation: 368Reputation: 368
You should be able to do it with fstab https://help.ubuntu.com/community/Fstab
 
Old 08-13-2017, 05:33 PM   #3
Timatekore
Member
 
Registered: Mar 2013
Location: Planet Earth
Distribution: open SuSE, Knoppix, Android, Puppy
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Mill J View Post
You should be able to do it with fstab https://help.ubuntu.com/community/Fstab
Sorry, but that aproach is just silly. No Windoze or Mac User would ever acccept having to fiddle around with his/her system's config files, before being able to access data on a new thumb drive - and neither do I. I know that Ubuntu users can access their portable drives w/o fstab hassle, so why shouldn't OpenSUSE be able do it?

Last edited by Timatekore; 08-13-2017 at 05:35 PM.
 
Old 08-14-2017, 09:31 PM   #4
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
There is a setting to specify what action to take when removable media is inserted. It's probably somewhere in Yast2. But it would be faster to just edit /etc/fstab than search for the setting. I don't know exactly where it is in opensuse.
 
Old 08-15-2017, 06:42 AM   #5
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: Mojave
Posts: 9,364
Blog Entries: 37

Rep: Reputation: Disabled
I use
Code:
/usr/bin/udisksctl mount -b /dev/sdXN /media/<user>/mount_name  > /dev/null 2>&1
no chmod/chown..."noise".

What system groups do you or the user belong to?
plugdev I think is necessary for usb actions by a user.
Code:
AUDIENCE

       This program does not assume that the caller is the super user - it is
       intended to be used by unprivileged users and authorizations are
       checked by the udisks daemon using polkit(8).
says http://manpages.ubuntu.com/manpages/...isksctl.1.html

Let us know how it goes.
 
Old 08-21-2017, 01:45 PM   #6
Timatekore
Member
 
Registered: Mar 2013
Location: Planet Earth
Distribution: open SuSE, Knoppix, Android, Puppy
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Habitual View Post
I use
Code:
/usr/bin/udisksctl mount -b /dev/sdXN /media/<user>/mount_name  > /dev/null 2>&1
no chmod/chown..."noise".

What system groups do you or the user belong to?
plugdev I think is necessary for usb actions by a user.
Code:
AUDIENCE

       This program does not assume that the caller is the super user - it is
       intended to be used by unprivileged users and authorizations are
       checked by the udisks daemon using polkit(8).
says http://manpages.ubuntu.com/manpages/...isksctl.1.html

Let us know how it goes.
Thx, I'll try them both (plugdev looks promising).
 
Old 08-21-2017, 05:30 PM   #7
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: Mojave
Posts: 9,364
Blog Entries: 37

Rep: Reputation: Disabled
Welcome!
 
Old 08-22-2017, 06:26 AM   #8
Timatekore
Member
 
Registered: Mar 2013
Location: Planet Earth
Distribution: open SuSE, Knoppix, Android, Puppy
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Habitual View Post
I use
Code:
/usr/bin/udisksctl mount -b /dev/sdXN /media/<user>/mount_name  > /dev/null 2>&1
no chmod/chown..."noise".

What system groups do you or the user belong to?
plugdev I think is necessary for usb actions by a user.
Code:
AUDIENCE

       This program does not assume that the caller is the super user - it is
       intended to be used by unprivileged users and authorizations are
       checked by the udisks daemon using polkit(8).
says http://manpages.ubuntu.com/manpages/...isksctl.1.html

Let us know how it goes.
Alas, neither adding my user to group plugdev nor trying to mount the disk manually via udisksctl makes any difference.
The error message is still: "Authorization required (as root)" respectively "No permission ..."
 
Old 08-22-2017, 08:38 AM   #9
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: Mojave
Posts: 9,364
Blog Entries: 37

Rep: Reputation: Disabled
Did you log out and back in for the group changes to apply?
 
Old 08-22-2017, 11:26 AM   #10
Timatekore
Member
 
Registered: Mar 2013
Location: Planet Earth
Distribution: open SuSE, Knoppix, Android, Puppy
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Habitual View Post
Did you log out and back in for the group changes to apply?
yes
 
Old 08-22-2017, 03:29 PM   #11
Mill J
Member
 
Registered: Feb 2017
Location: 127.0.0.1 Sweet 127.0.0.1
Distribution: Void, LFS, Haiku, Quirky on Rpi and many others
Posts: 906
Blog Entries: 2

Rep: Reputation: 368Reputation: 368Reputation: 368Reputation: 368
Did you check out the link I posted??

Quote:
4. If a device/partition is not listed in fstab ONLY ROOT may mount the device/partition.
5. Users may mount a device/partition if the device is in fstab with the proper options.
 
Old 08-22-2017, 08:49 PM   #12
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 3,542

Rep: Reputation: 624Reputation: 624Reputation: 624Reputation: 624Reputation: 624Reputation: 624
Quote:
Trying to automount it by clicking on the drive's icon in Dolphin or Konqueror errs out with a "not authorized to perform this action" error.
How can I fix that?
This reads like a PolKit issue to me. It is possible to lock openSUSE down a bit depending on the environment it's being used in. This can impact on user access includes, including with PolKit privileges relating to udisks/DE auto-mounting of external media. I'm wondering if your system is set as 'secure' or even 'paranoid' perhaps. For reference, the system I'm using is set to 'easy'.

Quote:
An openSUSEŽ Leap system includes the files permissions, permissions.easy, permissions.secure, and permissions.paranoid, all in the directory /etc. The purpose of these files is to define special permissions, such as world-writable directories or, for files, the setuser ID bit (programs with the setuser ID bit set do not run with the permissions of the user that has launched it, but with the permissions of the file owner, usually root). An administrator can use the file /etc/permissions.local to add his own settings.

To define which of the above files is used by openSUSE Leap's configuration programs to set permissions, select Local Security in the Security and Users section of YaST. To learn more about the topic, read the comments in /etc/permissions or consult the manual page of chmod (man chmod).
Reference:
https://doc.opensuse.org/documentati...al.permissions

Check the current settings
Code:
grep "PERMISSION_SECURITY" /etc/sysconfig/security
and change via YaST if necessary.

Last edited by ferrari; 08-22-2017 at 09:02 PM.
 
Old 08-22-2017, 08:59 PM   #13
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 3,542

Rep: Reputation: 624Reputation: 624Reputation: 624Reputation: 624Reputation: 624Reputation: 624
In addition to the above, it might pay to check the following as well...

Code:
grep "POLKIT" /etc/sysconfig/security
although I don't expect to see any PolKit privilege restrictions here (unless you explicitly set them).

More just for information purposes....
Quote:
9.2.3 Default Privileges
Report Bug
#

Each application supporting PolKit comes with a default set of implicit policies defined by the application's developers. Those policies are the so-called “upstream defaults”. The privileges defined by the upstream defaults are not necessarily the ones that are activated by default on SUSE systems. openSUSE Leap comes with a predefined set of privileges that override the upstream defaults:

/etc/polkit-default-privs.standard

Defines privileges suitable for most desktop systems
/etc/polkit-default-privs.restrictive

Designed for machines administrated centrally

To switch between the two sets of default privileges, adjust the value of POLKIT_DEFAULT_PRIVS to either restrictive or standard in /etc/sysconfig/security. Then run the command set_polkit_default_privs as root.

Do not modify the two files in the list above. To define your own custom set of privileges, use /etc/polkit-default-privs.local. For details, refer to Section 9.4.3, “Modifying Configuration Files for Implicit Privileges”.
https://doc.opensuse.org/documentati...licies.default
 
Old 08-24-2017, 06:55 AM   #14
Timatekore
Member
 
Registered: Mar 2013
Location: Planet Earth
Distribution: open SuSE, Knoppix, Android, Puppy
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Mill J View Post
Did you check out the link I posted??
I am not even going to entertain the idea of fiddling around with fstab every time I am about to attach a USB dive to my machine
 
Old 08-24-2017, 06:59 AM   #15
Timatekore
Member
 
Registered: Mar 2013
Location: Planet Earth
Distribution: open SuSE, Knoppix, Android, Puppy
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ferrari View Post
This reads like a PolKit issue to me. It is possible to lock openSUSE down a bit depending on the environment it's being used in. This can impact on user access includes, including with PolKit privileges relating to udisks/DE auto-mounting of external media. I'm wondering if your system is set as 'secure' or even 'paranoid' perhaps. For reference, the system I'm using is set to 'easy'.



Reference:
https://doc.opensuse.org/documentati...al.permissions

Check the current settings
Code:
grep "PERMISSION_SECURITY" /etc/sysconfig/security
and change via YaST if necessary.
Thx for the hint, but I am afraid on my system the bug sits elsewhere:
Quote:
cat /etc/sysconfig/security
## Path: System/Security/Permissions
## Description: Configuration of permissions on the system
## Type: string
## Default: "easy local"
#
# Permission settings to use. By default 'easy', 'secure' and
# 'paranoid' exist. You may define your own though.
#
PERMISSION_SECURITY="easy local"
 
  


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
How do automount scripts work? flyinggeorge Linux - General 1 08-03-2013 11:01 AM
CentOS 5.2 Automount isos in fstab \other methods that work?automount iso Frankly3D Linux - General 6 07-13-2008 12:34 PM
usb automount: how does it work? iam whoiam Linux - General 1 08-12-2006 02:44 AM
automount didnt work PinRojas Debian 7 07-05-2005 11:29 AM
how to make automount work? jaan kaer Linux - Hardware 3 02-21-2004 07:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 11:16 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration