Authenticate Portal Users (php) In Active Directory
I would like to authenticate portal users (php) in Active Directory (Win
Server 2003). (right now php authenticates them on radius). If somebody has
codes or articles about php + AD .
View Complete Forum Thread with Replies
Related Forum Messages:
Authenticating Users From Windows Active Directory From PHP Code
I want to authenticate users (defined in an Active Directory Service running on a Windows 2000 Server machine) from PHP Code running under Linux (Fedora Core 3 with Kerberos 5 installed). I just want to find out whether a particular user (with a given username, password combination) exists or not. Then I will login that user into my intranet application (developed on PHP under Linux).
View Replies !
Active Directory / Exchange / Active Directory.
I'm creating an Intranet module for a client (Forum, files upload...etc...etc). This client already has a huge server running on WIN2000 + IIS 4 + Exchange + Microsoft Active directory + proxy and finally PHP 4.03 + MySql. Problem #1 : All passwords are changed every weeks, so I want to be able to import users/pass from Microsoft exchange .... Does anyone have an idea to do such thing with PHP ? Problem #2: I would like that the user logged from the firm's network do not have to log. again when connecting the module. So, is it possible to do such thing ?
View Replies !
How To Authenticate Users With Htaccess?
Can I use PHP and htaccess to authenticate users? My service provider lets me password protect directories on my web site - using htaccess. If a user tries to access a page within a password protected directory, a dialog is received requesting username and password. But I want to provide a login page that users go to first, and then are directed to the page/directory that they are allowed to see based on their username/password. Code:
View Replies !
Active Users
I'm creating an active users script for my website and I'm having a bit of trouble updating the table. It's not producing an error but its not updating the table either. The columns in the active_users table are username varchar(30) and timestamp int(11) The code pertaining to the problem is: PHP Code: $query = sprintf("UPDATE active_users SET username='%s' AND timestamp = UNIX_TIMESTAMP()",mysql_real_escape_string($user)); mysql_query($query); And here is what I use to retrieve who's currently active: PHP Code: $result = mysql_query("SELECT username FROM active_users WHERE timestamp > (UNIX_TIMESTAMP() - 900)"); while($row = mysql_fetch_row($result)) { echo "<b><a href='users.php?action=profile&user=$row[0]'>" . $row[0] . '</a><br /></b>' }
View Replies !
Make An Active Users Script In PHP
I'm trying to make an active users script in PHP, not because I need one, because I want to know if i can. I made one that worked with PHP sessions but then it failed to work with people who had cookies turned off. So, now the script i'm using stored the time and users IP in a flat file. Needless to say it doesn't work for a seemingly unknown reason. It's a pretty small script that I heavily commented so I wouldn't get lost. If one of you more experienced PHP gurus can take a look through it real fast and tell me what's wrong and what I could do to fix it that'd be great. Code:
View Replies !
PHP And Active Directory
Via a PHP script (running on a LAMP configuration - PHP with LDAP support), I run queries on the LDAP server of our office (users and arguments). Now, I want to put the result of this query (user information) in a Windows 2003 AD. I use PHP-ldap functions to connect with the domain controller: making connection is no problem, but binding (authenticated, I even tried Domain Administrator credentials) doesn't work... Does anyone has experience with this matter (PHP and AD connection/communucation)?
View Replies !
PHP And Active Directory 2K3
Note: I'm cross-posting the below to nyphp.org as well. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~ I've been struggling with an issue for a few months. I am attempting to search Active Directory 2003 via PHP, but am running into an issue searching from the base DN (i.e. 'cn=company,cn=com'). This seems to be somewhat of a known issue with AD2K3. A search at this level always returns: Warning: ldap_search() [function.ldap-search]: Search: Partial results and referral received If I change my base DN to 'ou=someOU,dc=company,dc=com', searches work properly. I was curious to see what would happen at the command line, so I used openldap's ldapsearch function against AD and sure enough I got a bunch of results that were truncated with ldap_result: Can't contact LDAP server Of note: I have a base php class that sets the following options whenever a bind is created (seems to be necessary for searching AD2K3 at all): ldap_set_option($this->_ldap, LDAP_OPT_REFERRALS, 0); ldap_set_option($this->_ldap, LDAP_OPT_PROTOCOL_VERSION, 3); Anyone have any feedback about how to search the base dn of AD2K3?
View Replies !
Active Directory And PHP
Is there anyway to work PHP with Active directory? My intention consist in developing an application that authenticates automatically PHP on W2k3 server.
View Replies !
Active Directory In PHP
I am attempting to create an internal application for my company and I am not part of the programming department but I do happen to be pretty decent at PHP. Anyways my current delima is that they use Windows 2000 Server Active Directory for User Authintication and attempting to re-enter all of this information in to a MySQL database would be a huge undertaking and something I just dont want to do. is there a way to get PHP to communicate with the Server to authenticate people useing Active Directory. I have searched the forums and I did not find anything regarding this already of course I could of been searching for the wrong criteria.
View Replies !
Active Directory
I'm trying to get it so visitors to our intranet site are able to log into the site with there normal login details. On a network using win2k3, active directory etc. Now my code at the moment seems to connect to AD but it fails when it trys to bind. Code:
View Replies !
Active Directory Authentication Via Php.
I'm in a bit of a pickle.. at the company where I recently started work, I discovered that the knowledge base we use sucks, and sucks bad (oh Lotus Notes, how I loathe thee, let me count the ways) So for kicks and giggles, I found a nice "personal notebook" solution on the net called: http://www.tiddlywiki.com/ When this had ballooned into a big, nice knowledge base, I discovered that there's a server-side version of it called cctiddly : So as a test I found a free apache/php/sql solution: - copied the cctiddly into it, and the thing worked! As you can see, up until now, no real programming has been undertaken by me, at this point, I've just been at most playing around with installing plugins into my tiddlywiki. Of course, also, now I'm faced with the ultimate question... what's the best way to authenticate people who want access to the wiki? I've researched a bit, and discovered that you can enable LDAP access via php, so theoretically you can authenticate people through AD... which is excellent! People can just use their usual username and password, no need to remember yet another user/pass, and no need for admin to have to control yet another admin control thingum. So I've been testing this out, browsing through information, and as a test I created this: ------ echo "<h3>LDAP query test #1</h3>"; echo "Connecting ..."; $ldap_host = "localhost"; $ldap_user = "user@domain.is"; $ldap_pass = "password"; $connect = ldap_connect($ldap_host) or die ("No Connection to LDAP server"); // must be a valid LDAP server! echo "connect result is " . $connect . "<br />"; if (ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)) { echo "Using LDAPv3 <br />"; } else { echo "Failed to set protocol version to 3 <br />"; } if ($connect) { echo "Binding to server..."; $bind=ldap_bind($connect, $ldap_user, $ldap_pass); echo "Bind result is " . $bind . "<br />"; } ---- - Now this works.. if I remove the $ldap_pass in the "$bind=ldap_bind($connect, $ldap_user, $ldap_pass); " line, because then I'm connecting anonymously to the LDAP server... But when I try to authenticate to the server with the password I get this error: "Warning: ldap_bind() [function.ldap-bind]: Unable to bind to server: Strong(er) authentication required in C:Program Filesxampphtdocs wikiadtest.php on line 21" - which made me go, whu? Now I can't change the settings on the domain controller, as I'm not the sysadmin.. so I need to somehow create a stronger authentication to the server.. now how the hell do I do that? I can't install an SSL certificate, because there isn't one on the server, is there some way for me to make the password meet the bare minimum requirements for a stronger authentication without having to use SSL? An administratoir I know recommended to try to figure out how to use either NTLM or KERBEROS... which is at least perhaps something.
View Replies !
Active Directory And LDAP
I have a php Intranet, and what I would like to do is hit the Active Directory and bring back the Username, FirstName and Lastname from Active Directory and set them to variables, so I can either display them or insert them into a database. A few things to consider, php is installed on the server, but I don't have access to the server to change any settings. This is just a side project and we are blowing up the existing intranet and going with a Content Management System, so the easier the better.
View Replies !
Active Directory Token
My environment is setup like this: Windows Server 2003 Active Directory 2003 IIS 6.0 PHP 5.1.6 When a user tries to hit my system they are prompted for an Active Directory username / password combination. If their information is correct they get to the application. I need to modify the application code to check if the users password is about to expire. IIS can be configured to pass a token to the application. How would I use PHP to read the contents of this token so I can query AD?
View Replies !
Authentification On Active Directory
I want to use the users of our active directory in the intranet for a portal page. i dont know how to authenticate? $server = "xxx-xx.de.xx.com"; $connectid = @ldap_connect($server); is ok. $binding = @ldap_bind($connectid) or die("Error"); echo "ok";
View Replies !
How Can I Connect From Php To Active Directory?
i already have a CMS that has its own user table in MySQL. A customer wants me to use their own Active Directory user list in order to login to the php system. So, now i have to connect the app to the Active Directory. 1) What are the neccesary steps? 2) How can i connect from php to active directory in order to check user/password consistency?
View Replies !
Controlling Active Directory?
I need to make a php script cable of creating/editing users in windows active directory. To make it even harder php is installed as a module on Apache running on windows, same computer that runs MS exchange and thus needs active directory to manage all email accounts. Why? Because I could not find anything open source for windows to do what MS exchange does, and I am not talking about all of that calendar and contacts staff, what I need are simple IMAP and POP3, is it so hard to ask? Well to sum it up I need either help with php and a point to the right direction to manage active directory, or a good reliable open source email server that would run on windows XP+ ( I would not use 2003 server if I can find that email server ) and be flexible enough to be controlled from PHP.
View Replies !
Ldap And Php4 With W2k Active Directory
I am trying to get ldap info from a W2K active directory. I have the authentication down, but I want to search on the aa0000000 to get the name associated with the login. Basically I am making a request form that will be used once a year, but need to be sure of the people signing up, use resources already setup, and have one login/pass. Code:
View Replies !
Creating Active Directory User
does anyone already tried to create a user into active directory through php_ldap ? i tried something like this but still don't work :-/ $adduserAD["cn"][0] = "phpldapuser"; $adduserAD["samaccountname"][0] = "guguseli"; $adduserAD["objectclass"][0] = "top"; $adduserAD["objectclass"][1] = "person"; $adduserAD["objectclass"][2] = "organizationalPerson"; $adduserAD["givenname"][0] = "thomas"; $adduserAD["name"][0] = "tester"; $adduserAD["sn"][0] = "btester"; $adduserAD["description"][0] = "TEST-Account ldap"; $adduserAD["title"][0] = "Programm Manager"; ldap_add($ad, "ou=test, dc=my,dc=domain", $adduserAD) or die("error!");
View Replies !
Creating Active Directory Accounts
I need to add a feature to a php form that allows you to create Active Directory accounts (from the form). I read around that you needed something called ldap to do something like this, is that true.
View Replies !
LDAP Connect To The Microsoft Active Directory
I have been trying to connect to the Microsoft Active Directory in order to access user and user group information form authentication on one of my websites. When I execute the code below, I am able to connect but cannot bind. <?php $conn=ldap_connect("localhost") or die("Couldn't connect"); echo "Connect result is " . $conn . "<br />"; ldap_set_option($conn, LDAP_OPT_PROTOCOL_VERSION,3); ldap_set_option($conn, LDAP_OPT_REFERRALS,0); $bind=ldap_bind($conn,'sarfaraz','password') or die("Couldn't Bind"); echo "Bind result is " . $bind . "<br />"; ldap_close($ds); ?> RESULT: Connect result is Resource id #2 Couldn't Bind I am currently developing this website on my personal computer (xp home, apache 2, php 5, mysql 5). I enabled the LDAP module in the php.ini, added php to the windows PATH, added libeay32.dll and ssleay32.dll to the system32 folder and restarted apache and the computer.
View Replies !
Ldap_bind With Active Directory Working With Invalid Passwords
I have been trying to find an answer to this for some time now and cannot find anything on my own. I am trying to set up Active Directory authentication for some applications I am developing. I got the setup to initially work, but notice that it will work if I use an invalid password or even a blank password. I am not sure what I need to change in my code (listed below) $ldaprdn = $_POST["username"]; $ldappass = $_POST["password"]; $host = "ad1.mysite.edu"; $basedn = "DC=ad1,DC=mysite,DC=edu"; $ds = ldap_connect ("ldap://" . $host); ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3); if ($ds) { $r = ldap_bind($ds, $user . "@mysite.edu", $pass); if ($r) { session_start(); ldap_close($ds); $_SESSION["username"] = $ldaprdn; $_SESSION["login"] = true; header ("Location: options.php"); } else { ldap_close($ds); header ("Location: index.php"); } } If it authenitcates, it should go to the options.php page. I can put a check to see if the password given is null or blank, but that doesn't solve the binding with an invalid password. The one major thing I don't understand with the script are the DC= and what they do, and maybe its something in there that is the issue.
View Replies !
Editable For Only Specific Active Directory User Goup
I'm trying to make a php message board on our company's Intranet that can only be edited by a specific user group. The group "writers" is managed in active directory. Is it possible to automatically check if the user that is logged in to windows and is watching the site is a part of the group "writers"? And if that user is a part of writers then an "Edit" button would be displayed on the site. The intranet site runs on Apache 2.2.
View Replies !
Sorting Active Directory/LDAP Output (Lastname, Firstname)
My company has asked me to put a company directory on our intranet site and I'm trying to use php to extract the users from our active directory server. I've got everything working, however, when the list of users is shown in the output, it seems to display the users in the order their accounts were created, with Administrator obviously being first. What do you think would be the best way to get the list to be sorted by lastname (sn), based on the coding below. usort? ldap_sort? Not really too familiar with using php and ldap or active directory. <?php $ldap_server = "ldap://ourldap"; $auth_user = "user"; $auth_pass = "pass"; // Set the base dn to search the entire directory. $base_dn = "ou=staff, dc=ourldap, dc=com"; // Show People $filter = "(&(objectClass=user)(objectCategory=person)(cn=*))"; // connect to server if (!($connect=@ldap_connect($ldap_server))) { die("Could not connect to ldap server"); } // bind to server if (!($bind=@ldap_bind($connect, $auth_user, $auth_pass))) { die("Unable to bind to server"); }
View Replies !
Access Active Directory (of WINDOWS SERVER 2003) Via LDAP
I want to read user information from the microsoft windows 2003 server. In the windows server 2003, i've create a domain, called "wissenskolleg". I've assigned a password to it. Now, i want get access to the Active Directory with PHP. My code: $ds=ldap_connect("wissenkolleg.com"); $r=ldap_bind($ds,"administrator","psword"); Always I've get the following error message: warning: ldap_bind(): For Unable ton bind tons of servers I've found out, that $ds always return: Resource id #2 If i changed "wissenkolleg.com" in "whyitis", it is all the same, i've can only read: Resource id #2 and the same error with ldap_bind.
View Replies !
Internet Explorer 6 Vs 7 : COM Object That Uses ADSI To Reset Active Directory Domain Accounts
Setup: IIS 6 with PHP 5.2.0 We are trying to make a COM object that uses ADSI to reset Active Directory domain accounts. We can get the script to work great in IE7, but anyone stilll using IE6 has problems. We are using authentication (IWA and IIS configured not to allow anonymous) via the browser. I also have the same problem with a simple example script off of php's site (http://us3.php.net/com) <?php $domainObject = new COM("WinNT://Domain"); foreach ($domainObject as $obj) { echo $obj->Name . "<br />"; } ?> In Internet Explorer 6 I just get "Schema". With IE7, I get the full list of objects...
View Replies !
Stop Users Accessing A Directory Through The Url Bar
I've got some free downloads on my site and I want to stop people from downloading them without going through the correct page. Basically all of my downloads are in a directory like so: root/downloads/download category/files I want to stop people from just typing the url of a file into there browser and having the file. I've got a file which counts how many people have downloaded files and re-directs them to the download file. I want this to be the only way someone can access the files.
View Replies !
Use PHP To Authenticate To AD
We use Windows 2000 AD for everything. However, we are also running XAMPP (basically Apache, MySQL, PHP for windows) on a Windows box for our Intranet. I have a few applications that need to authenticate via AD from PHP and every example I see uses the LDAP functions built into PHP. I cannot query our AD server via LDAP. If I type ldap://domaincontroller it fails, so of course, when I try to use the LDAP function in PHP they fail. How do I get LDAP running on AD? I'm sure I'm missing something simple, but I'm very frustrated. BTW, I've started coding another app that queries AD using ASP and it is soooo easy it hurts.
View Replies !
Authenticate
Ive started recoding my login/authenticate pages for my game engine, because they were simple. Upon testing what I have so far I have noticed something that confuses me. Say these are my login details. User - Me Pass- letmein Now it will log me in when i enter them exactly like that. BUT when i log in using the user me ( no capitol M), it gives me a blank screen and does nothing The incorrect password or incorrect user name works, it seems to break with case sensitivity issues. any ideas? Code:
View Replies !
Use WWW-Authenticate:
I would like to learn how to use header('WWW-Authenticate: Negotiate'); header('WWW-Authenticate: NTLM', true); How are variables passed? Which are the variables? How do I name them? If anyone can give me some info to get started with that.
View Replies !
How To Authenticate When Using SimpleXML
I've got an RSS feed I'd like to consume from our Sharepoint server. When I try: $xml = simplexml_load_file($url); I get failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized This is understandable as I need to specify a username and password to access the RSS. How can I do this with SimpleXML, or, should I first call the URL with cURL and work with the stream locally? I thought there may be some global params I could set for the stream handling library of PHP.
View Replies !
Authenticate Windows
I posted a question in ASP forum but I really want to know your opinion in PHP because I'm more familiar with PHP than ASP. I have a windows 2003 stand alone server. In this server I have some windows accounts and they all have passwords. Now I have to create an intranet website on this server (IIS) My question is how can I use accounts/password on the server to authenticate user through an PHP page? Users have to enter their identity and the webpage log username and the time they login.
View Replies !
How To Authenticate Remotely
There is an html form on a remote site with the fields: Username, password. I can visit the website, and login successfully. However, I'm wondering if it's possible to login without visiting the website. In other words, can I create a similar form on a remote server, and do a remote POST? I've tried the following code, but it doesn't log me in. It simply returns to the login form. Code:
View Replies !
Active Persistent Links And Active Links Both 0
I just installed Apache/MySQL/PHP I'm trying to test if the connection to MySQL is there I know the database works on its own, I checked that when I run phpinfo() I get mysql listed, I'm just wondering if when it says "Active Persistent Links" and "Active Links" both 0 (zero) under "enabled" column, is that fine, meaning configured properly?
View Replies !
PHP Web Portal
I've been asked about the feasibility of a web portal for some controllers we are developing. Basically, the portal would offer accounts to subscribers and allow them to view and control their equipment. The view is primarily a spreadsheet with clickable links for each controller. The link would bring up a detailed view. I would imagine the backend would be SQL based, with a separate data collection engine and display engine. Is anyone aware of a GPL (or similar FOSS) licensed project that can do this?
View Replies !
Web Portal
(1)Is it possible to host PHP-based Web Portal + MySQL Database (e.g. PHPNuke) on MS Windows System? If yes which server software I need? (2)Compare PHP over JSP/ASP/CGI in performance/memory usage/others...which one is the best for a web portal targetted around few thousand concurrent users? Any article have detail comparisions are welcomed. (3)What is the function of SOAP? PS: Would anyone please introduces some sample flow-diagram of web-portal architecture of a PHP system with SQL database?
View Replies !
New Portal
I want to have a own portal(with php). What I must have? a server, database, php editor, FTP? I can download the portal or I have to start from the coding and setting from beginning until end.
View Replies !
Authenticate Google Accounts Pro
Did any of you ever tried to authenticate Google Accounts pro grammatically? What I mean is that there are many google services available which needs to authenticate user accounts first to fetch data remotely. Now is there any of you who authenticated using PHP?
View Replies !
Http-Authenticate Problems
I am using an include on the pages I want to protect but it just brings up the login box over and over again even with the correct user and pass. Is there a specific type of formatting to use in the database fields? Code:
View Replies !
Portal SE Friendly
Does anybody know a free php portal system that is also Search Engine friendly meaning that it can be configured not to show unfriendly URL to search engine spiders?
View Replies !
Secure Portal
Anybody knows how should we implement a portal-like website that allow its members to communicate through the private message but does not allow them to exchange email address or any other contact details? It is much like the FriendFinder implementation. I imagine the if we rely on the word filtering on every private message (like filter the @ character) it will not guarantee that we could avoid such email address being passed to one another.
View Replies !
PHP Portal From Scratch
I want to make a PHP Portal from scratch to develop my self better and gain experiance, do anyone know a link to a good free tutorail for making a PHP-Portal from scratch, or something related..
View Replies !
CMS/Portal API Advice
I need advance considering CMS/Portal. Features welcomed: - not a final product, in the first place, but API - ability to shape it into different CMS solutions - ability to work with PHP/Postgres/MySQL hosting server - API for simple content editing, template editing, for user management, user authorization - BSD-like or GPL-like license, I am redy to contribute back Is there anything out there that comes close to this ?
View Replies !
Portal Apps
I am looking for a PHP/MySQL portal app, and am having a hard time deciding. So far I like Xoops and PHPNuke, does anyone have any other suggestions, or comment about these? Advice?
View Replies !
Develop A Web Portal In PHP
I need to develop a web portal in PHP. can someone please give me some code for php pages using a small database. 2-3 PHP Pages & a small database would b welcomed.
View Replies !
|