The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

htpasswd Encryption

Discussion in 'Security' started by grayloon, Aug 6, 2014.

  1. grayloon

    grayloon Well-Known Member

    Joined:
    Oct 31, 2007
    Messages:
    102
    Likes Received:
    2
    Trophy Points:
    68
    Location:
    Evansville, IN
    cPanel Access Level:
    Root Administrator
    Twitter:
    I'm trying to script a server-wide change of all passwd files. I see that htpasswd supports MD5, SHA, and crypt. When I use htpasswd via command line, none of those options seems to produce the same format/syntax as the passwords generated in cPanel. How can I replicate the cPanel format via command line? Is it salted or something?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,995
    Likes Received:
    1,275
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    I suggest using our API to change the passwords. There's also a thread here if you prefer to use just a bash script instead of our API:

    Change All Passwords

    Thank you.
     
  3. grayloon

    grayloon Well-Known Member

    Joined:
    Oct 31, 2007
    Messages:
    102
    Likes Received:
    2
    Trophy Points:
    68
    Location:
    Evansville, IN
    cPanel Access Level:
    Root Administrator
    Twitter:
    The referenced thread is related to changing account passwords. I'd like to change the passwords in the htpassword files server-wide. Any pointers on doing that with the API?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,995
    Likes Received:
    1,275
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    You may find this API function helpful, depending on what exactly you are attempting to modify:

    API1 - .htaccess

    Thank you.
     
Loading...

Share This Page