Bri*_*ick 5 authentication ubuntu mount sd-card chrome-book
我正在通过 crouton 在 Toshiba Chromebook 2 上运行 Ubuntu 14.04。
我最近重新格式化了一张 256GB 的 SD 卡,该卡一直保存在我的 chromebook 中。我的问题是,每次我在唤醒 Chromebook 后尝试访问我的 SD 卡时,都会收到一条消息
Authentication is required to mount SD256 (/dev/mmcblk1p1)
An application is attempting to perform an action that requires privileges.
Authentication is required to perform this action.
Action: org.freedesktop.udisks2.filesystem-mount
Vendor: The udisks Project
Run Code Online (Sandbox Code Playgroud)
我很好奇为什么每次唤醒我的 chromebook 时都必须验证我的 SD 卡,以及是否有办法改变它。
我找到了答案。这是UDisks PolicyKit 身份验证问题,可能是由升级触发的。
线索是关于安装时需要身份验证的问题。我们只需要扭转它。
您需要创建一个/etc/polkit-1/localauthority/50-local.d/
名为类似udisks.pkla
以下内容的文件:
[Storage Permissions]
Identity=unix-user:*
Action=org.freedesktop.udisks2.filesystem-mount;org.freedesktop.udisks2.filesystem-mount-system
ResultAny=yes
ResultInactive=yes
ResultActive=yes
Run Code Online (Sandbox Code Playgroud)
(请注意,/etc/polkit-1/localauthority
其子级只能由 root 访问,因此使用sudo
可能需要盲文件系统访问;或者仅使用sudo vim
或sudo bash
并在编辑器或 shell 内导航。)