Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have just created a fresh installation of Ubuntu 12.10

I have created a www-data user account.

When I switch to www-data, I cannot see www-data at the front of the prompt.

  1. What is the technical name to call that part of the prompt?
  2. How can I make it appear for www-data?

See this for reference.

As you can see, root has this. But not www-data

enter image description here

share|improve this question
up vote 3 down vote accepted

I found the solution here

but i will explain the exact steps I used.

first at root i did a

echo $SHELL

I saw that I have /bin/bash

then i switch to www-data

sudo su www-data

then i do a

echo $SHELL

I saw that I had



So I did a

chsh -s /bin/bash

I was prompted for my www-data password so I gave it.


after that I switch back to root


then i log back into www-data

sudo su www-data

I checked the $SHELL again

echo $SHELL

I saw that now it is


and also my prompt is back

share|improve this answer
  1. I believe just 'the prompt'.
  2. Copy root's ~/.bashrc file to www-data's ~/.bashrc file.

In other words: (run in root) cp ~/.bashrc /home/www-data/.bashrc assuming /home/www-data is www-data's home folder, which it is. Then just restart. (Actually, you only need to kill bash, but just restart anyway)

share|improve this answer
first of all, the home of www-data is not in /home/www-data but in /var/www strangely. and i cannot make it work using the copy root bashrc – Kim Stacks Dec 25 '12 at 16:02

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.