HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
cancel
Showing results for 
Search instead for 
Did you mean: 

Installing bash

 
SOLVED
Go to solution
CowBoy
Regular Advisor

Installing bash

Dear All
Hi
I want to install bash and use it instead of sh
What should i do?
9 REPLIES
Jeeshan
Honored Contributor

Re: Installing bash

install bash if not installed already and change the SHELL parameter in /etc/profile, if you want to use it by your all user. otherwise you just change your own SHELL parameter in .profile.
a warrior never quits
Solution

Re: Installing bash

WARNING: You must NOT change root's shell to anything but /sbin/sh. You can invoke any other shell later, if you aren't in single user mode.

>ahsan: change the SHELL parameter in /etc/profile

This is next to useless. If you want to change the shell, you edit /etc/passwd or use chsh(1).

You may also have to add bash to /etc/shells.
Johnson Punniyalingam
Honored Contributor

Re: Installing bash

Hi ,

>> I want to install bash and use it instead of sh
What should i do?<<

For which "user id" you need to change...?

for "root" account "NO" "NO" you should not change

how to change the shell for "user id"

Check the below file "to check you have bash shell exits in you server"

# strings /etc/shells

than proceed as below

you need root access to change
Example:-

vi /etc/passwd
user1:*:133:20:For Database Access,,,:/home/user1:/usr/bin/sh --> erase and change to /usr/bin/bash

or

you Use SAM ->User & Groups->User->select the User -->modify


Thanks,
Johnson

Problems are common to all, but attitude makes the difference
CowBoy
Regular Advisor

Re: Installing bash

Dear All
Why i can not change the root 's SHELL to bash.
The bash is not installed on my OS.
HP-UX 11.23
OldSchool
Honored Contributor

Re: Installing bash

root uses a "statically linked" version of sh found in /sbin/sh. Others typically use /bin/sh (or whatever) which either may not be on a mounted filesystem or rely on libraries that aren't available when the system is first started in maintenance mode.

as noted above, once you've downloaded and installed bash, you can start it from the command line once you are logged in.
Steven Schweda
Honored Contributor

Re: Installing bash

> Why i can not change the root 's SHELL to
> bash.

In single-user mode, many file systems may
not be mounted, including the ones with the
run-time libraries which "bash" normally
needs. /bin/sh does not need these
libraries, so it works even when "/" is the
only mounted file system.

You might be able to do something like
exec bash
at the end of root's ".profile" file. If it
works, you'll be running "bash". If it
fails, you should still be ok (still running
/bin/sh).

Re: Installing bash

>Johnson: how to change the shell for "user id"

The command is chsh(1), root not needed.

>Check /etc/shells "to check if bash shell exists in your server"

You only need to update shells(4) if you want to use ftp.

Re: Installing bash

If you have gotten the answers you wanted, please read the following about assigning points:
http://forums.itrc.hp.com/service/forums/helptips.do?#33
CowBoy
Regular Advisor

Re: Installing bash

close