CNS Server Password Reset

Hi,

How to reset the password for the CNS Server?

Thanks,
Mark

Hi Mark,

After logging in to CNSS as ‘admin’, navigate to Admin -> Users (running man icon on left menu bar). From here you can edit passwords, user names, user groups and add/delete users directly like a spreadsheet. After making your changes click the Save icon or use the right click menu to save.

If the admin user has been deleted or the password has been lost you can use a recovery script to reset the users and server configuration. The recovery script is located in <install_directory>/scripts From the Documentation link at the bottom of CNSS:

Recovery Script
A recovery script is provided to either reset the admin account login and credentials to defaults (admin/admin) or to reset the configuration settings back to default. When setting the configuration settings back to default the admin account is also set back to default.

To reset the server back to default settings run the following command depending on the operating system being used:
Windows: reset_cnss.bat
Linux: reset_cnss.sh

For example, to reset the admin account credentials on a Linux system with defaults used during installation the following command would be used: reset_cnss.bat admin postgres cnss.</install_directory>

Jordan: It is asking me for my Postgres password, so apparently there’s one of those involved somewhere. I would just reset it, but I assume that would break CNS.

Mike,

If you didn’t change the default used during installation, the password is ‘postgres’. You will need to type this about 6 times if you use the ‘all’ option and once for the ‘admin’ option. You may want to temporarily alter a Postgres setting so you can skip typing the password.

From the documentation:

When running the restore_database and initialize_database scripts you will be promoted several times to enter the postres password. This can be avoided by updating the /stack/postgresql/data/pg_hba.conf file add adding the following line: “host all postgres 127.0.0.1/32 trust”. The postgres services will need to be restarted for this setting to take affect.

Postgres can be restarted by using the GUI tool in <install_dir>/stack/manager-windows.exe. It has a slightly different name in Linux. Change the setting back after running the scrip and restart Postgres again to improve security.</install_dir>

Now what does the stock pg_hba.conf look like? I had mucked around before I saw your post, so I’d like to make sure it is proper.

Sorry for the delay. I thought I would have been e-mailed when there was a followup post, but alas I was not.

The stock pg_hba.conf file after a CNS 1.2 install is pasted below. Comments at the top of the file have been skipped.



# TYPE DATABASE USER ADDRESS METHOD

# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#host replication postgres 127.0.0.1/32 md5
#host replication postgres ::1/128 md5