[CentOS] named problem with cpanel

Sun Jun 19 08:43:08 UTC 2005
Egypt.com <hamid at use-trade.com>

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


----- Original Message ----- 
From: "Tom" <admin at homemachine.net>
To: "CentOS mailing list" <centos at centos.org>
Sent: Saturday, June 18, 2005 5:17 PM
Subject: [CentOS] named problem with cpanel


> Hi all.
>
> does anyone know if this has been resolved?
>
> Important Notice Users updating to CentOS 3.5 from CentOS 3.4 may 
> experience a problem with /etc/named.conf reverting to the default state. 
> This is due to a problem with the new caching-nameserver rpm provided with 
> CentOS 3.5. If the problem does occur, it can be easily corrected by 
> running the following command in a root shell:
>
> mv /etc/named.conf /etc/named.conf.CENTOS35UPDATE;mv 
> /etc/named.conf.rpmsave /etc/named.conf;/scripts/restartsrv_named
>
> For more information, please refer to this thread on the cPanel Forums: 
> http://forums.cpanel.net/showthread.php?p=191301#post191301
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
>
>