Click here to Skip to main content
15,890,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,
I am using AddIPAddress and DeleteIPAddress methods from a windows Service.

To use these APIs, I need the service to Logon from the "Local System" account which is something I want to avoid.

Is there another way of doing this?

Thanks!
Posted
Updated 28-Nov-15 7:04am
v2
Comments
ZurdoDev 28-Nov-15 15:28pm    
LocalSystem is very safe to use.
_SurajP 29-Nov-15 0:02am    
https://technet.microsoft.com/en-us/library/hh125927(v=ws.10).aspx

Any service is a potential point of attack. So, its best to avoid giving higher level permissions.
ZurdoDev 29-Nov-15 9:53am    
Agreed. If you don't want to use that one then you have to create your own account and find the right permissions to grant/deny.

1 solution

Figured this:-

The restricted user can be made a member of the Network Configuration Operators group.

Network Configuration Operators Members of this group can make changes to TCP/IP settings, and they can renew and release TCP/IP addresses. This group has no default members. • and No default user rights

This way the service doesn't run with higher privileges but can still do network configuration related tasks.

Following links have details on this:-
https://technet.microsoft.com/en-us/library/cc771990.aspx
https://support.microsoft.com/en-us/kb/297938
https://technet.microsoft.com/en-us/library/cc754921(v=ws.10).aspx
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900