Appendix F - Resetting Root Password or MFA

Learn how to reset a root password or multi-factor authentication.
The reset method depends on whether you have SSH access to the N2WS instance and what is your version of N2WS:
  • If you have SSH access to the N2WS instance and are running version 4.2 and above, see section F.1.
  • If you do not have SSH access to the instance or are running an older version, see section F.2.

F.1 Resetting Root Password if SSH and Version 4.2 or Later

N2WS Login Reset Utility n2ws-reset-login:
usage: n2ws-reset-login.pyc [-h] [-u USER] [-a] [-p] [-m] [-y]
Reset login credentials and/or MFA for specific/all users.
optional arguments:
-h, --help show this help message and exit
-u USER, --user USER apply for specific user (name)
-a, --all apply for all users
-p, --password password to set
-m, --mfa disable MFA
-y, --yes auto confirm
To reset login credentials and/or MFA for specific or all users:
  1. 1.
    Connect to N2WS instance via SSH with user 'cpmuser' and your SSH key.
  2. 2.
    Switch to root: ‘sudo su’.
  3. 3.
    To see options for using the utility to resent the password or MFA, type ‘n2s-reset-login’.
4. Disable the root user MFA without changing the password:
n2ws-reset-login -u <root_user_name> -m -y
5. Disable the root user MFA and reset the password:
n2ws-reset-login -u <root_user_name> -m -y -p
6. Enter password and confirmation entry.
7. Reset MFA if relevant.

F.2 Resetting Root Password if no SSH and Version 4.1 or Earlier

If you don’t have SSH access, perhaps because the key is lost, or if you just need to recover your password and disable the MFA, redeploy the instance as follows:
If you know the root/admin username:
Make sure there are no backups or DR in progress.
  1. 1.
    Follow the upgrade procedure in the N2WS User Guide at https://docs.n2ws.com/user-guide/#1-4-upgrading-n-2-ws.
  2. 2.
    When configuring the new instance, use the old username of the root/admin (important!) and the new password.
  3. 3.
    After the new CPM is launched, apply any necessary patches to make sure it’s up-to-date with the latest fixes and features: https://support.n2ws.com/portal/en/kb/articles/release-notes-for-the-latest-v4-1-x-cpm-release​
If you don’t know the root/admin username:
Make sure there are no backups or DR in progress.
  1. 1.
    Follow the upgrade procedure in the N2WS User Guide at https://docs.n2ws.com/user-guide/#1-4-upgrading-n-2-ws.
  2. 2.
    During the “upgrade” process, type the username you think it is and the new password.
  3. 3.
    If you typed the wrong root username, N2WS will assume you forgot it and will create a file on the server, '/tmp/username_reminder', containing the old username.
    1. 1.
      To view this file, connect to the N2WS server using SSH as ‘cpmuser’.
    2. 2.
      Now you will be able to use the older username with the new password.
  4. 4.
    After the new CPM is launched, apply any necessary patches to make sure it’s up-to-date with the latest fixes and features: https://support.n2ws.com/portal/en/kb/articles/release-notes-for-the-latest-v4-1-x-cpm-release​