*BSD News Article 24672


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!uniwa!harbinger.cc.monash.edu.au!msuinfo!netnews.upenn.edu!newsserver.jvnc.net!howland.reston.ans.net!europa.eng.gtefsd.com!emory!tackle!irbs!jc
From: jc@irbs.UUCP (John Capo)
Newsgroups: comp.os.386bsd.questions
Subject: Re: "su" for one command
Message-ID: <520@irbs.UUCP>
Date: 3 Dec 93 22:43:17 GMT
References: <2dkb8a$hoq@sylvester.cc.utexas.edu>
Organization: Irbs Engineering
Lines: 15

In article <2dkb8a$hoq@sylvester.cc.utexas.edu> vax@sylvester.cc.utexas.edu (Vax) writes:
>Under BSD Unixes, how does one go about executing a single command
>as another user?  I have been unsuccessful in applying the standard:
>"su foo command".  It simply ignores the command.  Is there a proper way
>to do this?  Do you use a "here" document?  Can you nest them?
>

echo command | su 

works very well.

Has this always been BSD style behavior as opposed to SysV/SunOS behavior
which lets you do su command or su somebody command?

jcapo@netcom.com