ldapscriptsでldapmodifyuserを使用して値を変更する方法

ldapscriptsでldapmodifyuserを使用して値を変更する方法

使用法の例が見つかりません。LDAPスクリプトcommand ldapmodifyuser、私はそれをldapmodify理解するのに慣れていません。

ldapmodifyuserたとえば、を使用してユーザーをどのように変更しますかgivenName

私の試みは次のとおりです。

~$ sudo ldapmodifyuser 9928892
# About to modify the following entry :
dn: uid=9928892,ou=Users,dc=thisplace,dc=com
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
uid: 9928892
sn: FUJI
givenName: GABUTO
cn: GABUTO FUJISHITA
displayName: GABUTO FUJISHITA
uidNumber: 18055
gidNumber: 5000
gecos: GABUTO FUJISHITA
loginShell: /bin/bash
homeDirectory: /home/9928892
userPassword:: e2NyeXB0fS...
shadowLastChange: 17575

# Enter your modifications here, end with CTRL-D.
dn: uid=9928892,ou=Users,dc=thisplace,dc=com
givenName:GAKUTO      # Ctrl+D
Error modifying user entry uid=9928892,ou=Users,dc=thisplace,dc=com in LDAP

ベストアンサー1

指定しなかった

changetype: modify

そして

replace: givenName

次のようなものでなければなりません。

sudo ldapmodifyuser 9928892
# About to modify the following entry :
dn: uid=9928892,ou=Users,dc=thisplace,dc=com
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
uid: 9928892
sn: FUJI
givenName: GABUTO
cn: GABUTO FUJISHITA
displayName: GABUTO FUJISHITA
uidNumber: 18055
gidNumber: 5000
gecos: GABUTO FUJISHITA
loginShell: /bin/bash
homeDirectory: /home/9928892
userPassword:: e2NyeXB0fS...
shadowLastChange: 17575

# Enter your modifications here, end with CTRL-D.
dn: uid=9928892,ou=Users,dc=thisplace,dc=com
changetype: modify
replace: givenName
givenName:GAKUTO      # Ctrl+D

おすすめ記事