How to change the order of authentication in aix?

I have an AIX system configured as NIS client.

I have an local user on the system called "batman" and i have a user by the same name in NIS as well.

Now when i try to login with Batman user, the local batman gets in.

How do I tell the AIX machine to authenticate Batman as NIS user?

Things work out if I just delete the local user.

Bala

/etc/nsswitch.conf

I would not change the order though.

In AIX land, the authentication order is dictated by the file /etc/netsvc.conf. Most other flavors use /etc/nsswitch.conf. Any changes you make in there, once you save, become effective immediately.

All that said, the best thing is to not have two same account names even if one is local and one is NIS. If you look at /etc/passwd, and your setup as an NIS client, the +::0:0::: tells ypbind to auth against your NIS domain master. If you netsvc.conf is default, any account above +::0:0::: will authenticate locally first, naturally, if the local account doesn't exit, system will then auth against your NIS domain.

I would rename batman to batman_local or batlocal. This way you have your local account (above +::0:0:::slight_smile: and also helps administration wise knowing that batlocal is local and not NIS.

Good luck!