Operating System - HP-UX
1847256 Members
5258 Online
110263 Solutions
New Discussion

/usr/bin/false generates memory fault

 
SOLVED
Go to solution
MCP-DOC
Advisor

/usr/bin/false generates memory fault

Goodmorning everybody,

I'm updating my passwd-file, I want the pseudo-users to have the /usr/bin/false 'shell' so the can't be used at login. But when I'm testing the stuff, I do a su - (e.g.) lp (as root), I get back the message 'sh: No shell'and then 'memory fault'. It's this last line that worries me, what can cause this memoryfault?
In /usr/bin/false I just have 'exit 1'.
Anybody got any ideas??
5 REPLIES 5
Steven Gillard_2
Honored Contributor
Solution

Re: /usr/bin/false generates memory fault

Looks like a problem with the su command - I get the same thing (even with the latest su patch installed).

You have two options:

1. Ignore it. Its not causing a major problem is it?

2. Log a call and report it to HP as it looks like a bug.

Regards,
Steve
T. M. Louah
Esteemed Contributor

Re: /usr/bin/false generates memory fault

Check the permissions of the "/":
if it is "r--r--r--", change it to "r-xr-xr-x"
Little learning is dangerous!
Steven Gillard_2
Honored Contributor

Re: /usr/bin/false generates memory fault

Just had a closer look at this - it seems the /usr/bin/false and /usr/bin/true scripts do not start with #! lines. Hence su gets an "exec format error" when trying to exec /usr/bin/false and thats what causes the core dump. Its still a minor bug in su in that it doesn't handle the exec error, but if you add "#!/usr/bin/sh" to the start of /usr/bin/false the core dump doesn't occur.

I am curious to know why these scripts are incorrect - is there a reason or is this an error? Anyone?

Regards,
Steve
Alex Glennie
Honored Contributor

Re: /usr/bin/false generates memory fault

an error, hp ref -> JAGaa93186

as far as I'm aware this is a known issue and "to be fixed" at 11.00 though installing PHCO_16127 is a good idea (su patch).

From my understanding .... pam_end was being called twice in su.c at the end of su then execl would fail due to "No shell". This caused freeing a
non-referenced pointer, thus causing the core dump. The fix will be if there's
a non-executable shell, or if the shell doesn't exist, the error message "No shell" is returned and we exit gracefully.



MCP-DOC
Advisor

Re: /usr/bin/false generates memory fault

I submitted a software-call at HP, it seems to be a DTS defect #JAGaa93186 for project "hpux.security", DTS Version Fixed is "B.11.10". Engineer said there was a request for service at this stage for this problem, but a fix was not yet released??....
Thanx for helping,
greetz Timo Wilschut