1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:07:44 +00:00

Userland: Add userdel program (#1217)

This commit is contained in:
howar6hill 2020-02-19 19:59:09 +08:00 committed by GitHub
parent 6eae2ef9cf
commit 940de40f28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 194 additions and 0 deletions

View file

@ -0,0 +1,43 @@
## Name
userdel - delete a user account
## Synopsis
```**sh
# userdel [-r] <login>
```
## Description
This program deletes a user account in the system.
This program must be run as root.
## Options
* `-r`, `--remove`: Remove the home directory for this user if the directory exists.
## Exit Values
* 0 - Success
* 1 - Couldn't update the password file
* 6 - Specified user doesn't exist
* 12 - Couldn't remove home directory
## Files
* `/etc/passwd` - user information (such as UID and GID) in this file is deleted.
* `/home/` - user home directroy is deleted if the `-r` flag is specified.
## Examples
```sh
# userdel alice
# userdel -r alice
# userdel --remove alice
```
## See Also
* [`useradd`(8)](useradd.md)