Unable to log in using admin

Hi 

Just wondering if someone could help me. I have been unable to login to our usual admin on openvpms. It still allows basic login but not admin. Just wondering what may have caused this and how I can fix it.
Thanks for your help

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Unable to log in using admin

Is this simply as password problem - ie do you get "User name or password is incorrect" when you try to login as admin ?

If so then it is possible to use a MySQL query to find out the admin password. On Windows, open a Command prompt and do as follows:

ie start the mysql client using
   mysql -u openvpms -popenvpms openvpms

[yes it is correct that there is a space after the -u but not after the -p.  This says that the user is openvpms, the password is openvpms and the database name is openvpms]

then enter
     select * from users where user_name = 'admin';

[the trailing semicolon is necessary, otherwise mysql expects the entry to continue on the next line]

For obvious reasons, I have blurred the password on my system.

Regards, Tim G

Re: Unable to log in using admin

I will give this a try but no one has been able to manually change the password it has always been the same and then stopped working it does say incorrect username or password though I was thinking somehow it may have been deleted? 

Re: Unable to log in using admin

To confirm - you can login as other users and the only problem is that you cannot login as admin.

If this is correct, then it would be worth running the mysql session to look at the password for admin.

Next question: it is not only the user named 'admin' who can get at the Administration menu.  Do you have users who has been set as administrators and can see the Administration menu?  If so, they should be able to use Administration|Users to change the password of user 'admin'.  [And this is possibly what happened - ie some user with admin privileges, by error changed the password for the user admin. Alternatively they could have de-activated admin.]

Regards, Tim G

Re: Unable to log in using admin

This is what has come up but I still can't log in using admin? 

We don't have any other users with admin privaledges 

any ideas?

Thanks

AttachmentSize
login.JPG 96.07 KB

Re: Unable to log in using admin

OK - from the jpg we know that admin's user_id is 53 so we can now look at whether he is in fact active, so lets use mysql again and use the query:

select name,active+10 entities where entity_id = 53;

This will show something like (in my system admin is user_id 154)

The active value is in fact a single bit which is 0 or 1 (boolean false or true), and the "active+10" forces mysql to convert it to a number so it is printable - so the 11 means that the value is 1 - ie true.

[By the way - I assue that the password for admin that you blurred in your jpg is quite readable and makes sense to you - ie it is set to admin1234 or freddy42 or something that seems familiar - ie it is real characters that you can type.]

It the above shows that 'active+10' is actually 10 on your system then somehow the user admin has been deactivated.

We can set it back to active using the sql:

update entities set active=1 where entity_id=53;

Note that I checked on my system that de-activating the admin user gives you the same error as though you had typed in the wrong password - ie

Regards, Tim G

Syndicate content