UID is -1, can't login?
Rob Landley
rob at landley.net
Tue Jun 27 21:16:06 UTC 2006
On Tuesday 27 June 2006 4:27 pm, Joshua ChaitinPollak wrote:
> Hi,
>
> I'm having a strange problem with Busybox 1.1.0 and 1.1.3. When my
> system boots, I get the login prompt, I type my username, and then I
> get this error:
>
> login: This applet requires root priviledges!
>
> So I hacked applets/applets.c to add this line:
>
> if (geteuid() != 0) {
> + fprintf(stderr, "Effective UID = %d, ruid = %d\n", geteuid(), ruid);
> bb_error_msg_and_die("This applet require root priviledges!");
> }
>
> What I get when I run this is:
>
> Soekris login: root
> Effective UID = -1, ruid = -1
> login: This applet requires root priviledges!
Huh, geteuid() is _failing_. That's nice. Is there an errno?
The man page says "these functions are always successful", which is just
WEIRD. What libc are you using, and what kernel version?
> What would cause my uid to be -1???
Do you have an /etc/passwd? (If so, is it readable?) A stab in the dark...
Rob
--
Never bet against the cheap plastic solution.
More information about the busybox
mailing list