Sometimes administrators need to temporarily 'log in as' a particular user, in order to debug some problem. There is the SU for Jira/Confluence plugin for this, and the Switch to a different user built-in script in the ScriptRunner plugin.


But if you're cheap or lazy, a JSP file (switchuser.jsp for Jira 8.x+, Jira 7.x or switchuser.jsp for Confluence) in the right place will do the job fine, although the UI is not that flash:

Just drop it into the right directory:

For Confluence

cd /opt/atlassian/confluence/$version/confluence/admin/
curl -LOJ 'https://hg.sr.ht/~redradishtech/atlassian_switchuser/raw/confluence/switchuser.jsp'
chown root:confluence switchuser.jsp

For JIRA 8.x and above

cd /opt/atlassian/jira/$version/atlassian-jira/secure/admin/
curl -LOJ 'https://hg.sr.ht/~redradishtech/atlassian_switchuser/raw/jira/8.x/switchuser.jsp'
chown root:jira switchuser.jsp

For JIRA 7.x and earlier

cd /opt/atlassian/jira/$version/atlassian-jira/secure/admin/
curl -LOJ 'https://hg.sr.ht/~redradishtech/atlassian_switchuser/raw/jira/7.x/switchuser.jsp'
chown root:jira switchuser.jsp


These JSPs work with Okta (unlike ScriptRunner - see SRPLAT-192), and will also pacify websudo initially, so you are not prompted for the user's password when doing certain admin operations.


  • No labels