From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Aaron C. de Bruyn" Subject: Re: sudo selectively execute file, * wildcard on dir set with "(ALL) NOPASSWD:". Date: Tue, 5 Jan 2010 08:08:05 -0800 Message-ID: <20100105160805.GB3433@chrysalis> References: Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=heyaaron.com; s=2009; t=1262707688; bh=IwsGZl1XjGZriqohSO2gcVoWLfiFgPNcHLi+9A0Bzr0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=rm6YVCL0e9KXyfGCP7drWUmlWZvzlgwX5MABx2 ajMj8B6zQw7GJi+Is8rCS5/IrDfzLWNVynumVB3L6/V7mUQtLF10SCwwKunlGDbSP1I hh549u/I72YCDhTZDsGiFq6E66LW+EfR76zNbbmTQkwp3ScBlpEQ6XW1MRskfRFQu8= Content-Disposition: inline In-Reply-To: Sender: linux-apps-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Kent Ho Cc: linux-admin@vger.kernel.org, linux-apps@vger.kernel.org, linux-config@vger.kernel.org On 2010-01-05 at 17:08:37 +0800, Kent Ho wrote: > I then copy script1.sh to a new file in the same directory as "script2.sh". > Now I execute "script1.sh" again with sudo, now it will execute. Read the docs. >From the sudo man page: -k The -k (kill) option to sudo invalidates the user's timestamp by setting the time on it to the Epoch. The next time sudo is run a password will be required. This option does not require a password and was added to allow a user to revoke sudo permissions from a .logout file. -A