如果安装Centos9系统,只设置了root账户,没有新建账户,会出现Web cockpit登录不了,需要新建账户才能正常登录,方法如下:
设置一般账户方法,比如设置的用户名为kaixinit
[root@localhost ~]# sudo adduser kaixinit [root@localhost ~]# passwd kaixinit Changing password for user kaixinit. New password: Retype new password: passwd: all authentication tokens updated successfully.
设置带root权限的账户方法,比如设置的用户名为kaixinit
[root@localhost ~]# sudo useradd -ou 0 -g 0 kaixinit useradd warning: kaixinit's uid 0 outside of the UID_MIN 1000 and UID_MAX 60000 range. [root@localhost ~]# passwd kaixinit Changing password for user kaixinit. New password: Retype new password: passwd: all authentication tokens updated successfully.
如果是删除账户,比如设置的用户名为kaixinit
[root@localhost ~]# userdel -r kaixinit
原创文章,作者:开心电脑网,如若转载,请注明出处。