in reply to Remote Win32 User Authentication

Hi,

I think you encounders the LogonAsUser bug that incorrectly returns 1.

You should use this routine to check the LogonAsUser routine

Win32::AdminMisc::LogonAsUser( $Domain, $User, $Password); $UserName=Win32::AdminMisc::GetLoginName(); print "Failed to logon" if ( lc $User ne lc $UserName);
(cf: Win32 Perl Programming, You should really buy this book).
On windows, each workstation has it's own little SAM database. You can therefore prefectly connect to it using the accounts from it's local domain.

At least, this is how I understood it from my NT courses.
---------------------------
Dr. Mark Ceulemans
Senior Consultant
IT Masters, Belgium

Replies are listed 'Best First'.
Re: Re: Win32 User Authentication
by AcidHawk (Vicar) on Oct 29, 2002 at 05:30 UTC

    Thank you for drawing my attention to the fact that a LoginAsUser success returns a 1 as opposed to a 0.. I did read this but didn't pay attention to it.

    With this in mind though I still can't logon to a remote machine. The action fails.. I will be printing out more errors to try and track down the issue though.

    BTW - I batteled with this line for a bit $UserName=Win32::AdminMisc::GetLoginName(); only to find GetLoginName should be GetLogonName.

    I have ordered the book you mentioned. Look forward to finding out more.

    Thanks again.
    -----
    Of all the things I've lost in my life, its my mind I miss the most.