Solved

Login for NT Services

Posted on 2001-06-21
12
501 Views
Last Modified: 2008-02-01
I encounterd an error while starting service that has login name in ServiceStartName. The error occured when starting the service:

net start MyServiceName

The error is:

login failed for user ...

I need a help
Thanks
Motaz
0
Comment
Question by:Motaz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
  • +1
12 Comments
 
LVL 7

Author Comment

by:Motaz
ID: 6213734
When I ommit ServiceStartName and Password, it works, but it cann't access network resources, such as MS-SQL servers
0
 
LVL 17

Expert Comment

by:inthe
ID: 6213830
did it give an error code so you can type
net helpmsg "errorcode"
0
 
LVL 2

Expert Comment

by:FrodoBeggins
ID: 6213858
  Basicaly NT services are started with SYSTEM account. You may not be able to access the network.
   In the other hand is your account, which may connect to the network, but can't start as a service. I think you should go to "Local Security serrings" => "Local policies" => "User rights assignment" and allow "Logon as a service" to your account
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 7

Author Comment

by:Motaz
ID: 6213869
Error code: 1069
The error message is:


"The service did not start due to logon failure"
0
 
LVL 2

Accepted Solution

by:
FrodoBeggins earned 50 total points
ID: 6213879
  Basicaly NT services are started with SYSTEM account. You may not be able to access the network.
   In the other hand is your account, which may connect to the network, but can't start as a service. I think you should go to "Local Security serrings" => "Local policies" => "User rights assignment" and allow "Logon as a service" to your account
0
 
LVL 2

Expert Comment

by:FrodoBeggins
ID: 6213885
This is on Win2k. I have no NT4 arround here to see, but should be close to this.
0
 
LVL 7

Author Comment

by:Motaz
ID: 6213959
FrodoBeggins, it works in 2000 but Where can I find that in NT4 WS.
0
 
LVL 2

Expert Comment

by:FrodoBeggins
ID: 6214009
I have no nt4 arround, but I think it should be in Start -> Programs -> Administrative tools (common) -> User Manager
0
 
LVL 17

Expert Comment

by:geobul
ID: 6214234
Hi,
Start-Settings-Control Panel-Services:
Select your service and press 'StartUp' button. Here you have an option to start that service under an account different than System.

Regards, Geo
0
 
LVL 2

Expert Comment

by:FrodoBeggins
ID: 6214311
And hope it starts, right, Geo? :)
0
 
LVL 17

Expert Comment

by:geobul
ID: 6218534
I hope so. Motaz could try different users this way to see what exactly the problem is. I've tried a simple service program which copies a remote file with no login problems with:
- ServiceType : stWin32
- StartType : stManual
using ServiceStartName:
- blank : system account;
- local account (administrator);
- domain account (domain\user).

procedure TGeoService.ServiceExecute(Sender: TService);
begin
  CopyFile('\\computer\public\test.txt','c:\temp\');
  while not Terminated do begin
    ServiceThread.ProcessRequests(False);
  end;
end;

Regards, Geo
0
 
LVL 7

Author Comment

by:Motaz
ID: 6220874
Thanks FrodoBeggins you guided me to the right way. The solution as geobul stated, is to try different login in Services manager. When you click ok, Log as service will be granted automatically to that login.

geobul, I'll post to you points!

Motaz
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question