Good evening,

I have run into an issue where I am upgrading our osTicket from version 1.15.x to the latest 1.18.1. I got to the part where I have copied the /include folder to the /var/www/html location and I am redirected to the login page for our osTicket but my login credentials through AD no longer work, so I can't log in to run the Updater script. I'm at a loss.

I'm using PHP version 8.2. Ubuntu.

Thank you,

-klm

    spicehead-klm

    Yes, this is precisely why you need to have an admin account that’s not restricted to AD authentication and can login locally as well. If you do not have one login to the database, go to the _staff table, find your account, set backend to NULL, and if you don’t have a password you need to set one. Passwords are Bcrypt hashes with 8 round entropy. There are many sites online that can hash it for you.

    Cheers.

      KevinTheJedi Thank you for your response. I'm not very good at databases. I can get into the database and get to _staff but I don't know how to set the backend on my user account to NULL. I'm using the mariadb interface. Do you happen to have a link or two to any information on how to do what you're describing? Thank you so much.

        spicehead-klm

        You just run a simple UPDATE statement manually.

        UPDATE table_name SET column_name = value WHERE conditions;

        You would replace the table name, column name, value, and conditions with what you need.

        Cheers.

          KevinTheJedi Would it look something like this? I apologize for all of my questions. I'm really trying to learn and understand. Thank you for your patience.

          UPDATE ost_staff SET backend = NULL WHERE -insert first and last name- ldap;

            spicehead-klm

            Everything is good up until the WHERE conditions. You would want WHERE staff_id = your_id where “your_id” is your staff ID.

            Cheers.

              KevinTheJedi So it would look like: UPDATE ost_staff SET backend = NULL WHERE staff_id = 1

              Would this be the same for the password? UPDATE ost_staff SET passwd = 'PASSWORD' WHERE staff_id = 1 ?

              Do you happen to have a site where you describe being able to 'hash' the Bcrypt hashes with 8 round entropy? I tried searching for one but I get a lot of info on how long it would take to crack a password, etc.

                spicehead-klm

                Yes and yes however for the password query you would wrap the value in single or double quotes (ie. passwd = 'hashed_password').

                I don’t want to post a link as I don’t want to advertise 3rd party sites on here. It’s very simple though; just google “bcrypt hash generator”.

                Cheers.

                  KevinTheJedi Once I've done those two things, I should be able to log in to the portal using my username and newly created password? Thank you again for your help. I can't tell you how much I appreciate it.

                  EDIT: This is what I get when I type in the NULL line:

                  It doesn't seem to like it.

                    spicehead-klm

                    You are missing the trailing ; as shown in my example and referenced article in my previous reply. Every query has to end with a semi-colon.

                    Yes, once you run the two queries then you should be good to login.

                    Cheers.

                      KevinTheJedi I ended up going in a different direction and recovered our osTicket instance through a backup VM. Is there a way to create a local user within the osTicket Agent panel versus changing a user through the database?

                      For example, could I create a local user this way?

                      Thank you.

                      KevinTheJedi Thank you! I was able to create a 'local' admin user (instead of an 'ldap' admin user) and I double-checked that it said 'local' for that user in the database. Now when I upgrade the system, I should be fine to use the local account to get back in. Thanks for everything!

                      6 days later

                      KevinTheJedi I'm going to retry our osTicket upgrade today and I just had a follow up question. I have read that I should upgrade the plugins before running the upgrade script, is that correct? Will it wipe out the information so that I have to type it all in again or will the information in those plugins carry over to the new version? I hope that makes sense. Thank you.

                        spicehead-klm

                        Simply replace the existing plugin files on the server with the latest downloads; that’s all you need to do. It will keep configs; this is why you need latest plugins so the upgraders for those plugins can run and make sure the data is converted properly.

                        Cheers.

                          Write a Reply...