Does NTLM use Active Directory for storing all usernames?
Yes, usernames are stored in Active Directory. NTLM just a challenge/response authentication protocol in which the client never sends the password over the wire.
Are NTLM and Windows Authentication the same authentication methods?
Yes, there are many names that refer to this same authentication mechanism:
- HTTP Negotiate authentication
- NT Authentication
- NTLM Authentication
- Domain authentication
- Windows Integrated Authentication
- Windows NT Challenge/Response authentication
or simply
If yes, then what is the use of the domain in this case?
As mentioned earlier the client never sends his password over the wire. So in order to ensure the identity of the client, the server communicates with the domain controller in order to challenge the client to which if the client responds successfully it means that he is the one who he claims to be.
Now back to your original question:
I want to get all user and group details using NTLM authentication.
You need to query your domain controller (AD) in order to retrieve this information. Here's an example that shows how to get the groups given a username.