Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Jailshell and custom prompts

Discussion in 'General Discussion' started by sparek-3, Nov 17, 2004.

  1. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,799
    Likes Received:
    131
    Trophy Points:
    343
    cPanel Access Level:
    Root Administrator
    I know this has been talked about before, but the posts seem to be a little old. I was wondering if there has been any progress on having jailshell read the .bashrc file in a user's home directory. Or an equivalent. We have some users who are wanting to customize the shell prompt, something you can do from the .bashrc file with bash. Are there any plans to allow this in future jailshell releases? Or is there a way to allow this now?
     
  2. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,574
    Likes Received:
    3
    Trophy Points:
    343
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    In /home/user create .profile and add something like PS1="[\u:\w:\t\s]$ " this will allow for changing of prompt in jailshell. As an example

    To get
    [USERNAME:~:10:16:33-jailshell]$

    and add some safety

    Code:
     
    # User specific aliases and functions
    
    alias rm='rm -i'
    alias cp='cp -i'
    alias mv='mv -i'
    
    PS1="[\u:\w:\t\s]$ "
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #2 dgbaker, Nov 17, 2004
    Last edited: Nov 17, 2004
  3. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,799
    Likes Received:
    131
    Trophy Points:
    343
    cPanel Access Level:
    Root Administrator
    This is what I was looking for. Thanks alot.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice