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

How to log in to root for Linux

2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

How to log on to root for Linux, this article introduces the corresponding analysis and answer in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.

Already have a ROOT user and password

When you have set up the root user and set the password for it, then, after the ordinary user logs in, su in the shell interface, and then the system prompts for the root user password, and enter the password at this time.

No ROOt user and password

Sudo is a commonly used tool under linux to allow ordinary users to use superuser privileges. This command provides a fine-grained access control method for administrators, through which people can access the system as both superusers and other types of users. The advantage of this is that administrators can grant users certain types of superuser privileges without telling them their root password, which is what many system administrators dream of.

Setting up the assignment is simple, as long as you set a root password for root: $sudo passwd root

After that, you will be prompted to enter the password of the root user, enter the root password in succession, and then use: $su

You can switch to Super Admin user login!

1. After the terminal executes the sudo passwd root command, you will be prompted to set a new root account password.

two。 Click the System-> Preferences-> Login Window menu, switch to the Security options page, and select the "Allow local system administrator login" option under it.

After performing the above two steps, you can log in to the Ubuntu system using your root account.

If you want to disable the root account again, you can execute sudo passwd-l root.

Sudo passwd root sets the password of the root user to open the root account, locking the account is sudo passwd-l, and opening the account is sudo passwd-u (it needs to be locked before, otherwise it is invalid).

Method 2:

Log in with your root account in Ubuntu

In fact, I personally do not think this is necessary, because when you need the authority of root, you can use sudo. If you really need to enable your root account in Ubuntu, do the following:

1. Reset the password for root:

$sudo passwd root # enter the new password twice as prompted and confirm it.

two。 Enable root user login:

$sudo vi / etc/gdm/gdm.conf #

Open the configuration file of gnome, type: AllowRoot enter in the last line mode, find AllowRoot=false, change false to true, save and exit.

After that, when you restart the system, you can log in with root. If you want to disable the root account, execute the following command:

$sudo passwd-l root

The root account in Ubuntu is disabled by default. In this case, if you want to use root permissions to do something, you need the sudo instruction. For some friends, they may need to activate their root account in Ubuntu.

How to make root log in to the system collection on Fedora 10

By default, Fedora10 does not allow root accounts to log in to GUI. Here is the solution.

First, enter the terminal with the user account and allow the root account to log in:

First of all, su

Then vi / etc/pam.d/gdm

Delete the line auth required pam_succeed_if.so user! = root quiet

Then wq saves and exits.

This allows you to log in to GUI using root.

You can also modify the / etc/gdm/contom.conf file by adding the following lines to enable root automatic login

[daemon]

AutomaticLoginEnable=true

AutomaticLogin=user_name

The network service of Fedora 10 cannot be started automatically and also needs to be modified.

Chkconfig-level 35 network on

If you use the GUI interface to modify the network configuration, it seems that the modification program has BUG. After the subnet mask is changed, it becomes 192.168.1.1.

Similarly, you can modify it directly in the file.

File location: / etc/sysconfig/network-scripts/ifcfg-eth0

You can also:

Boot to root login system, login mode is a graphical interface, prompt can not verify the user, very puzzled, the password is also correct ah, enter several times still prompt "unable to verify the user". I have to log in with an ordinary user.

Open the terminal and enter su, and then enter the root password to successfully transfer to the root user. Set boot mode to text mode, restart to text mode, enter root and password, login is successful, it seems that you can log in with root in text mode.

Cannot log in to graphics mode as root, probably for security reasons. Although you can only log in to the graphical interface with ordinary users, the password of root can be changed in graphical interface mode. Select system-> Administration-> Root password and pop up the dialog box for changing the root password.

twenty-eight。 Graphical root login

Fedora 11 does not allow login as root in GDM by default, but must use normal users to log in to become root permissions in the terminal. Then many users still want to log in as root. Although I don't approve, I'd like to tell you how to do it. Please don't forget that once you log in using root, it will destroy your system, so please do not enter the following command unless you know what you are doing.

Open the terminal to enter:

Su-c 'gedit / etc/pam.d/gdm'

Find the following line:

Auth required pam_succeed_if.so user! = root quiet

Make a note of this line:

# auth required pam_succeed_if.so user! = root quiet

Save this file and log out, and then you can log in as root.

Modify this file in 11:

/ etc/pam.d/gdm-password

This is the answer to the question about how Linux logs in to root. I hope the above content can be of some help to you. If you still have a lot of doubts to solve, you can follow the industry information channel to learn more about it.

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

Internet Technology

Wechat

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

12
Report