home *** CD-ROM | disk | FTP | other *** search
/ tusportal.tus.k12.pa.us / tusportal.tus.k12.pa.us.tar / tusportal.tus.k12.pa.us / Wyse / latest-image.raw / 0.img / usr / sbin / userdel-pre.local < prev    next >
Text File  |  2010-05-08  |  551b  |  29 lines

  1. #!/bin/bash
  2. #
  3. # Here you can add your own stuff, that should be done for every user
  4. # who will be deleted.
  5. #
  6. # When you delete a user with userdel, this script will be called
  7. # with the login name, UID, GID and the HOME directory as parameter.
  8. #
  9.  
  10. case "$1" in
  11.    --help|--version)
  12.      echo Usage: $0 username uid gid home
  13.      exit 0
  14.      ;;
  15. esac
  16.  
  17. # Check for the required argument.
  18. if [ $# != 4 ]; then
  19.   echo Usage: $0 username uid gid home
  20.   exit 1
  21. fi
  22.  
  23. # Remove cron jobs
  24. test -x /usr/bin/crontab && /usr/bin/crontab -r -u $1
  25.  
  26. # All done.
  27. exit 0
  28.  
  29.