SUMMARY "shutdown" responds "NOT super-user"

From: Mike Salmon <f026_at_uea.ac.uk>
Date: Wed, 03 Sep 1997 16:35:27 +0100

My original request:

>When I try to take one of our Alphas (DU3.2C) down using
> # shutdown now
>it responds
> NOT super-user
>It does this whether I've su'd or logged in on the console as root.
>I end up using "halt" which is less than ideal :-)
>/etc/passwd includes
>root:encryptedpassword:0:1:system PRIVILEGED account,,,:/:/usr/local/bin/tcsh

I eventually tracked the problem to root's path having
been changed to include /sbin (which contains a "shutdown")
ahead of /usr/sbin (which contains the real "shutdown")
I reordered the path and it works fine now.
New question: what's /sbin/shutdown for?

Thanks to the following people for their help:

From: Lucio Chiappetti <lucio_at_ifctr.mi.cnr.it>
From: Martin Moore <martin_at_decatl.alf.dec.com>
From: Sean O'Connell <sean_at_stat.Duke.EDU>
From: Kevin Oberman <oberman_at_es.net>
From: "Mark E. Glidden" <mark_glidden_at_harvard.edu>
From: George Gallen <ggallen_at_slackinc.com>
From: matthewm_at_voyager.sgate.com (Michael Matthews)
From: Graham Allan <ALLAN_at_mnhep1.hep.umn.edu>
From: Becki Kain <beckers_at_josephus.furph.com>
From: Jason Bingham <jason.bingham_at_star.com.au>

Here's a selection from their suggestions to help you if you've trawled
this up in a search engine.

>perhaps tcsh not one of the "default" shells ?

checked /usr/shells - fine


>Possibly your hashed password database (which maps username to uid for fast
>lookup) is corrupt. If running base security:
>
># cd /etc
># rm passwd.pag passwd.dir
># mkpasswd passwd
>
>If running enhanced security:
>
># cd /etc/auth/system
># rm pw_id_map gr_id_map
>(will be recreated automatically)


>Your root account does not belong to the group system!
>gid for root should be 0 ... why did it change?

Good question! Don't know.


>What happens when you do:
>shutdown -h now or
>shutdown -r now


>Looks like tcsh isn't registering your tty in the /etc/utmp file. I
>bet shutdown's trying to figure out who you are by looking at that
>file, and, well, you ain't there....

I don't have a /etc/utmp - should I worry?


>what happens when you do an id before hand? what does it respond with?
>does it let you do a init 0? are you in single user and /usr/local is not
>mounted?

uid=0(root) gid=1(daemon) groups=0(system),3(mem),7(terminal),9(opr),12(lp)
Wierd or what? I don't see why it should be gid 1.


>We had a similar problem when we installed then deinstalled the jumbo
>patch. What it appeared to us was that the hashed password database
>files were corrupted so by recreating them with vipw or mkpasswd it
>fixed our problem.
>We also had symptoms when we did id there was no user name listed, it
>appears some commands use name rather than uid.


Thanks everyone! Sorry it turned out to be rather mundane.

mike.

#--
#Mike Salmon, Climatic Research Unit, University of East Anglia,
#Norwich NR4 7TJ, United Kingdom -- m.salmon_at_uea.ac.uk
Received on Wed Sep 03 1997 - 18:03:48 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:36 NZDT