Xref: utzoo unix-pc.sources:326 comp.sys.att:6822 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!uc!nic.MR.NET!shamash!com50!midgard!caa From: caa@midgard.Midgard.MN.ORG (Charles A Anderson) Newsgroups: unix-pc.sources,comp.sys.att Subject: Re: KSHPR: prompt generator for .kshrc Message-ID: <1045@midgard.Midgard.MN.ORG> Date: 27 Jun 89 17:59:21 GMT References: <19817@cup.portal.com> <287@ecijmm.UUCP> Reply-To: caa@midgard.Midgard.MN.ORG (Charles A Anderson) Followup-To: unix-pc.sources Organization: The Midgard Realm, St Paul MN Lines: 16 In article <287@ecijmm.UUCP> jmm@ecijmm.UUCP (John Macdonald) writes: |Well you asked for it... I hope there won't be a deluge of similar |postings. Anyhow, my method of determining whether I'm su'ed to root |or not is a simple test "if [ -w /etc/passwd ]". If that succeeds, |you're either root or the proud owner of an insecure system. Won't work for me, cuz my /etc/passwd is 444. Meaning I have to do a w! to change it in vi but that's ok with me. -- /-Charles-Anderson-\ caa@midgard.mn.org || (backbone)!bungia!midgard!caa \------------------/ caa@garnet.ssd.cdc.com || (backbone)!shamash!garnet!caa I'm gonna make like yesterday's lunch, down and out the back. -me (The above quote has been rated as gross, digusting, and tacky by my cow- orkers at work...are you a cow orker? Would you like to be one? Send $5 and SASEE to me for free (almost) informative (more or less) redundant (very) information packet. VISA and MasterCard accepted (and abused).)