0

I simply can't get Plain Basic auth to work on lighttpd for more than one user.

I have this auth.user file formatted like this:

[account_1_name]:[account_1_password]
[account_2_name]:[account_2_password]
[account_3_name]:[account_3_password]
[account_4_name]:[account_4_password]

and more.

But, everytime I try to log into my webpage, LightTPD.exe returns me:

(http_auth.c.887) password doesn't match for / username: XXXXXXX, IP: XX.XX.XX.XX

Here's my auth.conf:

auth.backend                = "plain"
auth.backend.plain.userfile = "C:/servers/webserver/bin/lighttpd/conf/auth.user"
auth.require                = ( "/" =>
                                (
                                  "method"  => "basic",
                                  "realm"   => "Server login required",
                                  "require" => "valid-user"
                                )
                              )

What can I do?

Please notice that if in my auth.user file I put only one user:password entry it works.

Thanks in advance for every attempt to help.

Bonny1992
  • 11
  • 1
  • @SvW: What software do you recommend to use? I usually work with Notepad++ – Bonny1992 Aug 25 '14 at 18:38
  • I am pretty sure Notepad++ has an option somewhere to set the line ending type. Quick google: http://stackoverflow.com/questions/8195839/choose-newline-character-in-notepad – Sven Aug 25 '14 at 18:39
  • @SvW: You're right, now it works like a charm. It was simply line ending type. How can I mark your comment as the answer? – Bonny1992 Aug 25 '14 at 19:23

1 Answers1

0

Check the line ending type. Windows editors usually use CRLF, while on Unix only LF is common. Although I think it unlikely, it wouldn't really surprise me if the program stumbles about something like this.

Sven
  • 97,248
  • 13
  • 177
  • 225
  • Awesome, it works changing line ending type! I link the question that you linked to me for easier understanding: http://stackoverflow.com/questions/8195839/choose-newline-character-in-notepad – Bonny1992 Aug 26 '14 at 07:05