Failed to reboot system via logind: Interactive authentication required
1. reboot 失败
In Linux system root
is the highest privileged administrator account. In order to reboot
or shutdown
we need root
privileges.
privilege [ˈprɪvəlɪdʒ]:n. 特权,荣幸,特殊利益,优惠待遇,特殊待遇,荣耀,光荣,免责特权 vt. 给予特权,特别优待
administrator [ədˈmɪnɪstreɪtə(r)]:n. 管理员,(公司、机构的) 管理人员,行政人员
If we try to reboot
without this privileges we will get errors like following:
Failed to set wall message, ignoring: Interactive authentication required.
无法设置 wall message,忽略:需要交互式身份验证。
Failed to reboot system via logind: Interactive authentication required.
无法通过 logind 重新启动系统:需要交互式身份验证。
Failed to start reboot.target: Interactive authentication required.
See system logs and ‘systemctl status reboot.target’ for details.
Failed to open /dev/initctl
: Permission denied
无法打开 /dev/initctl
:权限被拒绝
Failed to talk to init daemon.
无法与 init 守护进程对话。
deepnorth@deepnorth-amax:~$ reboot
Failed to set wall message, ignoring: Interactive authentication required.
Failed to reboot system via logind: Interactive authentication required.
Failed to start reboot.target: Interactive authentication required.
See system logs and 'systemctl status reboot.target' for details.
Failed to open /dev/initctl: Permission denied
Failed to talk to init daemon.
deepnorth@deepnorth-amax:~$
deepnorth@deepnorth-amax:~$ sudo reboot
2. sudo reboot
So we have provide root
privileges with the sudo
command like below.
deepnorth@deepnorth-amax:~$ sudo reboot
daemon [ˈdiːmən]:n. 守护进程,后台程序
References
[1] Yongqiang Cheng, https://yongqiang.blog.csdn.net/