Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-14-2010, 03:02 PM
Junior Member
 
Posts: 9
Default Modify Zimbra accounts via LDAP

Hi there,

I am just wondering if any one here has modified accounts via Zimbra LDAP? Also, theoretically could one create an account using LDAP? Basically I am trying to use django_ldapdb to create accounts. We use a lot of python code and there really isn't a good soap api connector so I figured this would be another way?

Thanks,
Rick Caudill
Reply With Quote
  #2 (permalink)  
Old 10-15-2010, 12:08 AM
Elite Member
 
Posts: 334
Default

Quote:
Originally Posted by rcaudill View Post
Hi there,

I am just wondering if any one here has modified accounts via Zimbra LDAP? Also, theoretically could one create an account using LDAP? Basically I am trying to use django_ldapdb to create accounts. We use a lot of python code and there really isn't a good soap api connector so I figured this would be another way?
I'm using LDAP search for reading accounts preferences and using LDIF file for modify the entry.

Below are an example of LDAPSearch :

Code:
displayName=`/opt/zimbra/bin/ldapsearch -H $LDAP_MASTER_URL -w $ZIMBRA_LDAP_PASSWORD -D uid=zimbra,cn=admins,cn=zimbra -x $OBJECT | grep displayName: | cut -d ':' -f2
Modify script :

Code:
ldapmodify -f "$CURRENT_FOLDER/zcs-acc-mod.ldif" -x -H ldapi:/// -D cn=config -w $ZIMBRA_LDAP_PASSWORD
Sample of zcs-acc-mod.ldif contents :

Code:
mail:/home/vavai # cat zcs-acc-mod.ldif 
dn: uid=vivian.chow,ou=people,dc=mydomain,dc=co,dc=id
changetype: modify
replace: userPassword
userPassword:: e1NTSEF9SU5BbzZjYjhYMSMnaU1hOGRURkdOWjg4L1VpMHMyTHI=
I never create an account using Zimbra LDAP with coding but you should be able calling zmprov CLI from your code and populate it with your new account parameter.
__________________
Best Regards
---
Masim "Vavai" Sugianto
Vavai Personal Blog
Personal Blog [ID]

Release 7.1.3_GA_3346.SLES11_64_20110930001521 SLES11_64 FOSS edition.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.