Find the answer to your Linux question:
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 ...
  1. #1
    Just Joined!
    Join Date
    Oct 2006
    Location
    France
    Posts
    2

    Question 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:

    Code:
    $ ssh jessy
    -bash: xmalloc: ../../bash/builtins/evalfile.c:128: cannot allocate 2343 bytes (0 bytes allocated)
    Connection to jessy closed.
    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.

    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.

  2. #2
    Just Joined!
    Join Date
    Oct 2006
    Location
    France
    Posts
    2

    Smile

    That's ok, I've been able to use su -c using a basic user account to move the broken file:

    Code:
    $ su -c 'mv /home/john/.bashrc /home/john/.bashrc.bak'
    And now I can log in. Thank you for your help!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •