您可以使用 DSCC 執行此作業。如需相關資訊,請參閱目錄服務控制中心介面與 DSCC 線上說明。
尋找目錄代理伺服器目前的配置。
$ dpconf get-server-prop -h host -p port |
$ dpconf get-server-prop -h host -p port property-name ... |
例如,透過執行此指令找出是否允許未認證的作業:
$ dpconf get-server-prop -h host -p port allow-unauthenticated-operations allow-unauthenticated-operations : true |
$ dpconf set-server-prop -h host -p port property:value ... |
例如,透過執行此指令禁止未認證的作業:
$ dpconf set-server-prop -h host -p port allow-unauthenticated-operations:false |
如果嘗試執行非法的變更,便無法完成變更。例如,如果將 allow-unauthenticated-operations 參數設為 f 而非 false,會產生下列錯誤:
$ dpconf set-server-prop -h host -p port allow-unauthenticated-operations:f The value "f" is not a valid value for the property "allow-unauthenticated-operations". Allowed property values: BOOLEAN The "set-server-prop" operation failed. |
請視需要重新啟動目錄代理伺服器實例以使變更生效。
如需有關重新啟動目錄代理伺服器的資訊,請參閱重新啟動目錄代理伺服器。
若要顯示目錄代理伺服器實例配置,請鍵入 dpconf info。
$ dpconf info Instance Path : instance path Host Name : host Secure listen address : IP address Port : port Secure port : secure port SSL server certificate : defaultServerCert Directory Proxy Server needs to be restarted. |
只有 Secure listen address 與 Non-secure listen address 設定為非預設值時,dpconf info 才會顯示這些特性。上述輸出不會顯示 Non-secure listen address,因為此特性並未設定為非預設值。
如果需要重新啟動實例,dpconf info 也會提醒使用者重新啟動。
您也可以使用 dpadm info 來顯示目錄代理伺服器實例配置資訊。