Default shell

Having a problem with your shell account? Post here.

Default shell

Postby Pinkbyte on Sat Mar 03, 2007 8:01 pm

Today i saw that I can not use .bash_profile because my default shell is SH and not BASH!!!
Examples:
pinkbyte@users:~$ ps uxf
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
pinkbyte 5378 0.0 0.1 14528 1432 ? S 19:46 0:00 sshd: pinkbyte@pt
pinkbyte 5379 0.0 0.1 4348 1632 pts/6 Ss 19:46 0:00 \_ -sh
pinkbyte 5830 0.0 0.0 2592 828 pts/6 R+ 19:56 0:00 \_ ps uxf

pinkbyte@users:~$ cat /etc/passwd | grep dekus
dekus:x:1001:1001:De Kus,,,:/home/dekus:/bin/bash

pinkbyte@users:~$ cat /etc/passwd | grep pinkbyte
pinkbyte:x:1065:100::/home/pinkbyte:

My default shell is not defined. I want to have normal shell(/bin/bash). Can anybody(with access to /etc/passwd/ of course Smile) correct this problem?
The neutrality is the highest achievement of the mankind!
English is not my native language, so - sorry for big number of mistakes!
Pinkbyte
Contributer
Contributer
 
Posts: 49
Joined: Sun Mar 19, 2006 7:44 am
Location: Russian

Re: Default shell

Postby Tim on Sat Mar 03, 2007 11:42 pm

Why don't you just use .profile? It does exactly the same thing except for the sh shell which doesn't actually exist anyway. We don't have sh anymore, it's just a symlink to bash.

Also, you can change it youself, see chsh.

Oh and for the record, /bin/sh would be normal not /bin/bash

Edit: dekus is right, should have been .profile, I put .bashrc by mistake :S
User avatar
Tim
root
root
 
Posts: 736
Joined: Thu Mar 10, 2005 6:31 am
Location: Australia

Re: Default shell

Postby De Kus on Sun Mar 04, 2007 12:22 am

Tim wrote:It does exactly the same thing except for the sh shell which doesn't actually exist anyway. We don't have sh anymore, it's just a symlink to bash.

Not true, running /bin/bash via /bin/sh makes bash acting like sh, or at least diffrent. Go and enter '/bin/sh' and youl'll see that the symlink doesnt remove the difference Very Happy. It obviously recognizes how it was started and acts a little diffrently. Obviously one of the diffrences is that it doesnt run .bash_profile Very Happy.

Oh I just remember a little thing... try if it runs 'profile' or '.profile' Very Happy
Image
User avatar
De Kus
Phoenix Veteran
Phoenix Veteran
 
Posts: 305
Joined: Mon Mar 14, 2005 2:15 pm
Location: Germany

Re: Default shell

Postby Pinkbyte on Sun Mar 04, 2007 8:00 am

Also, you can change it youself, see chsh


pinkbyte@users:~$ chsh
You may not change the shell for pinkbyte.

Why don't you just use .profile? It does exactly the same thing except for the sh shell which doesn't actually exist anyway. We don't have sh anymore, it's just a symlink to bash.


But .bash_profile executes when i enter 'bash -l' and not when i log in.
.profile file works well, thank you, Tim.
The neutrality is the highest achievement of the mankind!
English is not my native language, so - sorry for big number of mistakes!
Pinkbyte
Contributer
Contributer
 
Posts: 49
Joined: Sun Mar 19, 2006 7:44 am
Location: Russian


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron