[CentOS] named problem with cpanel

Wed Jun 22 01:06:18 UTC 2005
Tom <admin at homemachine.net>

Egypt.com wrote:
> If you have your zone files in /var/named, you can use the following 
> script to produce another named.conf file
> The script will print the file to the screen, you can copy and paste it 
> if you are satisfied with the results
> 
> Note : Run only if you have primary master name server
> 
> **************BEGIN SCRIPT**************
> #!/bin/bash
> 
> DIRECTORY="/var/named"
> 
> #Generate /etc/rndc.key file (if you already have one in /etc/rndc.key 
> then just run the script as non root user)
> rndc-confgen -a
> 
> cat /etc/rndc.key
> echo -e "controls { \n\t inet 127.0.0.1 allow { localhost; } keys { 
> "rndckey"; };\n};\n"
> if [ -f "$DIRECTORY/named.ca" ]
> then
>  echo -e "zone \".\" {\n\ttype hint;\n\tfile 
> \"$DIRECTORY/named.ca\";\n};\n\n"
> fi
> 
> for file in $DIRECTORY/*.db
> do
> if [ -f "$file" ]
> then
>   zonename=${file%.db}
>   echo -e "zone \"$zonename\" { \n\t type master; \n\t file \"$file\"; 
> \n};\n"
> fi
> done
> **************END SCRIPT**************
> 
> Hope this will help
> 

thanks for that. it looks like the best option is to remove 
caching-nameserver as it isn't needed with cpanel machines, then restore 
named.conf :)

regards
tom