home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3.4.17 [SPARC, PA-RISC] / nextstep33_risc.iso / private / etc / nulib / nu4.sh < prev   
Linux/UNIX/POSIX Shell Script  |  1989-08-25  |  752b  |  27 lines

  1. #! /bin/csh -fb
  2. # This shell script is called from nu to purge one account without
  3. # removing it from the /etc/passwd database (to preserve accounting info.)
  4. #
  5. # it is named "nu4.sh" instead of something like "deleteacct.sh" to discourage
  6. # people from trying to run it standalone, without going through nu.
  7. #
  8. # Created: 8 Oct 84    Jeffrey Mogul
  9. # Modified:  9 Jun 89   Lee Tucker
  10.  
  11. set exuser=$1
  12. set logindir=$2
  13. set linkdir=$3
  14. set Logfile=$4
  15. set debug=$5
  16.  
  17. set egrepstr = "^${exuser}\:"
  18. if ($debug == 0) then
  19.     rm -rf $logindir; echo rm -rf $logindir
  20.     if ($logindir != $linkdir) then
  21.     rm $linkdir
  22.     echo rm $linkdir
  23.     endif
  24.     rm -f /usr/spool/mail/$exuser; echo rm -f /usr/spool/mail/$exuser
  25. endif
  26. echo $exuser deleted by $user `date` >> $Logfile
  27.