views:

360

answers:

2

I can start the service correctly if the service's "Log on" account has a password. But when I remove the user password and try again, I got the error: "Error 1069: The service did not start due to a logon failure"

Can't a service runs under an account with empty password?

+1  A: 

What version of Windowss? I believe under Windows XP at least, a service can't be run as a user with a blank password.

If you've time spare, you could try setting things like "allow interaction with desktop" on the service, and "allow log on a service" for the user.

But I think you'd be better with a password, for several reasons. Why don't you want one?

Colin Pickard
Yes, I'm using XP. So you mean XP has such limitation? I didn't use "LocalSystem" account so I'm afraid I can't enable the "allowinteraction with desktop" option. The account is for testing only so I didn't create password for it.
trudger
I believe it does have that limitation. I did try searching the web to back it up but couldn't come up with anything concrete. I'd recommend creating a password anyway.
Colin Pickard
Stephen's answer confirms this, gives a workaround, and the reasoning behind it
Colin Pickard
+3  A: 

By default all modern versions of Windows have a Local Security policy that restricts users with blank passwords to logging on at the local console only. In other words, a user with a blank password must physically be at the computer in order to log on. The user cannot log on as a service, as a batch user, over a network, etc.

This can be changed by changing the policy under Local Policies -> Security Options. Or by changing the LimitBlankPasswordUse value under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa to zero.

But, and this is very important, this will set up a serious hole in your security since users with blank passwords will now be able to log on remotely and blank passwords are pretty easy to guess. I can't think of any reason to have a service run under an account with no password, so my recommendation would be - don't do it.

Stephen Martin