You are not logged in.

#1 2009-05-18 19:41:06

civ247
Member
Registered: 2005-08-05
Posts: 53

Permissions confusion

Hello Everyone,

Some confusion about Linux permissions.

http://wiki.archlinux.org/index.php/All … o_shutdown

According to this doing chmod -s /sbin/halt will allow regular users to shutdown.

It doesnt work, do i need to add regular users a certain group or something?

ls -l | grep halt:

-rwxrwxrwx 1 root root   10076 2009-04-30 08:03 halt

What about allowing a regular user install using pacman??


Thanks,

Civ,

Offline

#2 2009-05-18 19:44:43

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Permissions confusion

Use sudo


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#3 2009-05-19 16:51:24

civ247
Member
Registered: 2005-08-05
Posts: 53

Re: Permissions confusion

Any options other than sudo?

Offline

#4 2009-05-19 17:00:17

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: Permissions confusion

civ247 wrote:

...doing chmod -s /sbin/halt will allow regular users to shutdown.

It doesnt work...

FWIW, the wiki i just looked at said chmod +s /sbin/halt

irregardless, just use visudo to edit the sudoers file and make halt/pacman available with NOPASSWD for a particular group (then you can even alias pacman='sudo pacman' and similar)

or more succinctly as Mr Edlendig said: use sudo.

that would be the easy/secure way to do it.

Offline

#5 2009-05-19 19:20:06

civ247
Member
Registered: 2005-08-05
Posts: 53

Re: Permissions confusion

brisbin33 wrote:
civ247 wrote:

...doing chmod -s /sbin/halt will allow regular users to shutdown.

It doesnt work...

FWIW, the wiki i just looked at said chmod +s /sbin/halt

irregardless, just use visudo to edit the sudoers file and make halt/pacman available with NOPASSWD for a particular group (then you can even alias pacman='sudo pacman' and similar)

or more succinctly as Mr Edlendig said: use sudo.

that would be the easy/secure way to do it.

thanks brisbin, did chmod +s properly and it works now. Not really a fan of sudo.

Offline

#6 2009-05-19 19:51:28

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Permissions confusion

@civ247 - why are you a sudo hater?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2009-05-19 23:48:44

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: Permissions confusion

Is there something PolicyKit can do here?


neutral

Offline

#8 2009-05-20 00:14:28

Lexion
Member
Registered: 2008-03-23
Posts: 510

Re: Permissions confusion

allowing halt to be run as user might not be the best for security reasons...


urxvtc / wmii / zsh / configs / onebluecat.net
Arch will not hold your hand

Offline

#9 2009-05-20 14:35:24

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Permissions confusion

Lexion wrote:

allowing halt to be run as user might not be the best for security reasons...

With sudo you can set it to only be allowed to execute `halt` when the user is present locally, in which case he has access to the physical power button anyway....

Last edited by Mr.Elendig (2009-05-20 14:35:45)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

Board footer

Powered by FluxBB