Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Aug 2004 13:28:02 -0700
From:      Paredes =?UNKNOWN?Q?S=E1nchez_Mart=EDn_A=2E?= <mparedes@telmex.com>
To:        "BSD." <FreeBSD-Questions@FreeBSD.org>
Subject:   The set-user-ID-on-execution
Message-ID:   <E3F56D7842656F4484C5668BC4D7F298042C18@is~tmxmailhmo1.intranet.telmex.com>

next in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi? <E3F56D7842656F4484C5668BC4D7F298042C18>