You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2020-05-19 18:40:06

hAry2
Member
Registered: 2020-04-06
Posts: 10

(Solved) Login unsuccessful for GLPI user [9.4.5]

Hello.

I have a GLPI instance running, where I haven't touched it for a while.
Then when I tried to login to my admin account, it didn't have the administrative rights anymore.
I then proceeded to try and login to the GLPI user (This is not disabled), but here I just get told I use the wrong password.

Confused about this, I proceeded to look at how to reset the password for the GLPI user in the database, and I have found these two up until now:
forum.glpi-project.org/viewtopic.php?id=12725
techexpert.tips/glpi/glpi-password-recovery/

Neither of these have worked out for me, and I am now a little stuck.
I need to get back into the server, but I am a bit lost on how.
Any help is very appreciated.

Thanks.

Last edited by hAry2 (2020-05-20 16:53:51)

Offline

#2 2020-05-19 20:38:16

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,167

Re: (Solved) Login unsuccessful for GLPI user [9.4.5]

with glpi 9.4 :

update glpi_users set `password`='$2y$10$rXXzbc2ShaiCldwkw4AZL.n.9QSH7c0c9XJAyyjrbL9BwmWditAYm' where `id`='2'

will reset password to glpi for user glpi


Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6

Offline

#3 2020-05-20 08:39:56

hAry2
Member
Registered: 2020-04-06
Posts: 10

Re: (Solved) Login unsuccessful for GLPI user [9.4.5]

There is no user in that table with the ID specified.
As a matter of fact, when I run the following in mariadb the entire table starts at ID: 473
select id,name,password from glpi_users;

I use LDAP, hence so many users. I do however have a user in LDAP called GLPI as well. Is that able to screw anything over. I cannot see any other GLPI default users in the database either.

Offline

#4 2020-05-20 09:12:07

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,167

Re: (Solved) Login unsuccessful for GLPI user [9.4.5]

INSERT INTO `glpi_users` (`id`, `name`, `password`, `list_limit`, `authtype`, `last_login`, `date_mod`)
   VALUES ('2','glpi','$2y$10$rXXzbc2ShaiCldwkw4AZL.n.9QSH7c0c9XJAyyjrbL9BwmWditAYm','20','1','2014-06-18 08:02:24','2014-06-18 08:02:24');


Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6

Offline

#5 2020-05-20 09:15:07

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,167

Re: (Solved) Login unsuccessful for GLPI user [9.4.5]

if glpi user has no profile then :

INSERT INTO `glpi_profiles_users` VALUES ('2','2','4','0','1','0');


Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6

Offline

#6 2020-05-20 15:01:21

hAry2
Member
Registered: 2020-04-06
Posts: 10

Re: (Solved) Login unsuccessful for GLPI user [9.4.5]

That kinda did the job.
I don't know how or why all of this happened in the first place, but running the SQL lines in your two replies did add the GLPI user again. I did though restore from an old backup I had lying around since all the other standard users were also missing, and somehow the permissions had fucked up as well.

Thank you for the help nonetheless.

Offline

Board footer

Powered by FluxBB