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