Two accounts created locally, text and Text1
Now to delete the Text1 user, do the following
[[email protected]/]$ su text
Password:
[email protected]/]$ su
Password:
[Email protected]/]# Userdel Text1
Userdel:user Text1 is currently used by process 55462
An error has occurred, prompting Text1 that a program is running and cannot delete this user
Then end all of the user's processes.
[Email protected]/]# Killall-u Text1
Session terminated, killing shell ...
Session terminated, killing shell ...
Session terminated, killing shell ... [email protected]/]# ... killed.
... killed.
... killed.
You have new mail in/var/spool/mail/root
[Email protected] root]$ [[email protected]/]$ [[email protected] desktop]$
[Email protected]/]#
This was supposed to be the end of the success, so the next step, continue to delete users
[Email protected]/]# Userdel Text1
Userdel:user Text1 is currently used by process 55462
[[Email protected]/]# exit
Still error, it seems that there is no end to the process of Text1 users
Wasn't the order to execute the end of the process? Carefully go back to check the information returned, found that should not be successful
notice a word in the middle : You havenew mail in/var/spool/mail/root
Query data find the solution, switch to root input
[Email protected] desktop]# echo "unset mailcheck" >>/etc/profile
Then continue
[Email protected] desktop]# Killall-u Text1
[Email protected] desktop]# Userdel Text1
[[email protected] desktop]# su text
[email protected] desktop]$ su
Password:
[email protected] desktop]# su Text1
Su:user Text1 does not exist
Done ~
This article from "My Blog" blog, declined reprint!
Linux Kill Process Error problem