call halt/reboot as user

Rob Landley rob at
Thu Jan 6 10:04:56 UTC 2011

On Monday 03 January 2011 04:25:42 Arno Steffen wrote:
> Happy NY to all of you!
> I do have two questions:
> 1) I want normal user give the permission to reboot or halt the system.
> With current implemented busybox it is not allowes - I just get a NO.
> I already changed the link from /sbin/reboot to /bin/reboot or changed
> permission, but this doesn't help.
> 2) when user is logged in, I can't change to root, as login command
> can only be run as superuser.
> How can I change the user?

Set the suid bit on your busybox binary, and enable CONFIG_FEATURE_SUID and 
CONFIG_FEATURE_SUID_CONFIG.  Then read the menuconfig help for 
CONFIG_FEATURE_SUID_CONFIG.  (It's under busybox settings -> general 

GPLv3: as worthy a successor as The Phantom Menace, as timely as Duke Nukem 
Forever, and as welcome as New Coke.

More information about the busybox mailing list