All Forums
 Microsoft Windows CE
 General CE
 Adding Users/Groups in CE (+Ntlmssp.lib)
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

phobart

31 Posts

Posted - 25 Feb 2005 :  16:22:26  Show Profile  Email Poster
I'm trying to find information on how to add users and groups to CE. I'm trying to set up security on the Web Server and I have found information on the AdminUsers registry key in the [HKLM]COMMHTTPD . But I'm assuming the users and groups that you add here have been set up (passwords, etc) somewhere else on the machine?

Any help you could provide would be greatly appreciated!

Patrick

ctacke

877 Posts

Posted - 25 Feb 2005 :  17:24:36  Show Profile  Email Poster
Take a look at Topic 1276 for help on creating NTLM user profiles.
Go to Top of Page

phobart

31 Posts

Posted - 28 Feb 2005 :  08:55:10  Show Profile  Email Poster
Thanks, I'll take a look today.

Go to Top of Page

phobart

31 Posts

Posted - 28 Feb 2005 :  11:52:07  Show Profile  Email Poster
For some reason it dosen't seem to be working for me.

This is what I did.

I edited the source sample provided in Topic 1276 as follows

// set username, password and domain
TCHAR *lpszDomain = _T("localhost");
TCHAR *lpszUser = _T("rlw");
TCHAR *lpszPass = _T("demo");

I compiled the code and ran it on my AGX board which gave me the following output:

Successfully logged in localhost\rlw
Login successful!

I then added the key AdminUsers to the HKLM\COMM\HTTPD and set the string value to "localhost\rlw;rlw" .

In two different virtual directories I set one of the A values to 1 and one of the A values to 2
(1=valid used identifier and password, 2=valid admin identifier and password).

When I try to log into either of the sites, a security window pops up prompting me for a username and password. After several attempts, it fails to connect.

Access denied.
Client does not have access to the resource on the server


Any ideas on how to proceed?
Go to Top of Page

ctacke

877 Posts

Posted - 28 Feb 2005 :  12:03:00  Show Profile  Email Poster
Probably the best route is to look at the samples that come with Platform Builder. They include ASP and ISAPI admin page examples that allow you to add users, so inside the sample code there must be the logic to add/validate those users.

The samples are in the following directory:

$(WINCEROOT)\PUBLIC\SERVERS\SDK\SAMPLES\HTTP


If you don't have Platform Builder, we can send you an eval set of CDs or DVDs upon request.
Go to Top of Page

phobart

31 Posts

Posted - 01 Mar 2005 :  14:12:02  Show Profile  Email Poster
Here's the working C# code:

[DllImport("ntlmssp.dll")]
static extern bool NTLMSetUserInfo(string pszUser, string pszPassword);

static void Main(string[] args)
{
try
{
bool setInfo = false;

setInfo = NTLMSetUserInfo("user", "password");


}
catch (Exception x)
{
Console.WriteLine("ERROR EXECUTING SetUser: " + x.ToString());
}



}
}

Edited by - phobart on 01 Mar 2005 14:12:58
Go to Top of Page

3963

85 Posts

Posted - 24 Mar 2005 :  11:21:46  Show Profile  Email Poster
I happen to be using code similar to the above "NTLMSetUserInfo" APIs, but found that it isn't persisting between boots. I don't find anything in the registry that leads me to believe that persisting a reg key would help. So, anyone know what the magic file or API is to achieve persistence?

Thanks...
Go to Top of Page

ctacke

877 Posts

Posted - 24 Mar 2005 :  11:30:45  Show Profile  Email Poster
You're right, they don't get set in the registry. There is no persistence for these settings. Offhand I'd suggest a quick EXE that you run at startup that parses a username/password file somewhere on the device (or better yet retrieved from the domain server somehow).
Go to Top of Page

opsens_claude_belleville

34 Posts

Posted - 10 May 2006 :  11:44:30  Show Profile
.

Edited by - opsens_claude_belleville on 10 May 2006 11:50:03
Go to Top of Page

opsens_claude_belleville

34 Posts

Posted - 10 May 2006 :  11:46:22  Show Profile
I'm trying to use NTLMSetUserInfo to allow user&password to log on HTTPD

I'm using GCX
I've got Platform Builder 4.2 installed

In the windows documentation they said that the
Requirements are :
OS Versions: Windows CE 3.0 and later.
Header: Ntlmssp.h.
Link Library: Ntlmssp.lib.

I can find Ntlmssp.h on C:\WINCE420\PUBLIC\COMMON\OAK\INC directory

but I do not have on my computer le Library associate with .h file
(Ntlmssp.lib)

Any ideas

Thanks
Phil
Go to Top of Page

ctacke

877 Posts

Posted - 10 May 2006 :  11:52:22  Show Profile  Email Poster
ntlmssp.lib gets generated when an image that includes the NTLM feature set is generated. The LIB file will be in the _FLATRELEASEDIR of the generated platform. It also would be included in the device SDK if you're using the ADS SDK or have rolled your own.
Go to Top of Page

akidder

1519 Posts

Posted - 10 May 2006 :  12:17:52  Show Profile  Email Poster
Ntlmssp.dll is included in the latest GCX builds, but I don't see Ntlmssp.lib in the ADS SDK.

Email us with your contact information and we'll be glad to get you a copy of it.
Go to Top of Page
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.05 seconds. Snitz Forums 2000