Operating System - HP-UX
1753814 Members
7909 Online
108805 Solutions
New Discussion юеВ

Re: Need to cahnge user shell in to bash

 
Primesh Abeysinghe
Frequent Advisor

Need to cahnge user shell in to bash

I try to change user shell in to bash in HP ux 11.23 bash location is /usr/local/bin/bash
used sam & chsh command too, says it is an invalid shell

but just I log in to the system then temporally change it by just type bash & enter it work nicely

please tell me how to change it & also need command to list all installed shells
9 REPLIES 9
Pete Randall
Outstanding Contributor

Re: Need to cahnge user shell in to bash

It needs to be listed in /etc/shells. See "man 4 shells" for details.


Pete

Pete
James R. Ferguson
Acclaimed Contributor

Re: Need to cahnge user shell in to bash

HI:

Try adding the absolute path of the shell to '/etc/shells'. If you don't already have this file (and you probably don't), make it and populate it with:

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

Regards!

...JRF...
Tor-Arne Nostdal
Trusted Contributor

Re: Need to cahnge user shell in to bash

Just remember to not change to bash for the root-user ;)

... and to assign your points to Pete and JRF

http://forums11.itrc.hp.com/service/forums/helptips.do?#33

/Tor-Arne
I'm trying to become President of the state I'm in...
Primesh Abeysinghe
Frequent Advisor

Re: Need to cahnge user shell in to bash

hi JRF

sorry to say It is still not working

primesh
:(
Suraj K Sankari
Honored Contributor

Re: Need to cahnge user shell in to bash

Hi,

Did you add as said by JRF ?

post your '/etc/shells'

cat /etc/shells

Suraj
Primesh Abeysinghe
Frequent Advisor

Re: Need to cahnge user shell in to bash

hi suraj

I did as he explained then try to add but the I sows like it added but when I try to login (putty) window vanished

then I change it again to sh that makes ok but still not be able to change it bash

primesh
singh sanjeev
Trusted Contributor

Re: Need to cahnge user shell in to bash

Is bash script present on your server ??
Sanjeev Singh
Steven Schweda
Honored Contributor

Re: Need to cahnge user shell in to bash

> I did as he explained [...]

Show us.

> cat /etc/shells

Like that.

> [...] then try to add but the I sows like
> it added [...]

Huh?

> [...] but still not be able to change it
> bash

If you leave the login shell as something
which works, can you run "bash"?

/usr/local/bin/bash

> [...] bash location is /usr/local/bin/bash

Can we begin at the beginning? How did it
get there? What, exactly, did you install,
how, exactly?

> [...] also need command to list all
> installed shells

A shell is only a program. Anyone could
install one anywhere. (Well, anywhere he had
write permission.) The shells permitted as
login shells are in "/etc/shells" (which can
be changed).
Sri_kanth
Advisor

Re: Need to cahnge user shell in to bash

Hi,

You can change your shell in /etc/passwd file, login as a root user only.