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


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

  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)

  • 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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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