Linux "error" Userdel:user Xiaoming is currently used by process 4713 resolution

Source: Internet
Author: User

Beginners to learn Linux will certainly encounter some puzzling problems, such as me, in learning to delete a user, the error encountered above

1 userdel: user xiaoming iscurrently used byprocess 4713

, not only that, but when I created this directory, it was successful, but if I su-xiaoming, I found that I reported the error.

1 No directory, logging inwith HOME=/

The solution found in the Linux community has not been solved (perhaps I have to improve the level of information),

This is the answer to the community, and I finally found a similar problem with my csdn and solved it.

The approach is:

My personal speculation is that under the root user su switch to the xiaoming user, and then switch back to root under the Xiaoming user, but the xiaoming user is also occupied by a process, so the process is not dead, the user del does not drop.

So we use Ctrl+d in the command line to exit the current login, and then at the press of Ctrl+d exit Xiaoming User Login, this time we go back to the root of the user, in the use of

1 userdel -r xiaoming

You can delete the Xiaoming user.

Also put the delete user and add user commands, it will not be easy to see later

Delete:

Terminal method: Use NewUser instead of the user account you want to delete
Under root User: Userdel-r NewUser
Under normal User: sudo userdel-r newuser
Because the user needs to be completely removed, with the-r option, the user's host directory and the Mail directory are deleted while the user is being deleted.

Added: sudo adduser newuser

Linux "error" Userdel:user Xiaoming is currently used by process 4713 resolution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.