From owner-freebsd-questions Mon Jan 11 12:46:46 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA27586 for freebsd-questions-outgoing; Mon, 11 Jan 1999 12:46:46 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from chopin.seattleu.edu (chopin.seattleu.edu [206.81.198.70]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA27568 for ; Mon, 11 Jan 1999 12:46:43 -0800 (PST) (envelope-from hodeleri@seattleu.edu) Received: from seattleu.edu ([172.17.41.90]) by chopin.seattleu.edu (8.8.5/8.8.5) with ESMTP id MAA01526; Mon, 11 Jan 1999 12:45:33 -0800 (PST) Message-ID: <369A62DA.F68EDED7@seattleu.edu> Date: Mon, 11 Jan 1999 12:45:14 -0800 From: Eric Hodel X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 3.0-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: cjc@scitec.com CC: freebsd-questions@FreeBSD.ORG Subject: Re: su in sh scripts References: <199901111556.KAA20912@newmail.scitec.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG SciTec Postman wrote: > So what I want to know is, what is the most graceful way to execute a > couple of commands as another user from a shell script? I don't know either, but an example is in /etc/periodic/310.locate as that script su's to nobody then builds the locate database. -- Eric Hodel hodeleri@seattleu.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message