loune / php-ntlm Goto Github PK
View Code? Open in Web Editor NEWNTLM authentication for PHP
Home Page: https://loune.net/2009/09/ntlm-authentication-in-php-now-with-ntlmv2-hash-checking/
NTLM authentication for PHP
Home Page: https://loune.net/2009/09/ntlm-authentication-in-php-now-with-ntlmv2-hash-checking/
i would like to get the windows username without prompt. is that possible? @loune
Something is wrong here with $domain
:
function ntlm_get_challenge_msg($msg, $challenge, $targetname, $domain,
$computer, $dnsdomain, $dnscomputer)
{
$domain = ntlm_field_value($msg, 16);
See https://github.com/loune/php-ntlm/blob/master/ntlm.php#L118
It is only used once, so maybe the function parameter is not needed?
Hello,
can you please gave me a detailed example?
I always get:
"Authentication Required
NTLMv2 response required. Please force your client to use NTLMv2."
errors.
I use Samba with OpenLDAP.
I am a longtime user of your original NTLM script in my workflow application. I just need to pull the Windows username from a Type 3 response, and I don't care about secure authentication, hashes, etc.
I am hearing from coworkers that our Win10 upgrade will only allow NTLMv2 in an HTTP session, and that your original script won't work. I don't see in the ntlm.html protocol document how the Type 3 message in HTTP auth differs from v1 to v2. I have read elsewhere that the Type 3 is encrypted with the client's password hash (unsure on this).
Can I simply extract the username in v2 without using your setuid binary or otherwise involving an Active Directory server?
Many, many thanks for any information you might provide.
Hello,
It looks like a great library but I can't figure out what parameters set in to the ntlm_prompt() call.
My goal is the user is directly logged without question for the user, but to the AD.
My apologies, but I am quite new on this NTLM stuff.
Let's say my base DN is COM.CITY, so I use this parameters:
$testWebsite = "http://desired/place/to/go/after/login";
$testDomain = "COM.CITY";
$myComputer = ? // I could guess the IP
$testDomainLocal = "COM.CITY";
$myComputerLocal = ? // I could guess the IP
$auth = ntlm_prompt($testWebsite , $testDomain, $myComputer, $testDomainLocal, $myComputerLocal, "get_ntlm_user_hash");
I don't know what *Local stands for and I doubt if the computer value could be its IP.
I'll appreciate your clarifications.
Thank you.
Hi !
You have an example of using NTLM v1 here https://loune.net/2007/10/simple-lightweight-ntlm-in-php/
Using this library, how would the code look that achieves the same ?
Thanks in advance !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.