Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
(which really means - all files inside /lib/ got moved to /local/)
.. and now I CANNOT get into the box. 'Access Denied' as a root or a regular user. However, I still have the currently running SSH session, which doesn't let me do much - except for cd, pwd, echo and couple other basic commands (no cp, mv, ls etc). Can't sudo either (not that it would help much). Please advise! I don't have physical access to this box; it's few hundred miles away. RHEL 5. Thanks!!!
One of the libraries that you have renamed is the PAM library. Without the PAM library being available then nobody will be able to pass through security, remote, local, or otherwise.
If the point of this question is to find out how to login remotely without knowing the password then you are out of luck.
What do you mean by saying 'without knowing the password'? If PAM is a library that's been renamed (moved), where and how do I put in the password? The machine responds to ping, accepts SSH connections, asks for login and password, and goes 'Access Denied' -- even to root!
If you still have that valid SSH connection that enabled you to move everything from the /lib/ directory to /local/ then do the reverse by COPYING everything from /local/ to /lib/ - you will have a lot of duplicate files, but at least both /lib and /local will serve their purpose properly. If your system becomes reliable again, then start sorting out what belongs where.
If your SSH connection breaks or is timed out, then you will have to travel a few hundred miles.
If you still have that valid SSH connection that enabled you to move everything from the /lib/ directory to /local/ then do the reverse by COPYING everything from /local/ to /lib/ - you will have a lot of duplicate files, but at least both /lib and /local will serve their purpose properly. If your system becomes reliable again, then start sorting out what belongs where.
If your SSH connection breaks or is timed out, then you will have to travel a few hundred miles.
Yes, but how do I copy? The CP command doesn't work!!
Can't you mount the partition from another machine? I imagine that there isn't much you can in this case except accessing the drive and doing repairs from some external location.
You can run mv, cp , etc as following:
/usr/lib/local/ld-linux.so.2 --library-path /usr/lib/local /bin/cp args
Valery
Sorry - I was away from my machine for few days. Yes it worked on my test machine (when I was logged in as root); but on the production box that I did mv earlier, I had sudo'ed to root and had done mv; so the command didn't work with my permissions when I tried to move the libraries back. I needed to either be logged on as root, or be able to sudo (where /usr/sbin/sudo wasn't recognized any longer due to missing libraries and dependencies).
Thank you for the help - regardless. You guys are great!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.