[SCP] Trigger Reinitialization of Google OTP on SCP
Issue Description
The customer enabled Google OTP for the admin password but their phone and email are having issues. The OTP needs to be disabled or reinitialized (via QR scan or secret key).
Handling Process
- SSH to the backend. As it is unable to enable the remote maintenance, go to SCP VM console with the username root.
- Enter MySQL and use Keystone Database.
Command:<code>cr=</code>crudini --get /sf/cfg/envpasswd.conf mysql platform_manage<code>; mysql_pwd=</code>python /sf/bin//encryption_tool.py --is_encrypt false --text $cr<code>; mysql -uroot -p${mysql_pwd}</code>use keystone

- Get the user ID for the admin account.
Command:select * from local_user where name='admin';

- Check the admin OTP policy.
Command:select * from sf_otp_verification where user_id='7ec0a0742de14618931f7db0fc8719ca'\G

- Delete the data for admin.
Command:delete from sf_otp_verification where user_id='7ec0a0742de14618931f7db0fc8719ca';

- Double check whether the data has been deleted. (using command from step 4)

- Login again and scan the QR code for the OTP.
Root Cause
The customer is unable to log in to the admin account due to issue with the phone.
Solution
Reset the OTP initialization from the backend.