LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-06-2004, 07:30 PM   #1
Itsu
Member
 
Registered: Jan 2004
Location: Gladstone, Oregon
Distribution: Gentoo 2005; FreeBSD 5.3
Posts: 32

Rep: Reputation: 15
DNS Caching Server


I'm trying to set up a DNS Caching Server on one of my local machines. I've followed the DNS-Howto (http://www.tldp.org/HOWTO/DNS-HOWTO.html) to the letter, but whenever I start named, it fails.

tail -f /var/log/messages outputs:
Oct 6 17:20:05 Marcus named[29170]: loading configuration from '/etc/named.conf'
Oct 6 17:20:05 Marcus named[29170]: listening on IPv4 interface lo, 127.0.0.1#53
Oct 6 17:20:05 Marcus named[29170]: listening on IPv4 interface eth0, 192.168.0.101#53
Oct 6 17:20:05 Marcus named[29170]: root.hints:33: file does not end with newline
Oct 6 17:20:05 Marcus named[29170]: command channel listening on 127.0.0.1#953
Oct 6 17:20:05 Marcus named[29170]: couldn't open pid file '/var/run/named/named.pid': Permission denied
Oct 6 17:20:05 Marcus named[29170]: exiting (due to early fatal error)
Oct 6 17:21:41 Marcus su: pam_unix2: session finished for user root, service su
Oct 6 17:22:02 Marcus su: (to root) katie on /dev/pts/1
Oct 6 17:22:02 Marcus su: pam_unix2: session started for user root, service su


So I assume this is a permissions problem. I've been doing the whole process by su'ing to root and making changes as neccesarry. Must I actually be logged in as root for this to work, or is 'su' sufficient?

Thanks in advance.

P.S.
This is on SuSE 9.1

Last edited by Itsu; 10-06-2004 at 07:35 PM.
 
Old 10-06-2004, 08:13 PM   #2
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
I'm not familiar with how SuSE installs bind, but the logfile entries you posted suggest you have 2 problems.

1) root.hints:33: file does not end with newline.

I'd be willing to bet that line 33 is the end of the file.

2) couldn't open pid file '/var/run/named/named.pid': Permission denied

You'll have to check your SuSE init script, but if named is being started as user"named" (like on FC2) then change the ownership/permissions on directory /var/run/named to "named". On my FC2 system the ownership/permissions are set to:
Code:
[root@excelsior run]# pwd
/var/run
[root@excelsior run]# ls -ld named
drwxrwx---  2 named named 1024 Mar 26  2004 named
In fact, the SuSe init script could also be starting named in a chroot'd jail. i.e. -t parameter. If thats the case, you'll have to find the chroot'd base directory from the SuSE init script and then change the ownership/permissions on the corresponding chroot'd /var/run. Again, on FC2 its....
Code:
[root@excelsior run]# pwd
/var/named/chroot/var/run
[root@excelsior run]# ls -ld named
drwxrwx---  2 root named 1024 Oct  3 04:03 named
Note the chroot'd base on FC2 is /var/named/chroot. So all subordinate directories start from that point.

Also, just su'ing to root is all that's needed to start named.
 
Old 10-06-2004, 11:49 PM   #3
Itsu
Member
 
Registered: Jan 2004
Location: Gladstone, Oregon
Distribution: Gentoo 2005; FreeBSD 5.3
Posts: 32

Original Poster
Rep: Reputation: 15
It works now, thanks so much for your hints.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Caching DNS server error (lame server resolving) Iggyboo Linux - Networking 1 02-24-2005 03:43 AM
Temporary DNS Caching server egurski Linux - Networking 1 08-12-2004 10:28 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
No IP and Caching DNS server fmertus Linux - Networking 2 06-27-2003 12:33 PM
Caching Name-server and DNS forwarding Pauly Linux - Networking 0 09-20-2002 02:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:06 AM.

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