Service Data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am working on an image running as shell, using a couple of services which
need to be running under a user, not localsystem. I tried my hell best to set
the password for the user by :
1. Using Service data Password field.
2. Programatically using API.
3. Using sc.exe

I have gone through all the newsgroup and came to a conclusion that its not
POSSIBLE. Am I right ? If I am, what the Password field in Service Data of
CD>Resource is useful for ? Is it simply misleading ?

If it is possible , Please help me.
I cannot use services.msc as my image is shell.
I can use sc.exe but its not working.

Thanks in advance.
 
BONTZ,

I am wondering why you just don't start the service using CreateProcessWithLogonW API? (or LogonUser/CreateProcessAsUser)
Basically you can use "sc.exe" as process name and "start YourService" as the command line, or use "net start" if the service is a
MS common service.

Also, the "config" command of sc.exe utility includes "password=" option. (just type "sc.exe config" for more info)

If you already tries that, can you let us know what the problems/errors you encountered?

Btw, is it Minlogon or Winlogon based image?

KM
 
KM,
Thats a WinLogon system.
I have tried everything. Even the API you have suggested bears no fruit.
The password is set by the Service data itself, but service does not start.
on trying to start service, it says Logon failure.
I have tried sc.exe and putting password through it. It changes the password
but gives the same LOgon faliure error.

Steps :
1. I create an image with a service running under LocalSystem.
2. I then use sc.exe to change username and password.
3. But on trying to start, it gives Logon Failure.

The strange behavious I noticed this time is :
4. If I make any change(like an account or password change) of any
service(not my service), my service works, no more logon failure.
That means, the password is being set by sc.exe succesfully.

I have tracked the whole process by Inctrl5. I see a registry entry
"HKLM/Software/Microsoft/SEED" is changed. Can this be somehow related ?

Thank you very much for your help.
 
Just a correction :

In step 4, the change i make of any service is through services.msc
That means the password is being set by sc.exe .Because after making change
in password of any service(not mine), my service starts working without
setting the password again.
 
BONTZ,

Frankly, I don't have a clue why this is not working for you. If it works on XP Pro, it should work on XPe with WinLogon.

Are you trying to set the password for the service *before* the user account is yet created? (I can guess so since you had it set up
during FBA)

Only one ugly workaround I see if you [auto]logon to that user account under which you want to run the service and try to set up the
password with sc.exe or API call from there. It should work there. And if it is, the problem probably lays somewhere around user
account password crypto cache in SAM db.
Or, at least, you launch the sc.exe /password after FBA when all user account profiles are already created.
 
Back
Top