#!/usr/bin/perl
#
#  Delete user entry from LDAP
#  by pfalcon@users.sourceforge.net 2000-10-18

require("include.pl");  # Include all the predefined functions
&parse_local_inc;

if (!($#ARGV+1)) {
	print "Usage: $0 <user_name>\n";
	exit;
}

$cmd = "${ldap_prefix}ldapdelete -h $sys_ldap_host -p $sys_ldap_port -D '$sys_ldap_admin_dn' -W -C 'uid=$ARGV[0],ou=People,$sys_ldap_base_dn'";
#print "$cmd\n";
system($cmd);
