From owner-freebsd-questions Mon Apr 15 10:10:13 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id KAA07869 for questions-outgoing; Mon, 15 Apr 1996 10:10:13 -0700 (PDT) Received: from ritig1.rit.reuters.com (ritig1.rit.reuters.com [199.171.195.11]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id KAA07845 for ; Mon, 15 Apr 1996 10:10:03 -0700 (PDT) Received: from ritig4.rit.reuters.com by ritig1.rit.reuters.com; (5.65v3.2/1.1.8.2/14Sep94-0947PM) id AA13917; Mon, 15 Apr 1996 13:12:51 -0400 Received: from mr.rit.reuters.com by RITIG4.RIT.REUTERS.COM (PMDF V4.3-10 #7805) id <01I3KLBMKVIO001HO5@RITIG4.RIT.REUTERS.COM>; Mon, 15 Apr 1996 13:10:22 -0500 (EST) Received: with PMDF-MR; Mon, 15 Apr 1996 18:09:22 EST Mr-Received: by mta REOA.MUAS; Relayed; Mon, 15 Apr 1996 18:09:22 -0500 Mr-Received: by mta REOA2; Relayed; Mon, 15 Apr 1996 18:09:22 -0500 Mr-Received: by mta RITIG4; Relayed; Mon, 15 Apr 1996 18:10:17 -0500 Disclose-Recipients: prohibited Date: Mon, 15 Apr 1996 18:09:22 -0500 (EST) From: Andy Smith Subject: FreeBSD 2.1 SUID To: questions@freebsd.org Message-Id: <1722091815041996/A16461/REOA2/11A47C891500*@MHS> Autoforwarded: false Mime-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT Importance: normal Priority: normal Sensitivity: Company-Confidential Ua-Content-Id: 11A47C891500 X400-Mts-Identifier: [;1722091815041996/A16461/REOA2] Hop-Count: 2 Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I hope you can help with a small problem that I have using FreeBSD to implement a Firewall. First off let me just say that I am very impressed with FreeBSD and have used in to implement a number of large projects, including this one, in preference to Sun. The system is a Pentium PC with IDE HD, IDE SyQuest, Mitsumi CD Rom, 32Mb RAM. It is FreeBSD 2.1, with a recompiled kernel, removing NFS, SCSI etc. Most of the unused binaries have been removed from the system. The problem is I have a C program, that runs as user operator, with UID 3. I need this user to be able to modify some files in /etc, so I have a sh script that should run suid root. This script is simply #! /bin/sh # cp /usr/local/proto/weekly /etc/weekly cp /usr/local/proto/daily /etc/daily cp /usr/local/proto/security /etc/security ... Plus more of the same This script is called on exit from the C program. The sh script is owned by root.wheel and has permissions -rwsr-----. So that it 'should' suid to root as it runs, unfortunately this is not the case, and it runs with uid 3, the operator. How can I get this (or any) shell script to run SUID root?? Thanks Andy