Gunwant Singh wrote:
>
> I have written a small Perl script so to fetch information about the
> user. Here is the code:
>
> /1 use strict;
> 2 use warnings;
> 3 use Win32::Netadmin;
> 4 Win32::NetAdmin::UserGetAttributes(my $server,my $userName,my
> $password,my $passwordAge,my $privilege,my $homeDir,my $comment,my
> $flags,my $scriptPath);
> 5 print "The homedir for the user is $homeDir\n";/
>
> When I tried to run it, I got this:
>
> /Use of uninitialized value in subroutine entry at C:\Documents and
> Settings\Myself\Desktop\code\mac-info.pl line 4.
> Use of uninitialized value in subroutine entry at C:\Documents and
> Settings\Myself\Desktop\code\mac-info.pl line 4.
> Use of uninitialized value in concatenation (.) or string at
> C:\Documents and Settings\Myself\Desktop\code\mac-info.pl line 5.
> The homedir for the user is/
>
> I am not sure, what is the problem. Can anyone help me on this?
You need to specify the server and user name.
Win32::NetAdmin::UserGetAttributes('', 'Rob',
$password, $passwordAge,
$privilege, $homeDir, $comment, $flags, $scriptPath);
HTH,
Rob
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/