On Mon, 18 Jan 2016 23:31:39 +0100
lukash <lukk...@email.cz> wrote:

> On Mon, 2016-01-18 at 20:00 +0100, waben...@gmail.com wrote:
> > lukash <lukk...@email.cz> wrote:
> >   
> > > Hi all,
> > > 
> > > I'm reading on the internet that systemctl poweroff should work
> > > for normal user if he is the only one logged in, he is logged in
> > > locally
> > > and his session is active. I seem to be meeting these conditions:
> > > 
> > > # loginctl
> > >    SESSION        UID USER             SEAT
> > >          2       1000 lukash           seat0
> > > 
> > > $ loginctl show-session 2
> > > Id=2
> > > User=1000
> > > Name=lu
> > > Timestamp=Sat 2016-01-16 17:27:30 CET
> > > TimestampMonotonic=9614418
> > > VTNr=7
> > > Seat=seat0
> > > Display=:0
> > > Remote=no
> > > Service=lightdm
> > > Desktop=awesome
> > > Scope=session-2.scope
> > > Leader=529
> > > Audit=2
> > > Type=x11
> > > Class=user
> > > Active=yes
> > > State=active
> > > IdleHint=no
> > > IdleSinceHint=0
> > > IdleSinceHintMonotonic=0
> > > 
> > > But invoking the command gives me:
> > > 
> > > $ systemctl poweroff
> > > Failed to set wall message, ignoring: Access denied
> > > Failed to power off system via logind: Access denied
> > > Failed to start poweroff.target: Access denied
> > > 
> > > How is this supposed to work on Gentoo?
> > > 
> > > Thanks in advance,
> > > Lukas  
> > 
> > IIRC "CONFIG_AUDIT" and "CONFIG_HAVE_ARCH_AUDITSYSCALL" must be set
> > in the kernel configuration. But as I don't use this method I cannot
> > say this for sure.  
> 
> Thanks. But I've got those in my kernel already...
> 
> > --
> > Regards
> > wabe
> >   
> 

Try this https://wiki.archlinux.org/index.php/allow_users_to_shutdown ,
I think you might be happy with it. I don't have systemd personally so
I don't have any experience with it. From what I read on the wiki,
this will be an easy fix.

Instead of using users in the "Users without sudo privileges" section, I
think you can also use groups without the hostname. All you would have
to do is make a group that you would like to be able to shutdown or
whatever with the computer.

-- 

Willie Matthews
matthews.willi...@gmail.com
(702) 659-9966

Attachment: pgpTqKuRmPajL.pgp
Description: OpenPGP digital signature

Reply via email to