How to add entries in nsswitch.conf/resolv.conf Solaris 11
1.- Add entries in the ipnode and hosts in the nsswitch.conf to use dns after check files
# svccfg -s name-service/switch
svc:/system/name-service/switch> setprop config/host = astring:"files dns"
svc:/system/name-service/switch> setprop config/ipnode = astring:"files dns"
svc:/system/name-service/switch> exit
# svcadm refresh name-service/switch
# svcadm restart name-service/switch
2.- Add DNS entries 10.0.0.4 and 10.0.0.5 with domain example.com on the server
# svccfg -s dns/client
svc:/network/dns/client> setprop config/nameserver = net_address: (10.0.0.4 10.0.0.5)
svc:/network/dns/client> setprop config/domain = example.com
svc:/network/dns/client> listprop config
config application
config/value_authorization astring solaris.smf.value.name-service.dns.client
config/nameserver net_address 10.0.0.4 10.0.0.5
config/domain astring example.com
svc:/network/dns/client> exit
# svcadm refresh dns/client
# svcadm restart dns/client
Now you have configured the resolv.conf and nsswitch.conf
Comments