Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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 '14 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 '14 at 17:59
np. i found another way to do this. using nscfg - – Quest Monger Apr 15 '14 at 20:39

In addition to the missing type parameter, note also that the property in the service configuration is named 'sudoer', not 'sudoers'. Also, it is necessary to refresh the service after changing its configuration.

# svccfg -s system/name-service/switch  
svc:/system/name-service/switch> setprop config/sudoer = astring: "files ldap"
svc:/system/name-service/switch> exit
# svcadm refresh system/name-service/switch
share|improve this answer

Your Answer


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.