你的位置:首页 > 操作系统

[操作系统]Linux Systemd 挂载问题解决


Create the following file as root:

/etc/polkit-1/rules.d/49-nopasswd_global.rules/* Allow members of the wheel group to execute any actions * without password authentication, similar to "sudo NOPASSWD:" */polkit.addRule(function(action, subject) {  if (subject.isInGroup("wheel")) {    return polkit.Result.YES;  }});

Replace wheel by any group of your preference.

This will result in automatic authentication for any action requiring admin rights via Polkit. As such, be careful with the group you choose to give such rights to.

网址:https://wiki.archlinux.org/index.php/Polkit#Mounting_storage_without_password