Hi,
I'm working on a CGI to add users using Lanman, but it doesn't seem to
be using. I have other scripts running in the same directory that do
things like change passwords and unlock accounts and those work fine.
I've tried this script both as a CGI and running on the local system as
an account with Administrative privileges, and I get the same results.
Here's the simplified version of my script, which gives me the "Failure"
result when I run it, both command line and CGI:

--------------------
#!/c:\perl\bin\perl.exe -w
use Win32::Lanman;
use Win32::Perms;
use CGI qw(:standard);

print header;
my $name = 'testname';
if(!Win32::Lanman::NetGetDCName("", "testdomain", \$pdcname))
          {
            print "\nSorry, something went wrong; error: <BR>\n";
            # get the error code
            print Win32::Lanman::GetLastError();
            my $pdcname = "PDC1";
          }
if (Win32::Lanman::NetUserAdd(\\\\$pdcname, \%$name))
{
        print "Success";
}
else
{
        print "Failure";
}
print end_html;

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

Thanks,

-Tim


_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to