The question is more informative than practical, but all the same.

Fstab fragment:

/dev/disk/by-label/vmf /vmf ext2 noauto,nofail,user,noexec,rw 0 2 

As far as I understand that such a file system will not be automatically mounted at boot time. It can be mounted by a regular user.

 ]$ mount /dev/disk/by-label/vmf 

Well, with a double click on the file system icon on the desktop, the administrator password is still requested.

  1. Is it possible to prevent the password from being requested,

  2. Or mounted automatically when you first access / vmf

  • 1 - yes, you can, in theory, you need to correct the polkit rules for this action ... but honestly, I didn’t have the right and pure way to set it up. 2 - you can use autofs . - Fat-Zer

2 answers 2

In the polkte there is a rule:

 <action id="org.freedesktop.udisks2.filesystem-fstab"> <description>Mount/unmount filesystems defined in the fstab file with the x-udisks-auth option</description> ... <defaults> <allow_any>auth_admin</allow_any> <allow_inactive>auth_admin</allow_inactive> <allow_active>auth_admin_keep</allow_active> </defaults> 

Add x-udisks-auth to fstab

The rules in /usr/share/polkit-1/actions/org.freedesktop.UDisks2.policy put on this policy

  <allow_active>yes</allow_active> 

Without fstab , just by clicking, you can enable it in the org.freedesktop.udisks2.filesystem-mount-system policy. System partitions should not break, there are a lot of processes that will not allow to unmount the root on the fly.

So as not to get stuck when updating the policy you need to copy somewhere in /var/

    If a regular user can mount it, then why not create a simple bash script on the same desktop, since there is such a need. Perhaps this will be the easiest solution to the problem.

    • It is possible and so ... But there is an incomprehensible moment, why should a mount point be written in fstab if there is no car. The user can then mount it to any other section. - Yuchimenko Igor pm
    • one
      why write a mount point in fstab, if there is no auto , just for the purpose of issuing the mount command without keys and the second parameter later. - Sergey