You are not logged in.

#1 2007-11-04 12:54:20

voodoo.child
Member
Registered: 2007-11-01
Posts: 30

shutdown by normal user

what permission should i give to a normal user to be able to shutdown?


--
Alexandru

Offline

#2 2007-11-04 13:38:39

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: shutdown by normal user

AFAIK, there's no group for shutdown and poweroff commands. Your best bet is to set up sudo to allow the user to run the command without a password.

http://wiki.archlinux.org/index.php/Sudo

Once you've done that you can shut down with sudo <command>.  You can then use an alias in your .bashrc to make shutdown point to the sudo command:

alias poweroff='sudo poweroff'

etc

Dusty

Offline

#3 2007-11-04 13:43:21

Hide
Member
From: Castalia
Registered: 2007-02-02
Posts: 368

Re: shutdown by normal user

quick and dirty:
chmod +s /sbin/{reboot,poweroff}

big_smile

Offline

#4 2007-11-04 16:00:37

pelle.k
Member
From: Åre, Sweden (EU)
Registered: 2006-04-30
Posts: 667

Re: shutdown by normal user

You need to inform us in *how*, that is by what method, do you want user to be able to shut down?


"Your beliefs can be like fences that surround you.
You must first see them or you will not even realize that you are not free, simply because you will not see beyond the fences.
They will represent the boundaries of your experience."

SETH / Jane Roberts

Offline

#5 2007-11-05 10:33:38

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,229
Website

Re: shutdown by normal user

I found the easiest method to be the one where you add the user you want to grant these privileges to the power-group.

# gpasswd -a user power

Zl.

Offline

Board footer

Powered by FluxBB