forked from tilde/ssh-reg
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
263 B
Bash
12 lines
263 B
Bash
5 years ago
|
#!/bin/bash
|
||
|
cut -d: -f1 /etc/passwd | grep test > deltest.txt
|
||
|
while read name; do
|
||
|
userdel "$name"
|
||
|
rm -rf /home/$name
|
||
|
if [ "$#" -eq 1 ]; then
|
||
|
sqlite3 -batch $1 "DELETE FROM applications WHERE username = '$name'"
|
||
|
fi
|
||
|
done < deltest.txt
|
||
|
|
||
|
rm -f deltest.txt
|