[CentOS] /etc/bashrc help!
Roland Roland
R_O_L_A_N_D at hotmail.comTue Apr 19 17:18:38 UTC 2011
- Previous message: [CentOS] Intel DH67BL + CentOS 5.5 IRQ #177 nobody cared
- Next message: [CentOS] /etc/bashrc help!
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Dear all, i've appended the below to /etc/bashrc it works like a charm with ssh connections though SFTP sessions fail since the below is being sent to the intiator. any way of limiting the below to none sftp sessions? or any other idea for it to work? # If id command returns zero, you’ve root access. if [ $(id -u) -eq 0 ]; then # you are root, set red colour prompt echo "###############################################" echo "### You are now working as ROOT. ###" echo "### Pay attention to what you type. ###" echo "###############################################" PS1="\\[$(tput setaf 1)\\]\\u@\\h:\\w #\\[$(tput sgr0)\\]" else # normal echo echo " ###########################################################" echo "Welcome $(whoami), here's something to start your day with:" echo echo `sh /etc/lines.sh /etc/quotes.txt` echo " ############################################################" echo PS1="[\\u@\\h:\\w] $" fi Thanks, --Roland
- Previous message: [CentOS] Intel DH67BL + CentOS 5.5 IRQ #177 nobody cared
- Next message: [CentOS] /etc/bashrc help!
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list