From owner-freebsd-questions@freebsd.org Fri Apr 15 16:15:04 2016 Return-Path: Delivered-To: freebsd-questions@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 86DE4AEDE92 for ; Fri, 15 Apr 2016 16:15:04 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F80D1DCF for ; Fri, 15 Apr 2016 16:15:03 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de (port-92-195-71-243.dynamic.qsc.de [92.195.71.243]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx02.qsc.de (Postfix) with ESMTPS id A5E18276A7; Fri, 15 Apr 2016 18:06:14 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id u3FG6Dgr001903; Fri, 15 Apr 2016 18:06:13 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Fri, 15 Apr 2016 18:06:13 +0200 From: Polytropon To: Ian Smith Cc: Jason Hunt , freebsd-questions@freebsd.org Subject: Re: Cannot enter sleep mode as non-root user (Operation not permitted) Message-Id: <20160415180613.c066affb.freebsd@edvax.de> In-Reply-To: <20160416000316.V1139@sola.nimnet.asn.au> References: <20160416000316.V1139@sola.nimnet.asn.au> Reply-To: Polytropon 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-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Apr 2016 16:15:04 -0000 On Sat, 16 Apr 2016 00:24:17 +1000 (EST), Ian Smith wrote: > In freebsd-questions Digest, Vol 619, Issue 5, Message: 13 > On Wed, 13 Apr 2016 22:30:38 -0400 Jason Hunt wrote: > > > When attempting to enter sleep mode as a non-root user, I receive the error: > > acpiconf: request sleep type (3) failed: Operation not permitted > > Correct. > > > Searching online yielded a suggestion that the user must be a member of > > wheel, however my account is in the wheel and operator groups (confirmed by > > running /usr/bin/id) > > smithi on t23% id -p > uid smithi > groups smithi wheel operator staff dialer network vboxusers > smithi on t23% acpiconf -s3 > acpiconf: request sleep type (3) failed: Operation not permitted > > Being in wheel just means you can su root, and only root can suspend the > system .. unless you have a suspend button .. or know root's password :) That is the key information: The program must be run by root. Being in the operator or wheel group is not sufficient. > > Does anyone have suggestions for how to troubleshoot this? > > Revise expectations or hack acpiconf.c :) Or use a program like su, sudo, or super, for example like this: % sudo acpiconf -s3 which should work as expected. It's possible to assign this command to a shell alias or even to a key (or key combination). -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...