Results 1 to 2 of 2
Hi
I'm new at Linux Forums, hello people
Here's the plot : I have a remote Devian server. I can't access it physically. After a serie of stupid manipulations I ...
- 10-19-2006 #1Just Joined!
- Join Date
- Oct 2006
- Location
- France
- Posts
- 2
Locked outside
Hi
I'm new at Linux Forums, hello people
Here's the plot : I have a remote Devian server. I can't access it physically. After a serie of stupid manipulations I came with an infinite loop in my .bashrc file. It loads itself because of a source .bashrc line.
When I try to connect to the server using SSH, I'm kicked out after ~15 seconds, with this message:
So the infinite loop makes bash run out of memory and I can't log in. This user account is the only one in the sudoers. And the same error happen when I try to log as root: its .bashrc file is a symlink to the broken one.Code:$ ssh jessy -bash: xmalloc: ../../bash/builtins/evalfile.c:128: cannot allocate 2343 bytes (0 bytes allocated) Connection to jessy closed.
I can log in using another user, but it is not in the sudoers so I can't access the broken .bashrc file with this user. I also tried su with this user, and it fails with Segmentation fault.
Is there a way to fix this issue without accessing physically the server? Maybe there's an option or a tool that allow to log in without calling .bash_profile?
Thank you for your time.
- 10-19-2006 #2Just Joined!
- Join Date
- Oct 2006
- Location
- France
- Posts
- 2
That's ok, I've been able to use su -c using a basic user account to move the broken file:
And now I can log in. Thank you for your help!Code:$ su -c 'mv /home/john/.bashrc /home/john/.bashrc.bak'


Reply With Quote
