LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 10-16-2009, 07:41 AM   #1
RaelOM
Member
 
Registered: Dec 2004
Posts: 110

Rep: Reputation: 16
/etc/resolv.conf permissions are 600 and name lookups fail for other users?


So, I'm having a problem and I've never seen it before.

/etc/resolv.conf was mode 600. Users besides 'root' were unable to resolv anything. As another user besides root, a nslookup would result in nameserver timeout and a ping would result in unknown host.

When I change the permissions to 644, it works fine for everyone.

So I understand it makes sense that everyone should have read capability to the resolv.conf file so ping can query who it should get resolution from, but according to our latest backup, this file has been mode 600 for quite some time, so our services should have been failing yesterday and not just appearing this morning?

Does anyone know anything about this?

Yesterday my peer added this server to our Active Directory domain using Likewise, would that have caused this error to appear?
 
Old 10-16-2009, 07:44 AM   #2
madmadmod
Member
 
Registered: Sep 2009
Distribution: Fedora, Red Hat
Posts: 52

Rep: Reputation: 18
did your services use cached information?
 
Old 10-16-2009, 07:47 AM   #3
rizhun
Member
 
Registered: Jun 2005
Location: England
Distribution: Ubuntu, SLES, AIX
Posts: 268

Rep: Reputation: 47
Weird!

644 is definitely standard for /etc/reslov.conf though.
 
Old 10-16-2009, 09:53 AM   #4
RaelOM
Member
 
Registered: Dec 2004
Posts: 110

Original Poster
Rep: Reputation: 16
Yea, I thought of cache as well, and that's the only explanation I could come to, but if /etc/resolv.conf was 600 for awhile now, shouldn't this have been failing all along?

nsswitch.conf was modified but only for

< passwd: files
< group: files
---
> passwd: files lsass
> group: files lsass

Would that have any effect?
 
Old 10-16-2009, 11:08 AM   #5
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
madmadmod got it right. /etc/resolv.conf need to be readable for all only if the name service cache daemon (nscd) isn't enabled, otherwise, 0600 is just fine.

What says (assuming you are running Solaris 10 or newer):
Code:
svcs -xv name-service-cache
?

Last edited by jlliagre; 10-16-2009 at 11:10 AM.
 
Old 10-16-2009, 11:24 AM   #6
RaelOM
Member
 
Registered: Dec 2004
Posts: 110

Original Poster
Rep: Reputation: 16
Solaris 9, not using the new service implementation.

I don't see that nscd is running or has ever ran.
 
Old 10-16-2009, 11:33 AM   #7
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Nscd should and was certainly running before. It just died for some odd reason and that triggered the effect you are observing. Just restart it. It is quite useful anyway beyond that permission issue.
Code:
/usr/sbin/nscd
Note that this wouldn't have happened with Solaris 10 or newer.
 
Old 10-16-2009, 12:45 PM   #8
RaelOM
Member
 
Registered: Dec 2004
Posts: 110

Original Poster
Rep: Reputation: 16
BINGO

Never knew about nscd

Thanks!

I've audited my servers and foud three more with nscd not running but the perms on resolv.conf were correct, so we dodged the bullet and 9 more that had nscd running but bad perms on resolv.conf so we didn't get bit.

I've since fixed the perms and started nscd on all servers.

Thanks!
 
  


Reply



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
iptables: NAT/masquerading functions, DNS lookups fail cdean Linux - Networking 8 04-08-2007 03:24 AM
DNS Hosts.conf or resolv.conf problem mac_casey SUSE / openSUSE 0 03-26-2006 09:21 AM
DNS lookups fail on SuSE 10.0 aequora SUSE / openSUSE 5 03-21-2006 06:45 PM
resolv.conf Culbert Linux - Networking 8 03-20-2003 04:11 PM
Host lookups fail at first, but then succeed consistently. mikeyt_333 Linux - Networking 1 08-23-2002 01:22 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 05:59 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