You are not logged in.

#1 2016-05-24 08:31:58

nlern
Member
From: West Bengal, India
Registered: 2015-06-29
Posts: 51

Unable to Mount other Partitions using udisks2 without root Password

Hi all.  I have a working Ubuntu-Arch linux dual boot system.  I have installed kde plasma on Arch and Ubuntu is regular Ubuntu 14.04 LTS.  In Ubuntu I can mount other partitions using udisks2 without any password.  But in Arch, whenever I try to mount other partitions by clicking their icon in dolphin, I get a window asking for the root password.  My user account in Arch is part of storage group and I've created a file '10-udisks.rules' in '/etc/polkit-1/rules.d/' with following content to allow users in storage group to mount without passwords:

// See the polkit(8) man page for more information
// about configuring polkit.

// Allow udisks2 to mount devices without authentication
// for users in the "storage" group.
polkit.addRule(function(action, subject) {
    if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" ||
         action.id == "org.freedesktop.udisks2.filesystem-mount") &&
	subject.isInGroup("storage")) {
        return polkit.Result.YES;
    }
});

Still I get a window asking for root password.  What am I missing?  Please point it out.

Edit: I don't know if the following is important or not.  All of my partitions are of type btrfs.  When I first installed Arch,  I created no subvolume and installed it on 100 GB /dev/sda2.  Then I created a snapshot of /dev/sda2 partition (from Ubuntu) in a subvolume '@', deleted old files, directories and changed fstab of Arch suitably.  All went well and Arch booted fine.  Then I created abovesaid rule and it worked.  After some days I wanted to revert to use /dev/sda2 as root directory and move contents of '@' in /dev/sda2 and delete '@'.  But I could not find how to do this using btrfs commands.  So in Ubuntu, I used this command:

sudo mount /dev/sda2 /mnt
cd mnt
sudo cp -R @/* .

But it was taking too long (Arch system was nearly 7 GB then) where the snapshot was created instantaneously.  So I pressed ctrl+c and issued 'gksudo nautilus' and selected the directories moved, pressed ctrl+x (cut) and after entering '@' pressed ctrl+v (paste).  The operation completed successfuly.  When prompted I had pressed 'merge' and 'replace'.  Now all files under my home directory was owned by roor.  So I issued

cd /mnt/@/home
sudo chown -R myusername: myusername

where 'myusername' is my user name in Arch.  After that I rebooted to Arch and from then to now the Arch is running fine.  Only I have this above problem.

Last edited by nlern (2016-05-24 09:40:44)

Offline

#2 2016-05-24 08:36:49

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Unable to Mount other Partitions using udisks2 without root Password

I really hope that something catastrophic happened that prevented you from finishing this post and that you didn't think that a title and a cheery "hi all" constituted something worth a thread here...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2016-05-24 08:42:08

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,723

Re: Unable to Mount other Partitions using udisks2 without root Password

Offline

#4 2016-05-24 08:52:06

nlern
Member
From: West Bengal, India
Registered: 2015-06-29
Posts: 51

Re: Unable to Mount other Partitions using udisks2 without root Password

@jasonwryan, I was writing the question from android phone chrome browser and accidently pressed submit instead of preview.  But after that I finished the question and have updated it

Last edited by nlern (2016-05-24 08:52:56)

Offline

#5 2016-05-24 15:19:30

nlern
Member
From: West Bengal, India
Registered: 2015-06-29
Posts: 51

Re: Unable to Mount other Partitions using udisks2 without root Password

@V1del, the contents of '10-udisks.rule' are as shown in your 2nd link.  Yet I am not authorised.

Last edited by nlern (2016-05-24 15:19:56)

Offline

#6 2016-05-28 05:23:06

nlern
Member
From: West Bengal, India
Registered: 2015-06-29
Posts: 51

Re: Unable to Mount other Partitions using udisks2 without root Password

Maybe I'm having this problem due to user permissions of my current user account.  I will try to test automounting settings on a new account

Offline

#7 2016-05-28 06:05:48

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,433

Re: Unable to Mount other Partitions using udisks2 without root Password

can you mount using, (for example for device /dev/sdb1)

udisksctl mount -b /dev/sdb1

Offline

#8 2016-05-28 11:23:59

nlern
Member
From: West Bengal, India
Registered: 2015-06-29
Posts: 51

Re: Unable to Mount other Partitions using udisks2 without root Password

Docbroke wrote:

can you mount using, (for example for device /dev/sdb1)

udisksctl mount -b /dev/sdb1

I tried above command and got a window with following contents:

Authentication is required to mount WDC WD500AAKX-001CA0(/dev/sda5)

An application is attempting to perform an action that requires privileges.  Authentication is required to perform that action.

Password for root:

After clicking cancel I get following error

Error mounting /dev/sda5: GDBus.Error:org.freedesktop.Udisks2.Error.NotAuthorized:
 Not authorized to perform operation

Output of groups command

$ groups
wheel network storage power users

I've already given rules file I am using to add users of storage group to automount in udisks.

Edit: The command I issued following Docbroke's comment is:

udisksctl mount -b /dev/sda5

Last edited by nlern (2016-05-28 12:08:16)

Offline

#9 2016-05-28 11:54:25

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,433

Re: Unable to Mount other Partitions using udisks2 without root Password

that confirms that issue is not with dolphin.
Have you tried polkit rule posted in second link provided by V1del, which is specific for internal storage. I believe you are normally able to mount USB drives.
As a side note if you are trying to mount internal drives, you can also specify them in /etc/fstab for automounting on boot.

Offline

#10 2016-05-28 12:04:18

nlern
Member
From: West Bengal, India
Registered: 2015-06-29
Posts: 51

Re: Unable to Mount other Partitions using udisks2 without root Password

Docbroke, the contents of 10-udisks.rule that I've posted in the 1st post of this thread are essentialy same as indicated in the 2nd link by V1del.  I've placed that file in /etc/polkit-1/rules.d.  I'm currently mounting my ubuntu home partition using fstab.

Last edited by nlern (2016-05-28 12:09:54)

Offline

Board footer

Powered by FluxBB