snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Unable to login with LDAP credentials

Open JExactly opened this issue 10 years ago • 13 comments

Expected Behavior (or desired behavior if a feature request)

Ability to login with LDAP password(Active Directory) on imported users accounts.


Actual Behavior

Imported LDAP users cannot login with their ldap password


Please confirm you have done the following before posting your bug report:


Please provide answers to these questions before posting your bug report:

v3.5.1-2-gd7222ae- Version of Snipe-IT you're running 7.0.12-1+deb.sury.org~xenial+1 - PHP Version

Ubuntu 16.04 Apache- What OS and web server you're running Snipe-IT on Manual - What method you used to install Snipe-IT (install.sh, manual installation, docker, etc) " Error: The username or password is incorrect." - If you're getting an error in your browser, include that error Login Page- What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error

  • If a stacktrace is provided in the error, include that too.
  • Any errors that appear in your browser's error console.
  • Confirm whether the error is reproduceable on the demo.
  • Include any additional information you can find in app/storage/logs and your webserver's logs.
  • Include what you've done so far in the installation, and if you got any error messages along the way.
  • Indicate whether or not you've manually edited any data directly in the database

JExactly avatar Oct 28 '16 13:10 JExactly

Please provide the contents of your laravel log, as requested.

snipe avatar Oct 28 '16 21:10 snipe

[2016-10-28 10:13:16] production.DEBUG: Authenticating user against database.
[2016-10-28 15:00:59] production.DEBUG: LDAP is enabled.
[2016-10-28 15:00:59] production.DEBUG: Local auth lookup complete
[2016-10-28 15:01:00] production.DEBUG: Binding user to LDAP.
[2016-10-28 15:01:00] production.DEBUG: Local user jnero exists in database. Authenticating existing user against LDAP.
[2016-10-28 15:01:00] production.DEBUG: User jnero did not authenticate correctly against LDAP. Local user was not updated.
[2016-10-28 15:01:00] production.DEBUG: Authenticating user against database.

JExactly avatar Oct 28 '16 21:10 JExactly

Okay, so:

[2016-10-27 00:09:19] production.DEBUG: User jnero did not authenticate correctly against LDAP. Local user was not updated.

That usually means that your LDAP Authentication query is incorrect

snipe avatar Oct 29 '16 13:10 snipe

ahhh, I had an old string that was in there from when I upgraded to V3 and it imported the entire string from the old ldap settings file. It appears the LDAP documentation needs to be updated on the user-manual site. Thanks for pointing me in the right place!

JExactly avatar Oct 29 '16 14:10 JExactly

It appears the LDAP documentation needs to be updated on the user-manual site.

How so?

snipe avatar Oct 29 '16 14:10 snipe

It appears the LDAP documentation needs to be updated on the user-manual site. Forgive me, I haven't had any coffee yet and I made an error in that statement. The documentation is perfectly fine.

JExactly avatar Oct 29 '16 14:10 JExactly

Oh thank goodness lol... I was like "Wait, I spent a lot of time on that documentation!"

totoro-hula

Glad you got it sorted!

snipe avatar Oct 29 '16 14:10 snipe

Yes, It appears to be sorted!! Thanks for that! ( I am also very much looking forward to linking OU's to locations!!) I do have a quick question unrelated to this specific topic... I am new to using git to clone repositories to my Linux box. I ran into an error when I tried to use git pull to pull down the latest build. It kept throwing the error "error: Your local changes to the following files would be overwritten by checkout: foo.txt Please, commit your changes or stash them before you can switch branches. Aborting"

Is there a very specific way I correct this to merge the repo changes over my local using git pull or some other way?

JExactly avatar Oct 29 '16 14:10 JExactly

Did you create foo.txt? In general, if you're using git clone, you don't want to put anything in there that's not part of the official repo. If you don't need that file, you can delete it or git stash to keep a stash of it that you can pull back out later.

snipe avatar Oct 29 '16 14:10 snipe

Sorry, I used a canned error message from a search I did yesterday because I did resolve this by forcing a "git reset --hard." foo.txt wasn't in my cloned dir. The only files I can think that changed or were added from the original was the .env file and likely some images that were addes to assets etc...

JExactly avatar Oct 29 '16 14:10 JExactly

If it wasn't in your cloned directory, git shouldn't have choked on it - it only cares about what's different from that specific repo. (Uploaded files and the .env file are ignored in .gitignore, so you never need to worry about those.)

Either way though, you can either remove the offending file, or git stash

snipe avatar Oct 29 '16 15:10 snipe

Ok, I will see what happens next time I run a pull and seek further assistance if I run into an error! Thanks for your guidance!

JExactly avatar Oct 29 '16 15:10 JExactly

No problem!

snipe avatar Oct 29 '16 15:10 snipe