目录
新建用户
[root@localhost ~]# su haha
su: user haha does not exist or the user entry does not contain all the required fields
[root@localhost ~]#
[root@localhost ~]# useradd haha
[root@localhost ~]# passwd haha 123456
passwd: Only one user name may be specified.
[root@localhost ~]# su haha
[haha@localhost root]$ su root
Password:
[root@localhost ~]#
删除用户
当使用如下命令删除时,发现出现当前问题,并没有删除成功
[root@localhost ~]# userdel -r haha
userdel: user haha is currently used by process 14484
则需先通过 exit 退出当前用户:
[root@localhost ~]# exit
exit
[haha@localhost root]$ exit
exit
[root@localhost ~]#
最后再执行如下命令,删除成功
[root@localhost ~]# userdel -r haha
[root@localhost ~]# su haha
su: user haha does not exist or the user entry does not contain all the required fields
[root@localhost ~]#