Super User is a question and answer site for computer enthusiasts and power users. 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've got a zen slice running Ubuntu. I set the thing up as root and had "normal" bash and vim profiles, however the new users I've created for myself and others have no profiles.

I've tried copying the profiles from root to my user's home directories, but still don't have color or even machine name\login at the prompt.

How do I get the options transferred?

share|improve this question
up vote 0 down vote accepted

From man bash:

When bash is invoked as an interactive login shell, or as a non-inter‐ active shell with the --login option, it first reads and executes com‐ mands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable.

If it's not a login shell, Bash looks for ~/.bashrc. If it's a login shell, ~/.profile is the last file it looks for and only if the neither of the others listed in the paragraph above are found.

share|improve this answer
I have both, copied from the root account that has formatting as expected. – Präriewolf Apr 5 '10 at 12:25
Which "both" - I listed 5 or 6 files. Also, if the important stuff is in ~/.profile and it never gets read and it's not in files that are getting read... It would help if you posted the actual files (along with their names/locations). Also, you should check to see if the users' shells are actually /bin/bash or something else (and what is root's?). – Dennis Williamson Apr 5 '10 at 13:41
"Both" being both of the files you mentioned in the portion of your answered you authored. I had NO files in the user's home directory, so I copied all including .bashrc and .profile. I'll check the shell when I have access to the machine later. How do I change it if it isn't bash? – Präriewolf Apr 5 '10 at 14:26
So none of ~/.bash_* exist? To change a user's shell: sudo chsh --shell /bin/bash username Also, check to see if the files, such as ~/.bashrc are owned by the user and have permissions similar to 644. sudo chown username:username /home/username/.bashrc and chmod 644 /home/username/.bashrc, to set them, for example. – Dennis Williamson Apr 5 '10 at 16:17
Was missing the permissions, stupid mistake. Thanks. – Präriewolf Apr 8 '10 at 12:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .