change nameservers for 200 domains

chow

Verified User
Joined
Aug 27, 2003
Messages
123
Location
The Netherlands
Hi, my customer added 200 domains to the server before I configured nameservers in DA :( So now all domains use dummy nameservers. Is there anyway to change nameservers all at once for all the domains??
 
Not through the DirectAdmin interface last I checked (maybe another tool I need to work on).
But it's doable with a perl or shell script I'm sure.
 
via SSH as ROOT:

perl -pi -e 's/old.namserver.com./new.nameserver.com./' *

Dont leave off the trailing .'s after .com Substitute nameserver names - old and new

Run that in /var/named, and you should be ok
 
The nameservers are also stored in /usr/local/directadmin/data/username/user.conf

I'm not sure if the named database is the same as the httpd.conf files which can be overwritted by DirectAdmin, but it might be worth looking into.
 
Correct me if I'm wrong, but arent the settings in /usr/local/directadmin/data/username/user.conf only used on initial account creation? I've never had to change them there, except during new server prep where we specify the admin and reseller settings
 
hostpc.com said:
via SSH as ROOT:

perl -pi -e 's/old.namserver.com./new.nameserver.com./' *

Dont leave off the trailing .'s after .com Substitute nameserver names - old and new

Run that in /var/named, and you should be ok

Worked fine, thnx
 
Back
Top