Cannot log in because of corrupted .bash_profile [duplicate]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
-1
down vote

favorite













This question already has an answer here:



  • Stuck in a loop at login prompt after changing shell to zsh

    2 answers



I have created a new user account.
I can't access it because of a .bash_profile error.
How can I repair this type of error?







share|improve this question













marked as duplicate by Jeff Schaller, Gilles, nwildner, Rui F Ribeiro, Community♦ Jun 26 at 8:05


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.










  • 3




    what is the error
    – Debian_yadav
    Jun 25 at 12:53










  • Welcome to Unix Stackexchange! You can take the tour first and the learn How to Ask a good question. That makes it easier for us to help you.
    – andcoz
    Jun 25 at 13:02














up vote
-1
down vote

favorite













This question already has an answer here:



  • Stuck in a loop at login prompt after changing shell to zsh

    2 answers



I have created a new user account.
I can't access it because of a .bash_profile error.
How can I repair this type of error?







share|improve this question













marked as duplicate by Jeff Schaller, Gilles, nwildner, Rui F Ribeiro, Community♦ Jun 26 at 8:05


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.










  • 3




    what is the error
    – Debian_yadav
    Jun 25 at 12:53










  • Welcome to Unix Stackexchange! You can take the tour first and the learn How to Ask a good question. That makes it easier for us to help you.
    – andcoz
    Jun 25 at 13:02












up vote
-1
down vote

favorite









up vote
-1
down vote

favorite












This question already has an answer here:



  • Stuck in a loop at login prompt after changing shell to zsh

    2 answers



I have created a new user account.
I can't access it because of a .bash_profile error.
How can I repair this type of error?







share|improve this question














This question already has an answer here:



  • Stuck in a loop at login prompt after changing shell to zsh

    2 answers



I have created a new user account.
I can't access it because of a .bash_profile error.
How can I repair this type of error?





This question already has an answer here:



  • Stuck in a loop at login prompt after changing shell to zsh

    2 answers









share|improve this question












share|improve this question




share|improve this question








edited Jun 25 at 13:22









Gilles

502k1179901515




502k1179901515









asked Jun 25 at 12:51









ola

1




1




marked as duplicate by Jeff Schaller, Gilles, nwildner, Rui F Ribeiro, Community♦ Jun 26 at 8:05


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by Jeff Schaller, Gilles, nwildner, Rui F Ribeiro, Community♦ Jun 26 at 8:05


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









  • 3




    what is the error
    – Debian_yadav
    Jun 25 at 12:53










  • Welcome to Unix Stackexchange! You can take the tour first and the learn How to Ask a good question. That makes it easier for us to help you.
    – andcoz
    Jun 25 at 13:02












  • 3




    what is the error
    – Debian_yadav
    Jun 25 at 12:53










  • Welcome to Unix Stackexchange! You can take the tour first and the learn How to Ask a good question. That makes it easier for us to help you.
    – andcoz
    Jun 25 at 13:02







3




3




what is the error
– Debian_yadav
Jun 25 at 12:53




what is the error
– Debian_yadav
Jun 25 at 12:53












Welcome to Unix Stackexchange! You can take the tour first and the learn How to Ask a good question. That makes it easier for us to help you.
– andcoz
Jun 25 at 13:02




Welcome to Unix Stackexchange! You can take the tour first and the learn How to Ask a good question. That makes it easier for us to help you.
– andcoz
Jun 25 at 13:02










1 Answer
1






active

oldest

votes

















up vote
1
down vote













Since it's you who created the account, I'm assuming you have root access on the system.



Log in as root and edit the file, correcting the error.



To correct this as the affected user:



  • Some graphical logins provide the ability to choose an alternate login shell. Pick one that is not bash and log in, fix the error and log out again. Then pick bash as login shell on the next login.



  • If this is a remote system, use




    • ssh -t user@host vim .bash_profile, or


    • ssh -t user@host "sh -c 'vim .bash_profile'", edit the file and exit.

    • Alternatively, ssh user@host mv .bash_profile .bash_profile-broken, or

    • upload a new .bash_profile using scp (possibly a corrected version of the one fetched using scp).






share|improve this answer






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    Since it's you who created the account, I'm assuming you have root access on the system.



    Log in as root and edit the file, correcting the error.



    To correct this as the affected user:



    • Some graphical logins provide the ability to choose an alternate login shell. Pick one that is not bash and log in, fix the error and log out again. Then pick bash as login shell on the next login.



    • If this is a remote system, use




      • ssh -t user@host vim .bash_profile, or


      • ssh -t user@host "sh -c 'vim .bash_profile'", edit the file and exit.

      • Alternatively, ssh user@host mv .bash_profile .bash_profile-broken, or

      • upload a new .bash_profile using scp (possibly a corrected version of the one fetched using scp).






    share|improve this answer



























      up vote
      1
      down vote













      Since it's you who created the account, I'm assuming you have root access on the system.



      Log in as root and edit the file, correcting the error.



      To correct this as the affected user:



      • Some graphical logins provide the ability to choose an alternate login shell. Pick one that is not bash and log in, fix the error and log out again. Then pick bash as login shell on the next login.



      • If this is a remote system, use




        • ssh -t user@host vim .bash_profile, or


        • ssh -t user@host "sh -c 'vim .bash_profile'", edit the file and exit.

        • Alternatively, ssh user@host mv .bash_profile .bash_profile-broken, or

        • upload a new .bash_profile using scp (possibly a corrected version of the one fetched using scp).






      share|improve this answer

























        up vote
        1
        down vote










        up vote
        1
        down vote









        Since it's you who created the account, I'm assuming you have root access on the system.



        Log in as root and edit the file, correcting the error.



        To correct this as the affected user:



        • Some graphical logins provide the ability to choose an alternate login shell. Pick one that is not bash and log in, fix the error and log out again. Then pick bash as login shell on the next login.



        • If this is a remote system, use




          • ssh -t user@host vim .bash_profile, or


          • ssh -t user@host "sh -c 'vim .bash_profile'", edit the file and exit.

          • Alternatively, ssh user@host mv .bash_profile .bash_profile-broken, or

          • upload a new .bash_profile using scp (possibly a corrected version of the one fetched using scp).






        share|improve this answer















        Since it's you who created the account, I'm assuming you have root access on the system.



        Log in as root and edit the file, correcting the error.



        To correct this as the affected user:



        • Some graphical logins provide the ability to choose an alternate login shell. Pick one that is not bash and log in, fix the error and log out again. Then pick bash as login shell on the next login.



        • If this is a remote system, use




          • ssh -t user@host vim .bash_profile, or


          • ssh -t user@host "sh -c 'vim .bash_profile'", edit the file and exit.

          • Alternatively, ssh user@host mv .bash_profile .bash_profile-broken, or

          • upload a new .bash_profile using scp (possibly a corrected version of the one fetched using scp).







        share|improve this answer















        share|improve this answer



        share|improve this answer








        edited Jun 25 at 13:33


























        answered Jun 25 at 13:02









        Kusalananda

        101k13199312




        101k13199312












            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?