From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of joe
Sent: Wednesday, March 22, 2006 7:38 PM
To: [email protected]
Subject: RE: [ActiveDir] Multiple users having same UPN?
$|=1;
my $hint=10;
print "Querying directory, please hold...\n";
my @out=`adfind -t 0 -gc -b -f "&(objectcategory=person)(samaccountname=*)" -list samaccountname`;
print "Query Completed. Processing...\n";
my %myhash=();
my %mymulti=();
my $proc="\\|/-";
my $cnt=0;
foreach $thisid (@out)
{
chomp $thisid;
$thisid=lc($thisid);
$myhash{$thisid}++;
if ($myhash{$thisid}>1) {$mymulti{$thisid}=$myhash{$thisid}};
$cnt++;
if (!($cnt%$hint)) {print "\r",substr($proc,($cnt/$hint)%4,1)};
}
print "\r";
print "Processing Completed.\n";
map {print "$mymulti{$_}\t$_\n";$dupecnt++} sort {$mymulti{$a}<=>$mymulti{$b}} keys %mymulti;
print "Total Dupes: $dupecnt\n";
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bernier, Brandon (.)
Sent: Wednesday, March 22, 2006 10:25 AM
To: [email protected]
Subject: [ActiveDir] Multiple users having same UPN?
Hello all,
I'm mulling over this one and the more I think about this the less I like it. We have a single forest / multi-domain environment and nothing has a UPN populated. Well of course some bad apple app comes along and requires UPN's so we have to address populating UPN's across the forest.
We wanted to give everyone a UPN of [EMAIL PROTECTED], I don't see this as an issue for the joe user…unless you have user ID's with the same name in different domains (btw we do not use UPN's for logons). I know that some admins meet that criteria so how do I handle that? Search a GC to ensure it doesn't exist? That would making my script suck by having to do that for 200,000 users (I'm over exaggerating because I can limit to search only if it's an admin IDs). I'm going to see if it will even let you add dups programmatically…But in the meantime, I want to solicit feedback and see if there are other potential issues down the line by doing this.
-Brandon
