You are not logged in.

#1 2009-05-09 15:55:46

haxit
Member
From: /home/haxit
Registered: 2008-03-04
Posts: 1,247
Website

[Solved] Shutdown and Reboot With Normal User

Title says it all. I tried the wiki (chmod +s /sbin/halt and the sudo method). Both of them don't work. As a normal user I type reboot, it doesn't work.

~/  reboot
reboot: must be superuser.

Last edited by haxit (2009-05-09 17:04:25)


Archi686 User | Old Screenshots | Old .Configs
Vi veri universum vivus vici.

Offline

#2 2009-05-09 16:19:03

djgera
Developer
From: Buenos Aires - Argentina
Registered: 2008-12-24
Posts: 723
Website

Re: [Solved] Shutdown and Reboot With Normal User

Strange! Where are you when execute the command? On a virtual console or in a pseudo-terminal ?

Offline

#3 2009-05-09 16:31:17

kgas
Member
From: Qatar
Registered: 2008-11-08
Posts: 718

Re: [Solved] Shutdown and Reboot With Normal User

some process to shutdown needs root access and hence this alone does not work. This link will give the details and solution.
http://www.computing.net/answers/linux/ … 15214.html. I did not try this as I am not in a multi user environment.

Last edited by kgas (2009-05-09 16:37:55)

Offline

#4 2009-05-09 16:47:11

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

Re: [Solved] Shutdown and Reboot With Normal User

If I understand you correctly, you want the ability to reboot and shutdown your machine from the shell?  Use sudo and make sure your /etc/sudoers contains the following:

username ALL=(ALL) /sbin/reboot,/sbin/shutdown

Alternatively, you can assign the privs to an entire group in that same file like this:

%special_users ALL=(ALL) /sbin/reboot,/sbin/shutdown

Just make sure you add the users in question to the 'special_users' group.  Also make sure you're editing your /etc/sudoers with visudo.

Once those changes have been made, your user(s) should simply enter the following from a shell to reboot or shutdown:

$ sudo reboot

or

$ sudo shutdown -h now

Last edited by graysky (2009-05-09 16:49:33)


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

Offline

#5 2009-05-09 17:04:14

haxit
Member
From: /home/haxit
Registered: 2008-03-04
Posts: 1,247
Website

Re: [Solved] Shutdown and Reboot With Normal User

kgas wrote:

some process to shutdown needs root access and hence this alone does not work. This link will give the details and solution.
http://www.computing.net/answers/linux/ … 15214.html. I did not try this as I am not in a multi user environment.

Worked like a charm. Thanks!


Archi686 User | Old Screenshots | Old .Configs
Vi veri universum vivus vici.

Offline

Board footer

Powered by FluxBB