call halt/reboot as user

Arno Steffen arno.steffen at googlemail.com
Fri Jan 7 08:09:29 UTC 2011


2011/1/6 Rob Landley <rob at landley.net>:
> 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
> configuration.)
>
> Rob
> --
> GPLv3: as worthy a successor as The Phantom Menace, as timely as Duke Nukem
> Forever, and as welcome as New Coke.
>

Thanks all for your help!
This works fine for me. The only trouble I have now, I can use it only
if it is compiled for a full blown desktop.
Otherwise I get an hang up while booting:
request_module: runaway loop modprobe binfmt-464c ?!?


More information about the busybox mailing list