LDAP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesLDAP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rating: Thread Rating: 9 votes, 5.00 average. Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #31  
Old June 9th, 2004, 11:50 AM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Psycho Canadian
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jan 2001
Location: Canada
Posts: 4,739 Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 4 Weeks 6 h 25 m 16 sec
Reputation Power: 384
Yep you're on track, I currently use openLdap but I imagin that AD works the same. First I connect with auth account and verify that the username exists then I attemp to log in as the user if it sucesseds then I use it. The double connection is for security purposes to make sure it is a vaild user.

Reply With Quote
  #32  
Old June 9th, 2004, 12:38 PM
bwhaley bwhaley is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 9 bwhaley User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Offtopic - Custom Monster

Quote:
Originally Posted by Viper_SB
Custom Monster Hosting custom hosting.


Your shameless advertising worked - I am now hosting introspected.com with custom monster. What affiliation do you have with them? I've been pretty happy so far..

Reply With Quote
  #33  
Old June 9th, 2004, 12:42 PM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Psycho Canadian
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jan 2001
Location: Canada
Posts: 4,739 Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 4 Weeks 6 h 25 m 16 sec
Reputation Power: 384
He's a friend of mine I don't have a site so I asked him if he wanted me to put his site there. He does great work and it is a great hosting company glad you like it.

Reply With Quote
  #34  
Old June 11th, 2004, 07:47 AM
Jock3h^ Jock3h^ is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Greenock, Scotland
Posts: 5 Jock3h^ User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 59 sec
Reputation Power: 0
Send a message via MSN to Jock3h^
I've learned a lot from this site so i've decided to give my advice on how ma AD Admin Frontend works!
I still can't get the Password changed, but that will come in time!

Quote:
Do you know if it's possible to verify user & password stored in AD. What I mean is that user while entering a site is asked to enter loginname and password.


Here is the code i use to authenticate via Active Directory

PHP Code:
<?php session_start(); ?>

<?php

    
// disable error reporting
    
error_reporting(1);
    
    
// check form has been correctly completed
    
if($_POST["user"]=="" || $_POST["pass"]=="")
    {
            
printf("Authentication required");
            
session_destroy();
            exit();
    }
    
    
// initalize some variables
    
$server "localhost";
    
$user $_POST["user"]."@company.co.uk";
    
$pass $_POST["pass"];
    
    
// let other pages know this user is authenticated
    
$_SESSION["user"] = $user;
    
$_SESSION["pass"] = $pass;
    
    
// connect to active directory
    
$ad ldap_connect($server);
    if(!
$ad)
        die(
"Connect not connect to ".$server);
        
    
// try our username/pass
    
$b ldap_bind($ad,$user,$pass);
    if(!
$b)
        die(
"Invalid user name and password");

    
// if we get here the user/pass is ok, disconnect from AD
    //ldap_unbind($ad);


    
printf("<BR>You are now authenticated under ".$_SESSION["user"]);


One question, does the CA need to be the Server that Ldap is on?
i've got it a standalone given server & client certificates to the webserver!

Reply With Quote
  #35  
Old June 16th, 2004, 03:59 AM
KuRcZaK KuRcZaK is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Poland
Posts: 6 KuRcZaK User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Standalone

Quote:
Originally Posted by Jock3h^
One question, does the CA need to be the Server that Ldap is on?
i've got it a standalone given server & client certificates to the webserver!


From the information that I have it can be on a separate server.

Reply With Quote
  #36  
Old June 16th, 2004, 06:35 AM
MatthewClark's Avatar
MatthewClark MatthewClark is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: San Angelo, Texas (USA)
Posts: 286 MatthewClark User rank is Corporal (100 - 500 Reputation Level)MatthewClark User rank is Corporal (100 - 500 Reputation Level)MatthewClark User rank is Corporal (100 - 500 Reputation Level)MatthewClark User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 13 h 48 m 16 sec
Reputation Power: 7
Send a message via ICQ to MatthewClark Send a message via AIM to MatthewClark Send a message via Yahoo to MatthewClark
Some of you guys are missing the point - I can authenticate to Active Directory, which is easy (as some of you have proven). What I need to do is modify the user password in Active Directory. I know it can be done - Microsoft says it can, but how?
__________________
InLesserTerms.net
Sometimes it takes a little cussin' to get things done right.

Reply With Quote
  #37  
Old June 16th, 2004, 02:32 PM
MatthewClark's Avatar
MatthewClark MatthewClark is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: San Angelo, Texas (USA)
Posts: 286 MatthewClark User rank is Corporal (100 - 500 Reputation Level)MatthewClark User rank is Corporal (100 - 500 Reputation Level)MatthewClark User rank is Corporal (100 - 500 Reputation Level)MatthewClark User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 13 h 48 m 16 sec
Reputation Power: 7
Send a message via ICQ to MatthewClark Send a message via AIM to MatthewClark Send a message via Yahoo to MatthewClark
I think I'm gonna try bwhaley's idea on the first page of this thread: he wrote a Perl script that may work (I have yet to try it). I'll let you know how it goes... vbmenu_register("postmenu_663070", true);

