Author |
Topic |
|
phobart
31 Posts |
Posted - 25 Feb 2005 : 16:22:26
|
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
|
Take a look at Topic 1276 for help on creating NTLM user profiles. |
|
|
phobart
31 Posts |
Posted - 28 Feb 2005 : 08:55:10
|
Thanks, I'll take a look today.
|
|
|
phobart
31 Posts |
Posted - 28 Feb 2005 : 11:52:07
|
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? |
|
|
ctacke
877 Posts |
Posted - 28 Feb 2005 : 12:03:00
|
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. |
|
|
phobart
31 Posts |
Posted - 01 Mar 2005 : 14:12:02
|
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 |
|
|
3963
85 Posts |
Posted - 24 Mar 2005 : 11:21:46
|
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... |
|
|
ctacke
877 Posts |
Posted - 24 Mar 2005 : 11:30:45
|
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). |
|
|
opsens_claude_belleville
34 Posts |
Posted - 10 May 2006 : 11:44:30
|
. |
Edited by - opsens_claude_belleville on 10 May 2006 11:50:03 |
|
|
opsens_claude_belleville
34 Posts |
Posted - 10 May 2006 : 11:46:22
|
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 |
|
|
ctacke
877 Posts |
Posted - 10 May 2006 : 11:52:22
|
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. |
|
|
akidder
1519 Posts |
Posted - 10 May 2006 : 12:17:52
|
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. |
|
|
|
Topic |
|