[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#189309: id: unknown user name: 0



Hi,

On Wed, Apr 16, 2003 at 08:02:37PM +0200, Petter Reinholdtsen wrote:
> [Joe Nahmias]
> > Executing `id` returns the error message "id: unknown user name: 0" in
> > the shell in debian-installer.  I tested Tollef's daily d-i build from
> > 2003-04-14.
> 
> This works with busybox-udeb v1:0.60.6-2:
> 
>   # id
>   uid=0(root) gid=0(root)
>   #

the id applet from busybox-cvs tries to use nss-libraries to query the
system (/etc/nsswitch.conf and /lib/libnss*.so). The normal busybox
version doesn't do this, it simply parse the files directly.

I have attached two strace outputs (created with both busybox version in
the debian-installer).

Hope this will help to track down the problem.
Please contact me for more informations, or the complete strace output
:)

Bye
Thorsten


# strace id						<---  busbox (1:0.60.5-2)
[...]
open("/etc/passwd", O_RDONLY)           = 4
read(4, "root:*:0:0:root:/:/bin/sh\n", 256) = 26
lseek(4, 0, SEEK_CUR)                   = 26
close(4)                                = 0
getegid32()                             = 0
open("/etc/group", O_RDONLY)            = 4
read(4, "root:x:0:\n", 128)             = 10
lseek(4, 0, SEEK_CUR)                   = 10
close(4)                                = 0
open("/etc/passwd", O_RDONLY)           = 4
read(4, "root:*:0:0:root:/:/bin/sh\n", 256) = 26
lseek(4, 0, SEEK_CUR)                   = 26
close(4)                                = 0
open("/etc/group", O_RDONLY)            = 4
read(4, "root:x:0:\n", 128)             = 10
lseek(4, 0, SEEK_CUR)                   = 10
close(4)                                = 0
[...]
write(1, "uid=0(root) gid=0(root)\n", 24uid=0(root) gid=0(root)
) = 24


# strace id						<--- busybox-cvs (0.60.99.cvs20030221-1)
[...]
open("/usr/lib/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file
or direc)
[...]
open("/etc/nsswitch.conf", O_RDONLY)    = -1 ENOENT (No such file or
directory)
write(2, "id: ", 4id: )                     = 4
write(2, "unknown user name: 0", 20unknown user name: 0)    = 20
write(2, "\n", 1


# echo "passwd: compat" >>/etc/nsswitch.conf
# echo "group: compat" >>/etc/nsswitch.conf
# echo "shadow: compat" >>/etc/nsswitch.conf
# strace id
[...]
open("/usr/lib/libnss_compat.so.2", O_RDONLY) = -1 ENOENT (No such file
or dire)stat64("/usr/lib", {st_mode=S_IFDIR|0755, st_size=320, ...}) = 0
getegid32()                             = 0
socket(PF_UNIX, SOCK_STREAM, 0)         = 4
connect(4, {sa_family=AF_UNIX, path="/var/run/.nscd_socket"}, 110) = -1
ENOENT )close(4)                                = 0
write(2, "id: ", 4id: )                     = 4
write(2, "unknown user name: 0", 20unknown user name: 0)    = 20
write(2, "\n", 1
)                       = 1
exit_group(1)                           = ?





-- 
Thorsten Sauter
<tsauter@gmx.net>

				(Is there life after /sbin/halt -p?)

Attachment: pgpWro0yHgTdm.pgp
Description: PGP signature


Reply to: