Forum OpenACS Q&A: Re: New Install from Head does not allow login

Collapse
Posted by Lars Pind on
I simply don't get this.

I just did yet another fresh install, this time with 'mailto:lars@pinds.com';, username 'lars pind'. Login just fine.

Also, knowing the code, I can't think of anything that would cause that kind of behavior. "Unknown username", yes, but not with the kind of system to it that you're suggesting.

So I'm going to have to ask you to dig one step deeper into this.

It does prompt you for email, not username, right?

Can you tell me the results of a

'select * from parties'

and

'select * from users'

And then I'm going to have to ask you to start troubleshooting this a bit for me.

The login page calls auth::authenticate, which in turn calls a bunch of other procs, most notably auth::local::authentication::Authenticate.

However, this proc takes username and password, so auth::authenticate looks up by email and finds the username to pass to that proc.

Insert some ns_log Notice statements at strategic points, and see if you can trace the message and which condition triggers it.

That would be most helpful.

Thanks a bunch for your help.

/Lars

Collapse
Posted by Brad Ford on
Finally got around to revisiting this. I did a fresh update from HEAD and installed. I entered mailto:admin@stratamatters.com as email and Brad as username on the install.

Following Lars' requests:

Yes it prompts for email - enter email address and password and get 'unknown username'. Still asking for email - if you enter the username it comes up 'unknown email'

sql query results:

users table
user_id authority_id username screen_name priv_name priv_email
0                    guest                0          5
405    9            Brad                0          5

parties table
party_id      email                    url
0
-2
-4
394
405            mailto:admin@stratamatters.com

Looking at the log, I can see that it's querying the users table but has the username all lowercase i.e. select user_id from users where username='brad' and authority_id=9

I tried that query in psql and came up 0 rows returned - if I change username to 'Brad', I get the user_id 405 returned.

I guess next step for me is to dig into auth::authenticate and what-not. Guess there's no better time than the present to get my feet wet looking at tcl code...

In the meantime, you can see this bug live at 24.87.20.202:8888 - I'll leave the install up for today.

Lars, if I can't figure out anything with auth procs, would it help if I let you ssh into my server and poke around?