From owner-freebsd-questions Fri Feb 2 0:37:55 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail.thpoon.com (cr103675-a.bloor1.on.wave.home.com [24.42.106.79]) by hub.freebsd.org (Postfix) with SMTP id 74ADA37B491 for ; Fri, 2 Feb 2001 00:37:37 -0800 (PST) Received: (qmail 26434 invoked from network); 2 Feb 2001 08:37:36 -0000 Received: from unknown (HELO tea.thpoon.com) (mail@192.168.1.2) by cr103675-a.bloor1.on.wave.home.com with SMTP; 2 Feb 2001 08:37:36 -0000 Received: from antipode by tea.thpoon.com with local (Exim 3.12 #1 (Debian)) id 14Obip-0006TN-00 for ; Fri, 02 Feb 2001 03:37:35 -0500 To: freebsd-questions@FreeBSD.ORG Subject: Change group ID in a shell script From: Arcady Genkin X-Face: 0=A/O5-+sE[Tf%X>rYr?Y5LD4,:^'jaJ!4jC&UR*ZrrK2>^`g22Qeb]!:d;}2YJ|Hq"LHdF OX`jWX|AT-WVFQ(TPhFVak)0nt$aEdlOq=1~D,:\z5QlVOrZ2(H,mKg=Xr|'VlHA="r Mail-Copies-To: never Date: 02 Feb 2001 03:37:35 -0500 Message-ID: <87vgqteb00.fsf@tea.thpoon.com> Lines: 10 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Channel Islands) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I'm writing a script to be run from cron that needs to execute a command with effective group ID different from my login group. How would I change effective GID in a shell script? Linux has sg(1) command for this purpose. I couldn't find newgrp command, either. Many thanks, -- Arcady Genkin Nostalgia isn't what it used to be. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message