You are not logged in.

#1 2019-03-19 06:14:02

mmdamin
Member
From: Iran
Registered: 2019-02-19
Posts: 200
Website

Mounting NTFS needs password

Hi.
I've added my self to storage group but still file manager asks password for mounting disks.

$ groups
power users video storage disk wheel mmdamin sudo
$ ls /etc/pam.d/
chage	   deepin-auth-keyboard  i3lock		    newusers	rlogin	   screen	   sshd		systemd-user	     useradd
chfn	   groupadd		 lightdm	    other	rsh	   sddm		   su		system-local-login   userdel
chgpasswd  groupdel		 lightdm-autologin  partimaged	runuser    sddm-autologin  sudo		system-login	     usermod
chpasswd   groupmems		 lightdm-greeter    passwd	runuser-l  sddm-greeter    su-l		system-remote-login  xscreensaver
chsh	   groupmod		 login		    polkit-1	samba	   shadow	   system-auth	system-services

Last edited by mmdamin (2019-03-27 04:27:57)

Offline

#2 2019-03-19 07:08:24

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 3,335

Re: Mounting NTFS needs password

mmdamin wrote:

I've added my self to storage group

Why? This hasn't been needed for years and can be a bad idea...
https://wiki.archlinux.org/index.php/Us … emd_groups


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2019-03-19 07:25:10

seth
Member
Registered: 2012-09-03
Posts: 11,622

Re: Mounting NTFS needs password

The prime reason why this happens is that you don't have an active session.
https://wiki.archlinux.org/index.php/Ud … figuration

For pcmanfm and derivates ensure to have gvfs installed.

pam is useless information here.

Offline

#4 2019-03-19 08:32:56

mmdamin
Member
From: Iran
Registered: 2019-02-19
Posts: 200
Website

Re: Mounting NTFS needs password

Slithery wrote:
mmdamin wrote:

I've added my self to storage group

Why? This hasn't been needed for years and can be a bad idea...
https://wiki.archlinux.org/index.php/Us … emd_groups

this is my personal pc, not a web server, and I don't install anything outside of repos and aur, so security is not too much important for me. but thank you.

Offline

#5 2019-03-19 08:36:06

mmdamin
Member
From: Iran
Registered: 2019-02-19
Posts: 200
Website

Re: Mounting NTFS needs password

seth wrote:

The prime reason why this happens is that you don't have an active session.
https://wiki.archlinux.org/index.php/Ud … figuration

For pcmanfm and derivates ensure to have gvfs installed.

pam is useless information here.

I have gvfs installed, as it's a dependency for nautilus and dde-file-manager.

$ pm -Qi gvfs
Name            : gvfs
Version         : 1.40.0-1
Description     : Virtual filesystem implementation for GIO
Architecture    : x86_64
URL             : https://wiki.gnome.org/Projects/gvfs
Licenses        : LGPL
Groups          : gnome
Provides        : None
Depends On      : avahi  dconf  fuse  libarchive  libcdio-paranoia  libsoup  udisks2  libsecret  libbluray  libgudev  gcr  psmisc
Optional Deps   : gvfs-afc: AFC (mobile devices) support [installed]
                  gvfs-smb: SMB/CIFS (Windows client) support [installed]
                  gvfs-gphoto2: gphoto2 (PTP camera/MTP media player) support [installed]
                  gvfs-mtp: MTP device support [installed]
                  gvfs-goa: gnome-online-accounts (e.g. OwnCloud) support [installed]
                  gvfs-nfs: NFS support [installed]
                  gvfs-google: Google Drive support [installed]
                  gtk3: Recent files support [installed]
Required By     : brasero  deepin-daemon  gnome-music  gvfs-afc  gvfs-goa  gvfs-gphoto2  gvfs-mtp  gvfs-nfs  gvfs-smb  nautilus
Optional For    : evince  ffmpegthumbnailer  inkscape  thunar
Conflicts With  : None
Replaces        : gvfs-obexftp  gvfs-afp
Installed Size  : 5.13 MiB
Packager        : Bartlomiej Piotrowski <bpiotrowski@archlinux.org>
Build Date      : Fri 15 Mar 2019 03:16:07 PM +0330
Install Date    : Tue 19 Mar 2019 09:03:08 AM +0330
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature

Offline

#6 2019-03-19 08:42:41

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 3,335

Re: Mounting NTFS needs password

mmdamin wrote:

this is my personal pc, not a web server, and I don't install anything outside of repos and aur, so security is not too much important for me. but thank you.

Did you even read the link that I posted?

This has nothing to do with security, but the fact that adding yourself to those groups can break your system.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#7 2019-03-19 09:11:12

mmdamin
Member
From: Iran
Registered: 2019-02-19
Posts: 200
Website

Re: Mounting NTFS needs password

Slithery wrote:
mmdamin wrote:

this is my personal pc, not a web server, and I don't install anything outside of repos and aur, so security is not too much important for me. but thank you.

Did you even read the link that I posted?

This has nothing to do with security, but the fact that adding yourself to those groups can break your system.

