Ubuntu enters the correct password and cannot log in

Source: Internet
Author: User

Ubuntu entered the correct password after the problem can not be logged in. After the login interface, select the user name, enter the password, and then the landing screen disappears, it seems to enter the system, but soon, the same user login interface, again select the user name, enter the password, again came to this state, forming a dead loop. If I choose my user name, enter the wrong password, or simply enter a nonexistent username and password, prompt password error.

Search from the Internet, said is because the change of some configuration file and caused the landing not to go in, change back on it, because can not login, then remote access to Ubuntu Terminal Bar, fortunately before the configuration can be remote Ubuntu, with the user name and password login before landing, indicating the password is correct. If your password is wrong, just change the password, this is under Debian to change the root password, because I have previously configured to allow remote, can enter the terminal, so this method is not tried, but the Linux operating system should be similar:

1, we first want to get the shell, on the Grub Boot loader menu, select the entry you want to enter, type "E" to enter the editing mode;

2, in the second line (similar to kernel/vmlinuz-2.6.15 ro root=/dev/hda2), type "E" into the editing mode;

3, add "Init=/bin/bash" at the end of sentence, enter;

4, press "B" to start the system.

So we can get a bash shell, after entering the shell, the mount mode of the root partition is read-only, we want to change it to writable, otherwise we cannot alter the root password:


Mount-no REMOUNT,RW/
passwd root
sync
mount-no remount,ro/
reboot 

This will make it possible to successfully modify the Debian root password.

Here are some of the problems I have remotely entered into my system's Terminal:

Enter after entering some commonly used commands, such as sudo ls and so on, and the command could not being located because ' Usr/bin ' is not include in the path, I do not know where I moved, since the path Face No, then set it into play, through the export $PATH = "/usr/bin: $PATH" command to set it to PATH, and then enter Source/etc/environment to make the modified configuration take effect immediately, This can be modified by the VI in the previously modified configuration files, add their own deleted, because I added the environment variable will not go in, will/etc/environment and/etc/ The environment variables set in profile are deleted and then logged in to Ubuntu to log in normally.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.