login: This applet requires root privileges!
Denys Vlasenko
vda.linux at googlemail.com
Thu Oct 11 12:30:36 PDT 2007
On Thursday 11 October 2007 09:54, Vassilios Zafiropoulos wrote:
>
> dear list,
>
> I am experiencing great problems booting a system from initramfs.
> I am using a statically-built busybox binary as the initramfs system tool. The system itself, residing in a partition on the hard drive, is built from scratch using
> buildroot, and has busybox, again.
>
> After creating the initramfs archive, and linking it to the kernel, i would boot it inside qemu, and everything goes fine. I can mount all pseudo-filesystems, as required by mdev, and finally mount the 'real' root filesystem on a directory, local to the initramfs filesystem, namely /root.
>
> Problems arise when i try to finish the bool process, executing the /root/sbin/init program.
> Doing
> # exec switch_root /root /sbin/init
> does manage to run the init program, which spawns the login prompt, BUT
> i can never log in because:
>
> Welcome to the Erik's uClibc development environment.
>
> uclibc login: root
> login: This applet requires root privileges!
you seem to run getty's not under uid 0.
If applet is run under uid 0, you cannot reach that message:
static void check_suid(const struct bb_applet *applet)
{
gid_t rgid; /* real gid */
if (ruid == 0) /* set by parse_config_file() */
return; /* run by root - no need to check more */
...
if (applet->need_suid == _BB_SUID_ALWAYS) {
/* Real uid is not 0. If euid isn't 0 too, suid bit
* is most probably not set on our executable */
if (geteuid())
bb_error_msg_and_die("applet requires root privileges!");
--
vda
More information about the busybox
mailing list