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 09-09-2010, 08:49 AM
Loyal Member
 
Posts: 81
Default [SOLVED] LDAP Auth to Zimbra from Different Server PHP

I am looking to authenticate off of zimbra via PHP ldap functions. I am having some issues and not able to authenticate. I am doing this on the same network but from a different server.

server name is : zwm.otelconsulting.com
email: bleto@otelconsulting.com
domain on zimbra for email: otelconsulting.com

Can anyone give me some direction, or maybe ldap search command to test to see if i can do it via command line on the server.

MY CODE:

Code:
$ldap['user']      = 'bleto@otelconsulting.com';

$ldap['pass']      = 'test111';

$ldap['host']      = 'zwm.otelconsulting.com';

$ldap['port']      = 389;

$ldap['dn']= 'uid='.$ldap['user'].',ou=people,dc=otelconsulting,dc=com';

$ldap['base']      = '';

// connecting to ldap
$ldap['conn'] = ldap_connect( $ldap['host'], $ldap['port'] );
ldap_set_option($ldap['conn'], LDAP_OPT_PROTOCOL_VERSION, 3);

// binding to ldap
$ldap['bind'] = ldap_bind( $ldap['conn'], $ldap['dn'], $ldap['pass'] );

if ($ldap['bind']) {
  echo "LDAP bind successful...";
} else {
	echo 'no bind';
}
__________________
otel consulting, inc.
www.otelconsulting.com | facebook | twitter
Reply With Quote
  #2 (permalink)  
Old 09-10-2010, 07:48 AM
Loyal Member
 
Posts: 81
Default

Anyone? This is driving me insane
__________________
otel consulting, inc.
www.otelconsulting.com | facebook | twitter
Reply With Quote
  #3 (permalink)  
Old 09-10-2010, 07:55 AM
Moderator
 
Posts: 7,928
Default

uid should not have the domain name after it eg. uid=bleto,ou=people,dc=otelconsulting,dc=com
__________________
Reply With Quote
  #4 (permalink)  
Old 09-10-2010, 08:02 AM
Loyal Member
 
Posts: 81
Default

Yeah i tried both, still no go. Does it matter that I am connecting to zimbra from a different server?

Uxbod i knew you would come to my resuce thanks for responding so quickly!
__________________
otel consulting, inc.
www.otelconsulting.com | facebook | twitter
Reply With Quote
  #5 (permalink)  
Old 09-10-2010, 08:06 AM
Moderator
 
Posts: 7,928
Default

Try with ldapsearch
Code:
ldapsearch -x -H ldap://zimbraserver:389 -D "uid=bleto,ou=people,dc=otelconsulting,dc=com" -W -b "ou=people,dc=otelconsulting,dc=com"
__________________
Reply With Quote
  #6 (permalink)  
Old 09-10-2010, 08:10 AM
Loyal Member
 
Posts: 81
Default

ldap_bind: Invalid credentials (49)
__________________
otel consulting, inc.
www.otelconsulting.com | facebook | twitter
Reply With Quote
  #7 (permalink)  
Old 09-10-2010, 08:11 AM
Moderator
 
Posts: 7,928
Default

Are you only using Zimbra authentication or is Zimbra configured to use say Active Directory ?
__________________
Reply With Quote
  #8 (permalink)  
Old 09-10-2010, 08:12 AM
Loyal Member
 
Posts: 81
Default

in verbose mode:

ldap_initialize( ldap://zwm.otelconsulting.com:389 )
Enter LDAP Password:
ldap_bind: Invalid credentials (49)

me and ldap are not friends right now
__________________
otel consulting, inc.
www.otelconsulting.com | facebook | twitter
Reply With Quote
  #9 (permalink)  
Old 09-10-2010, 08:20 AM
Loyal Member
 
Posts: 81
Default

its configured to auth against an AS400 with fall back auth. Damn i created another domain and authed against it just fine. So is that the problem

Anyway to do the domain that is auth'd against the AS400 through the zimbra server. Cause some users have as400 users names and some don;t and it uses zimbra for the auth cridentianls?

I am retarded when it comes to ldap and how it works.
__________________
otel consulting, inc.
www.otelconsulting.com | facebook | twitter
Reply With Quote
  #10 (permalink)  
Old 09-10-2010, 08:24 AM
Moderator
 
Posts: 7,928
Default

Bug 50248 - RFE: GAL Search w/ external authentication
__________________
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.