/etc/resolv.conf permissions are 600 and name lookups fail for other users?
Solaris / OpenSolarisThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
/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?
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?
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
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):
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.