Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

2 Answers

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

/bin/sh

instead.

So I did a

chsh -s /bin/bash

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

Password:

after that I switch back to root

exit

then i log back into www-data

sudo su www-data

I checked the $SHELL again

echo $SHELL

I saw that now it is

/bin/bash

and also my prompt is back

share|improve this answer
add comment
  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
add comment

Your Answer

 
discard

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.