NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
kejones
Aug 02, 2014Tutor
How to keep DNS records up-to-date in an AD domain
Hi folks,
If you regularly use your ReadyNAS device in an active directory domain using the integrated DNS services, then you'll have probably noticed that you run into issues with the NAS not registering it's DNS name and DNS entries disappearing when the AD DNS server cleans out its records. As active directory is quite reliant on correct DNS settings to locate and identify devices, this can cause some very strange and difficult quirks (everything from not being to surf to the NAS using the expected FQDN through to issues with ACL's not working as expected).
A common workaround is to manually set up DNS entries in your AD DNS server to avoid the problem but with a simple tweak you can get your NAS doing the work for you...
[With the usual warning that using SSH shell access will invalidate your support from Netgear]
1) enable SSH (from the settings)
2) login as root using Putty (or an equivalent)
3) cd to /etc/cron.daily/
4) use vi to create a file in with whatever name you wish ( I used "ads" to remind me that it's handling ads integration)
5) add the lines;
#!/bin/sh
net ads dns register -P
6) save the file
7) use chmod to ensure the file has read+execute permissions (e.g. chmod 755 ads )
8) logout/disconnect from Putty
9) Disable SSH of you prefer :-)
The next time the cron daily jobs run (6:25am by default, according to the crontab file currently in use in OS6.xx), your NAS will run that shell script. The samba commands in it will use the credentials stored within the samba configuration files and register the NAS's DNS name on the AD controller's DNS server.
In most cases, having your NAS re-register on a daily basis is easily enough to prevent DNS entries disappearing when the AD DNS service cleans up records but it's worth bearing in mind that in some environments the scavenging of old DNS records might be much more rapid.
Regards,
Keith
If you regularly use your ReadyNAS device in an active directory domain using the integrated DNS services, then you'll have probably noticed that you run into issues with the NAS not registering it's DNS name and DNS entries disappearing when the AD DNS server cleans out its records. As active directory is quite reliant on correct DNS settings to locate and identify devices, this can cause some very strange and difficult quirks (everything from not being to surf to the NAS using the expected FQDN through to issues with ACL's not working as expected).
A common workaround is to manually set up DNS entries in your AD DNS server to avoid the problem but with a simple tweak you can get your NAS doing the work for you...
[With the usual warning that using SSH shell access will invalidate your support from Netgear]
1) enable SSH (from the settings)
2) login as root using Putty (or an equivalent)
3) cd to /etc/cron.daily/
4) use vi to create a file in with whatever name you wish ( I used "ads" to remind me that it's handling ads integration)
5) add the lines;
#!/bin/sh
net ads dns register -P
6) save the file
7) use chmod to ensure the file has read+execute permissions (e.g. chmod 755 ads )
8) logout/disconnect from Putty
9) Disable SSH of you prefer :-)
The next time the cron daily jobs run (6:25am by default, according to the crontab file currently in use in OS6.xx), your NAS will run that shell script. The samba commands in it will use the credentials stored within the samba configuration files and register the NAS's DNS name on the AD controller's DNS server.
In most cases, having your NAS re-register on a daily basis is easily enough to prevent DNS entries disappearing when the AD DNS service cleans up records but it's worth bearing in mind that in some environments the scavenging of old DNS records might be much more rapid.
Regards,
Keith
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!