欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

kali?linux?無法登錄root的問題及解決方法

 更新時(shí)間:2025年04月16日 09:51:28   作者:OceanWaves1993  
這篇文章主要介紹了kali?linux?無法登錄root的問題及解決方法,本文給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友參考下吧

kali linux 無法登錄root

1、問題描述

kali linux 無法登錄root

1.1、本地登錄root

本地?zé)o法登錄root,無法登陸,提示:Login Failed

1.2、ssh遠(yuǎn)程登錄root

ssh遠(yuǎn)程登錄root,無法登陸,提示:身份驗(yàn)證被拒絕,請重試。

2、解決方法

官方文檔:https://www.kali.org/docs/general-use/enabling-root/

2.1、為什么需要使用root登錄

Permanent vs temporary usage

永久使用與臨時(shí)使用

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.

在某些情況下,您可能需要長時(shí)間使用超級用戶root。在這些情況下,我們可以通過簡單的sudo su(將詢問當(dāng)前用戶的密碼),選擇Kali菜單中的root終端圖標(biāo),或者使用su -(將詢問root用戶的密碼)輕松訪問root帳戶,如果您已經(jīng)為您知道的root帳戶設(shè)置了密碼。完成后,exit或CTRL+D將帶我們離開這個升高的shell。
但是,在其他情況下,您可能希望在多個會話中使用root權(quán)限,而無需提升權(quán)限。在這些情況下,我們需要安裝一個軟件包,并進(jìn)行一些修改,以完全啟用根帳戶使用,因?yàn)槟J(rèn)情況下保持根帳戶禁用的安全原因。

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:

首先要做的是設(shè)置一個root密碼,該密碼應(yīng)與當(dāng)前用戶的密碼不同。我們可以通過以下方式做到這一點(diǎn):

點(diǎn)擊任務(wù)欄的這個圖標(biāo) 作用是打開終端

sudo passwd

第一行輸入當(dāng)前用戶的密碼
第二行輸入root要設(shè)置的用戶密碼
第三行輸入root要設(shè)置的用戶密碼進(jìn)行密碼確認(rèn)

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還是通過安裝在任何桌面環(huán)境上的登錄提示符使用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帳戶。使用其他桌面環(huán)境時(shí),不需要執(zhí)行此步驟:

sudo apt -y install kali-root-login

注銷當(dāng)前用戶 然后使用root登錄

root登錄成功

2.4、啟用ssh遠(yuǎn)程登錄root

切換到root用戶

su root

輸入root用戶密碼

cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak

編輯/etc/ssh/sshd_config 在最后面添加一行內(nèi)容:PermitRootLogin yes

/etc/ssh/sshd_config

sudo systemctl restart ssh

再次使用ssh遠(yuǎn)程登錄 成功

補(bǔ)充:解決vmware虛擬機(jī)下 kali 無root權(quán)限問題

解決vmware虛擬機(jī)下 kali 無root權(quán)限問題

?? 問題描述

在使用vmware創(chuàng)建kali虛擬機(jī)時(shí)只創(chuàng)建了用戶賬戶,并沒有明確指定root賬號的密碼,因此在以普通用戶身份登入時(shí)輸入su root不知道root密碼是多少。

?? 問題解決

這是因?yàn)榇藭r(shí)壓根沒有設(shè)置root密碼,需要以普通賬戶的身份來設(shè)置root密碼,聽起來有些抽象,具體指令如下:

sudo passwd root

系統(tǒng)提示輸入當(dāng)前用戶的密碼,輸入之后會提示設(shè)置root賬戶的密碼,輸入即可。

到此這篇關(guān)于kali linux 無法登錄root的文章就介紹到這了,更多相關(guān)kali linux 無法登錄root內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評論