Linux Login Problems

Source: Internet
Author: User

Linux Login Problems

This morning, when I was using Linux, I entered startx on the terminal and then exited the graphic interface. I entered the command mode, which may be a problem with Ubuntu 14.04. Somehow I didn't respond, I forcibly restarted the operating system, and then went in and found that I had been repeatedly logging on with the administrator account. I still had a lot of information on the Internet, there are also many methods provided.

1. For environment variables, go to tty1 or tty2 and then sudo vim profile or environment to restore the environment variables. However, this is not my issue.

2. Initialization File problems: delete. Xauthority, Xinit, and other initial files and restart them. My problem is not here either.

3./home permission: directly set/home chmod to 777. However, it still does not work for me.

4./tmp permission problem: My problem lies in this. The first choice is to find the log file, learn to analyze the log file, and cd it to/home/user, then you will find a log file related to starting the X component:

. Xsession-errors file: mkdtemp: private socket dir: Permission denied. read/write failed due to Permission issues when reading/tmp files, therefore, you can directly run chmod 777/tmp and then restart it to enter the desktop system.

5. ctrl + alt + f1, switch to tty1, enter the Administrator account and password

Sudo rm-r. Xauthority *

Sudo reboot // restart

OK

The following describes the. Xauthority: startx script file (from Baidu ):

When Xserver is started, read the file ~ /. Xauthority, which reads records corresponding to its display. when a client program is started to call XOpenDisplay (), it also reads the file and sends the magic code to Xserver. when Xserver verifies that this magic code is correct, it will agree to the connection.

Observe the startx script and you can see that every time startx runs, a new record is added to ~ by using the xauth add command before xinit is called ~ /. Xauthority, used to run X authentication this time.

Solution:

Ctrl + Alt + F1 ~ F6, you can enter the command line mode, which is tty1 ~ Tty6.

Note: Ctrl + Alt + F7 is the window mode.

Use the user name and password.

Sudo =/usr/bin/sudo

Vi =/usr/bin/bi

Remove the/home/sjjz/Android-sdk-linux_86/tools PATH added to the PATH in the three files

Whereis =/usr/bin/whereis

Cat = // bincat

Mv =/bin/mv

Ls =/bin/ls

Bash =/bin/bash

Restart:

/Usr/bin/sudo/sbin/reboot

2. modified the profile file.

Solution:

Use Alt + Ctrl + Shift + F1 to enter the command line mode and change the/etc/profile file as root, I modified this file when I configured the JDK runtime environment yesterday. Now I have changed the content and can finally access it normally.

3. Modified environment

Solution:

/Usr/lib/sudo/usr/lib/vi/etc/environment, move the cursor to PATH = $ PATH:/home/user1/program/androidSDK/tools, press D twice, that is, DD is deleted,

Then enter the command

4. Authentication Problems

Solution:

Today, you cannot log on to the system for no reason. after entering the correct password on the logon page, a black screen will pop up and the system will jump to the logon page.

Black screen appears too short after multiple times check found stuck in check battery state

Solution:

Sudo rm-r. Xauthority *

Of course, there are other reasons why I have not succeeded in trying the above methods. Later I saw a blog saying that the essence of this problem is that when I start the system, the system will read some initialization files in the/home folder. If these files cannot be found, an error will occur and the symptoms described above will appear. In combination with some solutions I have seen earlier, I think the home permission may be changed, resulting in non-root users being unable to read the initialization files in the/home directory.

This article permanently updates the link address:

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.