LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Root password not working in Debian 8.1 (https://www.linuxquestions.org/questions/debian-26/root-password-not-working-in-debian-8-1-a-4175555873/)

sushantasarkar 10-11-2015 04:00 PM

Root password not working in Debian 8.1
 
I am new to Linux. I have installed Debian 8.1 in my computer. During installation I had enabled the root user and password and had given a six digit password. During installation I have selected not to create other users as I was planning to use only the root user. After installation, when I selected Debian from boot manager, it took me to linux in command mode and asked for user which I gave as root and password what I had set during installation. But the login failed. Then I reinstalled the Debian. This time I was extra careful for the root password and I also created another user. I had given different password for the root and the other user. This time Debian logged in using the other user and password. But failed to login as root and it corresponding password. Even when I logged in using other user, and modified some settings it asks for administrator password where I provide the root password. It doesn't works.


Please help. During installation I had selected region as India, language EN-IN, keyboard- american english. At one point of installation it said that it will install En-IN font and it was showing list of many other fonts that I may like to install (some UTF-8 type of things). I didnt select any from the list as the installation was already installing the required font.

Please help as the root password that was given during installation is not being accepted during login.

Hungry ghost 10-11-2015 06:10 PM

Hi, and welcome to LQ!

Most linux distros don't allow graphic root login (i.e. using the graphic environment as root). It's possible to modify some files to allow it, but it's VERY discouraged since it's easier to get your system messed up this way (you can delete system files by mistake, or if, for instance, you use the web browser as root, your system would be very vulnerable to crackers).

What I would suggest is to log in to a virtual terminal as root and create a regular user. After that, you will be able to log in as a regular user and perform administrative (root) tasks from a terminal window in the graphic environment. To create a new user, press ctrl-alt-F1 after the system has completely booted. Then, on the CLI log in prompt, type root, then press enter, then type the root password and press enter again. Then type adduser username (using the new user name) to create a new user and follow the prompts. Finally, press ctrl-alt-F7 to go back to the GUI and log in with the new user's credentials. Once you have logged in as the new user, you can run commands as root from a terminal window after logging in with the su command.

Head_on_a_Stick 10-12-2015 05:51 AM

You can try resetting your root password by pressing "e" with the Debian GRUB menu entry highlighted and adding this to the end of the line that starts with "linux":
Code:

init=/bin/bash
Then press <Ctrl>+x to boot to a passwordless root shell.

You may have to remount the root partition read-write:
Code:

source /etc/profile
mount -o remount,rw /

Then set the root password with:
Code:

passwd root
Then reboot.

sushantasarkar 10-12-2015 06:54 AM

Quote:

Originally Posted by odiseo77 (Post 5433172)
Hi, and welcome to LQ!

Most linux distros don't allow graphic root login (i.e. using the graphic environment as root). It's possible to modify some files to allow it, but it's VERY discouraged since it's easier to get your system messed up this way (you can delete system files by mistake, or if, for instance, you use the web browser as root, your system would be very vulnerable to crackers).

What I would suggest is to log in to a virtual terminal as root and create a regular user. After that, you will be able to log in as a regular user and perform administrative (root) tasks from a terminal window in the graphic environment. To create a new user, press ctrl-alt-F1 after the system has completely booted. Then, on the CLI log in prompt, type root, then press enter, then type the root password and press enter again. Then type adduser username (using the new user name) to create a new user and follow the prompts. Finally, press ctrl-alt-F7 to go back to the GUI and log in with the new user's credentials. Once you have logged in as the new user, you can run commands as root from a terminal window after logging in with the su command.

I have also mentioned that for the first time when I didnt created a user during installation and kept only root user it only displayed a command prompt and asked me to login. That was actually not a GUI.

Hungry ghost 10-13-2015 01:23 PM

Quote:

Originally Posted by sushantasarkar (Post 5433438)
I have also mentioned that for the first time when I didnt created a user during installation and kept only root user it only displayed a command prompt and asked me to login. That was actually not a GUI.

So, would you clarify the following?:

1: Do you currently have both a root and an user account?
2: Are you trying to do a graphic login as root from a login manager such as KDM, GDM, SDDM, XDM, etc? (Discouraged).
3: How are you trying to login as root?: From a virtual terminal (tty), from a terminal on a user account's GUI, etc.? What command(s), if any, are you using to attempt to login as root?

I'd also check if the keyboard layout used by the terminal matches the layout of the physical keyboard you're using: setxkbmap -query.

273 10-13-2015 01:32 PM

I thought the option was something like "enable root or go with an administrator user"?
The usual Debian installer will create a root and any other accounts you like but I know there is an installer which goes all "Ubuntu" and decides that a regular user with root permission to everything is, somehow, safer.
Most distributions will not enable the GUI if you log in as root.

---------- Post added 2015-10-13 at 19:32 ----------

I thought the option was something like "enable root or go with an administrator user"?
The usual Debian installer will create a root and any other accounts you like but I know there is an installer which goes all "Ubuntu" and decides that a regular user with root permission to everything is, somehow, safer.
Most distributions will not enable the GUI if you log in as root.

sushantasarkar 12-29-2015 01:19 AM

Quote:

Originally Posted by sushantasarkar (Post 5433130)
I am new to Linux. I have installed Debian 8.1 in my computer. During installation I had enabled the root user and password and had given a six digit password. During installation I have selected not to create other users as I was planning to use only the root user. After installation, when I selected Debian from boot manager, it took me to linux in command mode and asked for user which I gave as root and password what I had set during installation. But the login failed. Then I reinstalled the Debian. This time I was extra careful for the root password and I also created another user. I had given different password for the root and the other user. This time Debian logged in using the other user and password. But failed to login as root and it corresponding password. Even when I logged in using other user, and modified some settings it asks for administrator password where I provide the root password. It doesn't works.


Please help. During installation I had selected region as India, language EN-IN, keyboard- american english. At one point of installation it said that it will install En-IN font and it was showing list of many other fonts that I may like to install (some UTF-8 type of things). I didnt select any from the list as the installation was already installing the required font.

Please help as the root password that was given during installation is not being accepted during login.


The problem was finally solved. The language or the keyboard should not be changed during the installation process.

andre@home 12-31-2015 04:39 PM

Good work...!


All times are GMT -5. The time now is 08:39 PM.