Ambari – user can log in but has no privileges

We ran into some interesting issue – user has all the privileges, was in correct ldap group, can log in to the ambari, but privileges weren’t effective.

I did multiple discoveries – checked log ambari-server.log and found out following

So, tried to restart ambari-server, didn’t work. Did further investigation, using ambari API

so, this worked. Notice uppercase in user_name. So I tried to fetch user info with privileges

Nice. Works too. So another check – load only certain privileges – 153.

Aha! Looks like there’s some inconsitency in the postgres database. So, check it!

Gotcha. There’s no such user named myuser in the database – and pg is case sensitive. So, rename the user

and restart ambari-server. Now we can try again the api call