RSA Product/Service Type: Authentication Manager
RSA Version/Condition: 8.x
O/S Version: SUSE
Create a read-only PostgreSQL database user, connect to the RSA Authentication Manager database using the psql command-line client on the appliance, execute SELECT queries, and export query results to a file.
ℹ️ NOTE: This procedure applies only to the primary Authentication Manager server. Replica servers are not supported for this procedure.
⚠️ CAUTION: This procedure is intended for read-only database access only. Do not execute INSERT, UPDATE, DELETE, CREATE, ALTER, DROP, or any other commands that modify the database. Unauthorized database changes can result in system instability, data corruption, and may affect RSA Support's ability to assist with the deployment.
Prerequisites
Before starting, ensure that all of the following requirements are met:
- SSH is enabled on the Authentication Manager primary appliance.
- You have the
rsaadminoperating system account credentials (username and OS password). - You have the Operations Console (OC) administrator username and password.
-
No additional SQL client software is required. The
psqlclient is pre-installed on the appliance at:/opt/rsa/am/pgsql/bin/
| Task | Tool | Key Detail |
| Task 1: Create a Read-Only Database User | rsautil CLI | Required before any database connection |
| Task 2: Connect and Run an Inline Query | psql CLI | Results displayed on screen |
| Task 3: Run a Query and Output to a File | psql CLI | Results saved to .csv at /opt/rsa/am/pgsql/bin |
| Task 4: Run a Query from a SQL File | psql CLI | SQL stored in an external .sql file |
| Task 5: Run an Interactive psql Session | psql CLI | Enter queries directly at the db=> prompt |
Task 1: Create a Read-Only Database User
cd /opt/rsa/am/utils
./rsautil manage-readonly-dbusers -a create -o <oc-admin-username> -u <read-only-username> -i <IP address where SSH is enabled>
Enter Operations Console (OC) password: <enter OC admin password>
Enter password for the read-only database user: <enter password>
Confirm password for the read-only database user: <confirm password>
Executing action: 'create'.
Trusted Root SSL CA certificate was copied in file '/opt/rsa/am/utils/RSAAMTrustedRootSSLCA.crt'.
'create' action complete.
RSAAMTrustedRootSSLCA.crt) has been copied to /opt/rsa/am/utils. You will need this file if connecting to the database from a remote client. See the Notes section for details.'create' action complete. in the output before proceeding to any of the tasks below. Task 2: Connect and Run an Inline Query
cd /opt/rsa/am/pgsql/bin
./psql -h localhost -p 7050 -d db -U <read-only-username> -c 'SELECT name FROM am_host;'
Password for user <read-only-username>: <enter password>
name
------------------------------------
am-server-1.example.com
am-server-2.example.com
Task 3: Run a Query and Output to a File
cd /opt/rsa/am/pgsql/bin
-o option:
./psql -h localhost -p 7050 -d db -U <read-only-username> -o myfilename.csv -c 'SELECT name FROM am_host;'
-o option, there will be no output displayed on screen. The resulting file will be written to /opt/rsa/am/pgsql/bin./opt/rsa/am/pgsql/bin/myfilename.csv.Task 4: Run a Query from a SQL File
cd /opt/rsa/am/pgsql/bin
-f option:./psql -h localhost -p 7050 -d db -U <read-only-username> -f /path/to/mysqlquery.sql
Password for user <read-only-username>: <enter password>
Task 5: Run an Interactive psql Session
cd /opt/rsa/am/pgsql/bin
./psql -h localhost -p 7050 -d db -U <read-only-username>
db=> prompt, run a SELECT query:
db=> SELECT serial_number FROM rsa_rep.am_token;
db=> \q
\q.RSAAMTrustedRootSSLCA.crt) is automatically copied to /opt/rsa/am/utils. If you are connecting to the database from a remote client machine, transfer this file using SCP or SFTP, then configure it as a trusted root CA certificate in your SQL client. Refer to your SQL client documentation for instructions on importing trusted root certificates.SELECT statements. INSERT, UPDATE, DELETE, and DROP operations are not permitted. Do not attempt to use administrative database credentials for queries.Related Articles
Reporting Engine service is not running due to reportstatusmanager.h2.db corrupt 14Number of Views Authentication Manager Web Tier Offline After Hard Shutdown with "System Fingerprint Encrypted Key Is Missing" 1.59KNumber of Views RSA MFA Agent for Windows will not run due to error "This module is blocked from loading into the Local Security Authority" 848Number of Views RSA SecurID Hardware Appliance Component Updates 498Number of Views RSA-2026-02: RSA Announces Critical Security Updates - RSA Authentication Manager 163Number of Views
Trending Articles
RSA Authentication Manager 8.8 Setup and Configuration Guide RSA Authentication Manager 8.9 Release Notes (January 2026) Test connection fails from the RSA ID Plus Cloud Access Service and Identity Router to the SecurID Authentication Manager RSA SecurID software token .sdtid file fails to import into RSA SecurID Software Token 5.0 for Windows RSA Authentication Manager Upgrade Process