Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-03-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report