dbs has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use warnings; my $notexists = 0; my $hashdiff = ( (scalar keys %EgrpsHash) - (scalar keys %NgrpsHash) +); print "\nI am now checking primary and secondary groups defined in AD +and locally on $host...\n"; LABEL: for my $ekey (keys %EgrpsHash) { last if $notexists >= $hashdiff; if ( ! exists $NgrpsHash{$ekey} ) { print uc("\n$nuser is **not** in the same 'ad' and or 'local' +groups as $euser is!\n\n"); print uc("*** $nuser needs to be in ''$ekey'' group(s) for int +erface support rights! ***\n\n"); print "Please correct this then rerun with the -r flag!\n\n"; print "$nuser\'s AD+local groups\n", join("\n", sort keys %Ngr +psHash),"\n"; print '=' x 11,"\n"; print "$euser\'s AD+local groups\n", join("\n", sort keys %Egr +psHash),"\n\n"; print uc("please change this within centrify gui! right-click +on new user, properties, profile tab, primary group, then rerun \n\n" +); ++$notexists; goto LABEL; } }
thx!__DATA__ is tsilvia's AD+local groups cbpro_group cbproop cbqa cbqaop cbtestop =========== thendri1's AD+local groups cbpro cbpro_group cbproop cbqa cbqaop cbtest cbtestop
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: ! exists in my hash. want to see all that dont exist.
by chromatic (Archbishop) on Apr 20, 2011 at 20:33 UTC | |
|
Re: ! exists in my hash. want to see all that dont exist.
by JavaFan (Canon) on Apr 20, 2011 at 21:23 UTC |