upgrade to otrs 6.0.30, cannot login as root@localhost

Moderator: crythias

Post Reply
ritacc
Znuny newbie
Posts: 6
Joined: 05 Feb 2021, 00:47
Znuny Version: 6.0.30
Real Name: Rita Chen

upgrade to otrs 6.0.30, cannot login as root@localhost

Post by ritacc »

Background: We have a production otrs 6.0.6, and now we want to upgrade to otrs 6.0.30. Since the document says “You can update directly from any previous to the latest available patch level release.” (https://doc.otrs.com/doc/manual/admin/6 ... ating.html) I assume there is no database structure change from 6.0.6 to 6.0.30. So my strategy is to install otrs 6.0.30 directly on a test virtual machine (https://doc.otrs.com/doc/manual/admin/6 ... -otrs.html), import the database from production 6.0.6 using backup.pl and restore using restore.pl (https://doc.otrs.com/doc/manual/admin/6 ... store.html).

Here are some issues that I have:
a) When I first create an empty database in <ip>/otrs/installer.pl, I can then login as root@localhost. However, after I restore the production database in the test virtual machine, I cannot login as root@localhost. I tried setting password using command. I also reset the mysql database root password. Neither of them works if I want to login the otrs database.
su -c "/opt/otrs/bin/otrs.Console.pl Admin::User::SetPassword root@localhost 12345" -s /bin/bash otrs
b) Our OTRS is configure to use ldap. I can login using my ldap username and password. But the thing is that I do not have “Admin” permission in the otrs website, so that I cannot make changes. And if I go back to <ip> /otrs/installer.pl, it asks me to turn off the SecureMode in the SysConfig. Since I cannot login as root@localost, and my account doesn’t have admin interface, I cannot re-run the installer.pl and reset root password. Is there a way to add my user as admin using command line? Or how can I be able to login as root@localhost?
c) When I login as my account, there re only “open tickets” that being imported from the production server, but there’s no new tickets or any previous tickets I can search. The otrs database size is about the same as the production database, I don’t know why I cannot find all previous tickets.
d) Does this strategy (install 6.0.30 and import database) work? Or do I have to install 6.0.6 on the test machine, and upgrade it to 6.0.30, then import database?

Thanks for taking your time to read this.
Any suggestion will be greatly appreciated!
Thanks!
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: upgrade to otrs 6.0.30, cannot login as root@localhost

Post by root »

Hi,

What type of database and version do you use?

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: upgrade to otrs 6.0.30, cannot login as root@localhost

Post by reneeb »

Can you login as root@localhost in your production environment? If so, did you use the same credentials on your new environment as you did on the production environment?

Is the root@localhost user invalid?
Is LDAP the only authentication backend?
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
skullz
Znuny superhero
Posts: 618
Joined: 24 Feb 2012, 03:58
Znuny Version: LTS and Features
Real Name: Mo Azfar
Location: Kuala Lumpur, MY
Contact:

Re: upgrade to otrs 6.0.30, cannot login as root@localhost

Post by skullz »

a) Since you are restoring, that means all the data from production will be copy into test server.
Current data in the test server will be gone.
Hence, you have to use whatever user/passw combination that work on your production at test server.

b) Alternatively, you can add the user to the admin group

Code: Select all

otrs@shell > bin/otrs.Console.pl Admin::Group::UserLink
c) try to delete cache via otrs.Console.pl

d) Normally, i will do,

- install 6.0.6 on test server
- backup.pl from production and transfer it to test server
- restore.pl on test server (you should have exact version as production)
- upgrade to latest 6.0.x

good luck
ritacc
Znuny newbie
Posts: 6
Joined: 05 Feb 2021, 00:47
Znuny Version: 6.0.30
Real Name: Rita Chen

Re: upgrade to otrs 6.0.30, cannot login as root@localhost

Post by ritacc »

Hi Roy,
I installed mysql 5.7.32

Thanks,
Rita
root wrote: 12 Feb 2021, 08:24 Hi,

What type of database and version do you use?

- Roy
ritacc
Znuny newbie
Posts: 6
Joined: 05 Feb 2021, 00:47
Znuny Version: 6.0.30
Real Name: Rita Chen

Re: upgrade to otrs 6.0.30, cannot login as root@localhost

Post by ritacc »

Hello again,
The good news is that when I login as my ldap username, I am the admin now, and I can see the open ticket and all the previous tickets. Everything seems to work now, except that I still cannot login as root@localhost.

But the thing is that I haven't changed anything about the server, and one week later the problem is solved.
I really want to know why this can happen. Maybe it's related to this "delete cache via otrs.Console.pl"? Can the cache be deleted by the system regularly and automatically?

Also, I tried reset root password using otrs user:
/opt/otrs/bin/otrs.Console.pl Admin::User::SetPassword root@localhost 12345
It shows "Successfully set password for user 'root@localhost'." but I still cannot login on otrs login page. But I guess it becomes a minor issue, because my ldap user has admin right in otrs.

Any suggestion that help me better understand this system will be greatly appreciated!

Thanks,
Rita

skullz wrote: 13 Feb 2021, 09:49 a) Since you are restoring, that means all the data from production will be copy into test server.
Current data in the test server will be gone.
Hence, you have to use whatever user/passw combination that work on your production at test server.

b) Alternatively, you can add the user to the admin group

Code: Select all

otrs@shell > bin/otrs.Console.pl Admin::Group::UserLink
c) try to delete cache via otrs.Console.pl

d) Normally, i will do,

- install 6.0.6 on test server
- backup.pl from production and transfer it to test server
- restore.pl on test server (you should have exact version as production)
- upgrade to latest 6.0.x

good luck
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: upgrade to otrs 6.0.30, cannot login as root@localhost

Post by crythias »

If your Config.pm shows that the AuthModule is LDAP, then it won't use database for Auth.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Post Reply