On Mon, Apr 16, 2001 at 06:11:38PM -0700, Mike Fedyk wrote: > On Mon, Apr 16, 2001 at 03:27:11PM -0800, Ethan Benson wrote: > > if [ `id -u` != 0 ] ; then > > echo 1>&2 "You are not root, go away" > > exit 1 > > fi > Heh, funny. :)
Even better is code that calls getpwnam, and, on failure, prints "you don't exist, go away". minicom does this. I once created an account for testing purposes, then deleted it while still logged in. I didn't exist! :( -- #define X(x,y) x##y Peter Cordes ; e-mail: X([EMAIL PROTECTED] , ns.ca) "The gods confound the man who first found out how to distinguish the hours! Confound him, too, who in this place set up a sundial, to cut and hack my day so wretchedly into small pieces!" -- Plautus, 200 BCE