Administrator password

Is there a way to reset the Administrator password from the console command line while logged on as root? I do not have the Administrator password for the web interface but I can log onto the console as root.

Hi,

You can run “reset_password” from the console to reset your admin password. It should prompt you for a tenant name (which is just “root” if you don’t have multi-tenancy enabled) and a new password.

Regards,

Jordan

[root@cristie-va-dr ~]# reset_password

======================================================================

Cristie Virtual Appliance

This utility will reset the password for a specified account.
You can exit at any point by pressing Ctrl + C.

======================================================================

Please enter the tenant name: root
Character set ‘utf8’ is not a compiled character set and is not specified in the ‘/usr/share/mysql/charsets/Index.xml’ file
Traceback (most recent call last):
File “/usr/sbin/reset_password”, line 109, in
sys.exit(main())
File “/usr/sbin/reset_password”, line 94, in main
tenant_id = prompt_for_tenant()
File “/usr/sbin/reset_password”, line 17, in prompt_for_tenant
tenant_query = query(‘SELECT Id FROM Tenants WHERE Name=%s’, [tenant])
File “/usr/sbin/reset_password”, line 62, in query
conn = connect_db()
File “/usr/sbin/reset_password”, line 53, in connect_db
return connect(
File “/usr/local/lib64/python3.8/site-packages/MySQLdb/init.py”, line 84, in Connect
return Connection(*args, **kwargs)
File “/usr/local/lib64/python3.8/site-packages/MySQLdb/connections.py”, line 179, in init
super(Connection, self).init(*args, **kwargs2)
MySQLdb._exceptions.OperationalError: (2019, “Can’t initialize character set utf8 (path: /usr/share/mysql/charsets/)”)

That issue should be fixed by an update - if you do “yum update -y && restart_services” from the console then try again you will be able to reset your password.

My apologies, I had to break all the links in the following message or I couldn’t post it.

[root@cristie-va-dr ~]# yum update -y && restart_services
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
CentOS-7.6-Extras | 2.9 kB 00:00:00
CentOS-7.6-OS | 2.9 kB 00:00:00
CentOS-7.6-Updates | 2.9 kB 00:00:00
https ://nexus.cristie.com/repository/CentOS-7-EPEL-x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden
Trying other mirror.
To address this issue please refer to the below wiki article

https ://wiki.centos.org/yum-errors

If above article doesn’t help to resolve this issue please use https ://bugs.centos.org/.

CentOS-7.7-Extras | 2.9 kB 00:00:00
Not using downloaded CentOS-7.7-Extras/repomd.xml because it is older than what we have:
** Current : Tue Oct 4 17:24:53 2022**
** Downloaded: Mon Feb 22 16:55:24 2021**
CentOS-7.7-OS | 2.9 kB 00:00:00
CentOS-7.7-Storage | 2.9 kB 00:00:00
CentOS-7.7-Updates | 2.9 kB 00:00:00
Not using downloaded CentOS-7.7-Updates/repomd.xml because it is older than what we have:
** Current : Tue Oct 25 16:57:55 2022**
** Downloaded: Mon Feb 22 16:55:24 2021**
https ://nexus.cristie.com/repository/Docker-CE/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden
Trying other mirror.
https ://nexus.cristie.com/repository/kube/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden
Trying other mirror.
https ://nexus.cristie.com/repository/appliance_maintenance/repodata/repomd.xml: [Errno 14] HTTPS Error 403 - Forbidden
Trying other mirror.
cristie-bmr | 2.9 kB 00:00:00
Not using downloaded cristie-bmr/repomd.xml because it is older than what we have:
** Current : Mon Oct 31 14:01:21 2022**
** Downloaded: Mon Feb 3 12:08:05 2020**
No packages marked for update
=========================================================

Cristie Virtual Appliance 4.5.2-1656 (10.64.10.72)

=========================================================

Can you please remove all entries in /etc/yum.repos.d/cristie.repo and replace the contents with:

[cristie]
name=Cristie
baseurl=https://source.cristie.com/appliance/v3
gpgcheck=0
metadata_expire=1m
enabled=1

This should allow you to run the upgrade.

This worked to get the upgrade to run…

Complete!

Cristie Virtual Appliance 4.7.2-1779 (10.64.10.72)

=========================================================

but problem with the reset_password command remains…

[root@cristie-va-dr ~]# reset_password

======================================================================

Cristie Virtual Appliance

This utility will reset the password for a specified account.
You can exit at any point by pressing Ctrl + C.

======================================================================

Please enter the tenant name: root
Character set ‘utf8’ is not a compiled character set and is not specified in the ‘/usr/share/mysql/charsets/Index.xml’ file
Traceback (most recent call last):
File “/usr/sbin/reset_password”, line 109, in
sys.exit(main())
File “/usr/sbin/reset_password”, line 94, in main
tenant_id = prompt_for_tenant()
File “/usr/sbin/reset_password”, line 17, in prompt_for_tenant
tenant_query = query(‘SELECT Id FROM Tenants WHERE Name=%s’, [tenant])
File “/usr/sbin/reset_password”, line 62, in query
conn = connect_db()
File “/usr/sbin/reset_password”, line 53, in connect_db
return connect(
File “/usr/local/lib64/python3.8/site-packages/MySQLdb/init.py”, line 84, in Connect
return Connection(*args, **kwargs)
File “/usr/local/lib64/python3.8/site-packages/MySQLdb/connections.py”, line 179, in init
super(Connection, self).init(*args, **kwargs2)
MySQLdb._exceptions.OperationalError: (2019, “Can’t initialize character set utf8 (path: /usr/share/mysql/charsets/)”)

Unfortunately, the upgrade appears to have killed the appliance. I attempted to reboot but it no longer boots. It fails to start Switch-Root.

I was able to get past the Switch_Root boot issue but still have the same issue attempting to change the Administrator password. Oh well.

Can you please raise a support ticket for this issue?

Thanks for all your help with this issue. I really appreciate it.