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.

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

Discussion in 'cPanel Developers' started by gustavodesouz, Jan 4, 2010.

  1. gustavodesouz

    gustavodesouz Registered

    Joined:
    Jan 4, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    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?
     
    #1 gustavodesouz, Jan 4, 2010
    Last edited: Jan 4, 2010
  2. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
  3. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Friendly Moderator Note

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

    gustavodesouz Registered

    Joined:
    Jan 4, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Yes.

    I solved a problem.

    Tks.
     
Loading...

Share This Page