Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: cactus on August 19, 2006, 09:57:28 PM
-
I installed the dungog user remote access contrib to create a user to have access to my developer machine for building RPM's using SSH2 keys, all that went perfectly well, but now I am left with the following problem:
Can someone tell me how I can configure a users bash prompt to have the familiar look and feel that we are used to for the root user:
[root@homer ~]#
Which templates do I have to configure? Perhaps someone can tell me where to find the settings that are used for the root account.
-
Can someone tell me how I can configure a users bash prompt to have the familiar look and feel that we are used to for the root user:
[root@homer ~]#
Which templates do I have to configure? Perhaps someone can tell me where to find the settings that are used for the root account.
Using google and browsing through the /etc directory I found that if I manually modify the PS1 environmental variable for the user I can set the desired format at the command prompt:
export PS1="[\u@\h \W]\\$ "
The PS1 value seems to be set in the /etc/bashrc file, but unfortunately this file is not templated. Do I need to set a certain value somewhere in the configuration/accounts database of the SME server to force this setting perhaps?
-
Found the solution:
[list=1]- Log in as the user for which you want to modify the bash prompt
- Make a .bash_profile file in the top of the users home directory
- In this file put the following line:
export PS1="[\u@\h \W]\\$ "
- Log out and log in again to see the result.[/list:o]
For more options for setting the PS1 string have a look here: http://www.expertsrt.com/tutorials/Matt/CmdPrompt.html