Friday, March 19, 2010

Changing the default shell without admin privileges

Whenever I get access to a machine for the first time, I always have to search for ways to change my default shell. Most suggestions on the web don't work for me (limited user privileges, missing tools in installation, etc.), so I decided to post what always worked for me so that I (and you) can find later.
Add "exec /bin/bash" (or whatever shell you want to use) to the end of the .login file.
What this command does is actually launching bash from the default shell. Since this is done automatically, the launch process is seamless.
Other people suggest using the following options:
Edit /etc/passwd file and change the last field of the line corresponding to the user whose shell you want to change. This option is useless without administrator privileges.


Use one of the following commands:
chsh -s /bin/bash
usermod -s /bin/bash username
ypchsh, then type the path to the shell.
Next time I know what to do :)

No comments:

Post a Comment