Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-5655

bashrc stuck in loop for unclear reason

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Undefined Undefined
    • None
    • rhel-9.2.0
    • bash
    • None
    • Moderate
    • rhel-sst-cs-plumbers
    • ssg_core_services
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None

      We have a customer that is having an issue with their .bashrc looping.

      It appears that it may be treating the bash command in the .bashrc as a login shell when logging in via ssh, but not when logging in via other methods.

      They were able to narrow down the issue to the following test case:

      Tested with root user:

      cd $HOME
      mv .bashrc .bashrc_bak

      vi .bashrc

      then put this line into .bashrc and save the file

      echo $(/bin/bash -c 'echo Hello')

      Then

      ssh localhost

      This appears to loop forever when logging in via ssh.

      However a normal console login works properly, and using 'su - root' works properly.

      Also this appears to only affect RHEL 9, and works properly on RHEL 8.

              rhn-support-svashish Siteshwar Vashisht
              rhn-support-ccheney Chris Cheney
              Siteshwar Vashisht Siteshwar Vashisht
              Karel Volný Karel Volný
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: