Adding new users via WebUI
Hash Format Password
In case of scripts, admin users prefer to use password in hash format. This way the scripts don’t contain/display the actual passwords of the users.
In order to have a password in a hash format for the users when adding it via the NodeGrid WebUI, it is required to generate the hash password first on the NodeGrid shell prompt or elsewhere such as linux or a hash generator application.
There are several methods and options of hashing to generate hash passwords such as openssl, chpasswd, mkpasswd, and MD5, SHA256, SHA512, but this topic of how to generate hash passwords is not the scope of this article. Use any of your choice / preference.
Below we provide one example using openssl running on NodeGrid shell to generate the hash password.
root@nodegrid:~# openssl passwd -1 -salt mysalt
Password:
$1$mysalt$4Lz7hS.y2V54mV2gJXEKR/
Once the hash password is generated, copy it and paste it on the password fields from step 4 above with Hash Format Password checkbox checked.
Adding new users via CLI:
1. log in as admin to the CLI (via telnet/ssh/console)
2. type the following commands:
[admin@nodegrid /]# add /settings/local_accounts/
[admin@nodegrid {local_accounts}]# set username=<username>
[admin@nodegrid {local_accounts}]# set password=<password>
[admin@nodegrid {local_accounts}]# save
If hash password is desired, then type the following:
[admin@nodegrid /]# add /settings/local_accounts/
[admin@nodegrid {local_accounts}]# set username=<username>
[admin@nodegrid {local_accounts}]# set password=$1$mysalt$4Lz7hS.y2V54mV2gJXEKR/ hash_format_password=yes
[admin@nodegrid {local_accounts}]# save