A user password can be changed in 5 ways:
1.A system administrator can change the password for any user on the system.
2.A tenant administrator change the password for the tenant users.
3.The user can change the password while logged on.
4.The user can also request a new password by email from the system, if email smtp for the system has been set up.
5.It is possible to type in a new password in the configuration file, if you have access to the file system in which InterFormNG2 is installed.
It is possible for a user to change his/her password while signed on.
To do that you need to click colored circle in the top right corner of InterFormNG2:
- and then the Change password line as marked above:
If a user has forgotten the password and cannot sign on, then the user has these options:
1.Request an email from the system.
2.Request a tenant admin to set a new password.
3.Request a system admin to assign a new password.
4.Change the password directly in the configuration file.
A prerequisite for this to work is, that a global email server has been setup.
You need to click the Forgot password option on the sign on window:
Then you will see this:
Type in your email address (as registered in InterFormNG2) and click SEND. An email with a new password is then sent to you - provided that email smtp has been setup in the InterFormNG2 settings.
If you have locked yourself out and none of the options mentioned above are an option, then you have one, final way to gain access to InterFormNG2, but this require that you have access to the InterFormNG2 file system.
This describes how you can setup the password for a user profile by changing a configuration file.
First you need to find the configuration file. It is found in the directory:
{{env:INTERFORMNG2_HOME}}\profiles\default
On the Windows platform this will normally translate into:
C:\ProgramData\InterFormNG2\profiles\default, but it depends on the INTERFORMNG2_HOME environment variable.
On the IBM i platform the configuration file is found in the IFS in /root/iformng2/InterFormNG-shell/user/profiles/default.
The relevant file is called: users.json
It is very important, that you save a copy of this file before you edit it like described below.
For editing the file you need to use an editor, that does not add any extra formatting e.g. the simple Notepad editor or Notepad++. It is important, that you change as little as possible, and you should not press enter while editing the file. An advise is to run the editor as an administrator in Windows, so that you can save the changed file back into the directory, where it was found.
You can run start Notepad as an administrator by searching for the Notepad application, right-click on Notepad and select 'Run as administrator':
Now you can find the file, if you remember to setup Notepad to show all files:
When you have opened the file in the editor you should search for the user, for which that you want to change the password. You are looking for a section, that looks like this:
"username":"<user>", where <user> is the user, that you want to change the password for. If e.g. you want to change the password for the user admin, then you should search for "username":"admin"
Here we have done the search and found this:
"admin":{"username":"admin","tenantAuthorities":[{"tenantId":"default","authorities":["ROLE_SYSTEM_ADMIN"]}],"password":"{bcrypt}$2a$10$SixCWJkvIkmi.ooqy6zXueV/97k8I5qc4KRYe2ZOF6dlQSi4fX6IS","pwChangeRequired":false}
As you can see, the current password is encrypted, so you cannot see what the password currently is, but you can type in a new password to be used instead in the value for the password as shown below:
"admin":{"username":"admin","tenantAuthorities":[{"tenantId":"default","authorities":["ROLE_SYSTEM_ADMIN"]}],"password":"NewPassword","pwChangeRequired":false}
In the example above we have chosen the new password to be, NewPassword.
You can also chose to force the user to change the password the first time, that the user signs on. You can do that, if you also change the value for the field, pwChangeRequired from false into true like below:
"admin":{"username":"admin","tenantAuthorities":[{"tenantId":"default","authorities":["ROLE_SYSTEM_ADMIN"]}],"password":"NewPassword","pwChangeRequired":true}
When you want to save the changes, then the editor might refuse to save the changes back into the original file (and also refuse to save into the same directory) with this error:
The reason is, that you have not run the editor as a Windows administrator. A workaround is then to save the file into another directory e.g. in documents, but then you need to make sure, that you save the file with the extension .json and NOT with the extension .txt as Notepad will suggest. You ensure the .json extension, if you select All files (*.*), when you save the changed document:
After saving the file to another folder, then you can normally copy the changed users.json file into the right folder via File explorer and here the File explorer will warn you, but still allow you overwriting the original file with Continue: