Problem with login after updating bash_profile

I am trying to setup environment for byol User, but after adding 

exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash

to bash_profile I can't login as byol , I have to login as another user and then comment out bash_profile .  When I run above command in the terminal it works fine.  What might cause this behavior? 
  • post-author-pic
    Stosh O

    Hi Marek,

    You only need to set the variables you desire.  No need for exec or /bin/base.

    The profile will be sourced as bash starts.

    Hope this helps!

  • post-author-pic
    Marek P

    Hi Stosh,

    Thanks, for a response.  Yes, I know, but tutorial recommends to reset all env variables. It is no big deal, I can comment it out, and uncomment after  I log in, I was just curious why it prevents me from logging in. 

  • post-author-pic
    Stosh O

    Hey there.

    I tried to recreate your situation with debian and was unable to do so.  What distribution are you running?

Looking For Team Training?

Learn More