사용법에 대한 예를 찾을 수 없습니다.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