Get the App
SLTechnology News&Howtos  ›  Servers  › 

Ordinary users in linux su root switch prompts what to do without files or directories

Shulou Source: shulou.com Published: 2022-06-01 17:49:07 10月04日 Update

This article mainly shows you the "linux ordinary users su root switching tips no files or directories how to do", the content is easy to understand, clear, hope to help you solve the doubt, the following let Xiaobian lead you to study and learn "linux ordinary users su root switching tips no files or directories how to do" this article.

1. First, enter single-user mode:

1)。 Ubuntu:

You can select the second fix in the grub interface, but there is no grub to refer to:

1. Restart ubuntu, and then press shirft to enter the grub menu

2. Select recovery mode and press the "e" key to enter the editing page, as follows:

The non-recovery models are:

3. Replace ro recovery nomodeset with "rw single init=/bin/bash" (the interface above will be changed to rw single init=/bin/bash)

4. Press ctrl+x to enter single-user mode, and the current user is root.

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 shell environment of root.

two。 Modify the shell of the user login.

Vim? / etc/passwd

Shell column is root or does not exist

Modified to: root:x:0:0:root:/root:/bin/bash.

Explanation: user name: password: user identification number: group identification number: annotative description: home directory: login Shell

Two zeros indicate that the user is root and belongs to the root group, that is, administrator permissions.

3. Then ctrl+alt+delete restarts. Problem solved.

The above is all the contents of this article "su root switching prompts for ordinary users in linux to do without files or directories". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: User directory mode normal how to do file switch prompt content article logo identification number interface single user learning help login selection one line two Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple NVidia Huawei Microsoft MySQL