Kali linux запуск root

Kali linux запуск root

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.

Читайте также:  Как восстановить uefi linux

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

Kali Linux

Статьи

В этой статье мы узнаем, как получить root-доступ и войти в систему как root в Kali Linux. В старой версии Kali по умолчанию пользователем является root. Но теперь при установке Kali Linux мы должны создать стандартного пользователя. После входа в систему мы должны использовать команду sudo для установки любого приложения или пакета в Kali.

Итак, как получить доступ root в Kali Linux, мы должны выполнить следующие шаги:

Как получить root-доступ

В первый раз мы должны войти в систему под учетной записью обычного пользователя, которая создается при установке Kali.

Вход под учетной записью пользователя, не являющегося пользователем root

Проверка учетной записи пользователя для входа в систему

Теперь, прежде всего, нужно открыть терминал, и вы можете проверить текущего пользователя входа в систему с помощью этой команды.

не root пользователь в Kali Linux

Вход в терминал под учетной записью root

Теперь мы переключим обычную учетную запись пользователя на учетную запись root, поэтому вам нужно ввести следующую команду в терминале.

Читайте также:  Linux установка apache centos

Теперь вы можете проверить, что вы находитесь в root вы можете определить с помощью символа #, а также вы можете ввести ту же команду, которая является whoami.

Пользователь root в Kali Linux

Установка пароля root в Kali Linux

Теперь вы проверили текущего пользователя в терминале, который является root, поэтому вам нужно ввести команду passwd и нажать enter, она запросит пароль, поэтому вам нужно ввести пароль, а затем проверить его, и все, вы установили пароль root с помощью терминала.

Пароль root в Kali Linux

Вход в систему как root в Kali Linux

Получение root-доступа в Kali Linux

Теперь вы можете выйти из пользователя root, закрыть терминал, выйти из учетной записи обычного пользователя и войти в систему под пользователем root с помощью нового пароля.

Вот и все, это способ, как вы можете изменить пароль root и войти под пользователем root в Kali Linux.

Похожие записи:

Источник

Как включить вход root в Kali Linux

Kali Linux

Статьи

В этой статье мы узнаем, как включить и отключить вход root в Kali Linux. Все мы знаем, что в Kali Linux по умолчанию отключен вход root. Мы должны входить в систему как стандартная учетная запись пользователя, которая создается при установке Kali Linux на наш ПК/ноутбук. Мы не можем войти в систему как root. Поэтому мы должны включить его или отключить, если хотите. Итак, давайте начнем.

Обновление Kali Linux

Прежде всего, нам необходимо обновить Kali Linux с помощью этой команды:

sudo apt update

Включение входа root в Kali Linux

Итак, нам необходимо включить root Login в Kali Linux. Для этого нам нужна учетная запись пользователя с привилегиями sudo. То есть у вас есть разрешение или привилегия на выполнение всех команд с sudo. Поэтому установите пакет kali-root-login с помощью этой команды:

sudo apt install kali-root-login -y

sudo apt install kali-root-login

Вход в систему от имени root в терминале

Мы должны войти в систему как root в терминале. Вы можете войти в систему с помощью следующей команды:

Вход в систему от имени root в терминале

Установите пароль root

Теперь с помощью следующей команды вы можете установить новый пароль для учетной записи root.

Установите пароль root

Теперь мы включили root Login в Kali Linux, нам нужно выйти из текущей учетной записи и войти в систему под именем root.

Вход в систему под именем root

Теперь введите root в качестве имени пользователя и введите новый пароль для входа в систему под именем root.

Вход под именем root в Kali Linux

Вот и все, как включить вход под root в Kali Linux. Теперь вы можете проверить пользователя, вошедшего в систему, с помощью команды whoami или pwd.

Отключение входа root в Kali Linux

Чтобы отключить учетную запись root, сначала выйдите из учетной записи root. И войдите в систему как обычный пользователь. Теперь нам нужно удалить пакет kali-root-login с помощью этой команды:

sudo apt --purge remove kali-root-login -y

Если вы все еще входите в систему под именем root. Вы должны использовать следующую команду, чтобы удалить пароль для вашей учетной записи root.

Вот так можно отключить вход под root в Kali Linux. .

Источник

How to Get the root access on Kali Linux 2022.3

Get the root access on Kali Linux

  • 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.

Non-root User Login

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.

Non-root User on Kali Linux

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.

Login as root on 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.

root User on Kali Linux

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]:~#

root Password on Kali Linux

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.

Источник

Оцените статью
Adblock
detector