Note: The configuration and instructions of Linux in this article have been tested on the CentOS 6.5 64-bit operating system. For other types and versions of the operating system, configuration may vary. Please refer to the official documentation for the details about relevant operating systems.
When using vnc or SSH to connect remotely and log in to the Linux VMs, you fail to log in, and the following error messages appear in the secure log:
login: Module is unknown.
login: PAM unable to dlopen(/lib/security/pam_limits.so): /lib/security/pam_limits.so: cannot open shared object file: No such file or directory.
Each PAM-enabled application program has a corresponding configuration file with the same name in the /etc/pam.d. For example, the configuration file of the login command is /etc/pam.d/login, and you can configure specific policies in the corresponding configuration file as follows:
File Function Description
/etc/pam.d/login Console (vnc) corresponding configuration file
/etc/pam.d/sshd Login corresponding configuration file
/etc/pam.d/system-auth System global configuration file
When a remote connect is logged in, some PAM-enabled applications fail to load the module, causing the failure of interaction between it and the login mode configured with corresponding policies. Here, the /etc/pam.d/sshd and /etc/pam.d/system-auth shall be mainly viewed. When there are errors in the /etc/pam.d/login configuration file logged by vnc, you shall restart the server to enter the single-user mode.
When it fails to log in via the servers's administrator account and password
Log in to the Linux VMs via vnc.
Execute the cat filename command to view the PAM configuration files, such as cat /etc/pam.d/login and cat /etc/pam.d/system-auth.
Check if the following configuration information exists in the configuration file, e.g., the following configuration information checked by /etc/pam.d/system-auth of this configuration file.
In this step, it should check if pam_limits.so is incorrectly placed in /lib/security, because the correct path to a 64-bit Linux system is /lib64/security.
session required /lib64/security/pam_limits.so # Modify to the correct path
If your problem still can not solved, please submit open ticket to us.