Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Aug 2019 15:09:38 -0400
From:      Jim Trigg <jtrigg@huiekin.org>
To:        Polytropon <freebsd@edvax.de>,hw <hw@gc-24.de>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: howto allow anyone to poweroff?
Message-ID:  <2756FCF5-417A-471F-9562-BB957FD936A6@huiekin.org>
In-Reply-To: <20190807185445.62b59f2f.freebsd@edvax.de>
References:  <20190807183735.f4a87306c851426be6b799ca@gc-24.de> <20190807185445.62b59f2f.freebsd@edvax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Way three is to chmod u+s,a+x /sbin/poweroff (or is it /usr/sbin/poweroff?)=
=2E

Thanks,
Jim Trigg


On August 7, 2019 12:54:45 PM EDT, Polytropon <freebsd@edvax=2Ede> wrote:
>On Wed, 7 Aug 2019 18:37:35 +0200, hw wrote:
>> Hi,
>>=20
>> is there a way to allow ordinary users to poweroff a machine?  I'd
>> like to automatically poweroff PXE booted clients once the user that
>> was logged in logs out after using it=2E
>
>There are basically two ways:
>
>Way 1 is to add the users to the group "operator"=2E This, however,
>allows them to do other things too which you might not be interested
>in allowing them=2E
>
>Way 2 is to add a program like sudo or super to your installation
>and allow the users to use _one_ specific program ("poweroff only")=2E
>This is probably the safer way=2E
>
>
>
>--=20
>Polytropon
>Magdeburg, Germany
>Happy FreeBSD user since 4=2E0
>Andra moi ennepe, Mousa, =2E=2E=2E
>_______________________________________________
>freebsd-questions@freebsd=2Eorg mailing list
>https://lists=2Efreebsd=2Eorg/mailman/listinfo/freebsd-questions
>To unsubscribe, send any mail to
>"freebsd-questions-unsubscribe@freebsd=2Eorg"

