From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 15768 invoked from network); 8 Aug 1998 10:56:19 -0000 Received: from stud1.tuwien.ac.at (193.170.75.11) by mail2.redhat.com with SMTP; 8 Aug 1998 10:56:19 -0000 Received: from alpha.home.at (root@c48.dialin.tuwien.ac.at [192.35.243.88]) by stud1.tuwien.ac.at (8.8.8/8.8.8) with ESMTP id MAA57596 for ; Sat, 8 Aug 1998 12:57:12 +0200 Received: from localhost (root@localhost) by alpha.home.at (8.8.5/8.8.5) with SMTP id MAA01168 for ; Sat, 8 Aug 1998 12:55:54 +0200 Date: Sat, 8 Aug 1998 12:55:54 +0200 (CEST) From: Christoph Zens Reply-To: Christoph Zens To: axp-list@redhat.com Subject: Re: SUID scripts? In-Reply-To: <19980807112938.1678.qmail@headwall.maine.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII > > Instead of that it is much simpler to have a compiled "wrapper" > > program which can call your shell script, avoiding various race > > conditions, and execute it under id you want. > > If you are going to wrap it and run it suid, you are probably better > off doing it in perl. Ever tried to use "sudo" ? SYNOPSIS sudo -V | -h | -l | -v | -k | -s | -H | [ -b ] | [ -p prompt ] [ -u username/#uid] command DESCRIPTION sudo allows a permitted user to execute a command as the superuser (real and effective uid and gid are set to 0 and root's group as set in the passwd file respectively). sudo determines who is an authorized user by consulting the file /etc/sudoers. By giving sudo the -v flag a user can update the time stamp without running a command. The password prompt itself will also time out if the password is not entered with N minutes (again, this is defined at installation time and defaults to 5 minutes). And as far as other IDs than root are concerned: -u The -u (user) option causes sudo to run the specified command as a user other than root. To specify a uid instead of a username, use "#uid". I use it to allow SOME users to execute a certain shell-script as root. -- _ _ // \X/ Christoph Zens