Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I recently re-installed a Ubuntu server (12.10) and I happened to have a minor issue with OpenSSH.

Once I created some new Accounts and logged into those the terminal always replys with "$". Contrary to the root account, which usually prompts with "Name@Server Path:".

So, how exactly did I disable the path and name displaying for normal accounts? I'd like to have it back.

share|improve this question

migrated from stackoverflow.com Dec 20 '12 at 11:16

This question came from our site for professional and enthusiast programmers.

This has nothing to do with openssh, it has everything to do with the shell/profile that the accounts were created with. –  Petesh Dec 20 '12 at 10:39
This is not a programming question. Either Superuser.com or unix.stackexchange.com would have been more appropriate. –  gertvdijk Dec 20 '12 at 10:48

2 Answers 2

The most common reason for this happening is that the shell profile for the new users doesn't have any settings to adjust the shell prompt; plus it also depends on the shell that is configured for the user.

when I do:

useradd -m freddy

Then su - freddy, I get the prompt


and the ps listing:

$ ps
 PID TTY          TIME CMD
7258 pts/28   00:00:00 su
7266 pts/28   00:00:00 sh
7300 pts/28   00:00:00 ps

i.e. not using bash.

if we add the user with the bash shell,

userdel -r freddy
useradd -m -s /bin/bash freddy
su - freddy

we get the prompt:


If you want to modify the login shell of the user accounts so that they will have a prompt, then you can do:

usermod -s /bin/bash <account name>

for each of the accounts.

Again, all the useradd, userdel and usermod commands are performed as root!

share|improve this answer
Using chsh a user can change its shell without having root privileges. –  gertvdijk Dec 20 '12 at 10:41
Thanks Petesh, this just fixed it. –  user1761295 Dec 20 '12 at 10:53
@user1761295 You should mark this answer as correct if it solved your problem, so others with the same problem can use it :). –  Arkenklo Dec 20 '12 at 12:29

This issue is not related to OpenSSH. The shell prompt is based on the PS1 environment variable. If you want to reset your shell prompt to "Name@Server Path:" add below lines in .bashrc or .bash_profile or .profile


For more ways of setting (colourful) prompts refer here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.