You are not logged in.
A while ago I pretty much started using commandline for just about everything with file management, to the point where I don't have a file manager installed. The only problem I've had is that I got tired of manually mounting USBs and I read that fstab was not the proper way to do it. So I looked into udisks and installed it. It works wonderfully, except every time I want to unmount a USB I have to type in my password. I find this rather irritating seeing as I have a button on my keyboard for just that, but it won't work since I can't bind it and enter my password. Is there any way I can make udisks not require a password?
Edit: Because it seems unclear, at this current point, when I plug in a USB it mounts to my /mnt folder. When I try this command:
udisksctl unmount -b /dev/sdc1It asks for a password. I just need to make it go automatically.
Also, I meant fstab when I typed cfdisk. My mistake.
Last edited by Dornith (2014-05-13 16:10:47)
Offline
sudoers
Offline
sudoers
I thought of that, but I figured there should be some way to just disable asking for passwords since I was able to get it to not require you be in root.
Offline
Does the option '--no-user-interaction' prevent the authentication dialog from appearing in your case?
Do you mount external or internal block device file systems?
And it is udisks and udisksctl ; so can you fix the typo in the thread title for a search on 'udisksctl' in the forum to include your thread?
Last edited by berbae (2014-05-13 09:04:32)
Offline
So you can mount (using udisksctl) without a password but then unmount (as the same user with the same active login session) requires a password?
And cfdisk is a partitioning tool?
Offline
I got tired of manually mounting USBs
FYI if you want your USB devices to automount when plugged in, you need more than just udisks. Details in the wiki.
Offline
Does the option '--no-user-interaction' prevent the authentication dialog from appearing in your case?
I tried that and got this error:
Error unmounting /dev/sdc1: GDBus.Error:org.freedesktop.UDisks2.Error.NotAuthorizedCanObtain: Not authorized to perform operationDo you mount external or internal block device file systems?
External. This is all for USB flash memory drives.
Offline
As Raynman has asked - you mount with udisksctl as user without providing a password and then can't unmount without providing a password?
Offline
Please post the command you use to mount the device, and in what login name.
Then post the output of the command 'mount' for the mounted device.
Is there an entry for it in /etc/fstab?
What happens if you try to un-mount it using just the 'umount' command as the user who mounted it?
Last edited by berbae (2014-05-13 14:54:56)
Offline
I'm not issuing any command to mount it. ldm is doing that for me.
mount
...
/dev/sdc1 on /mnt/USB type vfat (rw,relatime,uid=1000,gid=100,fmask=0133,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,flush,errors=remount-ro)
...There is not entry in fstab. There was, but I removed it.
umount /dev/sdc1
umount: /mnt/USB: umount failed: Operation not permittedOffline
https://github.com/LemonBoy/ldm/blob/master/README.pod says "ldm -r" should unmount the device - perhaps you should use that?
Offline
If you use ldm to automount, you cannot use udisks to un-mount it.
But ldm has the '-r' option to un-mount:
-r device
Ask the ldm daemon to unmount the selected device.
Why don't you use this option?
Offline
And if you really want to use udisksctl, you can allow "org.freedesktop.udisks2.filesystem-unmount-others" via polkit (ldm mounts as root and you want to unmount as user). https://wiki.archlinux.org/index.php/Polkit#Examples
Last edited by lucke (2014-05-13 15:34:20)
Offline
Something else worth mentioning: ldm doesn't use udisks at all, so you can remove it if you want.
Offline
Hu... I guess somewhere I got it that ldm was a wrapper for udisks. Well, thanks for the help.
ldm -r /dev/sdc1worked perfectly!
Offline
Yes, you got it from the udisks wiki page. ![]()
I'll correct it now.
Offline