1834448 Members
2255 Online
110067 Solutions
New Discussion

Re: POSIX

 

POSIX

Hello all,

My POSIX shell has stopped working. When a user types in sh and hits return the screen just hangs. When a user trys to logon who has sh as a shell it also hangs. Please help.
/usr/bin/sh
/bin/posix/sh
15 REPLIES 15
Robert-Jan Goossens
Honored Contributor

Re: POSIX

Hi,

What is you hpux version ?

check the permissions off you /usr/bin/sh

-r-xr-xr-x 2 bin bin 212992 Jul 5 1999 sh

Robert-Jan.
U.SivaKumar_2
Honored Contributor

Re: POSIX

Hi,

Check /etc/profile for any unwanted entries.

Check /var/adm/syslog/syslog.log for any errors. viz open file overflow.

Check the memory usage and swap usage.

regards,

U.SivaKumar



Innovations are made when conventions are broken
Ravi_8
Honored Contributor

Re: POSIX

Hi,

the /usr/bin/sh file should have following permissions

-r-xr-xr-x 2 bin bin 204800 Apr 14 2002 sh
# file sh
sh: PA-RISC1.1 shared executable dynamically linked
never give up

Re: POSIX

/usr/bin/sh -r-xr-xr-x bin:bin 491520 Dec 2
Rita C Workman
Honored Contributor

Re: POSIX

One more place to check..../etc/shells...is it still listed in that file??

Just a quick thought,
Rita

Re: POSIX

Yes it is, But I did notice that /bin/posix/sh was not. Does this matter?
James Murtagh
Honored Contributor

Re: POSIX

Hi Brian,

We really need a bit more info here:

1) What OS?

# uname -a

2) Is root ok using the statically compiled shell? If so can you change a users shell to /sbin/sh and retry.

3) What version of the posix shell patch do you have?

# swlist -l product|grep posix

4) Are the users home directories on NFS mount points?

5) Is NIS involved?

6) Any patches been applied recently?

Regards,

James.
James R. Ferguson
Acclaimed Contributor

Re: POSIX

Hi:

The Posix shell for HP-UX is '/sbin/sh' for the shell with statically linked libraries (required by root!) and '/usr/bin/sh' for normal use with dynamically linked libraries.

The use of '/usr/bin/sh' for non-root users reduces memory consumption.

The '/bin' directory is a transition-link for compatability with old (pre-10.0) releases. You can note that '/bin' is a symbolic link to '/usr/bin'. The "t" denotes a transition link (not a sticky bit! here:

lr-xr-xr-t 1 root sys 8 Aug 20 1997 /bin -> /usr/bin

Similarly, '/bin/posix' is a directory with the following entry:

lr-xr-xr-t 1 root sys 11 Aug 20 1997 sh -> /usr/bin/sh

Thus, '/bin/posix/sh' is really only a symbolic (transition) link to '/usr/bin/sh'.

Regards!

...JRF...

Regards!

...JRF...

Re: POSIX

Sorry I should have been more verbose.
10.20
PHCO_27804
root can sh fine.
When I try to sh as a normal user it hangs with /usr/bin/sh, /sbin/sh.

Re: POSIX

Home directories are nfs.
No nis involved.
James Murtagh
Honored Contributor

Re: POSIX

Hi Brian,

I'm assuming static NFS mounts, if you are using AUTOFS let me know. Also can you confirm how users access the server, i.e. telnet/CDE.

First thing to check is the NFS mount point is reported in bdf and you can cd to it as root. Also check the syslog/dmesg for any related errors.

One gotcha I have seen is the shell history file being in the home directory on NFS mount points. If you have change one users profile to have the HISTFILE pointing to /tmp or so forth and retry the login.

Also ensure the ksh patch is the same version as this posix one, PHCO_27803.

Regards,

James.

Re: POSIX

My NFS is static.
Strange problem with root. It says HISTFILE=//.sh_history.
Using both telnet and CDE. Neither one works with sh.

Re: POSIX

Just found out that csh is only shell that works. ksh,tcsh and bash all hang.

Re: POSIX

Hi all, Got bad news. Just found out that PHKL_16751 was reinstalled. I have heard that this is the patch from hell. Does anyone have any recovery options.
James Murtagh
Honored Contributor

Re: POSIX

Hi Brian,

Not so good but recoverable. If you have a good ignite image it may be worth applying it, otherwise find all the kernel patches you have installed from PHKL_16751 and re-install them. Its called a LITS (Line in the sand) patch, it sets a baseline for your OS. What you have done by re-installing it is roll back your OS to that point. Maybe one of the HP guys can dig you out a document that describes the recovery procedure but I'm sure it is just reinstalling the other kernel patches.

Regards,

James.