Home > Backend Development > PHP Tutorial > Linux adds super administrator instance code

Linux adds super administrator instance code

小云云
Release: 2023-03-20 16:32:01
Original
2108 people have browsed it

How to add super administrator, view all users, and reset user files in Linux? This article will briefly introduce it to you.

useradd test #添加用户passwd test    
’ #设置密码usermod -g root test #设置用户权限su test #切换用户cat /etc/passwd  
#查看所有用户信息cp /etc/passwd- /etc/passwd  
#重置配置文件,需要root权限才能覆盖,所以丢失该文件之后要第一时间保证root的登录状态,重启就麻烦了(要么重装系统,要么在机箱上装系统盘进行恢复)
Copy after login
vi /etc/passwd   #设置账户配置信息
Copy after login
test:x:0:0::/home/test:/bin/bash
Copy after login

The above is the detailed content of Linux adds super administrator instance code. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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