omcmd is a handy scriptable CLI program that helps you manage actions on a running ISC DHCP server using OMAPI. Pretty cool, right? It lets you create, remove, modify, and look up hosts and leases with ease. This tool was designed to work with a custom netreg application.
Before diving in, make sure to install dhcp-devel. You’ll need to check where the include files for DHCP are located. Don’t worry if autoconf sounds tricky; just type 'make' and fix any errors that pop up!
The basic usage format is:
omcmd [-k keyname secret | -K keyfile ] [-s server] [-v] < command > < objtype > < args >
The keyname and secret should match what’s in your dhcpd.conf file. Remember, the secret must be base64 encoded! If you’re using a 'keyfile', it should have the keyname on the first line and the secret on the second.
You have several commands at your disposal:
The objtype can be one of these:
The first argument should be in this form: property=value (like ip-address=10.20.30.40). For removing objects, this is all you need!
If you're creating or modifying an object, you'll add more property=value strings. Here are some properties you can use:
Go to the Softpas website, press the 'Downloads' button, and pick the app you want to download and install—easy and fast!
SoftPas is your platform for the latest software and technology news, reviews, and guides. Stay up to date with cutting-edge trends in tech and software development.
Subscribe to newsletter
© Copyright 2024, SoftPas, All Rights Reserved.