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

Re: how to replace multiple attributes?

Philip Guenther wrote:
That input looks okay to me and similar looking input works with
ldapmodify in my testing. My guess is that there's something invisible in the file that's breaking the parse. For example, trailing whitespace on the "-" lines is invalid and will result in errors like the above. I suggest you look at the output of
cat -vet profilepaths.ldif

and make sure the '$' that that command puts at the end of each line is where you expect it to be and that there's no otherwise hidden control characters.

Philip Guenther

thanks, cat'ing it looks ok to me, each line ends in ^M$ with no whitespace.

[root@roark ldap]# cat -vet profilepaths.ldif
dn: uid=panderson,ou=People,dc=mdah,dc=state,dc=ms,dc=us^M$
changetype: modify^M$
replace: sambaProfilePath^M$
sambaProfilePath: \\preshs\profiles\panderson^M$
replace: sambaHomePath^M$
sambaHomePath: \\preshs\panderson^M$
replace: sambaLogonScript^M$
sambaLogonScript: scripts\panderson.bat^M$
replace: sambaHomeDrive^M$
sambaHomeDrive: R:^M$
[root@roark ldap]# ldapmodify -D "cn=Manager,dc=mdah,dc=state,dc=ms,dc=us" -w xxxxxxxxxx -x -v -f profilepaths.ldif
ldap_initialize( <DEFAULT> )
ldapmodify: invalid format (line 5) entry: "uid=panderson,ou=People,dc=mdah,dc=state,dc=ms,dc=us"