From a4d8f9b4589ba9edd13c10504880c6975c8ba748 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Thu, 4 Mar 2010 19:41:01 +0000 Subject: [PATCH] -Function skeleton for deleting users in AD -Fix bug where a user in AD was missed git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5368 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/perl/xCAT/ADUtils.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xCAT-server/lib/perl/xCAT/ADUtils.pm b/xCAT-server/lib/perl/xCAT/ADUtils.pm index 2554f5eff..ea2a115c9 100644 --- a/xCAT-server/lib/perl/xCAT/ADUtils.pm +++ b/xCAT-server/lib/perl/xCAT/ADUtils.pm @@ -136,8 +136,20 @@ sub list_user_accounts { #provide enough data to construct an /etc/passwd lookin } } if ($failure) { return undef; } + foreach(keys %currvalues) { + $userhash{$currvalues{accountname}}->{$_} = $currvalues{$_}; + } return \%userhash; } +sub delete_user_account { #provide enough data to construct an /etc/passwd looking output + my %args = @_; + my $directoryserver = $args{directoryserver}; + my $dnsdomain = $args{dnsdomain}; + my $username = $args{username}; + unless ($dnsdomain and $directoryserver $username) { + die "Invalid arguments"; + } +} =cut example: add_user_account(username=>'fred',fullname=>'fred the great'); =cut