Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jan 2010
    Posts
    3

    Default Direct access denied. Please use the WHM interface to change the password.

    Hi.

    we have a script to create cpanel accounts. It uses communication via socket, with php.

    Example:

    private function alterPasswordCpanel() {
    $dadosAccountAdd = "POST /scripts/passwd?domain={$this->getUserClient()}&password={$this->getPassClient()} \r\n HTTP/1.0\r\n";
    $dataAccountAdd .= "Host: Example \r\n";
    $dataAccountAdd .= "Authorization: Basic " . $this->authorizationBasicString () . "\r\n\r\n";

    $result = '';

    $this->fPut ( $dataAccountAdd );

    while ( ! feof ( $this->socket ) ) {
    $result .= htmlspecialchars ( $this->fGets () );
    }
    echo '<hr>???'.$result.'???<hr>';
    $this->fClose ();

    }

    I formatted the server. Before it worked perfectly, now displays the following message:

    "Direct access denied. Please use the WHM interface to change the password."

    Can anyone help me?
    Last edited by gustavodesouz; 01-04-2010 at 10:29 AM.

  2. #2
    cPanel Staff cPanelMatt's Avatar
    Join Date
    Apr 2005
    Location
    Houston, TX
    Posts
    409

    Default

    This was changed due to security issues within the change password interface. For this type of interaction, you should be using the XML-API:

    ChangePassword < AllDocumentation/AutomationIntegration < TWiki
    Matt Dees
    Integration Developer
    cPanel, Inc.
    cPanel Integration Blog

  3. #3
    cPanel Quality Assurance Analyst cPanelDon's Avatar
    Join Date
    Nov 2008
    Location
    Houston, Texas, U.S.A.
    Posts
    2,555
    cPanel/Enkompass Access Level

    DataCenter Provider

    Arrow Friendly Moderator Note

    I've moved this thread into the Developer Discussions area of the forums.

  4. #4
    Registered User
    Join Date
    Jan 2010
    Posts
    3

    Default

    Yes.

    I solved a problem.

    Tks.

Similar Threads & Tags
Similar threads

  1. Ability to turn off password change in webmail login interface
    By sawbuck in forum Feature Requests for cPanel/WHM
    Replies: 10
    Last Post: 05-02-2012, 03:32 AM
  2. Replies: 1
    Last Post: 01-04-2010, 12:34 PM
  3. Replies: 14
    Last Post: 11-07-2009, 11:49 AM
  4. Replies: 5
    Last Post: 08-07-2008, 03:03 AM
  5. Wrong username/password. Access denied.
    By bhavesh.vala in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 06-09-2008, 02:41 AM
Tags for this Thread
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube