MacOS – how to place file inside /sbin/ in MAC 10.11 during .pkg installation

macmacosNetworkxcode

We have been installing / placing a tool for dhcp refresh under /sbin till MAC 10.10 there were no issues. but now it is completely blocked.
even with root privilege i cannot able to place it.
Any way is suggested?

Does Apple provide any other way to perform the release and renew IP address, clear the ARP entries in better way?

Thanks,
Saravana

Best Answer

wim-deblauwe's comment links to Release & Renew DHCP from the Command Line with ipconfig which shows how to do this:

The basic syntax to renew DHCP lease from the command line with ipconfig is as follows:

sudo ipconfig set (DEVICEINTERFACE) DHCP

If you know the device interface (en0, en1, en2, etc), just run that command to release and then renew DHCP for the determined device. Let’s say it’s en0, standard for modern Macs with wi-fi only.

sudo ipconfig set en0 DHCP

Do not use setuid on OS X. This approach is considered a security risk and Apple appears to be working to invalidate any justification for it.

Any script or tool you create will need to acquire the appropriate authorisation rights before calling the related API.