# How to change Opal admin password from WebUI

**URL:** <https://datashield.discourse.group/t/how-to-change-opal-admin-password-from-webui/895>\
**Category:** Beginner Support\
**Created:** [30 November 2023 16:00 UTC](https://datashield.discourse.group/t/how-to-change-opal-admin-password-from-webui/895 "2023-11-30T16:00:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![aakkoc](https://yyz2.discourse-cdn.com/free1/user_avatar/datashield.discourse.group/aakkoc/32/200_2.png) [@aakkoc](https://datashield.discourse.group/u/aakkoc)\
**Post date:** [30 November 2023 16:00 UTC](https://datashield.discourse.group/t/how-to-change-opal-admin-password-from-webui/895/1 "2023-11-30T16:00:30Z")

</div>

It’s possible to change the default admin password [while setting up Opal](https://datashield.discourse.group/t/change-the-passwords-in-docker-image/609), but is it also possible to change it afterwards from the web UI.

If not, I suppose enabling 2FA is the next best thing?

---

<div class="post-metadata">

**Author:** ![yannick](https://yyz2.discourse-cdn.com/free1/user_avatar/datashield.discourse.group/yannick/32/19_2.png) [@yannick](https://datashield.discourse.group/u/yannick)\
**Post date:** [30 November 2023 16:52 UTC](https://datashield.discourse.group/t/how-to-change-opal-admin-password-from-webui/895/2 "2023-11-30T16:52:43Z")

</div>

Hi,

It is not possible, it has to be done manually on the server. This default user is more for the initial setup, and should not be used on a day to day basis. The best practices are:

As the (default) administrator

- login
- enable 2FA
- create a real user (your name) so that the audit tracks your personal activity and add it to an admin group (call it “opal-admin” for instance, the name does not matter)
- grant this group full administration permission: go to Administration \> General settings \> Permissions and add group permission (choose “Administrate”)
- logout

As the new admin user

- login
- enable 2FA
- verify you have all permissions
- for any scripting operations: use personal access tokens
- …

Regards  
Yannick

---

<div class="post-metadata">

**Author:** ![aakkoc](https://yyz2.discourse-cdn.com/free1/user_avatar/datashield.discourse.group/aakkoc/32/200_2.png) [@aakkoc](https://datashield.discourse.group/u/aakkoc)\
**Post date:** [30 November 2023 18:11 UTC](https://datashield.discourse.group/t/how-to-change-opal-admin-password-from-webui/895/3 "2023-11-30T18:11:09Z")

</div>

Thank you.

The alternative would be to edit the shiro.ini file I presume?

---

<div class="post-metadata">

**Author:** ![yannick](https://yyz2.discourse-cdn.com/free1/user_avatar/datashield.discourse.group/yannick/32/19_2.png) [@yannick](https://datashield.discourse.group/u/yannick)\
**Post date:** [30 November 2023 19:39 UTC](https://datashield.discourse.group/t/how-to-change-opal-admin-password-from-webui/895/4 "2023-11-30T19:39:08Z")

</div>

The password must be hashed, instructions are in the shiro.ini file. [https://opaldoc.obiba.org/en/latest/admin/configuration.html#user-directories](https://opaldoc.obiba.org/en/latest/admin/configuration.html#user-directories)

---

<div class="post-metadata">

**Author:** ![aakkoc](https://yyz2.discourse-cdn.com/free1/user_avatar/datashield.discourse.group/aakkoc/32/200_2.png) [@aakkoc](https://datashield.discourse.group/u/aakkoc)\
**Post date:** [1 December 2023 13:15 UTC](https://datashield.discourse.group/t/how-to-change-opal-admin-password-from-webui/895/5 "2023-12-01T13:15:01Z")

</div>

And what do I have to do to update changes?

Restarting the opal process does not seem to update the shiro.ini passwords immediately (i can still log-in with the previous credentials)

---

<div class="post-metadata">

**Author:** ![yannick](https://yyz2.discourse-cdn.com/free1/user_avatar/datashield.discourse.group/yannick/32/19_2.png) [@yannick](https://datashield.discourse.group/u/yannick)\
**Post date:** [2 December 2023 11:22 UTC](https://datashield.discourse.group/t/how-to-change-opal-admin-password-from-webui/895/6 "2023-12-02T11:22:51Z")

</div>

Restart server is enough. That means you modified the wrong shiro.ini file.

---

<div class="post-metadata">

**Author:** ![aakkoc](https://yyz2.discourse-cdn.com/free1/user_avatar/datashield.discourse.group/aakkoc/32/200_2.png) [@aakkoc](https://datashield.discourse.group/u/aakkoc)\
**Post date:** [4 December 2023 12:26 UTC](https://datashield.discourse.group/t/how-to-change-opal-admin-password-from-webui/895/7 "2023-12-04T12:26:20Z")

</div>

I have double checked and it seems to be the correct shiro.ini file. (dir matches output of `which opal`)

I restart the server with: `sudo systemctl restart opal.service`

On the administrator user profile the following message appears:

> **Password**
> 
> Your account was defined in the user directory “opal-ini-realm”. Please contact your system administrator to change the password in this directory.

---

<div class="post-metadata">

**Author:** ![aakkoc](https://yyz2.discourse-cdn.com/free1/user_avatar/datashield.discourse.group/aakkoc/32/200_2.png) [@aakkoc](https://datashield.discourse.group/u/aakkoc)\
**Post date:** [29 January 2024 09:00 UTC](https://datashield.discourse.group/t/how-to-change-opal-admin-password-from-webui/895/8 "2024-01-29T09:00:54Z")

</div>

Okay, maybe the issue is too verbose.

I recorded a video of myself changing the admin password and it not updating. Hopefully, this will let others see what the issue looks on my end:

[![](https://global.discourse-cdn.com/free1/uploads/datashield1/original/1X/b90ec4e34e84aacd22d262fd45b8347903001af6.jpeg "Opal Issue: Admin Password Reset Does Not Update") ](https://www.youtube.com/watch?v=sffvG7nPn60)

1. I use the shiro-hasher to get a new password
2. Update the conf/shiro.ini file
3. Restart opal
4. But it still expects the old password

What could be the reason?

---

<div class="post-metadata">

**Author:** ![yannick](https://yyz2.discourse-cdn.com/free1/user_avatar/datashield.discourse.group/yannick/32/19_2.png) [@yannick](https://datashield.discourse.group/u/yannick)\
**Post date:** [31 January 2024 09:33 UTC](https://datashield.discourse.group/t/how-to-change-opal-admin-password-from-webui/895/9 "2024-01-31T09:33:36Z")

</div>

Hi,

For the record of others, Ahmet was modifying the shiro.ini file from the Opal distribution folder (`/usr/share/opal` that contains the binaries and the default config), instead of the one from the Opal local installation: `/etc/opal`.

Following the common layout of application installation on linux systems:

- `/usr/share/opal` is the distribution folder (replaced when upgraded)
- `/var/lib/opal` is the local data folder
- `/etc/opal` is the configuration folder
- `/var/log/opal` is the log folder

Regards  
Yannick
