From owner-freebsd-questions@FreeBSD.ORG Fri Aug 28 08:24:38 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA6951065826 for ; Fri, 28 Aug 2009 08:24:38 +0000 (UTC) (envelope-from jeronimocalvop@googlemail.com) Received: from mail-fx0-f210.google.com (mail-fx0-f210.google.com [209.85.220.210]) by mx1.freebsd.org (Postfix) with ESMTP id 4EF528FC17 for ; Fri, 28 Aug 2009 08:24:36 +0000 (UTC) Received: by fxm6 with SMTP id 6so1362915fxm.43 for ; Fri, 28 Aug 2009 01:24:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=yRyrGTbucQEyxuwVqGGcyaUHxLvOTDRU3Nbq5qFLxoA=; b=ntJD+4gjen3SkgzMVqZ3XWywhHe23k+fr0Y1N4ZI8wQuQMPK7nHRAIHR/ppb3AbSZV oGsUb0m4SljtFL+s+O9czGEevlgolBgnVtMhgR1Jveqn83vRb5kOPuhkeCKJ+guFNkct xRaxylbOms3JJGpGwaGxnacEPO/8OP2h7DHYo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=fr90mQbkH/nQVX1Kn38TOllIGSBxwMR18BI9ln7mT+wCUACxK1EwAbK1130vbng1QX f4uvkAm3MM0hdr08c2kYR76lP7Zo0oM1k9ob3Pbvm+NI6DFFTzDeaq+f/GkszzPT/VTx h6KS0Xj0AVgEnHlz93ajz8pVUCG9cf9ReqsoE= MIME-Version: 1.0 Received: by 10.103.37.25 with SMTP id p25mr121593muj.42.1251447875989; Fri, 28 Aug 2009 01:24:35 -0700 (PDT) Date: Fri, 28 Aug 2009 09:24:35 +0100 Message-ID: From: Jeronimo Calvo To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: SUID permission on Bash script X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Aug 2009 08:24:38 -0000 Hi folks! Im trying to set up a reaaallly basic scrip to allow one user to shutdown my machine without root permisions, seting up SUID as follows: -rwsrwxr-- 1 root wheel 38 Aug 27 23:12 apagar.sh $ ./apagar.sh Permission denied content of script: cat apagar.sh ]#!/usr/local/bin/bash shutdown -p now As far as i know, using SUID, script must runs with root permissions... so i shoudnt get "Permission denied", what im doing wrong??