From owner-freebsd-hackers@freebsd.org Tue Dec 19 02:54:24 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD2C9EA38D2 for ; Tue, 19 Dec 2017 02:54:24 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 87EA47FC45 for ; Tue, 19 Dec 2017 02:54:24 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: by mailman.ysv.freebsd.org (Postfix) id 873EBEA38D1; Tue, 19 Dec 2017 02:54:24 +0000 (UTC) Delivered-To: hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86EB4EA38D0 for ; Tue, 19 Dec 2017 02:54:24 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-wr0-x241.google.com (mail-wr0-x241.google.com [IPv6:2a00:1450:400c:c0c::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 19B957FC44 for ; Tue, 19 Dec 2017 02:54:24 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: by mail-wr0-x241.google.com with SMTP id l19so4093283wrc.2 for ; Mon, 18 Dec 2017 18:54:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OHw05z9ToJOi9s6sHrt+VKEBdJHXYaDjzwpmY7WIk84=; b=b0fcJbISQ73fdeBbQWgHu8U5hIbzhXZZ729FHDjK38I6SH49J8xWSySp0BfIOEFgdG B8xu3hwHnmZv/k1froMtupybpn4+5MV+CfBH9GwGa3xl27JPqApVWklvudzAywAAeBIS AUD07RLdL21m6Qed73EYKC9bVjvmkdTb0dQntu5OzCEZH+6y3ABqGfJuGjzfCKcdmHSh VUhT6efEAOh/p2ReQIrf499nVuPTtyqZR8dGuuqr6wmacomS5alx40ErsgxXQtr3AeZq 9eX4N6UgiBKgXC2uGlrNiBrd4wP1uMhWfU26Q8+bbI3ijByzXN1qaZDzf79b4/dLJRTJ ChKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OHw05z9ToJOi9s6sHrt+VKEBdJHXYaDjzwpmY7WIk84=; b=SK5zuAdl1uFrVLgvIJ3uohvREv0vy7bIm873xg7W91f77LInR4HH9dcuxa/SDRmI/+ B7yVPtKC9dpmLCJqSWrCMUEQkSJ5aVoZeI5Tol/thhS9SgPyD5D0Fmn1N3tq8Rzp/Yq3 PuESikQp+hD7DCTwXiBxbcZjVxWeZwKko59Zc3whY4l7zLlwAGNoSW6XtCQ9wyj6l9DQ fsX01Q8mC0c7GPj5fEYCYwiLcxM3iJ6U971GoO5x40EoAwr5T1vLimWa8WK8yoxJWMwf fscKYdZJtFQkwJxVRYF+7nARqKcMjdo3oEd1NpmqjlNDwkodl9cLwZe5WGeZjs6hbubi yS7g== X-Gm-Message-State: AKGB3mJBwh6ocodyrl4lg1b7JzMEqnaUUXufDJg6dzFuyEIazytZv6Pm zam4kAxtvwHIJAVQ2L9uwIg= X-Google-Smtp-Source: ACJfBovtlFRyKk3PYaM+k13AZce+Yja5/gM1qXS+D5ftI5Y/I8qIa3aoupvLNc8D5lNI+1Z6YvqE0Q== X-Received: by 10.223.196.211 with SMTP id o19mr2845046wrf.240.1513652062566; Mon, 18 Dec 2017 18:54:22 -0800 (PST) Received: from localhost ([213.149.52.70]) by smtp.gmail.com with ESMTPSA id 21sm7386625wrt.27.2017.12.18.18.54.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Dec 2017 18:54:22 -0800 (PST) Date: Tue, 19 Dec 2017 03:54:17 +0100 From: To: Ben Woods Cc: hackers@freebsd.org Subject: Re: Operator group and reboot cmd Message-ID: <20171219035417.000012a6@gmail.com> In-Reply-To: References: <20171218145303.00007fb2@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Dec 2017 02:54:24 -0000 On Mon, 18 Dec 2017 20:19:58 +0000 Ben Woods wrote: > On Tue, 19 Dec 2017 at 2:53 am, wrote: >=20 > > 11.1 REL-p6 > > > > As a non-root user and member of operator group, I was able to > > issue a poweroff and shutdown commands (group set to operator), but > > not a reboot (group set to wheel) command (Operation not permitted). > > > > I was able to reboot by: > > $ shutdown -r now > > > > But to use reboot, cmd I had to: > > # chgrp 5 /sbin/reboot > > # chmod 4554 /sbin/reboot > > Shouldn't this be set by default install? > > # exit > > > > $ reboot =20 >=20 >=20 > I suspect this is deliberate because the reboot command does not give > processes a proper chance to exit cleanly. Therefore, it makes sense > if only those in the wheel group can use this big hammer, whilst > operators must follow the proper shutdown model. >=20 > From the reboot man page: > https://man.freebsd.org/reboot >=20 > =E2=80=9CNormally, the shutdown(8) utility is used when the system needs = to > be halted or restarted, giving users advance warning of their > impending doom and cleanly terminating specific programs.=E2=80=9D >=20 >=20 > Regards, >=20 > Ben Thanks Ben, I'll have to investigate it, but in a meantime I've figured that it auto affected: -r-sr-xr-- 4 root operator /sbin/fastboot -r-sr-xr-- 4 root operator /sbin/fasthalt -r-sr-xr-- 4 root operator /sbin/halt which means those are hardlinks and man proves it ...