假设你是系统管理员,需要在Centos系统新增一个新的用户账号zheng,为新用户设置初始密码,锁定用户账号uly,并删除用户账号chang,请用命令执行这些操作
时间: 2024-02-21 13:00:38 浏览: 46
好的,下面是针对你的要求所需要执行的命令:
1. 新增用户账号zheng并设置初始密码:
```
sudo useradd zheng
sudo passwd zheng
```
在执行第二条命令时,会提示你输入新密码两次。
2. 锁定用户账号uly:
```
sudo usermod -L uly
```
3. 删除用户账号chang:
```
sudo userdel chang
```
请注意,在执行删除用户账号的操作时,系统会提示你是否删除该用户的主目录,如果你想同时删除该用户的主目录,请在命令后面加上 `-r` 参数,即:
```
sudo userdel -r chang
```
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![sh](https://img-home.csdnimg.cn/images/20210720083646.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)