Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to delete users completely in Linux system

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Today I will show you how the Linux system removes users completely. The content of the article is good. Now I would like to share it with you. Friends who feel in need can understand it. I hope it will be helpful to you. Let's read it along with the editor's ideas.

How to delete a user completely in the Linux system? When we simply execute the command to delete the user and can not delete the user completely, then how to delete a user completely?

1. First enter the system to create a user

[root@localhost /] # useradd # create user is the user name

[root@localhost /] # passwd # set the password for the user

Change the password of user . New password: * *

When the password is set, prompt "passwd: all authentication tokens have been updated successfully." Indicating that the password has been set successfully

2. Check the directory of some information about the user.

3. Delete a user

If you use the userdel command to delete the user, you cannot delete all the information of the user, just delete the information of the account and group in the four files / etc/passwd, / etc/shadow, / etc/group/, / etc/gshadow. By default, a user account is created, which creates a home directory and a user mailbox (named after the user name in the / var/spool/mail directory)

[root@localhost /] # userdel

[root@localhost /] # cat / etc/passwd | grep

[root@localhost /] # cat / etc/shadow | grep

[root@localhost /] # cat / etc/group | grep

[root@localhost /] # cat / etc/gshadow | grep

[root@localhost /] # find /-name ""

The next time you create a user, it appears:

The error is reported in the image above, so you will report an error when you create the user account again, which means that the files or directories related to the user have not been deleted completely before.

4. Delete the user correctly

[root@localhost /] # userdel-r

Then use the find command to see that the user-related files have been deleted.

This is how the Linux system completely delete all the user's content, more and how to completely delete the user's content related to the Linux system can search the previous articles or browse the following articles to learn ha! I believe the editor will add more knowledge to you. I hope you can support it!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report