Red Hat Training

A Red Hat training course is available for Red Hat Directory Server

A.3. パスワードの変更

ldappasswd コマンドは、新しいユーザー定義のパスワードを設定したり、アカウントの新しいパスワードを生成したりできます。表19.1「ldappasswd オプション」 は、コマンドラインを使用してパスワードを設定するための最も重要なパラメーターを一覧表示します。その他の設定 (バインド情報、接続情報、その他のコマンド設定など) は必要なことがあり、OpenLDAP の man ページに記載されています。
# ldappasswd -x -D bind_dn -W -p server_port -h server_hostname [-A | -a oldPassword] [-S | -s newPassword] [user]
重要
パスワードの変更操作は、TLS、Start TLS、SASL などのセキュアな接続で実行する必要があります。LDAP クライアントに TLS を設定する方法は、「証明書を使用した認証」を参照してください。
lda passwd のパスワード操作関連のパラメーターの一覧は、表19.1「ldappasswd オプション」 を参照してください。

例A.3 Directory Manager が TLS を介してユーザーのパスワードを変更

Directory Manager は、uid=tuser1,ou=People,dc=example,dc=com ユーザーのパスワードを TLS 経由で new_password に変更します。
# ldappasswd -D "cn=Directory Manager" -W -ZZ -p 389 -h server.example.com -x -s new_password "uid=tuser1,ou=People,dc=example,dc=com"

例A.4 ユーザーのパスワードを生成する Directory Manager

Directory Manager は、TLS 経由で uid=tuser2,ou=People,dc=example,dc=com ユーザーのパスワードを生成します。
# ldappasswd -D "cn=Directory Manager" -W -ZZ -p 389 -h server.example.com -x "uid=tuser2,ou=People,dc=example,dc=com"

例A.5 ユーザーが自分のパスワードを変更

ユーザー tuser3 は、パスワードを TLS 経由で old_newpassword から new_password に変更します。
# ldappasswd -p 389 -h server.example.com -ZZ -x -D "uid=tuser3,ou=People,dc=example,dc=com" -W -a old_password -s new_password

例A.6 DIGEST_MD5 によるユーザー認証および自身のパスワードの変更

ユーザー jsmith が、GSS-API で認証し、パスワードを new_password に変更します。
# ldappasswd -p 389 -h server.example.com -O noplain,minssf=1,maxbufsize=512 -Y GSSAPI -U "dn:uid=jsmith,ou=people,dc=example,dc=com" -R EXAMPLE.COM -W -s new_password

例A.7 新しいパスワードに対して Kerberos プロンプトにより認証されるユーザー権限

Kerberos によって認証済みのユーザーにより、新しいパスワードが要求されます。これは TLS 上では実行されません。
# ldappasswd -p 389 -h server.example.com -O noplain,minssf=1,maxbufsize=512 -I