#!/bin/sh
#
# smb-userdel
#
# This script is invoked through "delete user script" parameter by SWAT,
# like:
#   [global]
#   delete user script = /usr/local/samba/bin/smb-userdel %u
# And delete the user and its home directory.
#
SMB_USER_HOMEDIR=/var/samba/home

userdel -r $1
rm -rf ${SMB_USER_HOMEDIR}/$1
~
