cockpit使用root账户登陆时显示权限被拒绝

 admin   2025-09-16 12:29   1 人阅读  0 条评论

原因是root账户默认在禁止登录的配置文件中

[root@localhost ~]# cat /etc/cockpit/disallowed-users 
# List of users which are not allowed to login to Cockpit
root

然后编辑这个配置文件,把root这一行删除

[root@localhost ~]# vim /etc/cockpit/disallowed-users 

# List of users which are not allowed to login to Cockpit
root

删除完如下所示

[root@localhost ~]# cat /etc/cockpit/disallowed-users 
# List of users which are not allowed to login to Cockpit

然后重启cockpit服务就可以了

[root@localhost ~]# systemctl restart --now cockpit.socket 
[root@localhost ~]# systemctl restart --now cockpit.service 
本文地址:https://liuchunjie.top/?id=814
版权声明:本文为原创文章,版权归 admin 所有,欢迎分享本文,转载请保留出处!
NEXT:已经是最新一篇了

评论已关闭!