Failed to reboot system via logind: Interactive authentication required

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/

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Yongqiang Cheng

梦想不是浮躁,而是沉淀和积累。

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值