Re: Creating Active Directory Objects

2008-09-03 Thread Mike Matz
Hi Randy, My apologies for not getting back to you sooner. Here is a crude example of the code I used to create/modify a password using Python LDAP. The trick to modifying the password is encoding in unicode. I am still trying to find my bookmark to a discussion board that explains how

Re: Creating Active Directory Objects

2008-09-02 Thread wiser0+python-ldap
On 8/30/08, Michael Ströder <[EMAIL PROTECTED]> wrote: > Randy wrote: >> Mike (or anyone else who has successfully changed an Active Directory >> password using python-ldap over SSL), >> >> I have not found an update in the archives to your last message on >> this subject (below). Can you perhaps

Re: Creating Active Directory Objects

2008-08-30 Thread Michael Ströder
Randy wrote: > Mike (or anyone else who has successfully changed an Active Directory > password using python-ldap over SSL), > > I have not found an update in the archives to your last message on > this subject (below). Can you perhaps share some Python code showing > how to add or change the pas

Re: Creating Active Directory Objects

2008-08-29 Thread Randy
Mike (or anyone else who has successfully changed an Active Directory password using python-ldap over SSL), I have not found an update in the archives to your last message on this subject (below). Can you perhaps share some Python code showing how to add or change the password for an Active Direc

Re: Creating Active Directory Objects

2007-11-10 Thread Joe Little
Here's something that may be useful in this conversation about AD Objects. I wrote with some reference help a script to pack a SID as I was creating the necessary objects to create AD accounts from python using python-ldap: """ packsid """ import base64,struct def packsid(textsid): if

Re: Creating Active Directory Objects

2007-11-09 Thread Michael Ströder
Mike Matz wrote: > In the future I plan to try to implement the sasl_bind > code that Michael mentioned. In the past after invoking kinit command-line tool for getting a TGT I was successful sending a SASL bind with mech GSSAPI with python-ldap, OpenLDAP libs and heimdal. But not sure about whet

Re: Creating Active Directory Objects

2007-11-09 Thread Mike Matz
Thank you to all who responded to my queries. I have been able to successfully create an account and set the password for an AD user on my test server. For those who are interested here is the breakdown of what I did. As I continue to debug and test I will post updates to this topic.

Re: Creating Active Directory Objects

2007-11-09 Thread Michael Ströder
Geert Jansen wrote: > > Forget about using LDAP to change a user's password. It can be done but > it requires 128-bit SSL and so you need to set up certificate services > and distribute the CA certificate to your client. An easier way is to > use the Kerberos Set Password protocol (RFC3244). MIT K

Re: Creating Active Directory Objects

2007-11-08 Thread David Leonard
Michael Ströder wrote: David Leonard wrote: I hope someone else can chime in here with an example of sasl binds with python-ldap. See: Demo/sasl_bind.py oops, of course! thanks michael :) -- David Leonard [EMAIL PROTECTED]

Re: Creating Active Directory Objects

2007-11-08 Thread Geert Jansen
> > Mike Matz wrote: >> >> Thanks for the help guys. It got me off to a great start. I have >> successfully created a user in my AD. As you already eluded to, I am >> struggling with the password attribute. Can the password attribute >> be set when creating a user. From what I gathered, the pa

Re: Creating Active Directory Objects

2007-11-08 Thread Joe Little
(repost from another address_ Here's something that may be useful in this conversation about AD Objects. I wrote with some reference help a script to pack a SID as I was creating the necessary objects to create AD accounts from python using python-ldap: """ packsid """ import base64,struct

Re: Creating Active Directory Objects

2007-11-08 Thread Michael Ströder
David Leonard wrote: > > As far as I understand it, the unicodePwd attribute is the NT hash of > the user's password. I don't think so when setting it. Maybe it contains the NT hash afterwards, but conversion is probably done internally. http://support.microsoft.com/kb/269190 It seems you need

Re: Creating Active Directory Objects

2007-11-08 Thread Michael Ströder
David Leonard wrote: > I hope someone else can > chime in here with an example of sasl binds with python-ldap. See: Demo/sasl_bind.py Ciao, Michael. - This SF.net email is sponsored by: Splunk Inc. Still grepping through log

Re: Creating Active Directory Objects

2007-11-08 Thread David Leonard
far. Regards, Mike Example Add Entry - http://www.grotan.com/ldap/python-ldap-samples.html -Original Message- From: Geert Jansen [mailto:[EMAIL PROTECTED] Sent: Wed 11/7/2007 1:50 PM To: Michael Ströder Cc: Mike Matz; python-ldap-dev@lists.sourceforge.net Subject: Re: Creating Active Directory

Re: Creating Active Directory Objects

2007-11-08 Thread Mike Matz
p-dev@lists.sourceforge.net Subject: Re: Creating Active Directory Objects Michael Ströder wrote: > I vaguely remember that there are some issues with really activating a > user entry as a Windows user. But this is not a problem of accessing AD > via python-ldap. > This inde

Re: Creating Active Directory Objects

2007-11-08 Thread David Leonard
help thus far. Regards, Mike Example Add Entry - http://www.grotan.com/ldap/python-ldap-samples.html -Original Message- From: Geert Jansen [mailto:[EMAIL PROTECTED] Sent: Wed 11/7/2007 1:50 PM To: Michael Ströder Cc: Mike Matz; python-ldap-dev@lists.sourceforge.net Subject: Re: Cre

RE: Creating Active Directory Objects

2007-11-07 Thread Mike Matz
11/7/2007 1:50 PM To: Michael Ströder Cc: Mike Matz; python-ldap-dev@lists.sourceforge.net Subject: Re: Creating Active Directory Objects Michael Ströder wrote: > I vaguely remember that there are some issues with really activating a > user entry as a Windows user. But this is not a pro

Re: Creating Active Directory Objects

2007-11-07 Thread Geert Jansen
Michael Ströder wrote: > I vaguely remember that there are some issues with really activating a > user entry as a Windows user. But this is not a problem of accessing AD > via python-ldap. > This indeed rings a bell. You need to create the user as disabled (look for userAccountControl on MSDN)

Re: Creating Active Directory Objects

2007-11-07 Thread Michael Ströder
Geert Jansen wrote: > > It is definately possibly to create active directory users with > python-ldap. You just need to take care that you set the minimum amount > of attributes required, otherwise the addition will fail. I don't have > any code ready at the moment, but just create a user object w

Re: Creating Active Directory Objects

2007-11-06 Thread Geert Jansen
Hello Mike > Apologies in advanced if this is a duplicate post, but every time I > tried searching the archives it would time out. I am wondering if it > is possible to create Active Directory objects (users) with the python- > ldap module. I am currently developing on Mac OS X. I realize