Home > Operation and Maintenance > Linux Operation and Maintenance > How to change the root user name in Linux

How to change the root user name in Linux

WBOY
Release: 2023-05-18 19:50:50
forward
7675 people have browsed it

1. Taking CentOS as an example, modify /etc/passwd and /etc/shadow after logging in, change the root starting in the first line to a new user name (such as admin), and pass wq! # after modification. ##save.
How to change the root user name in Linux

How to change the root user name in Linux

2. After modification and saving, it will take effect after restarting the server. You can check the permissions of the file and you can see that the account column changes. It is admin, as follows:


How to change the root user name in Linux

Note: The default user with the highest administrative authority in Linux is root, and the uid is 0. Only uid is recognized in the system, so as long as uid is 0, the system considers the top administrative user. However, there may be certain problems with applications. Some software uses the root user by default. Therefore, if the understanding of the software application is limited, it is not recommended to adjust the user name for root.

The above is the detailed content of How to change the root user name in Linux. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template