From owner-freebsd-questions@FreeBSD.ORG Tue Dec 9 18:19:38 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CB26106564A for ; Tue, 9 Dec 2008 18:19:38 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: from mail-fx0-f19.google.com (mail-fx0-f19.google.com [209.85.220.19]) by mx1.freebsd.org (Postfix) with ESMTP id 864588FC14 for ; Tue, 9 Dec 2008 18:19:37 +0000 (UTC) (envelope-from odhiambo@gmail.com) Received: by fxm12 with SMTP id 12so21447fxm.19 for ; Tue, 09 Dec 2008 10:19:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=HvjAtO+yc/gqEEydg0K67RJSH4p6XjahNqb70qyD/rk=; b=E6K8l1MSuz4oavfpVYMxDjfQz5ibU9udu5Yjf6fHP2sR3nEZw6uCJG5AAxvOfFKjKi I/8rUYkKzVY4drw+2VgGRO/G4TlU9HLOGczCaqRwrZUfZwnNlzB5I6b0bEJB8A9f9Ox9 G5WbGYHIGRq0sKMedmJB+AaNa7FAUASe4CYZQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=DBDp/4hXjT9KcejlpoyDq5RBxYyXeFsniyNtJbS4//iIuY7hB5nDcetujEiCqTed4U V+MmS/54Va1p9L8/CiSiuHzltAijFYYpUGBjv4G3Zs7k3XQjDZl6rJqUuvQe9/CaBsLY 0LdkfsVImZTw/ztbI5SI5wunYLfNBXKzv1yfI= Received: by 10.223.113.83 with SMTP id z19mr422641fap.73.1228846371260; Tue, 09 Dec 2008 10:12:51 -0800 (PST) Received: by 10.223.103.206 with HTTP; Tue, 9 Dec 2008 10:12:51 -0800 (PST) Message-ID: <991123400812091012s5f9eac91i72724d8d834014b@mail.gmail.com> Date: Tue, 9 Dec 2008 21:12:51 +0300 From: "Odhiambo Washington" To: "Pieter Donche" In-Reply-To: MIME-Version: 1.0 References: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "mail.list freebsd-questions" Subject: Re: add/change/delete dhcpd.conf entries X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 18:19:38 -0000 On Tue, Dec 9, 2008 at 8:19 PM, Pieter Donche wrote: > In a DHCP server managing fixed IP addresses, one needs to make changes > often: new people need their Mac address given a IP addres, people leaving > need to be deleted, people changing an old for a new computer need a Mac > address change for the same IP, etc... > > All this information is recorded in the /usr/local/etc/dhcpd.conf file. > I know, there is the omapi command shell (/usr/local/bin/omshell) but as > far as I can see, you can only use it interactively. Or am I wrong? > > I would love to have a simple command line tool that allows you to make > changes to your dhcpd.conf file without needing to use an > editor or omapi. > > e.g. for a new entry, something like: > # dhcpdmgr -A 175.134.34.128 -c "John.Adams PC" -i "00:34:1A:23:4A:0F" > 175.134.34 > which would add IP 175.134.34.128 in subnet 175.134.3 for mac address > 00:34:1A:23:4A:0F with a comment "John.Adams PC" > > and with other options for delete (-D), make changes to comment, IP or Mac, > etc... > > Does anyone have such a command line tool? Webmin will easily allow you to do that! Odhiambo WASHINGTON, Nairobi,KE +254733744121/+254722743223 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ "Okay guys. This is Kenya. You pay taxes because you feel philanthropic, unlike our MPs!" -- Kenneth Marende, Speaker, 10th Parilament.