Hello, (forgive me if i have done this wrong)
let me try and explain what is going on with my system:
I have drupal running with the following modules:
ldap-auth
services (xmlrpc)
I create users in phpldapadmin, this creates username etc, however the password is set to ssha or something else if a user changes their password from the command line (passwd )
so great a correctly configured ldap auth, the user gets created at login authing from my my ldap server! (sweet)
next i started to write a script to build node data, so i enable the xmlrpc, with all the supporting service modules, (great i can now connect anonymously) and do xmlrpc calls.
now the problem comes when i try and do the follow
[python]
server = xmlrpclib.Server(url)
connection = server.system.connect()
session = server.user.login(connection['sessid'], uname, passwd)
(now you can well find this code laying around when googling for drupal python service)
the error i get is that the username and password are wrong (I don't think you need the stack trace)
after going through the process that services authenticates i discover:
services/user_service/user_service.inc: calls;
$user = user_authenticate(array('name' => $username, 'pass' => $password));
in turn this calls user_loca() - this function generates an SQL statement with md5(password), irritatingly enough the md5 hash in the database is not right,
my problem comes now because of my lack of knowledge of the drupal auth system.
so either
1. ldap-auth did not create the right md5 hash when the user first logged in correctly
2. services xmlrpc module is calling the wrong function as it seems to by pass the ldap-auth process
3. its just a design error and there is no way for a module to call a thirdparty auth
I am hoping its just that services xmlrpc is just calling the wrong function to auth a user?
Thanks
Comments
Comment #1
incorrect commentedI should say I fixed my problem by
update users set pass=md5('a really secure password') where uid = ;
not the best way to be managing things i guess
Comment #2
grendzy commentedmoving to correct queue
Comment #3
cgmonroe commentedClearing out old support requests - reopen if problem still exists in newest code (dev)