[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: adduser failed with unknow uid=0
From: Tito <farmatito () tiscali ! it>
Date: 2006-12-26 7:31:14
Message-ID: 200612260831.14807.farmatito () tiscali ! it
[Download RAW message or body]
On Tuesday 26 December 2006 07:20, he-guo@mediaring.com wrote:
> Hi Denis,
>
> you are right. but I can not figure out why like that.
> all user account related commands get problem with 1.30 version.
>
> Thanks a lot for your help
>
>
> ----- Original Message -----
> From: "Denis Vlasenko" <vda.linux@googlemail.com>
> To: <busybox@busybox.net>
> Cc: <he-guo@mediaring.com>
> Sent: Tuesday, December 26, 2006 1:02 PM
> Subject: Re: adduser failed with unknow uid=0
>
>
> > On Tuesday 26 December 2006 04:25, he-guo@mediaring.com wrote:
> > > Hi all,
> > >
> > > I tested busybox-1.30, i found adduser failed with unknown uid=0.
> > >
> > > adduser test
> > > passwd: unknown uid 0
> > >
> > > i tested it using busybox internal function and glibc function,
> > > all failed with the same reason .
> >
> > Well, the only place where I see "unknown uid" string is here:
> >
> > int vlock_main(int argc, char **argv)
> > {
> > sigset_t sig;
> > struct sigaction sa;
> > struct vt_mode vtm;
> > struct termios term;
> > uid_t uid = getuid();
> >
> > pw = getpwuid(uid);
> > if (pw == NULL)
> > bb_error_msg_and_die("unknown uid %d", uid);
> >
> > But adduser surely doesn't call vlock!
> > It calls passwd. Maybe it is printed here?
> >
> > int passwd_main(int argc, char **argv)
> > {
> > ...
> > pw = getpwnam(name);
> > if (!pw) bb_error_msg_and_die("unknown user %s", name);
> >
> > Can you check whaich of these messages is printed?
> > --
> > vda
Hi, Denis
seems to me that the failing call is in passwd:
myuid = getuid();
if ((opt & OPT_lud) && (!argc || myuid))
bb_show_usage();
myname = xstrdup(bb_getpwuid(NULL, myuid, -1));
bb_getpwuid() via bb_getug() when
} else if (bufsize < 0 && !idname) {
bb_error_msg_and_die("unknown %cid %ld", prefix, id);
}
have not time to investigate this now tough.
Ciao,
Tito
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic