Satoshino
Nov 16, 2023Cirrus
Create users Local User DB by CLI
Hello folks,
im looking for create users inside the localdb in APM module by CLI.
i verified that doesn't exitst a command for this purpose and i tried also to add user directly in the db table auth_user, but seems like that the appliance does'nt digest this configuration despite i can see new users added to the table:
MYSQL_PW=`perl -MPassCrypt -nle 'print PassCrypt::decrypt_password($_)' /var/db/mysqlpw`
MYSQL_PW="$(/usr/bin/perl -MPassCrypt -nle 'print PassCrypt::decrypt_password($_)' /var/db/mysqlpw)"
INSERT INTO auth_user (uid, uname, instance, password, user_groups, login_failures, lockout_start, tt1) VALUES ('14365', 'username', '/Common/instance', 'password', '', '0', '0', '1700135315');
--------------------+
| uid | uname | instance | password | user_groups | login_failures | passwd_expire | lockout_start | ttl | dynamic_user | deleted | suspended | locked_out | change_passwd | last_modified |
+-------+-----------+-------------------------------+----------------------------------------+-------------+----------------+---------------+---------------+------------+--------------+---------+-----------+------------+---------------+---------------------+
| 14365 | username | /Common/instance | password | 0| 0| 0| 0| 0| 0 | 0 | 0 | 0 | 0 |
Do you know how i can create users by CLI/API?
best regards