User Environment

 


  1. Why am I unable to modify the .bashrc?

    The .bashrc was changed to be owned by root due to a potential way to circumvent multi-factor authentication. Users could potentially execute something like a srun, which would run prior to the second layer of authentication. To prevent this from happening, the .bashrc was made read-only for users. Content that you typically place in the .bashrc can instead be placed in the user .bash_profile. This allows those actions to only be executed on the success of login via SSH. Slurm interactive jobs acquire their environment variables from the user environment that submitted the job : https://slurm.schedmd.com/faq.html#user_env .

    For batch jobs submitted using sbatch, users may need to source their .bash_profile to bring in all the environment variables that they set in their environment. To learn the difference between the .bash_profile and .bashrc you can look here. .bashrc vs .bash_profile

Â