Reply With Quote
  #38  
Old June 16th, 2004, 04:22 PM
MatthewClark's Avatar
MatthewClark MatthewClark is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: San Angelo, Texas (USA)
Posts: 286 MatthewClark User rank is Corporal (100 - 500 Reputation Level)MatthewClark User rank is Corporal (100 - 500 Reputation Level)MatthewClark User rank is Corporal (100 - 500 Reputation Level)MatthewClark User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 13 h 48 m 16 sec
Reputation Power: 7
Send a message via ICQ to MatthewClark Send a message via AIM to MatthewClark Send a message via Yahoo to MatthewClark
Okay, I tried it, but it isn't going to be easy. I have Perl v5.8.2 on Windows Server 2003, which works fine. I needed to install Net::SSLeay, among others, but it would not compile. First, I got an error from CPAN saying it could not find command 'cl', so I installed Microsoft Visual Studio .NET (something I was reluctant to do on a server, but I needed the compiler). I also installed the Windows version of Open SSL, which CPAN needed to compile NET::SSLeay. I also needed IO::Socket::SSL, and I think that installed.

Anyway, to make a long story short, I couldn't get all the required Perl modules installed to make bwhaley's script work. Anyone else? It seems like the moons have misaligned and something doesn't want me to intermingle PHP and Active Directory.

Reply With Quote
  #39  
Old June 18th, 2004, 03:14 AM
Jock3h^ Jock3h^ is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: Greenock, Scotland
Posts: 5 Jock3h^ User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 59 sec
Reputation Power: 0
Send a message via MSN to Jock3h^
Matthew i was answering someone elses post (about user authentication via AD..
anyway

I have resetted a users Password in Active Directory from my web interface
it's quite simple but it involves
creating a file on the server then useing PHP to call ldifde
which is what actualy changes the password,
i'm not finnished it yet but once i have i'll post for everyone to see!

Reply With Quote
  #40  
Old June 18th, 2004, 06:37 AM
MatthewClark's Avatar
MatthewClark MatthewClark is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: San Angelo, Texas (USA)
Posts: 286 MatthewClark User rank is Corporal (100 - 500 Reputation Level)MatthewClark User rank is Corporal (100 - 500 Reputation Level)MatthewClark User rank is Corporal (100 - 500 Reputation Level)MatthewClark User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 13 h 48 m 16 sec
Reputation Power: 7
Send a message via ICQ to MatthewClark Send a message via AIM to MatthewClark Send a message via Yahoo to MatthewClark
Oh, okay - just making sure the thread didn't go that direction .

I'm watchin' this thread hard, so if you post a solution, you can bet I'll be trying it out...

Reply With Quote
  #41  
Old June 18th, 2004, 09:39 AM
bwhaley bwhaley is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 9 bwhaley User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by MatthewClark
I think I'm gonna try bwhaley's idea on the first page of this thread: he wrote a Perl script that may work (I have yet to try it).


Sorry for the troubles Matthew.. please note that I didn't write the script, I put a link to the site where somebody did. Don't want to take credit for what isn't mine . Also, it is meant to work for *nix, I'm not sure if Net::SSLeay will work with ActiveState Perl..

Reply With Quote
  #42  
Old June 18th, 2004, 02:58 PM
MatthewClark's Avatar
MatthewClark MatthewClark is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: San Angelo, Texas (USA)
Posts: 286 MatthewClark User rank is Corporal (100 - 500 Reputation Level)MatthewClark User rank is Corporal (100 - 500 Reputation Level)MatthewClark User rank is Corporal (100 - 500 Reputation Level)MatthewClark User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 13 h 48 m 16 sec
Reputation Power: 7
Send a message via ICQ to MatthewClark Send a message via AIM to MatthewClark Send a message via Yahoo to MatthewClark
Quote:
Viper_SB:
Here is the perl code converted to PHP.
Where was I when this was posted? Did anyone try it? I'm gonna try it...

Reply With Quote
  #43  
Old June 18th, 2004, 04:51 PM
Viper_SB's Avatar
Viper_SB Viper_SB is offline
Psycho Canadian
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jan 2001
Location: Canada
Posts: 4,739 Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level)Viper_SB User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 4 Weeks 6 h 25 m 16 sec
Reputation Power: 384
Read this thread onward. If you can get it working that'd be great.

Reply With Quote
  #44  
Old June 18th, 2004, 05:25 PM
MatthewClark's Avatar