Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It should be possible to include domain in the user identifier #6

Open
Legrandin opened this issue May 15, 2012 · 2 comments
Open

It should be possible to include domain in the user identifier #6

Legrandin opened this issue May 15, 2012 · 2 comments

Comments

@Legrandin
Copy link
Owner

Right now, only the user's account name is put into the REMOTE_USER variable, and passed to the underlying application.

It would be nice if there was an option that allowed REMOTE_USER to also include the domain name.

For instance, let's say we have the domain WINDOM and a user John Doe with account name jdoe.
Today, after authentication, the application behind Apache will display 'jdoe'.
In some cases, it is preferable to have 'WINDOM\jdoe'.

@ojkoorde
Copy link

ojkoorde commented Sep 3, 2012

Whoever wants to have username as 'domain\user' needs to change PyAuthenNTLM2-2.2/pyntlm.py:

  1. line #326 from 'req.user = user' to 'req.user = domain + '\' + user'
  2. line #333 from 'req.connection.notes.add('NTLM_AUTHORIZED',user)' to 'req.connection.notes.add('NTLM_AUTHORIZED',domain + '\' + user)'

Regards,
Artur

@Legrandin
Copy link
Owner Author

I added a specific option called NameFmt so that one can choose to have only the user name or the logon name in REMOTE_USER.

9595b27
20d6356
2b6053d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants