From owner-freebsd-questions@FreeBSD.ORG Sun Feb 7 01:40:39 2010 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 9D7411065672 for ; Sun, 7 Feb 2010 01:40:39 +0000 (UTC) (envelope-from pieter@degoeje.nl) Received: from mx.utwente.nl (mx1.utsp.utwente.nl [130.89.2.12]) by mx1.freebsd.org (Postfix) with ESMTP id 2465E8FC13 for ; Sun, 7 Feb 2010 01:40:38 +0000 (UTC) Received: from nox.student.utwente.nl (nox.student.utwente.nl [130.89.165.91]) by mx.utwente.nl (8.12.10/SuSE Linux 0.7) with ESMTP id o171ePpo030398; Sun, 7 Feb 2010 02:40:25 +0100 From: Pieter de Goeje To: freebsd-questions@freebsd.org Date: Sun, 7 Feb 2010 02:40:24 +0100 User-Agent: KMail/1.9.10 References: <4B6E0F66.4060707@locolomo.org> In-Reply-To: <4B6E0F66.4060707@locolomo.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201002070240.24935.pieter@degoeje.nl> X-UTwente-MailScanner-Information: Scanned by MailScanner. Contact icts.servicedesk@utwente.nl for more information. X-UTwente-MailScanner: Found to be clean X-UTwente-MailScanner-From: pieter@degoeje.nl X-Spam-Status: No Cc: Subject: Re: Howto run privileged commands on login/logout 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: Sun, 07 Feb 2010 01:40:39 -0000 On Sunday 07 February 2010 01:55:02 Erik Norgaard wrote: > I'm playing around with diskless operation. I'd like to be able to run > privileged commands when a user logins or logs out: > > - on login, nfs mount the user's home directory (ok, not critical, I can > mount /home) This can be done using amd(8). Check out the example section in amd.conf(5). > - on logout a system reboot to clean up any temporary files left from > the session. Not sure why you would want to reboot the entire system but simply doing "chmod +s /sbin/shutdown" should give all users access to the shutdown(8) command. > > Is this possible, without messing arround with sudo or adding users to > wheel or operator groups? -- Pieter de Goeje