Ubuntu enters the correct password and cannot log in

Source: Internet
Author: User

Ubuntu input the correct password can not log on the issue. After the landing interface, select the user name, enter the password, and then the landing screen disappeared, it seems to enter the system, but very soon, there are the same user login interface, again select the user name, input password, again to this state, forming a dead loop. If I choose my username, enter the wrong password, or simply enter a nonexistent username and password, prompt the password error.

After searching the internet, that is because the change of some configuration files and caused landing not to go in, change back on it, because can not log in, that remote access to Ubuntu Terminal Bar, thanks to the configuration can be remote Ubuntu, with the user name and password before landing, the password is correct. If your password is wrong, modify the password, this is under Debian to modify the root password, because I 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 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, at the end of the sentence plus "Init=/bin/bash", 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 by default, we have to change it to writable, otherwise the root password cannot be changed:


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

This will successfully modify the Debian root password.

Here are some questions about my remote access to my system's terminals:

Enter after entering some commonly used commands, such as Sudo ls, and prompted the command could not to be located because ' Usr/bin ' are not include in the path, I do not know where I moved, since the path There is no, then set into play, through the export $PATH = "/usr/bin: $PATH" command to set it into the PATH, and then enter Source/etc/environment to make the modified configuration immediately effective, This can be modified by the VI of their previous modified configuration file, will add their own deleted, because I was added the environment variable after landing does not go in, will/etc/environment and/etc/ The environment variable set in profile is deleted and then logged in to Ubuntu to log on 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.