This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.
Can I change Authentication method for all users in Postgres?
How to change all users from one authentication method to another.
- BACKUP DATABASE before attempting the steps below
- Run script
This will show current users and the authentication methods used
This will show the output as below:
Look at the cfg_obj_id filed to get the value for each type of authentication.
In this example we can see
LDAP – 204
INTERNAL – 1
WEBSERVER – 2
We will need those values to alter the authentication method for the users
- Run script to update user authentication method
20-Update users auth method
Search for the line:
SELECT * FROM fpdb001_system.update_selected_users_to_new_authentication_method(1, 2, 'Commit');
This is where we are changing the authentication method.
In this example we are changing from 1 (INTERNAL) to 2 (WEBSERVER)
Change this value as applicable
Running Script to confirm change
1-list all users authentication methods
Restart Tomcat Service