LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-14-2020, 01:19 PM   #1
witchkinkofangmar
Member
 
Registered: May 2019
Posts: 83

Rep: Reputation: Disabled
ipa host-del to remove stale host/dns entries only


What would a command to remove stale host/dns entries look like? I'd love to create a cron that removes them every 7 days.
 
Old 07-14-2020, 01:46 PM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by witchkinkofangmar View Post
What would a command to remove stale host/dns entries look like? I'd love to create a cron that removes them every 7 days.
What do you mean by "stale"?
Remove them from where?
 
Old 07-14-2020, 02:01 PM   #3
witchkinkofangmar
Member
 
Registered: May 2019
Posts: 83

Original Poster
Rep: Reputation: Disabled
Stale as in DNS records for a deleted VM or machine and removed from an IPA server.
 
Old 07-14-2020, 02:11 PM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
First, you need a way to identify the stale entries. Do you have that?
Second, you need way to update the server. Do you know how to do that?
A cron job would do those things: Identify stale entries and update the server accordingly.

Generally speaking, we’re happy to help if you run into problems, but we don’t have enough information to do it for you...and that’s not how the forum works anyway.

Please review the Welcome to LQ link in my signature.
 
Old 07-14-2020, 02:37 PM   #5
witchkinkofangmar
Member
 
Registered: May 2019
Posts: 83

Original Poster
Rep: Reputation: Disabled
I guess a better question would be how to identify stale entries. DNS scavenging and aging for Windows is a setting but is there something similar for linux?

Updating would be a cron job running a script that would just be like:

for server in servers:
ipa host-del

Last edited by witchkinkofangmar; 07-14-2020 at 02:45 PM.
 
Old 07-14-2020, 02:49 PM   #6
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by witchkinkofangmar View Post
I guess a better questions would be how to identify stale entries. DNS scavenging and aging for Windows is a setting but is there something similar for linux?

Updating would be a cron job running a script that would just be like:

for server in servers:
ipa host-del
There appears to be, but it depends on exactly what you are doing. Something in this search may help...if not refine it to include specific information about your setup: bind9? AD? Whatever you're using. Note the "-windows" part to remove a gazillion not-Linux finds.
 
  


Reply

Tags
centos7, cron, dns, freeipa, rhel7



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you configure an IPA client to see an IPA replica? edomingox Linux - Server 2 12-03-2018 07:33 AM
Stale login entries in utmp/wtmp (even after user logs out) dmadhava Linux - General 1 03-04-2009 09:18 AM
Stale login entries in utmp/wtmp (even after user logs out) dmadhava Linux - General 0 05-19-2004 10:29 AM
Dynamic DNS and stale firewall lookups socom Linux - Networking 2 02-28-2004 08:21 PM
need help to set up caching only dns server to with bogus DNS entries ullas Linux - Networking 1 10-28-2003 01:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration