*BSD News Article 66447


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!qns3.qns.com!imci4!newsfeed.internetmci.com!newsserver.jvnc.net!newsreader.jvnc.net!lazlo
From: jlucas@uvi.edu (John Lucas)
Subject: Re: No su -c
Message-ID: <Dq9xwC.8vK@tigger.jvnc.net>
Sender: news@tigger.jvnc.net (Zee News Genie)
Organization: University of the Virgin Islands
X-Newsreader: News Xpress 2.0 Beta #0
References: <1436504362@f401.n711.z3.ftn> <4l83sb$65i@uriah.heep.sax.de> <4l937n$smu@vanbc.wimsey.com>
Date: Mon, 22 Apr 1996 17:26:49 GMT
Lines: 51

Ok, where do you get "gnu su"? I don't see it on ftp://prep.ai.mit/pub/gnu/ 
where I normally find the GNU stuff.

In article <4l937n$smu@vanbc.wimsey.com>, jhenders@wimsey.com (John Henders) 
wrote:
>In <4l83sb$65i@uriah.heep.sax.de> j@uriah.heep.sax.de (J Wunsch) writes:
>
>>`-c' is an option to the invoked shell, not to the `su' utility.
>>Therefore, the optional user id is no longer optional if you wanna use
>>-c.
>
>It doesn't appear to work even when used properly. Note root's shell is
>bash here but I get identical results with /bin/sh, so it's not a shell
>issue. Also note I have gnu su first in my path to overcome this
>problem.
>
>FreeBSD is the first unix I've used where su user -c didn't work.
>
>Script started, output file is typescript
># export PS1='`whoami` \$'
>root #su news -c id
>uid=10(news) gid=8(news) groups=8(news), 0(wheel)
>root #/usr/bin/su news -c id
>`whoami` \$echo $SHELL
>/bin/sh
>`whoami` \$id
>uid=10(news) gid=8(news) groups=8(news), 0(wheel)
>`whoami` \$exit
>root #exit
>Script done, output file is typescript
># cat typescript
>Script started on Fri Apr 19 15:08:38 1996
># export PS1='`whoami` \$'
>root #su news -c id             <- gnu su
>uid=10(news) gid=8(news) groups=8(news), 0(wheel)
>root #/usr/bin/su news -c id    <- FreeBSD su
>`whoami` \$echo $SHELL
>/bin/sh
>`whoami` \$id
>uid=10(news) gid=8(news) groups=8(news), 0(wheel)
>`whoami` \$exit
>root #exit
>
>Script done on Fri Apr 19 15:10:01 1996
>-- 
>i* - The internet provider formerly know as Wimsey

| John Lucas                               jlucas@uvi.edu |
| Academic Computing                   NIC Handle: JL423  |
| University of the Virgin Islands        (809) 693-1216  |
| St. Thomas, VI 00802     http://www.uvi.edu/jlucas.html |