Cisco Mobile default will use the LDAP jpegPhoto field to store the photo, for CUP you need to configure in
CUP > Applications > CUPC > Settings
Map the Photo user fields to LDAP jpegPhoto attributes
MS doesn't provide a UI to upload the photo to the jpegPhoto attribute, after some research I have modified a VB script and I am using it for my photo upload:
Function ReadBinaryFile(FileName)
Const adTypeBinary = 1
Dim BinaryStream
Set BinaryStream = CreateObject("ADODB.Stream")
BinaryStream.Type = adTypeBinary
BinaryStream.Open
BinaryStream.LoadFromFile FileName
ReadBinaryFile = BinaryStream.Read
End Function
Set objNewUser = GetObject("LDAP://localhost:389/cn=1234567,ou=bamboo,ou=panda,dc=pandaeatsbamboo,dc=com")
objNewUser.Put "jpegPhoto", ReadBinaryFile("1234567.jpg")
objNewUser.SetInfo
Set objNewUser = Nothing
Good post and clear instruction, it saves me lots of time!
ReplyDelete