LogonUser function - help please! 
Author Message
 LogonUser function - help please!

I am trying to authenticate a user on Win NT4 using the LogonUser API
function, passing in a userid and password.

I realise that the process calling this function must have TCB privileges
which I do not have so I am writing this into an ActiveX exe that I can
install on a server with the required privilege and call using DCOM.  That
way any clients do not need to have the TCB privileges.

As there is no development server available yet, I decided to test it on my
NT4 workstation for the time being, just to check for bugs.  The logonuser
call fails every time (as expected) but I expected to get an access denied
error whereas GetLastError always returns zero.  Obviously I'll test it on a
development server evntually but I want to know if I can expect it to work...
as it stands I have my concerns!

Any ideas anyone please?

Ian

 -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web  -----
  http://www.*-*-*.com/ ,000+ groups
   NewsOne.Net prohibits users from posting spam.  If this or other posts



Mon, 27 Oct 2003 21:53:18 GMT  
 LogonUser function - help please!
The GetLastError API doesn't work correctly with VB (probably because vb
makes other api calls before returning control to the calling program).
Instead, try using the Err.LastDllError property. It should contain message
no 1314 - ERROR_PRIVILEGE_NOT_HELD.

--
............................................
Bj?rn Holmgren
Concept Development
Guide Integration AB
Olof Asklunds gata 10
SE-421 30 V?stra Fr?lunda, Sweden
Office +46 31 709 50 00
Mobile +46 706 84 01 29
Fax +46 31 709 50 99

............................................


Quote:
> I am trying to authenticate a user on Win NT4 using the LogonUser API
> function, passing in a userid and password.

> I realise that the process calling this function must have TCB privileges
> which I do not have so I am writing this into an ActiveX exe that I can
> install on a server with the required privilege and call using DCOM.  That
> way any clients do not need to have the TCB privileges.

> As there is no development server available yet, I decided to test it on
my
> NT4 workstation for the time being, just to check for bugs.  The logonuser
> call fails every time (as expected) but I expected to get an access denied
> error whereas GetLastError always returns zero.  Obviously I'll test it on
a
> development server evntually but I want to know if I can expect it to
work...
> as it stands I have my concerns!

> Any ideas anyone please?

> Ian

>  -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the
eb  -----
>   http://newsone.net/ -- Free reading and anonymous posting to 60,000+
groups
>    NewsOne.Net prohibits users from posting spam.  If this or other posts
> made through NewsOne.Net violate posting guidelines, email




Tue, 28 Oct 2003 13:46:12 GMT  
 LogonUser function - help please!
Bjorn,

Thanks for your response.  I did try what you suggested and it worked!!

Regards
Ian


Quote:

>The GetLastError API doesn't work correctly with VB (probably because vb
>makes other api calls before returning control to the calling program).
>Instead, try using the Err.LastDllError property. It should contain message
>no 1314 - ERROR_PRIVILEGE_NOT_HELD.

>--
>.............................................
>Bj?rn Holmgren
>Concept Development
>Guide Integration AB
>Olof Asklunds gata 10
>SE-421 30 V?stra Fr?lunda, Sweden
>Office +46 31 709 50 00
>Mobile +46 706 84 01 29
>Fax +46 31 709 50 99

>.............................................



>> I am trying to authenticate a user on Win NT4 using the LogonUser API
>> function, passing in a userid and password.

>> I realise that the process calling this function must have TCB privileges
>> which I do not have so I am writing this into an ActiveX exe that I can
>> install on a server with the required privilege and call using DCOM.  That
>> way any clients do not need to have the TCB privileges.

>> As there is no development server available yet, I decided to test it on
>my
>> NT4 workstation for the time being, just to check for bugs.  The logonuser
>> call fails every time (as expected) but I expected to get an access denied
>> error whereas GetLastError always returns zero.  Obviously I'll test it on
>a
>> development server evntually but I want to know if I can expect it to
>work...
>> as it stands I have my concerns!

>> Any ideas anyone please?

>> Ian

>>  -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the
>eb  -----
>>   http://newsone.net/ -- Free reading and anonymous posting to 60,000+
>groups
>>    NewsOne.Net prohibits users from posting spam.  If this or other posts
>> made through NewsOne.Net violate posting guidelines, email


 -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web  -----
  http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
   NewsOne.Net prohibits users from posting spam.  If this or other posts



Sat, 01 Nov 2003 19:32:24 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP, PLEASE HELP,

2. Can anyone HELP me PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE

3. LogonUser Function

4. LogonUser API function - question

5. Calling DLL function troubles - please, please help!!!

6. LogonUser function declaration problem

7. LogonUser Function

8. LogonUser advapi32.dll function

9. PLEASE HELP PLEASE HELP PLEASE HELP

10. NEED HELP WITH A SEARCH FUNCTION IN VB, PLEASE HELP

11. Help with Logonuser

12. Repost: Help with LogonUser API call needed

 

 
Powered by phpBB® Forum Software