The problem
If you get the following error message:
'NULL' is not valid for password 'password', in table: 'users'
This means there is a literal password value of NULL in /etc/op5/auth_users.yml
.
The Solution
Step 1
From the Monitor shell, look for any users in /etc/op5/auth_users.yml
that do not have a password entry (or simply run grep -B 5 -i null /etc/op5/auth_users.yml
). In a valid entry, you will see both password
and password_algo
fields and values:
john:
username: "john"
password: "$1$7th39pXa$IV0PUeEJDY752corXIWGr."
password_algo: "crypt"
modules:
- "Default"
groups:
- "admins"
realname: "John Doe"
When you get a failing entry, you will not likely have a password_algo
field and the password value will not be in double-quotes:
jane:
username: "jane"
password: null
modules:
- "Default"
groups:
- "admins"
realname: "Jane Doe"
Step 2
Copy each of the user entries that do not have passwords. You will need to re-enter this content when you add the password since any update via op5-manage-users
will purge existing content. Please see https://support.itrsgroup.com/hc/en-us/articles/360020252513-How-to-reset-the-password-for-local-users for details.
Step 3
Use /usr/bin/op5-manage-users
to set the password, and provide the original values along with the password. Based on the example above:
op5-manage-users --update --username=jane --password=PASSWORD--realname="Jane Doe" --group=admins
Comments
0 comments
Please sign in to leave a comment.