Linux plain user Su root toggle prompt no files or directories

Source: Internet
Author: User

1. Enter single-user mode first:
1). Ubuntu:
In this case, you can select the second fix in the Grub interface, but no grub can refer to:
1, restart Ubuntu, then long press SHIRFT into the Grub menu;
2, select Recovery mode, press the "E" key to enter the editing page, as follows:
    

The non-recovery mode is:
    

3, replace the RO recovery nomodeset with "RW single Init=/bin/bash" (The above interface will be replaced by RW single Init=/bin/bash)
4, press ctrl+x into single-user mode, the current user is root;
From

2) Fedora 23 (virtual machine)
After entering Grub, press E to enter edit mode. Find the line that starts with "Linux" and append "RW single Init=/bin/bash".
    

Press Ctrl+x to start, and then enter the root shell environment.
    

2. Modify the shell that the user is logged into.

Vim? /etc/passwd
The shell bar is root or does not exist
Modified to: Root:x:0:0:root:/root:/bin/bash.
Explanation: User name: password: User id: Group ID: annotative Description: Home directory: Login Shell
Two 0 on behalf of the user is root, belongs to the root group, that is, administrator rights


3. Then ctrl+alt+delete restart. Problem solving.

Linux plain user Su root toggle prompt no files or directories

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.