进入/usr/share/polkit-1/actions目录里,里面就是用来设置各种权限的配置文件。找到一个名为org.freedesktop.udisks.policy的文件,右键点击它用管理员的身份打开,然后把(代码开头部分)下面的红色部分的字体全换成yes即可。编辑完成保存,无需重启即可生效。
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
<policyconfig>
<vendor>The udisks Project</vendor>
<vendor_url>http://udisks.freedesktop.org/</vendor_url>
<icon_name>drive-removable-media</icon_name>
<action id="org.freedesktop.udisks.filesystem-mount">
<description>Mount a device</description>
<description xml:lang="da">Montér en enhed</description>
<description xml:lang="de">Ger?t einh?ngen</description>
<message>Authentication is required to mount the device</message>
<message xml:lang="da">Autorisering er p?kr?vet for at montere et fil system</message>
<message xml:lang="de">Zugriffsrechte werden ben?tigt um das Ger?t einzuh?ngen</message>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
</action>
<action id="org.freedesktop.udisks.filesystem-mount-system-internal">
<description>Mount a system-internal device</description>
<description xml:lang="da">Montér en intern enhed</description>
<description xml:lang="de">Eingebautes Ger?t einh?ngen</description>
<message>Authentication is required to mount the device</message>
<message xml:lang="da">Autorisering er p?kr?vet for at montere et fil system</message>
<message xml:lang="de">Zugriffsrechte werden ben?tigt um das Ger?t einzuh?ngen</message>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
</action>
如果你的系统是ubuntu系统的话,则打开文件/usr/share/polkit-1/actions/org.freedesktop.devicekit.disks.policy,修改下面的红色字体为yes,然后保存即可。
- <action id="org.freedesktop.devicekit.disks.filesystem-mount-system-internal">
- <description>Mount a system-internal device</description>
- <description xml:lang="da">Montér en intern enhed</description>
- <description xml:lang="de">Eingebautes Ger?t einh?ngen</description>
- <message>Authentication is required to mount the device</message>
- <message xml:lang="da">Autorisering er p?kr?vet for at montere et fil system</message>
- <message xml:lang="de">Zugriffsrechte werden ben?tigt um das Ger?t einzuh?ngen</message>
- <defaults>
- <allow_any>no</allow_any>
- <allow_inactive>no</allow_inactive>
- <allow_active>auth_admin_keep</allow_active>
- </defaults>
- </action>
if you wannt to make your system to mounted the partition without authentication,you shou open their diretory and edit the polity file .just repleace the red-color words above with yes ,it will take effect without reboot.still any question ,plz send me email by [email protected].