1

I have newly installed a remastered ubuntu 12.10. after installation I ran a script to make a standard user and do some other works. now when I log into the new standard user and open terminal, it only shows a $ mark and doesnt show username@hostname$.

it can return whoami but doesnt return anything for echo $HOSTNAME the interesting thing is when I run bash, everything is ok, but when I run dash(which is default in ubuntu) I see the problem.

I've tried dpkg-reconfigure dash but nothing changed.

can anyone guess what is happened to my system! thank you in advance.

1 Answers1

1

I suggest to use bash instead of dash since the former is far better for interactive use.

The shell for the new user is probably set to /bin/dash, you just have to create the new user specifing the shell you want using the --shell option for the adduser command. To change the shell for an alredy created user you can use the command chsh.

toro2k
  • 19,020
  • 7
  • 64
  • 71
  • but the administrator user uses dash with no problem; so the standard user must be capable of using dash, too. what is the problem with dash? – mohammadh montazeri Apr 05 '13 at 10:52
  • dash is not intended for interactive use, it is used on Debian-like systems to execute startup script since it's much faster than bash. For interactive use i recommend using bash. If you really want to use dash you have to configure it by yourself. Copying the administrator `.profile` file could be a good starting point. – toro2k Apr 05 '13 at 11:01
  • thanks toro, I checked and saw that the admin user uses bash too. so I changed to bash with chsh (as you said). it solved the problem. but why doesnt dash return hostname? a bit strange! – mohammadh montazeri Apr 05 '13 at 11:32
  • The variable $HOSTNAME is specific to bash, dash don't define it by default. You can see the dash manual page for reference. – toro2k Apr 05 '13 at 11:34