From owner-freebsd-questions@FreeBSD.ORG Tue Aug 3 20:25:31 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7345D16A4CE for ; Tue, 3 Aug 2004 20:25:31 +0000 (GMT) Received: from smtp.telmex.com (nlcproxy10.telmex.com [148.235.53.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 305E743D5F for ; Tue, 3 Aug 2004 20:25:31 +0000 (GMT) (envelope-from mparedes@telmex.com) Received: from tmxmailsmtp2.ad.intranet.telmex.com (tmxmailsmtp1.telmex.com [148.223.155.51]) by smtp.telmex.com (iPlanet Messaging Server 5.2 HotFix 1.21 (built Sep 8 2003)) with ESMTP id <0I1W0072S0LXZT@smtp.telmex.com>; Tue, 03 Aug 2004 15:22:49 -0500 (CDT) Received: from tmxmailmex3.ad.intranet.telmex.com ([10.106.1.35]) by tmxmailsmtp2.ad.intranet.telmex.com with Microsoft SMTPSVC(5.0.2195.6713) ; Tue, 03 Aug 2004 15:26:17 -0500 Received: from tmxmailhmo1.ad.intranet.telmex.com ([10.106.1.39]) by tmxmailmex3.ad.intranet.telmex.com with Microsoft SMTPSVC(5.0.2195.6713) ; Tue, 03 Aug 2004 14:28:02 -0600 Date: Tue, 03 Aug 2004 13:28:02 -0700 From: Paredes =?UNKNOWN?Q?S=E1nchez_Mart=EDn_A=2E?= To: "BSD." Message-id: MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: quoted-printable Content-class: urn:content-classes:message Thread-topic: The set-user-ID-on-execution Thread-index: AcR5l549d2ZyzuVAEdi7rwAJa7r2XQ== X-MS-Has-Attach: X-MS-TNEF-Correlator: X-OriginalArrivalTime: 03 Aug 2004 20:28:02.0818 (UTC) FILETIME=[60240620:01C47998] X-Mailman-Approved-At: Wed, 04 Aug 2004 12:58:24 +0000 Subject: The set-user-ID-on-execution X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Aug 2004 20:25:31 -0000 Hi: I made a script (for tcsh shell) which add a printer to the system (made directories, files, security and made some validations) but need root access to accomplish this task. my solution was to setuid the scripts been root # chown root:admin-hmo *.tcsh # chmod u=3Dswrx,g=3Drx,o=3D *.tcsh # ls -l total 4 -rwsr-x--- 1 root admin-hmo 2024 Aug 3 04:07 impresora.tcsh -rwsr-x--- 1 root admin-hmo 275 Jul 30 02:26 seguridad.tcsh The first line of the script is #!/bin/tcsh -fb But when I run the script been other user I had problem with the permissions > impresora.tcsh oc81p8707 p1ct203 psct203 raw mkdir: /var/spool/lpd/oc81p8707: Permission denied touch: /var/spool/lpd/oc81p8707/filter-errors: No such file or directory touch: /var/spool/lpd/oc81p8707/accounting-file: No such file or directory /var/spool/lpd/oc81p8707/minfree: No such file or directory. did I miss something? maps *************************************************************************= *************************************************************************= ****************************** Con Prodigy Infinitum navega y habla al mismo tiempo sin ocupar tu = tel=E9fono por s=F3lo $349 al mes. Adem=E1s, al contratar ll=E9vate un = mes de renta gratis.=20 =BFQu=E9 esperas? Con=E9ctate 01 800 123 2222 o ven a tu Tienda Telmex. = Precio m=E1s I.V.A. http://www.hits.telmex.com/app/ad_Mgr/ad_mgrN.jsp?ad=3D157 Prodigy Infinitum la conexi=F3n m=E1s r=E1pida Asom@te a telmex.com http://www.telmex.com