kali?linux?無(wú)法登錄root的問(wèn)題及解決方法
kali linux 無(wú)法登錄root
1、問(wèn)題描述
kali linux 無(wú)法登錄root
1.1、本地登錄root
本地?zé)o法登錄root,無(wú)法登陸,提示:Login Failed
1.2、ssh遠(yuǎn)程登錄root
ssh遠(yuǎn)程登錄root,無(wú)法登陸,提示:身份驗(yàn)證被拒絕,請(qǐng)重試。
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.
在某些情況下,您可能需要長(zhǎng)時(shí)間使用超級(jí)用戶(hù)root。在這些情況下,我們可以通過(guò)簡(jiǎn)單的sudo su(將詢(xún)問(wèn)當(dāng)前用戶(hù)的密碼),選擇Kali菜單中的root終端圖標(biāo),或者使用su -(將詢(xún)問(wèn)root用戶(hù)的密碼)輕松訪問(wèn)root帳戶(hù),如果您已經(jīng)為您知道的root帳戶(hù)設(shè)置了密碼。完成后,exit或CTRL+D將帶我們離開(kāi)這個(gè)升高的shell。
但是,在其他情況下,您可能希望在多個(gè)會(huì)話中使用root權(quán)限,而無(wú)需提升權(quán)限。在這些情況下,我們需要安裝一個(gè)軟件包,并進(jìn)行一些修改,以完全啟用根帳戶(hù)使用,因?yàn)槟J(rèn)情況下保持根帳戶(hù)禁用的安全原因。
2.2、啟用root帳戶(hù)
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è)置一個(gè)root密碼,該密碼應(yīng)與當(dāng)前用戶(hù)的密碼不同。我們可以通過(guò)以下方式做到這一點(diǎn):
點(diǎn)擊任務(wù)欄的這個(gè)圖標(biāo) 作用是打開(kāi)終端
sudo passwd
第一行輸入當(dāng)前用戶(hù)的密碼
第二行輸入root要設(shè)置的用戶(hù)密碼
第三行輸入root要設(shè)置的用戶(hù)密碼進(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.
接下來(lái)我們需要決定的是,我們是想通過(guò)SSH還是通過(guò)安裝在任何桌面環(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登錄,以更改多個(gè)配置文件,這些文件將允許我們通過(guò)GNOME GDM3和KDE登錄提示登錄到root帳戶(hù)。使用其他桌面環(huán)境時(shí),不需要執(zhí)行此步驟:
sudo apt -y install kali-root-login
注銷(xiāo)當(dāng)前用戶(hù) 然后使用root登錄
root登錄成功
2.4、啟用ssh遠(yuǎn)程登錄root
切換到root用戶(hù)
su root
輸入root用戶(hù)密碼
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 無(wú)root權(quán)限問(wèn)題
解決vmware虛擬機(jī)下 kali 無(wú)root權(quán)限問(wèn)題
?? 問(wèn)題描述
在使用vmware創(chuàng)建kali虛擬機(jī)時(shí)只創(chuàng)建了用戶(hù)賬戶(hù),并沒(méi)有明確指定root賬號(hào)的密碼,因此在以普通用戶(hù)身份登入時(shí)輸入su root
不知道root密碼是多少。
?? 問(wèn)題解決
這是因?yàn)榇藭r(shí)壓根沒(méi)有設(shè)置root密碼,需要以普通賬戶(hù)的身份來(lái)設(shè)置root密碼,聽(tīng)起來(lái)有些抽象,具體指令如下:
sudo passwd root
系統(tǒng)提示輸入當(dāng)前用戶(hù)的密碼,輸入之后會(huì)提示設(shè)置root賬戶(hù)的密碼,輸入即可。
到此這篇關(guān)于kali linux 無(wú)法登錄root的文章就介紹到這了,更多相關(guān)kali linux 無(wú)法登錄root內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
利用iptables來(lái)配置linux禁止所有端口登陸和開(kāi)放指定端口的方法
下面小編就為大家?guī)?lái)一篇利用iptables來(lái)配置linux禁止所有端口登陸和開(kāi)放指定端口的方法。小編覺(jué)得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2017-01-01VirtualBox 錯(cuò)誤:This kernel requires the following features no
這篇文章主要介紹了VirtualBox 錯(cuò)誤:This kernel requires the following features not present on the CPU的相關(guān)資料,希望通過(guò)本文能幫助到大家,解決這樣的問(wèn)題,需要的朋友可以參考下2017-10-10php擴(kuò)展memcached和memcache的安裝配置方法
這篇文章主要介紹了php擴(kuò)展memcached和memcache的安裝配置方法,需要的朋友可以參考下2014-11-11詳解Ubuntu 16.04 pycharm設(shè)置桌面快捷啟動(dòng)方式
本篇文章主要介紹了Ubuntu 16.04 pycharm設(shè)置桌面快捷啟動(dòng)方式,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧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ī)?lái)一篇Linux下實(shí)現(xiàn)定時(shí)器Timer的幾種方法總結(jié)。小編覺(jué)得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧2016-10-10linux下用time(NULL)函數(shù)和localtime()獲取當(dāng)前時(shí)間的方法
這篇文章主要介紹了linux下用time(NULL)函數(shù)和localtime()獲取當(dāng)前時(shí)間的方法,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2020-02-02