LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (http://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   [CentOS] Unable to login: libpam.so.0 not found (http://www.linuxquestions.org/questions/linux-enterprise-47/%5Bcentos%5D-unable-to-login-libpam-so-0-not-found-937924/)

chekhov_neo 04-03-2012 11:37 AM

[CentOS] Unable to login: libpam.so.0 not found
 
Hello,

I accidentally removed some important packages while trying to upgrade openSSL in a CentOS enterprise server and now I'm unable to login. Even trying to login as root doesn't work. I'm getting the following error while trying to login:

Code:

error while loading shared libraries: libpam.so.0: cannot open shared object file: No such file or directory
Is it possible to solve this issue without re-installing the OS? I tried to boot using a CentOS livecd iso on an USB stick and it threw the following error while booting:

Code:

-----------------------------------------------
WARNING: Cannot find root file system!
-----------------------------------------------

Create symlink /dev/root and then exit this shell to continue the boot sequence.

bash-3.2#

I tried creating the symbolic link using the command:

Code:

ln -s /dev/sda /dev/root
This too didn't work.

I'm in a pickle. :( Please help! Thanks!

lithos 04-03-2012 12:01 PM

Hi,

What I would suggest you is to run off the installation DVD of your system CentOS
and choose "Rescue" at startup (not installation).

Here is the first "guide"
another here and Basic system recovery.
Boot from LiveCD here.

Then hopefully it will mount you your drive partition and you could copy the missing libs where you need.

I don't know how to manually mount drive from rescue mode, that I will leave to more experienced users at this forum.

But it could be the way to rescue your system.



good luck

chekhov_neo 04-03-2012 12:57 PM

Quote:

Originally Posted by lithos (Post 4643793)
Hi,

What I would suggest you is to run off the installation DVD of your system CentOS
and choose "Rescue" at startup (not installation).

Here is the first "guide"
another here and Basic system recovery.
Boot from LiveCD here.

Then hopefully it will mount you your drive partition and you could copy the missing libs where you need.

I don't know how to manually mount drive from rescue mode, that I will leave to more experienced users at this forum.

But it could be the way to rescue your system.



good luck

Thank you for your response! Let me go through the useful links that you have provided.

chekhov_neo 04-03-2012 07:35 PM

Problem Solved!
 
Hi Lithos,

Thank you very much for the useful links! I managed to login to the server in single user mode and fixed the issue by placing the required library files in the /lib64 folder. I had copied the files from another similar server. Now I'm able to login to the server! Learned a couple of things in the process. :)

The reason I got into the mess in the first place was I tried to uninstall openssl using "yum remove" command which unfortunately removed the dependencies too! I need to be careful in the future.

Regards,
chekhov_neo

lithos 04-04-2012 01:52 AM

That's great and thanks for reporting back the solution.

Best regards.


All times are GMT -5. The time now is 04:26 PM.