Best way to include defaul .bashrc to Jailkit Chroot Users

Discussion in 'Installation/Configuration' started by Nyx_, Oct 18, 2022.

  1. Nyx_

    Nyx_ Member HowtoForge Supporter

    Hi Folks. Good day.
    I hope you're doing good.

    I noticed that, when I create a login to a Jailkit/Shell User, the terminal behaves a little different (ls doesn't show file colors for example).
    I traced it down to the missing .bashrc file on the shell user.
    If I manually create a bashrc copying the content from another server user, it seems to work fine once the Shell user makes a new login.

    My question is: What is the best/correct way to have a default .bashrc file created when a new shell user is created?

    Thank you.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You can configure under system > server config which files get copied into a new jail.
     
  3. Nyx_

    Nyx_ Member HowtoForge Supporter

    Hello @till Thanks for the quick reply.

    If I got to System -> Server Config -> Jailkit, under what session should I add the path to .bashrc?
    Jailkit chroot app sections or Jailkit chrooted applications

    Also should I add it like /etc/skel/.bashrc ?

    Would that be better to include it under the /etc/jk_init.ini ?

    Thanks for clarifying it.

    Best Regards.
     
  4. Nyx_

    Nyx_ Member HowtoForge Supporter

    Hi @till. Sorry to bother....
    Any suggestion regarding where to "source" the .bashrc from?
    Thank you.
     
  5. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    What do you mean by that? There is one copy in /etc/skel/.bashrc.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    I'm sorry, my first advice was wrong. I was not aware that we have a .bashrc file template in ISPConfig. Copy the file /usr/local/ispconfig/server/conf/bash.bashrc.master to /usr/local/ispconfig/server/conf-custom/bash.bashrc.master and then edit the file /usr/local/ispconfig/server/conf-custom/bash.bashrc.master to suit your needs.
     
    Nyx_ likes this.

Share This Page