sorry, I was a little busy. yes it's for direct access and should not added. I'll remove, but how can I silent the password that being asked by file managers? how to make pam trust them?

Offline

#8 2019-03-19 10:45:59

mmdamin
Member
From: Iran
Registered: 2019-02-19
Posts: 200
Website

Re: Mounting NTFS needs password

I've found this. Thank you all guys.
https://ask.fedoraproject.org/en/questi … fedora-20/

Offline

#9 2019-03-19 12:44:41

seth
Member
Registered: 2012-09-03
Posts: 11,622

Re: Mounting NTFS needs password

What means you're not on an active session (as predicted), but instead of fixing this, you chose to allow unlimited mounting access in a way that will get re-broken w/ the next update of udisks2…

3671_doublefacepalm.png

Offline

#10 2019-03-19 17:43:45

mmdamin
Member
From: Iran
Registered: 2019-02-19
Posts: 200
Website

Re: Mounting NTFS needs password

seth wrote:

What means you're not on an active session (as predicted), but instead of fixing this, you chose to allow unlimited mounting access in a way that will get re-broken w/ the next update of udisks2…

https://discordemoji.com/assets/emoji/3 … cepalm.png

Actions a user can perform using udisks are restricted with Polkit. If the user session is not activated or present (for example, when controlling udisks from a systemd/User service), adjust Polkit rules accordingly.

what does this mean? how can I activate my session? you mean I've not started a specified daemon for mounting disks?
I have gvfs. in dde-file-manager, nautilus and thunar mounting needs password.

Last edited by mmdamin (2019-03-19 17:45:02)

Offline

#11 2019-03-19 18:19:10

loqs
Member
Registered: 2014-03-06
Posts: 7,877

Re: Mounting NTFS needs password

It means you have logged in but systemd session management has not tracked that so you have not been added to the groups automatically by systemd.
Edit:
General_troubleshooting#Session_permissions

Last edited by loqs (2019-03-19 18:20:42)

Offline

#12 2019-03-20 04:39:43

mmdamin
Member
From: Iran
Registered: 2019-02-19
Posts: 200
Website

Re: Mounting NTFS needs password

loqs wrote:

It means you have logged in but systemd session management has not tracked that so you have not been added to the groups automatically by systemd.
Edit:
General_troubleshooting#Session_permissions

As you can see, I use lightdm with deepin desktop. also the polkit agent is running. in my i3, I've added exec_always polkitagent to my config file, also (without that I couldn't able to use file manager to mount disks by a permission denied error.)
Active is yes and Remote is no, as mentioned in wiki. what else should I do?

$ loginctl show-session $XDG_SESSION_ID
Id=2
User=1000
Name=mmdamin
Timestamp=Wed 2019-03-20 08:04:05 +0330
TimestampMonotonic=31164304
VTNr=7
Seat=seat0
Display=:0
Remote=no
Service=lightdm
Desktop=deepin
Scope=session-2.scope
Leader=522
Audit=2
Type=x11
Class=user
Active=yes
State=active
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0
LockedHint=no

Offline

#13 2019-03-20 08:50:24

seth
Member
Registered: 2012-09-03
Posts: 11,622

Re: Mounting NTFS needs password

Did you only change the rules for "org.freedesktop.udisks2.filesystem-mount-system" or did you use the sed command in that link?
What filesystem exactly do you try to mount from what filemanager exactly that prompts you w/ a PW request?

Offline

#14 2019-03-20 09:05:49

mmdamin
Member
From: Iran
Registered: 2019-02-19
Posts: 200
Website

Re: Mounting NTFS needs password

seth wrote:

Did you only change the rules for "org.freedesktop.udisks2.filesystem-mount-system" or did you use the sed command in that link?
What filesystem exactly do you try to mount from what filemanager exactly that prompts you w/ a PW request?

Actually I didn't, I just plan to do things on that link soon.
NTFS partitions of internal hard disk, and FAT32 partitions of USB Flash Disks on dde file manager, nautilus and thunar.
I don't use fstab for internal hard disk because it'll increase boot time (mounting and fsck on my root and home at least takes 1 second) and sometimes boot will failed if my Windows installation cache on them.

Offline

#15 2019-03-20 09:14:35

seth
Member
Registered: 2012-09-03
Posts: 11,622

Re: Mounting NTFS needs password

Then how would you know that this is the actual problem and solution?
You can expect the HDD partitions to require authentication, but the usb keys should work fine unless the filemanager(s?) at hand screw(s) up the "system" part.

Can you

udisksctl mount -b /dev/sd??

for any of those partitions (w/o the change)

I don't use fstab for internal hard disk because it'll increase boot time

"man fstab", look for noauto…

failed if my Windows installation cache on them

MANDATORY READ: https://wiki.archlinux.org/index.php/Du … t_Start-Up

Offline

#16 2019-03-20 09:41:18

mmdamin
Member
From: Iran
Registered: 2019-02-19
Posts: 200
Website

Re: Mounting NTFS needs password

seth wrote:

Then how would you know that this is the actual problem and solution?
You can expect the HDD partitions to require authentication, but the usb keys should work fine unless the filemanager(s?) at hand screw(s) up the "system" part.

