[Date Prev][Date Next] [Chronological] [Thread] [Top]

回复: 回复: slapcat command



hi Ciao, Michael!
     i use the slapcat to get the output file,just like belows.then i delete this person.

dn: cn=tiangexuanadd,ou=users,dc=xxx,dc=xxx
cn: tiangexuanadd
createtimestamp: 20121127080342Z
creatorsname: cn=manager,dc=xxx,dc=xxx
entrycsn: 20121127082433.542652Z#000000#000#000000
entrydn: cn=tiangexuanadd,ou=users,dc=xxx,dc=xxx
entryuuid: b48c76ae-ccb4-1031-8745-b3f3f9fa7bb0
gidnumber: 93003
hassubordinates: FALSE
homedirectory: /home/tiangexuanadd
loginshell: /bin/bash
modifiersname: cn=manager,dc=tmsr,dc=org
modifytimestamp: 20121127082433Z
objectclass: posixAccount
objectclass: shadowAccount
objectclass: inetOrgPerson
sn: zouyang
structuralobjectclass: inetOrgPerson
subschemasubentry: cn=Subschema
uid: tiangexuanadd
uidnumber: 30962
userpassword: 123

after that, i use slapadd command to add this person. will get the wrong message. so i think the attribute createtimestamp can not be added, it should be created by ldap server or system,not in the file.

 [root@tmsr-ldap0 ldap]# ldapadd -x -D "cn=manager,dc=xxx,dc=xxx" -W -f test.ldif
Enter LDAP Password: 
adding new entry "cn=tiangexuanadd,ou=users,dc=tmsr,dc=org"
ldap_add: Constraint violation (19)
additional info: createtimestamp: no user modification allowed



------------------ 原始邮件 ------------------
发件人: "Michael Ströder";<michael@stroeder.com>;
发送时间: 2015年1月12日(星期一) 下午5:38
收件人: "Eileen(=^ω^=)"<123784635@qq.com>; "openldap-technical"<openldap-technical@openldap.org>;
主题: Re: 回复: slapcat command

Eileen(=^ω^=) wrote:
>    thank you for the reply. i use the slapcat is for backup the BDB database. if the computer down, i can use the slapadd commond to put the backup file back to the server. but now i can not find the right way to use the slapcat commond to get the output file, which can use the slapadd commond add the records back directly. you know  'createTimestamp' etc attributes can not add into the server computer directly.‍
>      so could you pls tell me how to use the slapcat commond to take the right output file. the output file can directly use the slapadd commond into the server.

slapadd will definitely add 'createTimestamp' etc. when adding entries which
do not exist before.

If anything goes wrong on your side you should provide more information about
what exact command you're using and what the error message is.

Ciao, Michael.