RE: [cciug] User info

From: Peter Vogel (QA CCT) (Peter.Vogel@e2open.com)
Date: Wed Jul 18 2001 - 14:17:15 EDT


You can write a perl script to do this. For example, this will get me a
complete list
of all users in the NT domain "arsin01".
 
Win32::NetAdmin is available via PPM, I belive, while Win32::AdminMisc is
available
from Dave Roth's website: www.roth.net <http://www.roth.net>
 
use Win32::NetAdmin;
use Win32::AdminMisc;
#
# NT Domain Config + Connect
#
Win32::NetAdmin::GetDomainController("","arsin01",$name) || die "problem
getting DC: $!\n";
@users = ();
Win32::NetAdmin::GetUsers($name, Win32::NetAdmin::FILTER_NORMAL_ACCOUNT,
\@users);
#
# Get the NT data
#
foreach my $username (@users) {
    next if $username =~ /\$$/;
    next if $username =~ /^admin$/; #Don't bother with admin accounts
    Win32::AdminMisc::UserGetMiscAttributes("", $username, \%attribs);
    my $flags = $attribs{USER_FLAGS};
    my $comment = $attribs{USER_COMMENT};
    my $fullname = $attribs{USER_FULL_NAME} ;
    print "$username\t$fullname\t$flags\t$comment\n";
}
 
---
Peter A. Vogel
Manager+Consultant, Configuration Management
Arsin Corporation, Professional Services
< http://www.arsin.com <http://www.arsin.com/> >

-----Original Message-----
From: Kevin Mossman [mailto:kevin.mossman@s1.com
Sent: Wednesday, July 18, 2001 10:42 AM
To: 'cciug@rational.com'
Subject: [cciug] User info

Is there a DOS command line equivalent to "finger" or "whois"? Our email
addresses are different than our usernames. The email address are a
concatentation of the persons actual name and the uname is an 8 character
truncation of first and last names. I am assuming that the NT profile for
the individual has their full name. I want to be able to pass the uname to
some command that will return the profile info for the user so I can extract
the full name and email them. Any ideas?

TIA,

Kevin

"We are what we repeatedly do. Excellence then, is not an act but a habit."
Aristotle

Kevin Mossman
S1, Inc.
(678)421-4849
Cell: (678)662-5526

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



This archive was generated by hypermail 2b29 : Tue Jul 31 2001 - 22:03:57 EDT