Use of userdel in user and group management on the command line interface

Source: Internet
Author: User

Use of userdel in user and group management on the command line interface

Userdel-delete a user account and related files

In Linux, The userdel command is used to delete users and related files in the system.

Syntax
Userdel [Option] username

Parameters

-R -- remove: when a user is deleted, the user's home directory is also deleted. By default, the user's home directory is not deleted.

-F -- force: forcibly delete users, home directories, and mailboxes

-H: Get help information

-Z -- selinux-user:

Remove SELinux user assigned to the user's login from SELinux
Login mapping.

This option does not know what it is, but does not know how to use it. Please let me explain it. Thank you.


Note: When a user account is deleted, user files in non-user main directories are not deleted. The administrator must search and delete these files using the find command.

The find command will be described in detail later

Example:

# Userdel manager delete a manager User

# Find/-user manager-exec rm {} \ find and delete the file created by the manager user

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.