我正在Solaris 11上做这个,当我打开'/etc/nsswitch.conf‘时,我看到-
...
sudoers: files
...我想把这个改成-
...
sudoers: files ldap
...我尝试直接编辑文件,但是当我重新启动主机时,更改将丢失。我试过用svcfg,但那不管用-
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是否有办法永久地使用svccfg命令或其他命令在nsswitch中设置“sudoers”值?
发布于 2014-04-15 09:44:01
您引用的会话在错误消息中有线索。
新属性所需的类型。
看起来您缺少了一个必需的类型参数,文档有更多的信息
# svccfg -s system/name-service/switch
svc:/system/name-service/switch> setprop config/host = astring: "files dns nis"
svc:/system/name-service/switch> quit注意astring:类型..。
发布于 2015-01-16 12:16:14
除了缺少的类型参数之外,还要注意服务配置中的属性名为'sudoer',而不是'sudoers‘。此外,在更改服务配置后,有必要刷新其配置。
# 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/switchhttps://serverfault.com/questions/589085
复制相似问题