Re: Help! - unable to exec shell (solved - SUMMARY)

From: Keith Farrar (markets!
Date: Thu Jun 06 1991 - 16:23:10 CDT

My problem has been solved. It was an Operator Head-Space error.

--------------------- Solution -------------------------------------

It turns out that at some time during my frantic efforts to fix things,
I clobbered the ownership and permissions of /dev.

 This is how things were:
drw--w--w- 2 keith amix 6144 Jun 6 05:55 /dev/
 This is how things should have been:
drwxr-sr-x 2 bin staff 6144 Jun 6 05:55 /dev/

        Sorry to waste time (and bandwidth) with this.

--------------------- My original message --------------------------

>From: Keith Farrar <uunet!markets!keith>
>Subject: Help! - unable to exec shell
>To: markets!!sun-managers
>Date: Thu, 6 Jun 91 6:08:11 PDT
>My sun 3/160 (running SunOS 4.0.3, with SLIP support) won't allow
>non-root logins. It fails with the error message "crt0: no /dev/zero"
>and drops the connection when /bin/login calls an exeve of /bin/csh.
>Running trace on failed logins shows that it is dying when it fails
>to open /dev/zero. The line from trace's output is:
>open ("/dev/zero", 0, 021152) = -1 EACCES (Permission denied)
>Tracing a shell launch on any of our other machines (all of which are
>sparc machines running OS 4.1.1) shows a totally different set of flags
>being passed to open() -- but this may be due to OS differences...
>/sbin/sh will launch successfully, but no executable which tries to
>access /dev/zero will function, unless invoked by a process with an
>effective uid of root.
>I have tried resetting the access permissions on /dev/zero; removing
>and recreating /dev/zero; reloading /usr/bin, /usr/lib, and /usr/etc
>from tape; clearing and recreating /etc/; rebooting the
>afflicted machine; and power-cycling it all to no avail.

--------------------- Responses -------------------------------------

>From uunet!!oconnor!miker Thu Jun 6 12:44:33 1991
>Return-Path: <uunet!!oconnor!miker>
>Date: Thu, 6 Jun 91 13:03:24 CDT
>From: Mike Raffety <uunet!!oconnor!miker>
>Message-Id: <>
>To: oddjob!!markets!keith
>Subject: Re: Help! - unable to exec shell
>Status: OR
>Does /dev/zero indeed have 666 permissions?

>From uunet!sunne.East.Sun.COM!stern Thu Jun 6 10:23:47 1991
>Return-Path: <uunet!sunne.East.Sun.COM!stern>
>Date: Thu, 6 Jun 91 11:59:37 EDT
>From: uunet!sunne.East.Sun.COM!stern (Hal Stern - Consultant)
>Message-Id: <9106061559.AA24129@sunne.East.Sun.COM>
>To: markets!keith
>Subject: Re: Help! - unable to exec shell
>Status: OR
>make sure /dev/zero has permissions 0666 - world r/w/x.
>the difference between /sbin/sh and /bin/sh is dynamic linking.
>things in /sbin are statically linked, since you don't (usually)
>have a /usr partition from which to dynamically link libs out
>of /usr/lib when you're using /sbin (at boot time). /bin/sh and
>friends are dynamically linked. when something is dynamically linked,
>and needs to create a new page, it faults it in from /dev/zero, which
>produces a zero-filled page (nice for uninitialized data area pages).
>--hal stern
> sun microsystems
> northeast area consulting group

| Keith Farrar |
| AMIX Corporation |
| Palo Alto, CA "Apple is like the Chinese Cultural |
| (415) 856-1234 x217 Revolution conducted by people in |
| three-piece suits." |
| DOMAIN: -John Perry Barlow |
| UUCP: {uunet|sun|xanadu!}markets!keith |

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:14 CDT