473,595 Members | 2,474 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ldap passwd need help

I've got the python-ldap version 2.0.11 with python 2.4 under Linux

I've got the ldap stuff working for groups, but now I'm trying to use it to
change a user password. I get a return of 2 and no error messages but it
does not change ldap.

I've tried it with uid = 'joeblow' and with oldpw=whatever it was with the
same result.

Anyone know what I'm missing?

class LdapUser:
def __init__(self, uri=uri, binddn=BINDDN, password=""):
self.ldap = ldap.initialize (uri)
self.ldap.simpl e_bind(binddn, password)

def chg_pw(self,uid ,oldpw,newpw):
print self.ldap.passw d_s(uid,oldpw,n ewpw)
if __name__=="__ma in__":
Ldap = LdapUser(passwo rd="secret")
Ldap.chg_pw("ui d=joeblow,ou=ab c,ou=def,dc=ghi ,dc=org","", "new.pass")

---------------------------------------------------------------------------
The information contained in this message may be privileged and / or
confidential and protected from disclosure. If the reader of this message is
not the intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If you
have received this communication in error, please notify the sender
immediately by replying to this message and deleting the material from any
computer.
---------------------------------------------------------------------------
Jan 18 '06 #1
1 2619
Sells, Fred wrote:

I've got the ldap stuff working for groups, but now I'm trying to use it to
change a user password. I get a return of 2 and no error messages but it
does not change ldap.
Could you please post a complete Python traceback? If you mean "2" being
the LDAP error code this is ldap.PROTOCOL_E RROR.
def chg_pw(self,uid ,oldpw,newpw):
print self.ldap.passw d_s(uid,oldpw,n ewpw)


Make sure your LDAP server (which one?) supports the
LDAP Password Modify Extended Operation (see RFC 3062) when using method
LDAPObject.pass wd_s(). ldap.PROTOCOL_E RROR indicates that the server
does not support it.

Otherwise you have to send a modify request replacing the value of
attribute 'userPassword' in the user's LDAP entry. Make sure you
understand password hashes if needed with your server.

Ciao, Michael.
Jan 19 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
6791
by: Amar | last post by:
I am trying to connect to my college LDAP directory using ASP.NET. This LDap does not have security as it returns only user demographic information. i do not need to bind with a username or credentials. What i am trying to do is, i am trying to look up all the information for the user with user id 'testuser'. The following is the Vb.net code for my aspx page: Dim oRoot As DirectoryEntry = New...
0
1804
by: Ronald Wunderlich | last post by:
Hi, My first Question: can db2 (db2ckpw) ask over pam_ldap my edirectory ldap server for user authentication? The scenario: 1. computer suse linx enterprise server 8(SLES8) and edirectory 7.8.3 2. computer sles8 db2 with pam_ldap ( the user authentication on kde, on ssh, radius with ladp ... works fine. I see all user with getent passwd (local
4
27926
by: m96 | last post by:
hi, i'm trying to make a query to a ldap server (version v2 or v3 doen't matter) with c#. the query works just fine but the problem is that i can't read the custom attributes/fields, since .net gives the following error: System.NotImplementedException: Handling of this ADSVALUE type is not yet implemented (type = 0xb). after googling for a long time i found out that many other have the same
1
4741
by: Andrew | last post by:
Hey all, Working on revamping our Intranet here and making use of the LDPA, Active Directory, Directory Services, etc. that .Net provides. I am still fairly new on this subject, so the problem I have run into I am not sure how to fix, and really not sure what is causing it. Here's what is going on (test server - Windows 2003 Server): I have a page in a folder (under anonymous authentication in IIS6) that has a link on it that...
4
4183
by: Nico Koenig | last post by:
Hi there, I try to make an authorisation bind to the LDAP with ASP.NET. I use the DirectoryServices Namespace and the MSDN documented way to do it, but every time I get an "COMException: Server is not operational". Can anyone tell me what I have to do to avoid this??? Thanks, Nico
0
986
by: Sells, Fred | last post by:
I've got the python-ldap version 2.0.11 with python 2.4 under Linux I've got the ldap stuff working for groups, but now I'm trying to use it to change a user password. I get a return of 2 and no error messages but it does not change ldap. I've tried it with uid = 'joeblow' and with oldpw=whatever it was with the same result. Anyone know what I'm missing?
4
6568
by: Terry Miller | last post by:
I have DB2 V8.2 loaded on a Redhat Enterprise Linux version 3 (RHEL 3) box. RHEL is configured to talk to LDAP for authenticaton besides the local passwd file. I can verify this by executing an su to a User Id that exists in LDAP and not in the local /etc/passwd file. Also verified that the connection to LDAP is working by ssh into the box. The problem I have is when I try to connect to a local DB2 Database using a User Id and Password...
0
1839
by: Sells, Fred | last post by:
I'm running python 2.5 (or 2.4) in an XP environment. I downloaded and installed the .dll's from OpenLDAP-2.4.8+OpenSSL-0.9.8g-Win32.zip and copied the .dll's in c:/windows/system32 as instructed now I get this error. Is there anyway to avoid building the python_ldap binaries? Apart from being lazy, I've got a secure system policy issue if I start compiling apps. I could give up and just start running in linux, but myxp environment is...
2
3930
by: Lars | last post by:
Hi I got some programming experience and I recently started looking into Python. I've read much of the tutorial from 2.6 documentation. But it was more interesting to get started on something I needed. I'm trying to create a script that creates a variable list (just a txt file to be included in bash scripts) with hosts from LDAP. The file will include some static entries and the hosts based on 'cn', 'ipHostNumber' and I might as well set...
0
7955
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7883
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8379
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
6674
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5839
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5418
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2391
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1490
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1223
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.