--=20
Sent from my Android device with K-9 Mail=2E Please excuse my brevity=2E
From owner-freebsd-questions@freebsd.org  Wed Aug  7 19:59:28 2019
Return-Path: <owner-freebsd-questions@freebsd.org>
Delivered-To: freebsd-questions@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5B9D2B5DAA
 for <freebsd-questions@mailman.nyi.freebsd.org>;
 Wed,  7 Aug 2019 19:59:28 +0000 (UTC)
 (envelope-from freebsd@edvax.de)
Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.187])
 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
 (Client CN "mout.kundenserver.de",
 Issuer "TeleSec ServerPass Class 2 CA" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 463j5C0dhmz4Fbc
 for <freebsd-questions@freebsd.org>; Wed,  7 Aug 2019 19:59:26 +0000 (UTC)
 (envelope-from freebsd@edvax.de)
Received: from r56.edvax.de ([94.223.163.215]) by mrelayeu.kundenserver.de
 (mreue010 [212.227.15.167]) with ESMTPA (Nemesis) id
 1MQuwR-1hibvz0Knf-00Nz9w; Wed, 07 Aug 2019 21:59:20 +0200
Date: Wed, 7 Aug 2019 21:59:18 +0200
From: Polytropon <freebsd@edvax.de>
To: Jim Trigg <jtrigg@huiekin.org>
Cc: hw <hw@gc-24.de>, freebsd-questions@freebsd.org
Subject: Re: howto allow anyone to poweroff?
Message-Id: <20190807215918.95d801ab.freebsd@edvax.de>
In-Reply-To: <2756FCF5-417A-471F-9562-BB957FD936A6@huiekin.org>
References: <20190807183735.f4a87306c851426be6b799ca@gc-24.de>
 <20190807185445.62b59f2f.freebsd@edvax.de>
 <2756FCF5-417A-471F-9562-BB957FD936A6@huiekin.org>
Reply-To: Polytropon <freebsd@edvax.de>
Organization: EDVAX
X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K1:wu3KK0YjEQF5m+uIuZRMEioBIBCuQRrX6ICF+3aOm2Cf/a/lo82
 tBHGhquMLrO3orwRZGZTfgfc+BtTi1NzRYJYDAe8PsZOuEilaM+81BbasymsZhqlCgCu2YJ
 8X0+kh8MPwIMaH1LG15EM8JsTqwKGlEm+g+zSK7WX5tRG/yyAJkn/x9mbNQEGviwxe8xMxl
 QW/YHWzixkDBVlh9DkP2w==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:MZqFP/WrKKc=:r6npYN7YRrPmgNhT8h1tgt
 T6CFXCv9k0WCpyK5Wd9xHvLckY/gF+Fx6JrhEHikr5ed8OpTQzWtai+CQe83qD2FNszjpHbSQ
 +x75a3EzBocO6cnSdqk5dyKCV+vd5V3P97TlQBMiQj7gt6eZjY82Sl68HHFEFr9RL61uxKI+4
 6pZhQfgWPhPT3U+4cq+v2Mp+K8fwsOAa/bCIw65SoTJEPaojHWdcMJoqWg1rOEg0eVcUWEyws
 lBf5jHywgJXLmx22z9cepfmwRTcLxnFfjIINU3M0IgJXOZk9/tCgmryhTc/pj8DmABmeWwLwX
 yukesu6wP49ha8Rbsspg2cmOV48vygx+//+oCJ+/UObXYUe7gZCOds1HMN5sr0pMBHjtmpWxE
 oogp11fb6D61TVyU21hdRrBdgz+2fVZKo2f3REb0hMycRym0P+z6i2T5Tgbq2bfmk5c3VJg9x
 ox+jVdkKGUS7o5pzFIloLiRxywX5xHDtfkzMs1PNWTBFyBZF+A3zRXO0yNOcgJTqTTFUpAjs6
 uBUNmWeKpdRvvimAOVmc1T//+YDTMsY7kFufezybCMfTyRbr002G0my5jrBaDeW1zZNxmSZ+C
 tDty22A1ETPBtr9dPmZRuP9jLBH5CmVudE3Tbsx/FdmYmRowcicB/0Zl5Rb9rB+Tism+wPb0L
 IiXMe/8MqbLCVFyKGSnva7DW2ryo/gR7HRum/Kn4DNWshcb2Paxckk1B/w6zWe6ADgfj8HdQG
 oo+nfhrcR7XUIGrCkwYj/XP52R2frIWp7RMXrIAE0SS03Is/7Afvb069keo=
X-Rspamd-Queue-Id: 463j5C0dhmz4Fbc
X-Spamd-Bar: +++++
Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none;
 spf=none (mx1.freebsd.org: domain of freebsd@edvax.de has no SPF policy when
 checking 212.227.126.187) smtp.mailfrom=freebsd@edvax.de
X-Spamd-Result: default: False [5.30 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[];
 HAS_REPLYTO(0.00)[freebsd@edvax.de]; TO_DN_SOME(0.00)[];
 MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[];
 NEURAL_HAM_SHORT(-0.47)[-0.471,0];
 RECEIVED_SPAMHAUS_PBL(0.00)[215.163.223.94.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net
 : 127.0.0.11]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[];
 FROM_EQ_ENVFROM(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[];
 ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE];
 ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[];
 RCPT_COUNT_THREE(0.00)[3]; MIME_GOOD(-0.10)[text/plain];
 MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[edvax.de];
 AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.97)[0.975,0];
 TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.96)[0.965,0];
 MID_CONTAINS_FROM(1.00)[];
 RCVD_IN_DNSWL_NONE(0.00)[187.126.227.212.list.dnswl.org : 127.0.5.0];
 R_SPF_NA(0.00)[];
 RWL_MAILSPIKE_POSSIBLE(0.00)[187.126.227.212.rep.mailspike.net : 127.0.0.17]; 
 RCVD_COUNT_TWO(0.00)[2];
 IP_SCORE(0.43)[ip: (1.24), ipnet: 212.227.0.0/16(-1.37), asn: 8560(2.28),
 country: DE(-0.01)]
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/>;
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 07 Aug 2019 19:59:28 -0000

On Wed, 07 Aug 2019 15:09:38 -0400, Jim Trigg wrote:
> Way three is to chmod u+s,a+x /sbin/poweroff (or is it /usr/sbin/poweroff?).

Let's see:

	% which poweroff
	/sbin/poweroff

Yes, that's an option, too. But like the 1st way I mentioned,
it might be more risky than needed, because now even non-
interactive users (i. e., programs, daemons, services, etc.
running on the system) can cause a shutdown.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2756FCF5-417A-471F-9562-BB957FD936A6>