# Unix user problem : "I have no name!"

## Roman2K

Hello,

I am using libnss-mysql-1.4 and it works well except that the system looks not to be able to retrieve a user's information from its UID. I can auth with a login and password from a MySQL database but the prompt shows "I have no name!@localhost" as logged in user, and typing "whoami" prints :

```
I have no name!@localhost /tmp $ whoami

whoami: cannot find username for UID 5000

I have no name!@localhost /tmp $ id

uid=5000 gid=5000 groups=5000
```

And typing "id cinergi" (where cinergi is a user stored with the sample data in the MySQL database) gives :

```
localhost tmp # id cinergi

uid=5000(cinergi) gid=5000(foobaz) groups=5000(foobaz)
```

I have no idea what is wrong and where the problem can come from.

I am testing libnss-mysql with the sample database schema and data, the sample nss-user and nss-root, and the sample libnss-mysql.cfg and libnss-mysql-root.cfg.

Databse schema and data :

http://libnss-mysql.sourceforge.net/libnss-mysql/sample/linux/sample_database.sql

libnss-mysql.cfg :

http://libnss-mysql.sourceforge.net/libnss-mysql/sample/linux/libnss-mysql.cfg

libnss-mysql-root.cfg :

http://libnss-mysql.sourceforge.net/libnss-mysql/sample/linux/libnss-mysql-root.cfg

And my /etc/nsswitch.conf :

```
# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/nsswitch.conf,v 1.1 2005/05/17 00:52:41 vapier Exp $

passwd:      compat mysql

shadow:      compat mysql

group:       compat mysql

# passwd:    db files nis

# shadow:    db files nis

# group:     db files nis

hosts:       files dns

networks:    files dns

services:    db files

protocols:   db files

rpc:         db files

ethers:      db files

netmasks:    files

netgroup:    files

bootparams:  files

automount:   files

aliases:     files
```

Any help is welcome, thank you.

=> The answer!Last edited by Roman2K on Wed Nov 30, 2005 7:05 pm; edited 2 times in total

----------

## allucid

there's probably a problem with /etc/passwd (check the permissions).

----------

## Roman2K

Allucid, thank you for the answer.

The problem should not be from /etc/passwd since I did not touch it (perms : -rw-r--r--).

I tested the library nss-mysql too and there is the same issue  :Shocked: .

----------

## Roman2K

Has nobody else an idea, please ?

----------

## Roman2K

I found the answer : /etc/nsswitch.conf was not world-readable  :Very Happy: .

Thanks anyway !

----------

