您可以使用 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. |
dpconf info 僅會顯示 Secure listen address 和 Non-secure listen address (如果這些特性設為非預設值)。以上輸出不會顯示 Non-secure listen address,因為此特性未設為非預設值。
如果需要重新啟動實例,dpconf info 也會提醒使用者重新啟動。
您也可以使用 dpadm info 顯示目錄代理伺服器實例的配置資訊,但此指令僅能在實例已停止時使用。