473,806 Members | 2,607 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Windows 2003 Service

cd
Is there a specific process or permissions that must be granted to get a .NET
(framework 1.4) Window Service to run properly on a Windows 2003 Server?

I built a Windows Service to start two local programs (Putty and Pageant)
located on a Win 2003 Server. The service installs but doesn't start the
Putty / Pageant programs properly when using any user ID except my own. Why
will it work with my User ID? I install the Windows Service on a Win 2000
machine and the service works fine with the local administrator account I
setup. I set the same user on the Win 2003 Server and the service doesn't
start the programs prooperly. I know there are a bunch of variables between
the 2 operating systems and progams. Most of what I have found is Win 2003
needs permissions granted to certain functions and no longer grants them out
of the box. I'm trying to find out what those permissions are and the
differences.

thank you,
--
Christopher
Jul 21 '05 #1
2 2597
Hi Chis,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you are having problem to start a
windows service on Windows 2003 server. If there is any misunderstandin g,
please feel free to let me know.

There is some minor difference on the LocalSystem Account of Windows 2000
and Windows 2003. Windows 2000 LocalSystem account doesn't have SE_TCB_NAME
privilege. In Windows 2000, the process calling LogonUser requires the
SE_TCB_NAME privilege. If the calling process does not have this privilege,
LogonUser fails and GetLastError returns ERROR_PRIVILEGE _NOT_HELD.

However, I think if you try to use an administrator account the start the
server, the above privilege doesn't matter. If it doesn't start, is there
any error messages?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #2
"cd" <No****@noemail .nospam> wrote:
Is there a specific process or permissions that must be granted to get a .NET
(framework 1.4) Window Service to run properly on a Windows 2003 Server?

I built a Windows Service to start two local programs (Putty and Pageant)
located on a Win 2003 Server. The service installs but doesn't start the
Putty / Pageant programs properly when using any user ID except my own. Why
will it work with my User ID? I install the Windows Service on a Win 2000
machine and the service works fine with the local administrator account I
setup. I set the same user on the Win 2003 Server and the service doesn't
start the programs prooperly. I know there are a bunch of variables between
the 2 operating systems and progams. Most of what I have found is Win 2003
needs permissions granted to certain functions and no longer grants them out
of the box. I'm trying to find out what those permissions are and the
differences.

thank you,


Your best bet is to create an special account for your
service and the programs it spawns. You really shouldn't be
running a service with the administrators account.

- Enable security auditing on the machine.

- Create a special (unprivileged) account for your service.

- Test the programs that the service spawns under that
account. Security auditing should indicate the missing
privileges. Add each privilege in turn.

- Not all problems are related to privileges, sometimes its
an issue with the Discretionary Access Control Lists (DACL,
or sometimes even just ACL). For that you'll have to get and
install FileMon (for file accesses) and RegMon (for registry
accesses) - that should help you identify the problem
file(s) and registry entries.

- Once your programs run fine set the service up to use that
account. Depending on "how" you do things in your service
you may need to add further privileges of tweak some more
File/Registry ACLs.

- Once you got everything running, shutdown FileMon, RegMon
and disable Security Auditing (or set it to a more suitable
configuration). DOCUMENT the privileges and ACL changes
needed to make it work for the next administrator to come
along.

- In the future develop under an account that is set up
according to the least privilege principle - that way you
will be alerted early to any problems that third party
components or your own code is causing.

How To Enable and Apply Security Auditing in Windows 2000
http://support.microsoft.com/default...b;en-us;300549
(Shouldn't be too different for 2003)

Filemon
http://www.sysinternals.com/ntw2k/source/filemon.shtml

RegMon
http://www.sysinternals.com/ntw2k/source/regmon.shtml

Defend Your Code with Top Ten Security Tips Every Developer
Must Know
http://msdn.microsoft.com/msdnmag/is...s/default.aspx

Developing Software in Visual Studio .NET with
Non-Administrative Privileges
http://msdn.microsoft.com/library/de...privileges.asp

Secure Coding Practices: Running with Least Privileges in
Windows
http://www.codeproject.com/tips/runas.asp

How To: Secure Your Developer Workstation
http://msdn.microsoft.com/security/s...htworkstat.asp

The Challenge of Least Privilege
http://msdn.microsoft.com/library/de...re06112002.asp
Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
7195
by: Eric Chong | last post by:
I created a Windows Service in C# that requires to get passed command arguments like a Console App. I noticed that there is an option "Start parameters" text box in the property of a Windows Service in MMC. Is there any way to get arguments using this option? If possible, what framework method should I use to get an arguement? Thanks in advance. Eric
3
7667
by: Harry Simpson | last post by:
Windows Server 2003 is supposed to include Framework 1.1 right. I don't have it here but have reports that the web is not running. The users say that the %COMPUTERNAME%\ASPNET user doesn't exist. Questions: 1. is this user replaced by the %COMPUTERNAME%\NETWORK SERVICE user in Windows 2003 Server (IIS6)? 2. if the ASPNET user still needed to run .NET apps and it's missing, how would you add to a Windows 2003 Server box?
5
2701
by: pberna | last post by:
Dear all, I built a Web Form application to start and stop a Windows Service remotely. I successful tested the application on Windows 2000 server + IIS. I must include the ASPNET user to the Administration group (on server side) to have the necessary authorization to start a Windows Service (I don't understand why "Power User" rights are not enough to do the same thing) Although I'm able to start a service using windows 2000 server...
7
3217
by: lvpaul | last post by:
Hallo ! I am using IIS-Windows-Authentication in my intranet (web.config <authentication mode="Windows" /> <identity impersonate="true" /> How can I get the users (client) IP-Address ? I think the username can be read with user.identity.name.
10
3491
by: Ger | last post by:
I am having problems using VB.Net's Management base object on a machine hosting Windows Server 2003. I am trying to set file permissions from a Windows Service. These files may be loacted on a local machine or somewhere on the network. I use the Management Base Object to set these permissions which works perfectly when the windows service is running on an XP machine. However, when the service is running on a Windows Server 2003 machine I...
2
370
by: cd | last post by:
Is there a specific process or permissions that must be granted to get a .NET (framework 1.4) Window Service to run properly on a Windows 2003 Server? I built a Windows Service to start two local programs (Putty and Pageant) located on a Win 2003 Server. The service installs but doesn't start the Putty / Pageant programs properly when using any user ID except my own. Why will it work with my User ID? I install the Windows Service on a Win...
0
2230
by: Charles Leonard | last post by:
I am having yet another issue with Windows Server 2003. This time, the web service (a file import web service) appears to run except for one odd message: "ActiveX component can't create object". There are no other statements to indicate what object cannot be created. Otherwise, everything on the test Windows Server 2003 works fine—all import data updates correctly. Unfortunately, my normal development environment is not Windows...
4
2121
by: Lenny Shprekher | last post by:
Hi, I have long time ago written windows service (VS2002) which is working fine on Windows 2000 server for 4 years. After installing service on Windows 2003 SP1 service crashing every time with same System.StackOverflow exception. Please help me with this if you can? Thread created.
1
1960
by: Mahesh Devjibhai Dhola | last post by:
Hi, Scenario: The webservice was developed on windows 2000 Pro and deployed previously on windows XP pro for testing. We have tested for many days. The client for that service was 30+ and accessing the webservice each min. It was working 100% fine. Problem: But now in actual deployment, we have deployed webservice in Win Server 2003 and we have used all the default configurations. Now the clients are accessing that service the same way...
0
9719
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10372
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10110
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9187
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7650
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5546
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5682
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4329
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.