|
-
November 15th, 2008, 04:16 PM
#1
Logon failure with Win32 Service using Domain Account
I am trying to install a local service under the context of a trusted domain account.
I installed the service correctly and it starts fine running under the LocalSystem context, however the service fails to start under the domain account because of a logon failure.
The domain account I am using meets all of the following requirements. Please tell me if I am missing anything:
1). Account is enabled/unlocked
2). Account password I am using is valid (logged into a few machines with it)
3). Account has local admin rights on the machine I am installing the service on
Attached is the CreateService() function I am using to install the service.
Thank you
Code:
TCHAR szPath[MAX_PATH] = (L"\"C:\\Program Files\\Temp.exe\"");
TCHAR szStartName[50] = (L"Domain\\User");
TCHAR szStartNamePassword[50] = (L"**********");
schService = CreateService(
schSCManager,
SVCNAME,
SVCNAME,
SERVICE_ALL_ACCESS,
SERVICE_WIN32_OWN_PROCESS,
SERVICE_AUTO_START,
SERVICE_ERROR_NORMAL,
szPath,
NULL,
NULL,
NULL,
szStartName,
szStartNamePassword);
Last edited by ovidiucucu; November 16th, 2008 at 03:12 AM.
Reason: added [CODE] tags
-
November 16th, 2008, 03:16 AM
#2
Re: Logon failure with Win32 Service using Domain Account
[ Redirected thread ]
Is this the real password: L"**********" ?
Last edited by ovidiucucu; November 16th, 2008 at 03:22 AM.
-
November 16th, 2008, 12:39 PM
#3
Re: Logon failure with Win32 Service using Domain Account
No, I changed it to that for the sake of the post.
-
November 16th, 2008, 01:45 PM
#4
Re: Logon failure with Win32 Service using Domain Account
Update:
I solved the problem partly.
Apparently the Domain user account needs "Log in as a service" rights on the local machine. However while this solved the problem I dont know how to do this programatically.
Any help is appreciated.
Thanks
-
November 17th, 2008, 04:35 PM
#5
Re: Logon failure with Win32 Service using Domain Account
Best regards,
Igor
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|