forked from pool/shadow
37abeb5bf8
FATE#314473: Replace pwdutils with shadow utilities OBS-URL: https://build.opensuse.org/request/show/139680 OBS-URL: https://build.opensuse.org/package/show/Base:System/shadow?expand=0&rev=1
29 lines
537 B
Bash
29 lines
537 B
Bash
#!/bin/bash
|
|
#
|
|
# Here you can add your own stuff, that should be done for every user
|
|
# who will be deleted.
|
|
#
|
|
# When you delete a user with userdel, this script will be called
|
|
# with the login name as parameter before any other action is done.
|
|
#
|
|
|
|
case "$1" in
|
|
--help|--version)
|
|
echo Usage: $0 username uid gid home
|
|
exit 0
|
|
;;
|
|
esac
|
|
|
|
# Check for the required argument.
|
|
if [ $# != 1 ]; then
|
|
echo Usage: $0 username
|
|
exit 1
|
|
fi
|
|
|
|
# Remove cron jobs
|
|
test -x /usr/bin/crontab && /usr/bin/crontab -r -u $1
|
|
|
|
# All done.
|
|
exit 0
|
|
|