{"id":400,"date":"2013-07-15T12:39:50","date_gmt":"2013-07-15T19:39:50","guid":{"rendered":"http:\/\/blog.ls-al.com\/?p=400"},"modified":"2013-07-15T12:44:51","modified_gmt":"2013-07-15T19:44:51","slug":"solaris-smf-not-updating-resolv-conf","status":"publish","type":"post","link":"https:\/\/blog.ls-al.com\/solaris-smf-not-updating-resolv-conf\/","title":{"rendered":"Solaris SMF Not Updating resolv.conf"},"content":{"rendered":"

I recently had an issue where the Solaris SMF did not want to update my \/etc\/resolv.conf file. Even though \"svccfg -s network\/dns\/client listprop config\" showed the entries for my DNS client correctly and also trying the export the SMF simply refused to update the resolv.conf. I dug around in the scripts a little bit and saw the \"delcust\" option. AFter clearing everything out I could add my entries back in SMF DNS client and resolv.conf automatically updated when doing a refresh.<\/p>\n

Found the delcust line here:<\/span><\/strong><\/p>\n

\r\nroot@t41:\/lib\/svc\/method# more dns-client\r\n...\r\n'unconfigure')\r\n # Permanently shutdown service\r\n svcadm disable $SMF_FMRI\r\n # Unroll any admin customization\r\n svccfg -s svc:\/network\/dns\/client delcust\r\n...\r\n<\/pre>\n

Try deleting\u00a0customization:<\/span><\/strong><\/span><\/p>\n

\r\nroot@t41:\/lib\/svc\/method# svccfg -s svc:\/network\/dns\/client delcust\r\nDeleting customizations for service: network\/dns\/client\r\n\r\nroot@t41:\/lib\/svc\/method# svcs -a | grep dns\/client\r\nonline 14:21:02 svc:\/network\/dns\/client:default\r\n\r\nroot@t41:\/lib\/svc\/method# svcadm disable svc:\/network\/dns\/client\r\n\r\nroot@t41:\/lib\/svc\/method# svcs -a | grep dns\/client\r\ndisabled 14:17:40 svc:\/network\/dns\/client:default\r\n\r\nroot@t41:\/lib\/svc\/method# svccfg -s network\/dns\/client listprop config\r\nconfig application\r\nconfig\/value_authorization astring solaris.smf.value.name-service.dns.client\r\n<\/pre>\n

Add values for DNS:<\/strong><\/span><\/p>\n

\r\nroot@t41:\/lib\/svc\/method# svccfg -s network\/dns\/client setprop config\/nameserver = net_address: "(10.200.10.10)"\r\nroot@t41:\/lib\/svc\/method# svccfg -s network\/dns\/client setprop config\/domain = astring: domain1.com\r\nroot@t41:\/lib\/svc\/method# svccfg -s network\/dns\/client setprop config\/search = astring: '("domain1.com" "domain2.com")'\r\n\r\nroot@t41:\/lib\/svc\/method# svccfg -s network\/dns\/client listprop config\r\nconfig application\r\nconfig\/value_authorization astring solaris.smf.value.name-service.dns.client\r\nconfig\/nameserver net_address 10.200.10.10\r\nconfig\/domain astring domain1.com\r\nconfig\/search astring "domain1.com" "domain2.com"\r\n\r\nroot@t41:\/lib\/svc\/method# svcadm refresh network\/dns\/client\r\nroot@t41:\/lib\/svc\/method# more \/etc\/resolv.conf\r\n...\r\ndomain domain1.com\r\nsearch domain1.com domain2.com\r\nnameserver 10.200.10.10\r\n<\/pre>\n

Check nsswitch also:<\/strong><\/span><\/p>\n

\r\nroot@t41:\/lib\/svc\/method# svccfg -s name-service\/switch listprop config\r\nconfig application\r\nconfig\/default astring files\r\nconfig\/value_authorization astring solaris.smf.value.name-service.switch\r\nconfig\/printer astring "user files"\r\nconfig\/host astring "files dns"\r\n\r\nroot@t41:\/lib\/svc\/method# grep host \/etc\/nsswitch.conf\r\nhosts: files dns\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

I recently had an issue where the Solaris SMF did not want to update my \/etc\/resolv.conf file. Even though “svccfg<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-400","post","type-post","status-publish","format-standard","hentry","category-solaris"],"_links":{"self":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts\/400","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/comments?post=400"}],"version-history":[{"count":0,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts\/400\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/media?parent=400"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/categories?post=400"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/tags?post=400"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}