關於linuxmint下自動掛載分區的權限問題

在基於debian的linuxmint系統上,我門剛裝好系統的時候,每次開機之後,打開nautilius,掛載分區的時候都會顯示一個對話框,內容是:“Authentication is required to mount the device”。也即是說,每次打開我的電腦的硬盤分區的時候都會需要權限(即授權)。其實這個安全機制在這裏並沒有什麼用對於大多數人來說。因爲打開分區是我們經常做的事,而且經常輸入管理員的密碼是很麻煩的。那麼怎麼去掉這個權限控制呢?
  進入/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,然後保存即可。
  1.   &lt;action id=&quot;org.freedesktop.devicekit.disks.filesystem-mount-system-internal&quot;&gt;
  2.     &lt;description&gt;Mount a system-internal device&lt;/description&gt;
  3.     &lt;description xml:lang=&quot;da&quot;&gt;Montér en intern enhed&lt;/description&gt;
  4.     &lt;description xml:lang=&quot;de&quot;&gt;Eingebautes Ger?t einh?ngen&lt;/description&gt;
  5.     &lt;message&gt;Authentication is required to mount the device&lt;/message&gt;
  6.     &lt;message xml:lang=&quot;da&quot;&gt;Autorisering er p?kr?vet for at montere et fil system&lt;/message&gt;
  7.     &lt;message xml:lang=&quot;de&quot;&gt;Zugriffsrechte werden ben?tigt um das Ger?t einzuh?ngen&lt;/message&gt;
  8.     &lt;defaults&gt;
  9.       &lt;allow_any&gt;no&lt;/allow_any&gt;
  10.       &lt;allow_inactive&gt;no&lt;/allow_inactive&gt;
  11.       &lt;allow_active&gt;auth_admin_keep&lt;/allow_active&gt;
  12.     &lt;/defaults&gt;
  13.   &lt;/action&gt;

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].
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章