Friday, January 14, 2011

Changing the default shell to bash in RHEL 4

Today while installing Oracle Grid Control 10.2.0.1 on RHEL 4 I found out that the default shell was ksh as a result of which the system was not reading the .bash_profile which contained all the settings for the grid control. Hence I made the following changes to make bash my default login shell:

Note: My username was 'oracle'

1. First identify the location of bash:

$ which bash

/bin/bash

2. Next change the shell:

$ chsh -s /bin/bash oracle
Password: ******
Shell changed

3. Then I logged out and logged in again to implement the change.

4. To verify you can also check the /etc/passwd file:

$ grep ^oracle /etc/passwd

oracle:x:500:500::/home/oracle:/bin/bash

No comments:

Post a Comment