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

I was away for a few weeks and updated my tree from HEAD.
I installed a new system. All works fine, the system asks to create the administrator: There is a new field: Username!

So I enter email, Username, First and Lastname and the installation finishes succesfully.

Restart and then login with the newly created email, the system responds: Unknown Username.
If I enter the Username instead of the email, it complains: Unknown email. I am unable to logon to the sysadmin account.

I can register as a new user, but I can not give any admin rights.

Am I doing something wrong?

Thanks for help

Collapse
Posted by Lars Pind on
Hm. Just tried a fresh install. Works here on PG.

And our automated smoke test servers seem okay, too, except for one unrelated test case error:

http://dotlrn.collaboraid.net/test/

Are you on PG or Oracle?

/Lars

Collapse
Posted by Christian Eva on
Hi Lars

Thanks for your reply. I am on PG 7.3.4 and nsd4beta10.

I made and CVS update - but I,ll try a full checkout later today.

Anyway what is the new Username in relation to the email?

Thanks
Christian

Collapse
Posted by Christian Eva on
I tried again and still have the same problems ...

It must be related to the new authentication procs,

I checked the tables parties, persons, users and everything seems to look okay. I changed usernames in persons to the same as the email in parties as it is when I register a new user.

I still get the error maessage Unknown username or
unknown email or invalid username or password.

Is there any dependency to the underlying plattform for the administrator?

Collapse
Posted by Christian Eva on
Okay, I figured out that the you have to enter exactly the same for email and username in the setup screen.

It works now, sorry for the inconvenience!

Thanks for any help
Christian

Collapse
Posted by bill kellerman on
I briefly installed head, found the same thing, thought I had botched something.  Thanks for pointing this out.
Collapse
Posted by Karl Thiessen on
[auth::get_login_focus] appears to have gone away in the latest HEAD. (kernel 5.0d8) At least my installation couldn't find its definition, but it's used in $ROOT/www/index.tcl.  Commenting it out and replacing the line with "set focus {}" seems to work, however.
Collapse
Posted by Lars Pind on
Karl,

This problem has been resolved. Sorry.

Christian: I still don't understand. You're not upgrading, are you?

I've created my new system with 'admin' as the username, 'mailto:lars@pinds.com'; as the email, and it's worked every time.

You're not leaving username blank, are you?

/Lars

Collapse
Posted by Brad Ford on
I just did an install with 5.0d10 and get the same problem - I used my own name as username (is a space allowed?)not admin. Could the problem be related to that i.e. first user must have username 'admin'?
Collapse
Posted by Brad Ford on
Ok, just dropped the db and reloaded 5.0d10 - this time I made the email and username identical and everything worked. What the heck, let's drop it again and try with username admin. BTW, I'm on pg 7.3.2 and aolserver 3.3+ad13.
Collapse
Posted by Brad Ford on
Alrighty, just dropped the db and loaded up 5.0d10 again. This time I used admin as the user and an arbitrary email address - result: success! Seems the only way to get to admin pages after initial install is to either use admin as the username or make email and username identical. Are we posting bugs for HEAD anywhere or will this serve as a bug report?

Also, in the HEAD docs in the tdom section, a line needs to be added directing the user to edit config.tcl in server0/etc - change the nstdom.so to nstdom0.7.8.so (I used a later version than specified). Otherwise aolserver fails on startup. Should I post this separately?

Collapse
Posted by Frank N. on

Brad,

Every and all bugs should go into the bugtracker. Currently for the next few weeks we are filing bugs found in HEAD under version 5.0, the upcoming next release of OpenACS. One bug per report, please.

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 Frank N. on
Just checked here with a fresh checkout. First admin login works perfectly with PG 7.3.4. No errors in the log.

Frank.

Collapse
Posted by Brad Ford on
Hi Lars,

Before I go through your instructions above, just want to make sure the cvs command I'm using will get the latest HEAD from cvs. I'm using: cvs -z3 -d :pserver:mailto:anonymous@openacs.org:/cvsroot co openacs-4

It was my understanding that this would get everything including latest core - is that correct?

Collapse
Posted by Brad Ford on
Ok, reinstalled a couple of more times. If I use mailto:x@whatever.com and x as the user name - no probs. If I use mailto:x@whatever.com and xy - that gets the above errors (actually I used mailto:lars@pinds.com and lars/larsRules...). This evening I'll have more time to go through the above instructions and check out error logs and whatnot. In the meantime - any comments on my cvs checkout script above?
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?

Collapse
Posted by Lars Pind on
I think you've nailed it, Brad. Thanks so much for tracking this down.

I've committed a few fixes that I think solves it, but please update acs-tcl and acs-authentication and test again.

If this problem still shows up, please post a bug report with a link to this forums posting, so we can make sure we track it.

/Lars

Collapse
Posted by Brad Ford on
Thanks Lars - I updated those pacakages again, restarted et voila! All fixed.
Collapse
Posted by Tom Jackson on
Lars, I know I could dig through the code, but what was the fix? Are mixed case usernames allowed, or not?
Collapse
Posted by Brad Ford on
Hi Tom,

I don't know what code exactly was fixed but mixed case logins definitely work now - to test, I just updated the packages that lars committed and tried with same combos above. No problems now.

Collapse
Posted by Lars Pind on
Tom, mixed case usernames are allowed, but we treat them case-insensitive, meaning you cannot have two users with the same username except for case, and we don't care in which case you enter it. However, we do store it with the case with which you entered it.

Hm. Just now I'm realizing that when passing the username on to the authentication driver, we use the case the user entered when logging in, not when registering, which may be a problem with authentication services that happen to be case-sensitive.

/Lars