为什么 usb-creator-gtk 需要 root 访问权限?

Jo-*_*tad 3 grub2 usb-creator

当您要创建可启动的 USB 记忆棒时,您必须标识为 sudoer。这是为什么?我很容易理解为什么不应该允许非特权用户摆弄已安装的系统,但是如果您有写权限,为什么不应该允许您将 grub 复制到记忆棒上?

enz*_*tib 5

Policy Kit 预见了以下与Usb Creator相关的动作

$ pkaction --verbose | grep -A1 '\.usb' | less
com.ubuntu.usbcreator.bootloader:
  description:       Install the bootloader
--
com.ubuntu.usbcreator.format:
  description:       Format the device
--
com.ubuntu.usbcreator.image:
  description:       Image the device
--
com.ubuntu.usbcreator.mount:
  description:       Mount a device
Run Code Online (Sandbox Code Playgroud)

鉴于块设备归 root 所有,这些是只有 root 才能执行的操作。