Resolves an issue where the guest can only enter the system after changing 1000 in the/etc/passwd file to 0 | | The method of upgrading normal user rights to root user rights under Ubuntu;

Source: Internet
Author: User

In fact, I now know that the Linux system for user Rights management is strict, in Ubuntu under the system does not allow root user access to the image interface system. This thing has been out of the hole for an instant because I didn't get permission.

I want to change the root of the nginx.conf that file, but I do not have permission to solve this problem once and for all, so I think of the user permissions for the title.

The steps I've changed are this:

(1) First enter root user in terminal: sudo su

(2) Then set the root password: passwd root, enter the root password, confirm the root password.

(3) Enter command in terminal: sudo gedit/etc/passwd can open open/etc/passwd file and modify it with root user privileges. (In fact, I want to open nginx.conf with this on the line, why bother so much effort ah ah ah ah)

(4) Find your user name at the bottom of the file two 1000:1000 will be changed to 0

Like mine is zhouchang:x:1000:1000.

After the change, the establishment of ZHOUCHANG:X:1:1

(5) Save logout and then I'm going to be a tragedy. This is still missing a key part:

(6) Terminal open: Sudo:sudo gedit/etc/lightdm/lightdm.conf

Change the contents of this file to:

[Seatdefaults]

Greeter-session=unity-greeter

User-session=ubuntu

Greeter-show-manual-login=ture (This command allows you to enter your account when you enter the interface, it will not be the default to enter the guest access)

Allow-gues=false (This command does not allow guest to log in)

Advice: hope that the masses of the best still do not blindly change the/etc/passwd file good.

I can't get into my account now. Only one other way to solve it.

/////

One

Before I get to the point, I'll introduce some of the major editing commands for the VI editor, which I think will be used. (Regret not to change the original didn't study Unix ah ah AH)

The most important point is to know that the VI editor is divided into edit mode and command mode, press the ESC key to enter the command mode from the edit mode, press the I key to enter the editing mode from the command mode. (if it's not clear what the mode is, press the ESC a few more minutes).

Enter command mode to save or exit the first ":" Begins, for example:

: W Save but do not exit editor

: q! Force exit

: wq! Save exit

x to remove one character backwards

DD Delete the entire line where the cursor is located

Second, the solution

(1) Restart the computer long press CTRL+ALT+FI to enter the command line mode (in fact, the same as the terminal)

(2) Then login to your account to enter your account password (this time you are the root user to enter the root password you reset)

(3) Because you are the root user (if not hit: sudo su is not it) is the root of the file has read and write permissions

Enter: VI/ETC/PASSWD into the file's VI edit mode

(4) Use the VI Edit command above to change 0 back to 1000 save, so restart you will still enter the guest mode,

It's better to modify the /etc/lightdm/lightdm.conf file (as in the previous article)

Resolves an issue where the guest can only enter the system after changing 1000 in the/etc/passwd file to 0 | | The method of upgrading normal user rights to root user rights under Ubuntu;

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.