Permission for DHCP Client in Registry

Joined
Dec 9, 2019
Messages
3
Reaction score
0
I created a batch file to automatically change IP address
and I'm experiencing DHCP error Due to Access Denied Failed 5

So I decided to follow the instruction below, and it works for me

However, may concern now is, does it have a security risks ?
Is it safe to grant full control permission to 'Network Service' and 'Dhcp'

Something you can do that may resolve this for you is the following:
  • Press Windows key and R key together to open the Run dialog
  • In the Run dialog type regedit then click OK
  • When the User Account Control appears click Yes
  • The Registry Editorwindow will now open.
    • On the left pane click and expand to the following location:
HKEY_LOCAL_MACHINE
— SYSTEM
— CurrentControlSet
— Services
Dhcp
  • Right-click on the Dhcp key In the left pane and select Permissions

    Sample image

    permissions.png
  • In the window that opens click the Add button

    Sample image

    permissions2.png

  • In the next window that opens type network service in the empty field then click Check Names button.

    This will open the window again showing NETWORK SERVICE in the field. Click OK

    Sample images


    permissions3.png

  • This will return you to the Permissions for Dhcp window. Check the Full Control box under the Allow column, then click OK

    Sample image

    permissions4.png

  • You will now be back at the Registry Editor window. Click once on the Dhcp key in left pane, then type tc to auto scroll down to the Tcpip key.

    Alternatively, just scroll down to this key.
HKEY_LOCAL_MACHINE
— SYSTEM
— CurrentControlSet
— Services
Tcpip
  • When you get there, right-click on the Tcpip key in the left pane and select Permissions
  • In the window that opens click the Add button
  • In the window that opens as before type network service in the empty field and click Check Names
  • When you see this window showing NETWORK SERVICE click OK
  • Check the Full Control box under Allow column then click OK
  • Close the Registry Editor, and any other open programs.
  • Restart computer for changes to take affect.

Once you have done this and restarted computer, hopefully this DHCP error 5 will not bother you again.
 

Regedit32

Moderator
Joined
Mar 4, 2016
Messages
3,609
Reaction score
1,140
The Network Service is an actual account.

Thus granting full access to this account comes with an element of risk.

You can mitigate this by approaching your issue in a slightly different way, by expanding the Dhcp hive and applying Permissions to your User Account, for the Sub-key named Configuration. Granting yourself full control comes with its own risks, but at least limits the access to your account only.

Rather than post an entire new post on a topic I covered several years ago, I'll suggest you take a look at the following article posted by AnandK where he fully explains this alternate method to achieve the same outcome.


Regards,

Regedit32
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top