UAPI send passwords in a hashed format

SAdamLongevity

Registered
May 15, 2018
1
0
1
Canada
cPanel Access Level
Root Administrator
Hi,

I am working on creating several Hooks to automate some tasks that need to be performed everytime a new account is added including: creating a database, creating a database user, and granting permissions to that user.

Unfortunately I have reached a problem with the creation of the database user, as the UAPI function mysql::create_user does not seem to support taking the new user's password as a hash.

For organizational reasons we want to match the database user password with the account password specified at account creation, which we can obtain in a hashed format using perls getpwnam function.

Does anyone have any suggestions towards automating the creation of the new database user, with the same password used during account creation, or any ideas on how to get UAPI to take a hashed password instead of a plaintext one?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463