kali?linux?無法登錄root的問題及解決方法
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)文章
利用iptables來配置linux禁止所有端口登陸和開放指定端口的方法
下面小編就為大家?guī)硪黄胕ptables來配置linux禁止所有端口登陸和開放指定端口的方法。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2017-01-01VirtualBox 錯誤:This kernel requires the following features no
這篇文章主要介紹了VirtualBox 錯誤:This kernel requires the following features not present on the CPU的相關(guān)資料,希望通過本文能幫助到大家,解決這樣的問題,需要的朋友可以參考下2017-10-10php擴(kuò)展memcached和memcache的安裝配置方法
這篇文章主要介紹了php擴(kuò)展memcached和memcache的安裝配置方法,需要的朋友可以參考下2014-11-11詳解Ubuntu 16.04 pycharm設(shè)置桌面快捷啟動方式
本篇文章主要介紹了Ubuntu 16.04 pycharm設(shè)置桌面快捷啟動方式,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2017-12-12vmware中CentOS7網(wǎng)絡(luò)設(shè)置教程詳解
這篇文章主要為大家詳細(xì)介紹了vmware中CentOS7網(wǎng)絡(luò)設(shè)置教程,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2017-07-07Win10 + Ubuntu 16.04雙系統(tǒng)完美安裝教程【詳細(xì)】
這篇文章主要介紹了Win10 + Ubuntu 16.04雙系統(tǒng)完美安裝教程,本文圖文并茂給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2019-10-10Linux下實(shí)現(xiàn)定時(shí)器Timer的幾種方法總結(jié)
下面小編就為大家?guī)硪黄狶inux下實(shí)現(xiàn)定時(shí)器Timer的幾種方法總結(jié)。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2016-10-10linux下用time(NULL)函數(shù)和localtime()獲取當(dāng)前時(shí)間的方法
這篇文章主要介紹了linux下用time(NULL)函數(shù)和localtime()獲取當(dāng)前時(shí)間的方法,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2020-02-02