- Зайти root kali linux
- Enabling the root account
- Enabling root for SSH
- Enabling root for GNOME and KDE login
- Как получить root-доступ в Kali Linux
- Как получить root-доступ
- Проверка учетной записи пользователя для входа в систему
- Вход в терминал под учетной записью root
- Установка пароля root в Kali Linux
- Вход в систему как root в Kali Linux
- Похожие записи:
- How to Get the root access on Kali Linux 2022.3
- How To Get root Access
- Check Login User Account
- Login as root on Terminal
- Check Login User Account
- Set the Kali Linux root Password
- Login as root in Kali Linux
- IMPORTANT THINGS TO REMEMBER
- Finally
- About The Author
- admin
Зайти root kali linux
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.
Enabling the root account
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:
[email protected]:~$ sudo passwd [sudo] password for kali: New password: Retype new password: passwd: password updated successfully [email protected]:~$
Please note that the password prompt will not display output as you are typing in the password, but it will still register the keystrokes.
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.
Enabling root for SSH
If we look at /etc/ssh/sshd_config we will see a PermitRootLogin line. We will want to change this line to match our use case:
[email protected]:~$ grep PermitRootLogin /etc/ssh/sshd_config #PermitRootLogin prohibit-password # the setting of "PermitRootLogin without-password". [email protected]:~$ [email protected]:~$ man sshd_config | grep -C 1 prohibit-password PermitRootLogin Specifies whether root can log in using ssh(1). The argument must be yes, prohibit-password, forced-commands-only, or no. The default is prohibit-password. If this option is set to prohibit-password (or its deprecated alias, without-password), password and keyboard-interactive authentication are disabled for root. [email protected]:~$ [email protected]:~$ sudo systemctl restart ssh [email protected]:~$
If we have set up SSH key based login for the root account, then we can simply uncomment the appropriate line and continue on. Otherwise, we should change PermitRootLogin to be yes which will allow us to input a password.
Enabling root for GNOME and KDE login
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:
[email protected]:~$ sudo apt -y install kali-root-login Reading package lists. Done Building dependency tree Reading state information. Done The following NEW packages will be installed: kali-root-login 0 upgraded, 1 newly installed, 0 to remove and 1516 not upgraded. Need to get 6,776 B of archives. After this operation, 33.8 kB of additional disk space will be used. Get:1 http://kali.download/kali kali-rolling/main amd64 kali-root-login all 2019.4.0 [6,776 B] Fetched 6,776 B in 1s (10.9 kB/s) Selecting previously unselected package kali-root-login. (Reading database . 333464 files and directories currently installed.) Preparing to unpack . /kali-root-login_2019.4.0_all.deb . Adding 'diversion of /etc/gdm3/daemon.conf to /etc/gdm3/daemon.conf.original by kali-root-login' Adding 'diversion of /etc/pam.d/gdm-password to /etc/pam.d/gdm-password.original by kali-root-login' Adding 'diversion of /etc/pam.d/gdm-autologin to /etc/pam.d/gdm-autologin.original by kali-root-login' Adding 'diversion of /etc/pam.d/lightdm-autologin to /etc/pam.d/lightdm-autologin.original by kali-root-login' Adding 'diversion of /etc/pam.d/sddm to /etc/pam.d/sddm.original by kali-root-login' Adding 'diversion of /etc/sddm.conf to /etc/sddm.conf.original by kali-root-login' Unpacking kali-root-login (2019.4.0) . Setting up kali-root-login (2019.4.0) . Installing /usr/share/kali-root-login/daemon.conf as /etc/gdm3/daemon.conf Installing /usr/share/kali-root-login/gdm-password as /etc/pam.d/gdm-password Installing /usr/share/kali-root-login/gdm-autologin as /etc/pam.d/gdm-autologin Installing /usr/share/kali-root-login/lightdm-autologin as /etc/pam.d/lightdm-autologin Installing /usr/share/kali-root-login/sddm as /etc/pam.d/sddm Installing /usr/share/kali-root-login/sddm.conf as /etc/sddm.conf [email protected]:~$
We can now log out of our non-root user account and login to root using the password that we set earlier.
Updated on: 2023-Mar-06
Author: gamb1t
Как получить root-доступ в Kali Linux
Статьи
В этой статье мы узнаем, как получить root-доступ и войти в систему как root в Kali Linux. В старой версии Kali по умолчанию пользователем является root. Но теперь при установке Kali Linux мы должны создать стандартного пользователя. После входа в систему мы должны использовать команду sudo для установки любого приложения или пакета в Kali.
Итак, как получить доступ root в Kali Linux, мы должны выполнить следующие шаги:
Как получить root-доступ
В первый раз мы должны войти в систему под учетной записью обычного пользователя, которая создается при установке Kali.
Проверка учетной записи пользователя для входа в систему
Теперь, прежде всего, нужно открыть терминал, и вы можете проверить текущего пользователя входа в систему с помощью этой команды.
Вход в терминал под учетной записью root
Теперь мы переключим обычную учетную запись пользователя на учетную запись root, поэтому вам нужно ввести следующую команду в терминале.
Теперь вы можете проверить, что вы находитесь в root вы можете определить с помощью символа #, а также вы можете ввести ту же команду, которая является whoami.
Установка пароля root в Kali Linux
Теперь вы проверили текущего пользователя в терминале, который является root, поэтому вам нужно ввести команду passwd и нажать enter, она запросит пароль, поэтому вам нужно ввести пароль, а затем проверить его, и все, вы установили пароль root с помощью терминала.
Вход в систему как root в Kali Linux
Теперь вы можете выйти из пользователя root, закрыть терминал, выйти из учетной записи обычного пользователя и войти в систему под пользователем root с помощью нового пароля.
Вот и все, это способ, как вы можете изменить пароль root и войти под пользователем root в Kali Linux.
Похожие записи:
How to Get the root access on Kali Linux 2022.3
- June 1, 2022
- admin
- Kali Linux / Linux Tips and Tricks
In this article, we are going to learn how to get root access and login as a root in Kali Linux. In the older version of Kali by default user is root. But now we have to make a standard user while we install the Kali Linux. After login, we have to use the sudo command to install any application or packages in Kali. So how to get the root access on Kali Linux we have to follow the following steps:
How To Get root Access
The first time we have to login as a normal user’s account which is created while we install the Kali.
Check Login User Account
Now, first of all, you have to open the terminal and you can check the current login user with the help of this command.
Login as root on Terminal
Now we switch the normal user account to the root account so you have to type the following command in the terminal.
Check Login User Account
Now you can check you are in the root you can identify with the symbol of # as well as you can type the same command which is whoami.
Set the Kali Linux root Password
Now you have verified the current login user in the terminal which is root so you have to type passwd command and hit enter, it is asking for a password so you have to enter the password and then verify the password, and that it, you have set the root password using the terminal.
[email protected]:~# passwd New password: Retype new password: passwd: password updated successfully [email protected]:~#
Login as root in Kali Linux
Now you can exit from the root user and close the terminal and logout from the normal user account and login with the root user with the help of a new password.
That’s it this is the way how you can change the root password and login with the root user on Kali Linux.
IMPORTANT THINGS TO REMEMBER
- This article was written only for educational purposes.
- The author can not be held any responsibility for damage caused by the use of these resources.
- You will not use this information to gain unauthorized access or any other legal activity.
If you are using any illegal activities using these techniques kalilinuxtutorial.com can’t hold any responsibility for your action.
Finally
If you have any questions about this article, any feedback, suggestions, or if you want to share your thoughts, please feel free to comment below.
If you want to speak with us directly you can Contact Us.
About The Author
admin
Kali Linux Tutorial blog that publishes articles, Tips, Tricks and Tutorials about Kali Linux operations, new techniques and Linux security.