Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Someone accidentally overwrote our dhcpd.conf file so it's now 0 bytes long. The server is still running and DHCPD is still serving addresses. Is there any way to either recover the lost file from disk, or to dump the configuration from memory? It's running FC3.
Someone accidentally overwrote our dhcpd.conf file so it's now 0 bytes long. The server is still running and DHCPD is still serving addresses. Is there any way to either recover the lost file from disk, or to dump the configuration from memory? It's running FC3.
Thanks a lot,
-Dan
No, you can't do either. Just restore from a recent backup.
We have a backup, but we've been making a lot of changes and backups have failed for a couple of weeks on this machine.
Quote:
Originally Posted by introuble
Why go through all that trouble ? Is it so hard to rewrite dchpd.conf ?
We have 10,000 nodes at 43 sites. There's quite a few printers and client machines with reserved addresses as well, plus we have special scopes for some of our VLANs.
backups have failed for a couple of weeks on this machine.
I'd say off hand that you have some real problems in the making. Looks like you will need to make the file over unless you can restore from backup.
How did someone accidently delete that anyhow?
They were trying to copy the file off the machine and confused source and destination. (!)
One thing we're going to try, besides going back through our work logs, is to search the dhcpd log file for ACKs and then filtering out everything out of the pools. We'll then combine this with our old backup to find any reserved addresses that got lost. It's not perfect (we won't get the ones that haven't been on the network yet and we'll lose the comments) but should fill out anything else we've missed from the work requests.
Another way of adding stuff with fixed-IPs (I've done that in
the past) is to resolve all hosts and filter out static ones
via script, then ping and arp to get their MAC addresses. I'm
quite anal about security, and only devices with known MACs got
a lease on that LAN. To create sections of a dhcpd.conf file from
the arp requests I used this:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.