Linux - Cannot login from remote console but can access via ssh

Linux - Cannot login from remote console but can access via ssh

 
If you are not able to access your Linux machine through it's remote console, you can give the below solution a try.

Symptom :
Not able to login to a Linux machine via remote console despict login credential used is valid.
Login via ssh is successful using the same login credential.

Troubleshooting Procedure:

1.  Login via ssh and monitor /var/log/secure live.
=====================================================================
#tail -f /var/log/secure
=====================================================================

2. Try to login from remote console while monitoring /var/log/secure for error.

3. Check if you find errors such as below.
=====================================================================
Mar  1 09:24:27 linuxmachine login: PAM unable to dlopen(/lib/security/pam_limits.so)
Mar  1 09:24:27 linuxmachine login: PAM [error: /lib/security/pam_limits.so: wrong ELF class: ELFCLASS32]
Mar  1 09:24:27 linuxmachine login: PAM adding faulty module: /lib/security/pam_limits.so
=====================================================================

4. If you find errors such as above, most likely your /etc/pam.d/login file is pointing to a faulty module. Check file /etc/pam.d/login for line below.
=====================================================================
session    required   /lib/security/pam_limits.so
=====================================================================

5. If you found it, try to replace the line with the below.
=====================================================================
session    required   /lib64/security/pam_limits.so
=====================================================================

6. Once done, try to login via remote console. If it is still not working, there might be other issue causing it. You will need to troubleshoot further. Check /var/log/secure for hint.
5 (1)
Article Rating (1 Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
How to find your System details using inxi
Viewed 4487 times since Sat, Jun 2, 2018
HowTo: Send Email from an SMTP Server using the Command Line
Viewed 3166 times since Mon, Feb 18, 2019
Jak ustawić LVM, jak robić snapshoty oraz automatycznie powiększać LV, czyli małe howto
Viewed 5733 times since Sun, May 20, 2018
Tilix: Advanced Tiling Terminal Emulator for Power Users
Viewed 8309 times since Thu, Apr 18, 2019
OEL 7 – How to disable IPv6 on Oracle Linux 7 – Follow Up
Viewed 10554 times since Wed, Jul 25, 2018
LVM: Extend SWAP size by growing existing Logical Volume
Viewed 3349 times since Sat, Jun 2, 2018
Enabling or disabling a repository using Red Hat Subscription Management
Viewed 13973 times since Mon, Oct 29, 2018
ubuntu How to reset lost root password on Ubuntu 16.04 Xenial Xerus Linux
Viewed 9339 times since Tue, Dec 8, 2020
ZPOOL: Verify/change properties of a zpool
Viewed 2832 times since Sun, Jun 3, 2018
LUKS List available methods of encryption for LUKS
Viewed 3802 times since Fri, Jul 13, 2018