Operating System - HP-UX
1822494 Members
2462 Online
109642 Solutions
New Discussion юеВ

Changing default shell to bash?

 
SOLVED
Go to solution
Low Han Ming
Advisor

Changing default shell to bash?

Hi,

I would like to change default shell for normal user to bash.

I understand bash is not availble (or maybe I'm wrong), how can I include bash in this case.

I'm using a linux NIS server for the HP-UX and Solaris.

Thanks for any reply.


Han Ming
6 REPLIES 6
James R. Ferguson
Acclaimed Contributor

Re: Changing default shell to bash?

Hi:

1. You can do this, but don't do it for root!

2. Specify /usr/bin/bash in the user(s) you want in /etc/passwd.

3. Add /usr/bin/bash to the /etc/shells file -- along with every other shell that you want to remain valid. /etc/shells is an ASCII file containing a list of legal shells on the system. Each shell is listed in the file by its absolute path name. Lines or portions of lines beginning with "#" are assumed to be comments and are ignored. Blank lines are also ignored. Make the permissions 444 and the ownership "bin:bin".

The file should look like this:

/sbin/sh
/usr/bin/sh
/usr/bin/rsh
/usr/bin/ksh
/usr/bin/rksh
/usr/bin/csh
/usr/bin/keysh
/usr/bin/bash

...JRF...
Low Han Ming
Advisor

Re: Changing default shell to bash?

Hi,

Thanks for the reply.

But will it works even if bash cannot be found in my /usr/bin directory.
I can't find it there.
Is it that I have delete it off accidentally or need to be downloaded or ....?

Thanks for any advice.


Han Ming
T.Watanabe
Advisor
Solution

Re: Changing default shell to bash?

Please go http://hpux.cs.utah.edu/.
And input "bash" to search.
Then you can find "bash" package.

With regards,
Watanabe.
Fabio Maciel
Occasional Advisor

Re: Changing default shell to bash?

Hi...

hmm, errr.. I`m with the same problem to install the bash here, but... am I supposed to create the /etc/shells file??? This file doesn`t exist in my HPUX... another thing, even when I created this file, give it the proper permission and ownership, when I try to configure any user using the SAM, I didn`t see the /usr/bin/bash shell in the shells option list.

Thanks in advance...

Regards..

Fabio
"Every step brings me closer to my last"
Pete Randall
Outstanding Contributor

Re: Changing default shell to bash?

Fabio,

Yes, you can just create the /etc/shells file. Contents should be as JRF posted. Then you'll need to download the package as Watanabe suggested. That should be all there is to it.

Pete

Pete
Pete Randall
Outstanding Contributor

Re: Changing default shell to bash?

Oh, and you can just type in /usr/bin/bash rather than selecting it from the options list.

Pete

Pete