关于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 bkdwei@163.com.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值