![]() ![]() The line that follows checks if the current user is in the group postgres, if yes, the authentication process is considered successful and returns sufficient as a result. In the above configuration, the first line checks if the target user is postgres, if it is, the service checks the current user, otherwise, the default=1 line is skipped and the normal authentication steps are executed. auth pam_succeed_if.so user = postgresĪuth sufficient pam_succeed_if.so use_uid user ingroup postgres # vim /etc/pam.d/suĪdd the following configurations after “auth sufficient pam_rootok.so” as shown in the following screenshot. To allow users in a specific group to switch to another user account without a password, we can modify the default PAM settings for the su command in the /etc/pam.d/su file. PAM ( Pluggable authentication modules) are at the core of user authentication on modern Linux operating systems. You can use any of the two solutions provided below to solve the above issue. Any other user will be prompted to enter the password of the user account they are switching to (or if they are using the sudo command, they will be prompted to enter their password), if they don’t provide the correct password, they get an “ authentication failed” error as shown in the following screenshot. For example, we have a user account called postgres (the default PostgreSQL superuser system account), we want every user (typically our PostgreSQL database and system administrators) in the group called postgres to switch to the postgres account using the su command without entering a password.īy default, only the root user can switch to another user account without entering a password. In this guide, we will show how to switch to another or a specific user account without requiring a password. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |