挂载内部分区每次都需要密码
/usr/share/polkit-1/actions/org.freedesktop.devicekit.disks.policy
<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>
<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>
改为
<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>yes</allow_active> <!-- here -->
</defaults>
</action>
<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>yes</allow_active> <!-- here -->
</defaults>
</action>
参考:http://ubuntuforums.org/showthread.php?t=1299820
update 2010/4/20
经过更新,现在是
/usr/share/polkit-1/actions/org.freedesktop.udisks.policy
但是每次更新系统后,该文件都会被覆盖,man pklocalauthority 可以看到配置本地权限的方法
在 /etc/polkit-1/localauthority/50-local.d/ 文件夹下新建一个任意文件名,后缀为.pkla的文件,内容如下(具体可以看man):
[filesystems mount internal privs]
Identity=unix-user:localuser
Action=org.freedesktop.udisks.filesystem-mount-system-internal
ResultAny=no
ResultInactive=no
ResultActive=yes
参考:http://yuanjie-huang.blogspot.com/2009/11/mount-internal-filesystem-without.html
浙公网安备 33010602011771号