Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

UAPI send passwords in a hashed format

Discussion in 'cPanel Developers' started by SAdamLongevity, May 15, 2018.

Tags:
  1. SAdamLongevity

    SAdamLongevity Registered

    Joined:
    May 15, 2018
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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?
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,142
    Likes Received:
    1,932
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice