feat: add gnu-linux-rm-user.md

This commit is contained in:
dancingCycle 2023-05-09 06:53:51 +02:00
parent 9469528b75
commit bfbbded6e0
2 changed files with 71 additions and 4 deletions

65
doc/gnu-linux-rm-user.md Normal file
View File

@ -0,0 +1,65 @@
* list active users
```
who
```
* list processes running by <user>
```
ps -u <user>
top -U <user>
```
* look at the <user> entry of the password list
```
sudo awk -F: '/<user>/ {print $1,$2}' /etc/shadow
```
* lock the account
```
sudo passwd -l <user>
```
* validate lock
```
sudo awk -F: '/<user>/ {print $1,$2}' /etc/shadow
```
* kill <user> processes
```
sudo pkill -KILL -u <user>
```
* validate <user> process list
```
who
```
* check scheduled cron jobs for <user>
```
sudo ls -lh /var/spool/cron/crontabs/<user>
```
* delete cron jobs of <user>
```
sudo crontab -r -u <user>
```
* remove print jobs of <user>
```
lprm -U <user>
```
* remove user
```
sudo deluser --remove-home <user>
```
* check that home dir is removed
```
ls /home
```
* check group
```
less /etc/group | grep <user>
```

View File

@ -4,17 +4,19 @@
* [Create bootable USB Drive For OS Installation](doc/bootable-usb-drive.md)
* [Cmake](doc/cmake.md)
* [Cups](doc/cups.md)
* [Debian Installation](doc/debian-install.md)
* [Debian Configuration](doc/debian-config.md)
* [Debian Lid Switch Configuration](doc/debian-lid-switch-config.md)
* [Docker](doc/docker.md)
* [Emacs](doc/emacs.md)
* [Email Client](doc/email-client.md)
* [Filezilla](doc/filezilla.md)
* [Firewall](doc/firewall.md)
* [Gimp](doc/gimp.md)
* [Git](doc/git.md)
* [GitHub Using SSH](doc/github-ssh.md)
* [GNU/Debian Installation](doc/debian-install.md)
* [GNU/Debian Configuration](doc/debian-config.md)
* [GNU/Debian Lid Switch Configuration](doc/debian-lid-switch-config.md)
* [GNU/Emacs](doc/emacs.md)
* [GNU/Linux create user](doc/gnu-linux-create-user.md)
* [GNU/Linux remove user](doc/gnu-linux-rm-user.md)
* [Group and User](doc/grp-usr.md)
* [Java](doc/java.md)
* [Mastarm](doc/mastarm.md)