I just would like to tell what I've experienced. Suppose this could be posted in Administration/Installation also. After some trouble I was reinstalling a server with nss volumes to the tree. There was already another machine installed with nss in the eDirectory. I searched the problem in nam as when i was doing:

getent passwd

i got three lines of admin one in the right place and the other twos at the end.

id admin showed me one line but where was a group missing that i added as a test. My first idea was that the nam cache was corrupt but that wasn't the case. namconfig cache_refresh and namconfig -k didn't help.

getent group showed that admin was a member of the test group.

What i did was probably unnecessary when i now know the answer. I removed all of OES2 and added it step by step. First the edirectory and ldap and checked that it work with an ldap tool. Then i added the replica to the server.

The second step was to make lum/nam work. I had hoped that the reinstall should fix but that didn't help.

Then i got a crazy idea as Linux i case sensitive.

id admin
id Admin
and got two different answers.

The correct answer came from admin so i made sure my admin user was named admin and not Admin. I then rerun getent passwd and it still showed 3 admins in the list and now i knew it couldn't be the right admin showing up at the end. (did a namconfig refresh_cache to check)

I searched the eDirectory and couldn't find anything with Admin. Then yet another idea popped up. Maybe there could be an object with another name and a cn with Admin. I had read about orphaned leaves.

I found some unknown objects named 0_1 etc. And when checking them there was two of them with cn=Admin.....

I checked and they didn't show up as lum-objects. I then removed them and getent and id showed the right stuff after an namconfig refresh_cache.

Then I installed nss again it worked fine!

It could be a bug or that I in some point added the user with the wrong case with admin. But isn't eDirectory case insensitive....

With this message i hope that someone doesn't need to spend hours of searching for this problem.

Also a big thanks to the people thats answer the posts at this place. I have had a lot of help from reading the posts.