We use LDAP users to install oracle software. In my humble opinion, it’s not a good approach because if the server can not communicate with LDAP service, Oracle gets errors when spawning new processes. We have already started to switch our oracle users from LDAP authentication to local users, but this is not the subject of this blog post. Using LDAP for authentication, also affects Enterprise Manager agents. When I try to create a named credential, EM agent can not verify the user/password, although I used the same user/password information to deploy the agents 🙂
Here’s the log generated by the agent:
1 2 3 4 5 6 7 8 9 |
[164049:8DB30DFF] INFO - >>> Reporting exception: oracle.sysman.emSDK.agent.client.exception.PerformOperationException: ERROR: Invalid username and/or password LOG: Local Authentication Failed...Attempt PAM authentication... PAM failed with error: Authentication failure (request id 1) <<< oracle.sysman.emSDK.agent.client.exception.PerformOperationException: ERROR: Invalid username and/or password LOG: Local Authentication Failed...Attempt PAM authentication... PAM failed with error: Authentication failure |
The solution is well documented on My Oracle Support: How to Configure the Enterprise Management Agent Host Credentials for PAM and LDAP (Doc ID 422073.1)
In short, you need to create a file under /etc/pam.d directory named emagent i.e /etc/pam.d/emagent, and enter the following configuration lines into it:
1 2 3 4 5 |
#%PAM-1.0 auth required pam_ldap.so account required pam_ldap.so password required pam_ldap.so session required pam_ldap.so |
I know that My Oracle Support is the most reliable source, but I decided to go my way! So instead of creating a new file containing the above configuration rules, I copied a working pam.d configuration file (/etc/pam.d/sshd) to “/etc/pam.d/emagent”. After I copied the configuration file, LDAP authentication started to working fine (no agent restart required on “Red Hat Enterprise Linux Server release 5.7 (Tikanga)”.
Matthew Garrett
Srinivas
Neha Agarwal
Aamir Haroon
PRABHU RANGANATHAN