Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am doing this on Solaris 11. When i open '/etc/nsswitch.conf' i see this -

...
sudoers:  files
...

I would like to change this to -

...
sudoers:  files ldap
...

I tried editing the file directly, but when i reboot host, changes are lost. I tried using svcfg, but that didnt work -

root@solaristhost:/# svccfg
svc:> select name-service/switch
svc:/system/name-service/switch> setprop config/sudoers = "files ldap"
Type required for new properties.
svc:/system/name-service/switch> exit

Is there some way to set the 'sudoers' value in nsswitch permanently using the svccfg command or some other command?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The session you quote has a clue in the error message

Type required for new properties.

It looks like you're missing a required type parameter and the Documentation has more information

# svccfg -s system/name-service/switch  
svc:/system/name-service/switch> setprop config/host = astring: "files dns nis"
svc:/system/name-service/switch> quit

Note the astring: type ...

share|improve this answer
    
Thanks. This worked. Now when i do 'listprop config/sudoers' i can see "files ldap". But this value is still not reflected in '/etc/nsswitch.conf'. It still reads 'sudoers: files'. Are these changes made with svccfg supposed to reflect back in nsswitch.conf? –  Quest Monger Apr 15 at 17:54
    
@QuestMonger: I've no idea I just read the docs - I don't have much to do with Solaris these days. –  Iain Apr 15 at 17:59
    
np. i found another way to do this. using nscfg - c0t0d0s0.org/archives/7452-Solaris-11-features-nscfg.html –  Quest Monger Apr 15 at 20:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.