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.

reset user password remotely

Discussion in 'General Discussion' started by ircmaxell, Jul 28, 2006.

  1. ircmaxell

    ircmaxell Member

    Joined:
    Mar 20, 2006
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    I need the functionality for users to both change and reset passwords automatically from the front end of my site. For the password change, they would be required to send the old password for verification. For reset passwords, the server automatically generates a new password for the front end of the site. I need to get those passwords into whm to change the password. I've looked into reverse engineering the scripts, and have no idea. Any help?
     
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    /scripts/chpass should let you change a user's password from the command line.

    Give this a go and see if it works. If so, you could write a wrapper to allow the functionality to be included in your own site.

    If you can also write a script to validate the existing password, which would simply involve md5ing the user's entry and comparing it to the relevant record in /etc/shadow, then you should also be able to integrate this into your own site (this method is just a guess but it's probably not too far off).

    I've posted an article explaining how to you can extend WHM's remote access features through PHP. So long as you can write server-side scripts to perform the necessary tasks, the article will cover how to integrate the functionality into your own site.

    HOW TO: Create your own remote access features in PHP
     
Loading...

Share This Page