From: Zhang H. <zhb...@gm...> - 2009-11-04 02:27:36
|
Hi, list. it seems .modify() or .modify_s() can only modify one dn in one time. How can i modify several dn in one time? Such as ldapadd command: # ldapadd -x -D 'cn=Manager,dc=xxx,dc=xxx' -wpasswd -f new.ldif Content of new.ldif: dn: cn=vmail,dc=xxx,dc=xxx changetype: modify add: cn cn: newCN cn: newCN2 -- dn: cn=user01,dc=xxx,dc=xxx changetype: modify cn: newCN cn: newCN2 -- Best Regards. Zhang Huangbin - Open Source Mail Server Solution for Red Hat(R) Enterprise Linux, CentOS, Debian, Ubuntu: http://www.iredmail.org/ |
From: Zhang H. <mic...@gm...> - 2009-11-03 14:02:06
|
Hi, list. it seems .modify() or .modify_s() can only modify one dn in one time. How can i modify several dn in one time? Such as ldapadd command: # ldapadd -x -D 'cn=Manager,dc=xxx,dc=xxx' -wpasswd -f new.ldif Content of new.ldif: dn: cn=vmail,dc=xxx,dc=xxx changetype: modify add: cn cn: newCN cn: newCN2 -- dn: cn=user01,dc=xxx,dc=xxx changetype: modify cn: newCN cn: newCN2 -- Best Regards. Zhang Huangbin - Open Source Mail Server Solution for Red Hat(R) Enterprise Linux, CentOS, Debian, Ubuntu: http://www.iredmail.org/ |
From: Michael S. <mi...@st...> - 2009-11-04 17:16:03
|
Zhang Huangbin wrote: > it seems .modify() or .modify_s() can only modify one dn in one time. > How can i modify several dn in one time? You can't. These methods strictly follow the LDAP functional model (see RFC 4511, section 4.6. Modify Operation). > Such as ldapadd command: > > # ldapadd -x -D 'cn=Manager,dc=xxx,dc=xxx' -wpasswd -f new.ldif > > Content of new.ldif: > > dn: cn=vmail,dc=xxx,dc=xxx > changetype: modify > add: cn > cn: newCN > cn: newCN2 > -- > dn: cn=user01,dc=xxx,dc=xxx > changetype: modify > cn: newCN > cn: newCN2 These will lead to sevaral add requests being sent by command-line tool ldapadd. Same with ldapmodify reading several change records from LDIF file and sending a modify request for each of these. Ciao, Michael. |
From: Zhang H. <zhb...@gm...> - 2009-11-05 01:59:26
|
On Nov 5, 2009, at 1:15 AM, Michael Ströder wrote: > Zhang Huangbin wrote: >> it seems .modify() or .modify_s() can only modify one dn in one time. >> How can i modify several dn in one time? > > You can't. These methods strictly follow the LDAP functional model > (see RFC > 4511, section 4.6. Modify Operation). Got it. Thanks Chris & Chaos & Michael. :) -- Best Regards. Zhang Huangbin - Open Source Mail Server Solution for Red Hat(R) Enterprise Linux, CentOS, Debian, Ubuntu: http://www.iredmail.org/ |
From: Marcus <ma...@py...> - 2009-11-05 04:34:28
|
Hi, Anyone knows of any python based LDAP servers? The main objective is to have on that run on Windows. The OpenLdap i have tested is pretty unstable in Windows, crashes every 4-5 days. The Apache DS in java works better but would prefer if there is a python version. Or anyone have ldaptor working as a basic LDAP, i just need to provide simple lookups , don't even need full compliance of authentication etc. Marc. Zhang Huangbin wrote: > On Nov 5, 2009, at 1:15 AM, Michael Ströder wrote: > > >> Zhang Huangbin wrote: >> >>> it seems .modify() or .modify_s() can only modify one dn in one time. >>> How can i modify several dn in one time? >>> >> You can't. These methods strictly follow the LDAP functional model >> (see RFC >> 4511, section 4.6. Modify Operation). >> > > Got it. Thanks Chris & Chaos & Michael. :) > > |
From: Chris D. <pa...@ft...> - 2009-11-04 02:44:02
|
On Wed, Nov 04, 2009 at 10:27:15AM +0800, Zhang Huangbin wrote: > Hi, list. > > it seems .modify() or .modify_s() can only modify one dn in one time. It doesn't just seem, it *IS* > How can i modify several dn in one time? Issue multiple .modify()s. Collect the .result()s to make sure they worked. > > Such as ldapadd command: > > # ldapadd -x -D 'cn=Manager,dc=xxx,dc=xxx' -wpasswd -f new.ldif > > Content of new.ldif: > > dn: cn=vmail,dc=xxx,dc=xxx > changetype: modify > add: cn > cn: newCN > cn: newCN2 > -- > dn: cn=user01,dc=xxx,dc=xxx > changetype: modify > cn: newCN > cn: newCN2 That shouldn't work either. ldapmodify -c <INSERT YOUR AUTH PARAMETERS HERE> << EEOOTT # This is one LDIF record dn: cn=foo,dc=xxx changetype: modify add: sn sn: baz - #This is a SECOND LDIF record dn: cn=bar,dc=xxx changetype: modify add: sn sn: quf - > > > > -- > Best Regards. > > Zhang Huangbin > > - Open Source Mail Server Solution for Red Hat(R) Enterprise Linux, > CentOS, Debian, Ubuntu: http://www.iredmail.org/ > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Python-LDAP-dev mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/python-ldap-dev -- Chris Dukes "In cynicism she's about 35" -- Terry Pratchett's "Hog Father" |