本文主要是介绍kali linux 无法登录root的问题及解决方法,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
《kalilinux无法登录root的问题及解决方法》:本文主要介绍kalilinux无法登录root的问题及解决方法,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,...
kali linux 无法登录root
1、问题描述
kali linux 无法登录androidroot
1.1、本地登录root
本地无法登录root,无法登陆,提示:Login Failed
1.2、ssh远程登录root
ssh远程登录root,无法登陆,提示:身份验证被拒绝,请重试。
2、解决方法
官方文档:https://www.kali.org/docs/general-use/enabling-root/
2.1、为什么需要使用root登录
Permanent vs temporary usage
永久使用与临时使用
There are some cases where you may need to use superuser, root, for an extended period of time. In these cases we can easily Access the root account with a simple sudo su (which will ask for the current user’s password), selecting the root terminal icon in the Kali menu, or alternatively using su - (which will ask for the root user’s password) if you have set a password for the root account that you know of. When finished, exit or CTRL+D will take us out of this elevated shell.
However, there may be other times where you may want to use root across multiple sessions without the hassle of elevating privileges. In these situations we will need to install a package and make a few modifications to fully enable the root account for use due to security reasons of keeping the root account disabled by default.
在某些情况下,您可能需要长时间使用超级用户root。在这些情况下,我们可以通过简单的sudo su(将询问当前用户的密码),选择Kali菜单中的root终端图标,或者使用su -(将询问root用户的密码)轻松访问root帐户,如果您已经为您知道的root帐户设置了密码。完成后,exit或CTRL+D将带我们离开这个升高的shell。
但是,在其他情况下,您可能希望在多个会话中使用root权限,而无需提升权限。在这些情况下,我们需要安装一个软件包,并进行一些修改,以完全启用根帐户使用,因为默认情况下保持根帐户禁用的安全原因。
2.2、启用root帐户
The first thing to do is set a root password, which should be different to the current user’s password (in this case kali). We can do this by doing the following:
首先要做的是设置一个root密码,该密码应与当前用户的密码不同。我们可以通过以下方式做到这一点:
点击任务栏的这个图标 作用是打开终端
sudo passwjsd
第一行输入当前用户的密码
第二行输入root要设置的用户密码
第三行输入root要设置的用户密码进行javascript密码确认
The next thing we need to decide is if we are wanting to use root via SSH or through the login prompt on whichever desktop environment is installed.
接下来我们需要决定的是,我们是想通过SSH还是通过安装在任何桌面环境上的登录提示符使用root。
2.3、启用GNOME和KDE登录的root
We will first install kali-root-login to change multiple configuration files that will permit us to login to the root account through the GNOME GDM3 and the KDE login prompt. This step is not necessary when using other desktop environments:
我们将首先安装kali-root登录,以更改多个配置文件,这些文件将允许我们通过GNOME GDM3和KDE登录提示登录到root帐户。使用其他桌面环境时,不需要执行此步骤:
sudo apt -y install kali-root-login
注销当前用户 然后使用root登录
root登录成功
2.4、启用ssh远程登录root
切换到root用户
su root
输入root用户密码
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
编辑/etc/ssh/sshd_config 在最后面添加一行内容:PermitRootLogin yes
/etc/ssh/sshd_config
sudo systemctl restart ssh
再次使用ssh远程登录 成功
补充:解决vmware虚拟机下 kali 无root权限问题
解决vmware虚拟机下 kali 无root权限问题
问题描述
在使用vmware创建kali虚拟机时只创建了用户账户,并没有明确指定root账号的密码,因此在以普通用户身份登入时输入su root
不知道root密码是多少javascript。
☁️ 问题解决
这是因为此时压根没有设置root密码,需要以普通账户的身份来设置root密码,听起来有些抽象,具体指令如下:
sudo passwd root
系统提示输入当前用户的密码,输入之后会提示设置root账户的密码,输入即可。
到此这篇关于kali linux 无法登录root的文章就介绍到这了,更多相关kali linux 无法登录root内容请搜索China编程(www.chinasem.cn)以前的文章或继续浏览下面的相关文章希望大家以后多多支持编程China编程(www.chinasem.cn)!
这篇关于kali linux 无法登录root的问题及解决方法的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!