Superuser doesn't have proper permissions

I was experimenting with roles and noticed that Superuser only had ROLE_USER.

I removed ROLE_USER and added ROLE_SUPERUSER

Now when I log in, I don't have permission to view anything nor do I have access to the Manage tab.


How is this even possible? Shouldn't superuser always have access? Is this just bad design? How do I fix this? Can I add/remove roles from the db. If so, can you please tell me how?

itgroup's picture
Joined: Jul 23 2016 - 12:19pm
Last seen: 1 year 1 week ago

2 Answers:

SOLVED: For other users out there, superuser, and every other user needs ROLE_USER to function.

I didn't have a dbuser password so:

  1. Dropped into user postgres to find pg_hba.conf (for me it was in /var/lib/pgsql93/data/pg_hba.conf)
  2. Added this to the first line: local all all trustlocal all all trustlocal all all trustlocal all all trustlocal  all   all   trust (security alert!! this needs to be reverted back right away when you are done - you might want to use whitelisted IPs only in your firewall config when doing this)
  3. psql -U postgres
  4. gave postgres a new password (and this caused me problems I'm still working on)
  5. \connect jasperserver
  6. UPDATE jiuserrole SET roleid = 5 WHERE userid = 10;

Now superuser is back to ROLE_USER


Now I have to figure out where to add the new password for postgres in the relevant configs because Jasper is now not working due to that changed password.


EDIT: Regarding #4, the original password for postgres is ... drumroll .... "postgres".

itgroup's picture
Joined: Jul 23 2016 - 12:19pm
Last seen: 1 year 1 week ago

Re: #4 and the problems you caused, that is bacause your JasperServer can no longer access the repository, go to /webapps/jasperserver-pro/META-INF/context.xml and change the password for the jdbc/jasperserver JNDI connection properies in that XML file and restart the server :)


marianol's picture
Joined: Sep 13 2011 - 8:04am
Last seen: 4 years 5 months ago