LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 05-14-2015, 09:23 PM   #16
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225

Any problem with mounting the hidden partition read-only in fstab? Users (even root) will not be able to change any files on the partition.
 
Old 05-15-2015, 02:51 AM   #17
Emsi
LQ Newbie
 
Registered: Nov 2013
Location: Bulgaria
Distribution: Slackware
Posts: 3

Rep: Reputation: Disabled
I get the idea from this file /usr/share/polkit-1/actions/org.freedesktop.udisks2.policy
Code:
<action id="org.freedesktop.udisks2.filesystem-mount">
...
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>yes</allow_active>
...
Not sure why they are different, i will try to test it tonight or tomorrow.

Added
-----

After testing with clean -current, and trying to downgrade two packages that was changed between 14.1 and current that i think may be related to it:
udisks2-2.1.0-x86_64-1.txz -> udisks2-2.1.5-x86_64-1.txz
polkit-gnome-0.102-x86_64-1.txz -> polkit-gnome-0.102-x86_64-2.txz
There was no change in behavior, every user was able to mount internal partition that was commented in fstab.
Then i start looking into this policy file /usr/share/polkit-1/actions/org.freedesktop.udisks2.policy and /etc/polkit-1/localauthority/50-local.d/20-plugdev-group-mount-override.pkla
Second file is included in package from line 109 of polkit.SlackBuild
From my point of view this file should be removed, because it gives every user in group plugdev to much permission. Is it required for some reason ?
After removing it, users in plugdev can mount usb drives, cd and etc. but if they try to mount internal partition, root password is required.

And one more test that i made before removing 20-plugdev-group-mount-override.pkla file :
From console issuing this command from regular user:
Quote:
udisksctl mount -b /dev/sdX
/dev/sdX gets mounted. No password asked.
*udisksctl is from udisks2 package.
Quote:
udisks --mount /dev/sdX
Password is requested before mounting partition.
*udisks is from udisks package.

After removing pkla file, both commands require root password.

Last edited by Emsi; 05-15-2015 at 07:56 AM. Reason: added more info after testing
 
1 members found this post helpful.
Old 05-15-2015, 09:59 PM   #18
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
I think that a better solution is to edit /etc/polkit-1/localauthority/50-local.d/20-plugdev-group-mount-override.pkla

The entry
Code:
Action=org.freedesktop.udisks2.filesystem-*;org.freedesktop.udisks2.eject-*
is allowing the org.freedesktop.udisks2.filesystem-mount-system action.
Code:
bash-4.3$ pkaction | grep udisks2.filesystem-
org.freedesktop.udisks2.filesystem-fstab
org.freedesktop.udisks2.filesystem-mount
org.freedesktop.udisks2.filesystem-mount-other-seat
org.freedesktop.udisks2.filesystem-mount-system
org.freedesktop.udisks2.filesystem-unmount-others
Also it is allowing
Code:
bash-4.3$ pkaction | grep "udisks2.eject-"
org.freedesktop.udisks2.eject-media
org.freedesktop.udisks2.eject-media-other-seat
org.freedesktop.udisks2.eject-media-system

I suggest changing to
Code:
Action=org.freedesktop.udisks2.filesystem-mount;org.freedesktop.udisks2.eject-media
which restores the requirement for root authorisation for a system partition as well as prevents ejecting system media.
A member of the plugdev group can still mount, unmount and eject external media (USB devices, optical disks).

Last edited by allend; 05-15-2015 at 10:41 PM.
 
1 members found this post helpful.
Old 05-17-2015, 01:24 AM   #19
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,784

Rep: Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434
I'm curious if anyone has any idea why udev's mounting protocol doesn't default to root. If one does not configure udev mounting policy Dolphin will ask for a password that doesn't exist since it is assigned to no user at all by default, that is to say that the partition is unmountable until and unless one assigns the job to root or some user. Not a big deal but I find it an odd default. Perhaps I'm missing some compelling strategy.
 
Old 05-17-2015, 02:17 AM   #20
kingbeowulf
Senior Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware
Posts: 1,266
Blog Entries: 11

Rep: Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744
Quote:
Originally Posted by enorbet View Post
I'm curious if anyone has any idea why udev's mounting protocol doesn't default to root.
I can only surmise that some IMHO idiot distros disable/remove root and depend on sudo for everything.

Last edited by kingbeowulf; 05-17-2015 at 02:17 AM. Reason: text stutter
 
Old 05-17-2015, 06:43 AM   #21
pchristy
Senior Member
 
Registered: Oct 2012
Location: South Devon, UK
Distribution: Slackware
Posts: 1,119

Original Poster
Rep: Reputation: Disabled
Apologies for not responding sooner - family commitments got in the way! Still its allowed time for an interesting discussion to develop, and thanks to all who have contributed.

GazL: Yes, the behaviour is exactly the same in Xfce/Thunar, confirming that this is a system issue rather than a KDE one.

I've tried the solutions suggested both by Emsi and allend and both restore the desired behaviour - at least from my perspective. I get the feeling from the discussion that allend's solution may be the optimal one, so that's what I have left on my machine for the moment. I'm not in a position to judge for myself, as this is an area of the system outside of my experience!

I'll drop Pat an e-mail drawing his attention to this thread. I'll also leave it a couple of days before marking it "solved" to see if any more definitive conclusions can be drawn.

Thanks everybody for your contributions!

--
Pete
 
1 members found this post helpful.
Old 05-20-2015, 10:54 AM   #22
pchristy
Senior Member
 
Registered: Oct 2012
Location: South Devon, UK
Distribution: Slackware
Posts: 1,119

Original Poster
Rep: Reputation: Disabled
I've sent Pat an e-mail about this, and pointed him at this thread. No response, but I guess he's pretty busy right now!

I'm going to mark this as "solved" now, because the solutions offered work for me!

Many thanks, folks.

--
Pete
 
  


Reply

Tags
mount, password



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
[SOLVED] Force password change on VM console in VMware BhushanPathak Linux - Newbie 2 02-02-2015 11:42 PM
[SOLVED] Force password complexity - RHEL 5 savona Linux - Security 4 03-21-2011 12:07 PM
[SOLVED] How to force password to 15 characters on a selected accounts? lrs1122 Linux - Security 5 04-14-2010 08:29 AM
force ssh to use key AND password frznchckn Linux - General 1 05-05-2009 01:55 PM
Force sudo to re-ask for password? humbletech99 Linux - Security 3 12-06-2006 10:14 AM

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

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