Can you

udisksctl mount -b /dev/sd??

for any of those partitions (w/o the change)

I don't use fstab for internal hard disk because it'll increase boot time

"man fstab", look for noauto…

failed if my Windows installation cache on them

MANDATORY READ: https://wiki.archlinux.org/index.php/Du … t_Start-Up

I had same problem on ubuntu.
I think file manager asks udisk then udisk asks polkit for authentication, so if I config polkit to authenticate udisk without password it will work.
I'll try udisksctl mount you've said after I went home, thank you.
I knew fast startup but not noauto.

Last edited by mmdamin (2019-03-20 09:43:09)

Offline

#17 2019-03-20 11:18:30

mmdamin
Member
From: Iran
Registered: 2019-02-19
Posts: 200
Website

Re: Mounting NTFS needs password

I entered this in terminal

$ udisksctl mount -b /dev/sda5

then A window opened asked for password.
if I entered correct password:

Mounted /dev/sda5 at /run/media/mmdamin/70F0377CF037479C.

and if I cancel:

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

This is for all disks, even externals.

EDIT:
this fixed the password prompt, but as seth said it'll break after upgrade:

$ sed -i 's/auth_admin_keep/yes/g' /usr/share/polkit-1/actions/org.freedesktop.UDisks2.policy

The pkla file doesn't work, but if it would work it will fix the problem.

Last edited by mmdamin (2019-03-20 11:32:30)

Offline

#18 2019-03-20 13:29:44

seth
Member
Registered: 2012-09-03
Posts: 11,622

Re: Mounting NTFS needs password

Again: you can expect having to pass a password for an internal disk, update your fstab to avoid that.

=> Undo the sed command (re-install udisks2) and check
1. whether the same problem exists for an usb key
2. whether this is between org.freedesktop.udisks2.filesystem-mount and org.freedesktop.udisks2.filesystem-mount-system by only relax the latter pollicy.
2a. If it does no, try the "…-other-seat" and "…-fstab" rules.

Offline

#19 2019-03-20 14:11:12

mmdamin
Member
From: Iran
Registered: 2019-02-19
Posts: 200
Website

Re: Mounting NTFS needs password

seth wrote:

Again: you can expect having to pass a password for an internal disk, update your fstab to avoid that.

=> Undo the sed command (re-install udisks2) and check
1. whether the same problem exists for an usb key
2. whether this is between org.freedesktop.udisks2.filesystem-mount and org.freedesktop.udisks2.filesystem-mount-system by only relax the latter pollicy.
2a. If it does no, try the "…-other-seat" and "…-fstab" rules.

I've reinstalled and it begins to asking password again.
previously it asks password for USB (may I'm wrong), but I just tried again now and I see It mounts without asking password. I tried from terminal and all of file managers, it works.
So, I'm going to use fstab and noauto for internal disks. Thank you very much!

Offline

#20 2019-03-20 17:01:27

mmdamin
Member
From: Iran
Registered: 2019-02-19
Posts: 200
Website

Re: Mounting NTFS needs password

still needs password. what did I wrong? (I've added this then rebooted)

# /dev/sda7 LABEL=Data
UUID=7278F2D15D8438A7	/media/Media	ntfs      	noauto,rw,nosuid,nodev,user,blksize=4096,errors=remount-ro	0 0

Also I've found the password is being asked for org.freedesktop.udisks2.filesystem-mount-system by accident.

Last edited by mmdamin (2019-03-20 17:28:27)

Offline

#21 2019-03-20 21:17:54

seth
Member
Registered: 2012-09-03
Posts: 11,622

Re: Mounting NTFS needs password

Not sure what's wrong because you should be able to do even a stupid "mount" w/ an entry in fstab, but you can add "x-systemd.automount" and have the FS mounted as soon as you access /media/Media in any way.

Offline

#22 2019-03-21 04:36:19

mmdamin
Member
From: Iran
Registered: 2019-02-19
Posts: 200
Website

Re: Mounting NTFS needs password

seth wrote:

Not sure what's wrong because you should be able to do even a stupid "mount" w/ an entry in fstab, but you can add "x-systemd.automount" and have the FS mounted as soon as you access /media/Media in any way.

ok thank you

Offline

#23 2019-03-27 04:29:42

mmdamin
Member
From: Iran
Registered: 2019-02-19
Posts: 200
Website

Re: Mounting NTFS needs password

seth wrote:

Not sure what's wrong because you should be able to do even a stupid "mount" w/ an entry in fstab, but you can add "x-systemd.automount" and have the FS mounted as soon as you access /media/Media in any way.

This is a problem in ntfs-3g compilation.

$ mount /media/Media
WARNING: blksize option is ignored because ntfs-3g must calculate it.
Unprivileged user can not mount NTFS block devices using the external FUSE
library. Either mount the volume as root, or rebuild NTFS-3G with integrated
FUSE support and make it setuid root. Please see more information at
http://tuxera.com/community/ntfs-3g-faq/#unprivileged

Offline

#24 2019-03-27 04:46:36

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 27,515
Website

Re: Mounting NTFS needs password


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB