Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When I type

reboot

I get

reboot: Need to be root

P.S. I do not have sudo privileges and password

share|improve this question
add comment

2 Answers

On Debian, you have to be a member of the powerdev group in order to shut the computer down as a regular user. I am not sure how this works in Ubuntu.

What you can do either way is to use the setuid bit in order to allow anyone to reboot the computer. Think about it, before you do this though. Maybe you can only set the setuid for the group of reboot and change the group of reboot to your own user group (or create a new power group by hand).

share|improve this answer
    
And if you don't have permissions to make the changes on another account, reboot to recovery mode, select the 'remount' option, and then the 'root' option and do it then you will, but it's probably best to ask the machine admin do do it for you .... –  ams Dec 2 '11 at 12:27
    
I can reboot using the GUI (unity?gnome?) –  UAdapter Dec 2 '11 at 12:31
    
Yes, since GDM/LightDM is allowed to reboot the computer if nobody else is logged in. But it is not really you who shuts it down. –  queueoverflow Dec 2 '11 at 18:18
add comment

We don't know what Ubuntu you're using but to power off the computer try

dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop

and to restart

dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart

For a list of possible actions run

dbus-send --system --print-reply --dest=org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/Manager org.freedesktop.DBus.Introspectable.Introspect
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.