Showing posts with label setprop. Show all posts
Showing posts with label setprop. Show all posts

Thursday, December 12, 2013

Solaris 11- Configuring Nsswitch.conf

##Configuring nsswitch.conf
The next step is to configure the svc:/system/name-service/switch service .

solaris:~$ svccfg -s name-service/switch
svc:/system/name-service/switch> setprop config/default = files
svc:/system/name-service/switch> setprop config/host = "files dns"
svc:/system/name-service/switch> setprop config/ipnode = astring: "files dns"
svc:/system/name-service/switch> exit
solaris:~$ svcadm refresh name-service/switch
solaris:~$ svcadm restart name-service/switch

Now examine the /etc/nsswitch.conf to confirm it worked:


Solaris 11- Configuring DNS Client on the server?

Now use the svccfg to modify the svc:/network/dns/client service:
solaris:~$ svccfg -s dns/client
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.1

Modify the config/nameserver property and list the results:
svc:/network/dns/client> setprop config/nameserver = (192.168.1.1 4.2.2.2 8.8.8.8)
svc:/network/dns/client> listprop config
config application
config/value_authorization astring solaris.smf.value.name-service.dns.client
config/nameserver net_address 192.168.1.1 4.2.2.2 8.8.8.8

Add the config/search and config/domain properties and list the results:
svc:/network/dns/client> setprop config/search = xyz.com
svc:/network/dns/client> setprop config/domain = xyz.com
svc:/network/dns/client> listprop config
config application
config/value_authorization astring solaris.smf.value.name-service.dns.client
config/nameserver net_address 192.168.1.1 4.2.2.2 8.8.8.8
config/search astring xyz.com
config/domain astring xyz.com
svc:/network/dns/client> exit

Finally refresh and restart the dns/client service:
solaris:~$ svcadm refresh dns/client
solaris:~$ svcadm restart dns/client