The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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,384
    Likes Received:
    23
    Trophy Points:
    38
    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,578
    Likes Received:
    3
    Trophy Points:
    38
    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]$ "
    
     
    #2 dgbaker, Nov 17, 2004
    Last edited: Nov 17, 2004
  3. sparek-3

    sparek-3 Well-Known Member

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

Share This Page