進入/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].