Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SC CreateService FAILED 1057 The account name is invalid or does not exist, or the password is invalid for the account name specified

I am trying to install winodws service on remote system which is under same network, using below command from cmd.

sc \\11.130.23.105 create "test_service01" binpath= "\11.130.23.105\ServiceLocation\TestWindowService.exe" obj= user password= password123#

when try to execute above command I m getting below error.

[SC] CreateService FAILED 1057: The account name is invalid or does not exist, or the password is invalid for the account name specified. I m verifies that user and passwords are correct. any one can suggest what might be the problem here. Thanks

like image 564
N.RaviKumar Avatar asked Jun 27 '16 10:06

N.RaviKumar


1 Answers

If the target machine is in a domain, you need to specify the user like this:

sc \\11.130.23.105 create "test_service01" binpath= ... obj= .\user password= pwd123

Also note that the path to the executable should be provided from the perspective of the remote machine, i.e., it should be a local path rather than a UNC path.

like image 87
Harry Johnston Avatar answered Nov 04 '22 09:11

Harry Johnston