Some problems and questions

Discussion in 'Installation/Configuration' started by Typhon, Dec 4, 2011.

  1. Typhon

    Typhon New Member

    Hi
    I a new user of ISPC 3, it's work fine but i have many php errors :
    In Website quota :
    HTML:
    Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 44 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 45 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 46 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 44 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 45 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 46 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 44 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 45 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 46 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 44 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 45 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 46 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 44 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 45 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 46 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 44 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 45 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 46 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 44 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 45 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 46 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 44 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 45 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 46 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 44 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 45 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 46 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 44 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 45 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 46 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 44 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 45 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 46 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 44 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 45 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 46 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 44 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 45 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 46 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 44 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 45 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 46 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 44 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 45 Notice: Undefined index: user in /usr/local/ispconfig/interface/web/sites/user_quota_stats.php on line 46
    In Virtual server :
    HTML:
    Notice: Undefined index: on_after_update in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 139 Notice: Undefined index: vm:on_after_update in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 139 Notice: Undefined index: active_until_date in /usr/local/ispconfig/interface/lib/classes/tform.inc.php on line 367 Notice: Undefined index: active_until_date in /usr/local/ispconfig/interface/lib/classes/tform.inc.php on line 481 Notice: Undefined variable: template_id_select in /usr/local/ispconfig/interface/web/vm/openvz_vm_edit.php on line 153
    In monitoring :
    HTML:
    Notice: Undefined variable: html_server in /usr/local/ispconfig/interface/web/monitor/show_sys_state.php on line 237 Notice: Undefined index: unknown in /usr/local/ispconfig/interface/web/monitor/show_sys_state.php on line 255 Notice: Undefined index: info in /usr/local/ispconfig/interface/web/monitor/show_sys_state.php on line 256 Notice: Undefined index: warning in /usr/local/ispconfig/interface/web/monitor/show_sys_state.php on line 257 Notice: Undefined index: critical in /usr/local/ispconfig/interface/web/monitor/show_sys_state.php on line 258 Notice: Undefined index: error in /usr/local/ispconfig/interface/web/monitor/show_sys_state.php on line 259 Notice: Undefined variable: description in /usr/local/ispconfig/interface/web/monitor/show_sys_state.php on line 72
    … There are many problems so
    For the question :
    The panel (ISPC) is on sub.domain.tld and i need to user domain.tld for the principal website, i would know if creating an account with the domain : domain.tld can cause problems with my panel ?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    These are no errors, that are PHP debug messages because you have debugging enabled in PHP.

    Edit all php.ini files on your system and change the error_reporting level to:

    error_reporting = E_ALL & ~E_NOTICE

    and restart apache.
     
  3. Typhon

    Typhon New Member

    Ok, thanks
    Other questions :D :
    -When i go yo Website hard disk quota, i don't have any information about the disk usage
    -What is the hash algorithm and the salt used by ISPconfig to hashing passwords ?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Ensure that quota is installed and activated as decsribed in the perfect setup guide.

    ISPConfig uses the Linux default algorithm which is crypt-md5
     
  5. Typhon

    Typhon New Member

    Ah great that's work :)
    No questions for the moment, thank you till
     
  6. Typhon

    Typhon New Member

    Hi !
    I will create manually a client but i would to know if it's required to give the id_rsa and ssh_rsa must ?
     
  7. falko

    falko Super Moderator ISPConfig Developer

    No, that's needed only if you want to use key-based SSH logins.
     
  8. Typhon

    Typhon New Member

    So it's only if i give SSH account ?
    If i disable SSH acount for my clients, i don't need to give the rya key ?
     
  9. falko

    falko Super Moderator ISPConfig Developer

    You can use password-based SSH logins without these fields - they are needed only for key-based logins.
     
  10. Typhon

    Typhon New Member

    I did not understand, I do not know the key-based logins and password-based SSH logins
    I have an other problem, i try to add a user
    PHP:
            $username $_POST['username'];
            
    $password crypt($_POST['password']);
            
            
    $query=$db->prepare('INSERT INTO  client(username, password)
            VALUES (:username, :password)'
    );
            
    $query->bindValue(':username'$usernamePDO::PARAM_STR);
            
    $query->bindValue(':password'$passwordPDO::PARAM_STR);
            if(
    $query->execute()){echo 'yes';}
            
    $query->CloseCursor();
    The user is created in the DB but i can't use it for connection, i have this message when i try to login in ISPC :
    ERROR

    Error
    Username or Password wrong.
    I think that there are a problem with the password hashing, we must use cryt, no ?

    EDIT :Even if i change the password from my admin account i cannot connect….
    For information, i have give in the DB ONLY the username and the password
     
    Last edited: Dec 7, 2011
  11. cbj4074

    cbj4074 Member HowtoForge Supporter

    When till said,

    I believe he was referring to the algorithm that ISPConfig uses when creating Linux system users (not ISPConfig users, per se).

    How are you creating your new users? With the ISPConfig API?
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    The algorithm is used for all passwords in ISPConfig (Linux System Users ISPConfig CP Users and Email accounts) except of mysql logins as mysql uses its own algorithm.
     
  13. Typhon

    Typhon New Member

    I insert user with PDO :
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats not crypt-md5 encryption. Crypt can create many different algorithms, see php manual. Take a look here on how to create a crypt-md5 password.

    Code:
    function crypt_password($cleartext_password) {
    		$salt="$1$";
    		$base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
    		for ($n=0;$n<8;$n++) {
    			$salt.=$base64_alphabet[mt_rand(0,63)];
    		}
    		$salt.="$";
    		return crypt($cleartext_password,$salt);
    	}
     
  15. Typhon

    Typhon New Member

    It's difficult to imagine the system that ISPC use so it's impossible for me to create a user ?
    There are no developers in this forum ? :confused:
    Can some body give me the function that ISPC use ? :(
     
  16. Typhon

    Typhon New Member

    It's difficult to imagine the system that ISPC use so it's impossible for me to create a user ?
    There are no developers in this forum ? :confused:
    Can some body give me the function that ISPC use ? :(
     
  17. cbj4074

    cbj4074 Member HowtoForge Supporter

    Dude, you haven't told us anything about what you're attempting to do relative to "creating a user" or where you're doing it. Are you modifying the ISPConfig code? Are you attempting to create your own plug-in/module? It's hard for us to help when you're so vague.

    Till built ISPConfig; he's qualified to address your questions. :rolleyes: He also gave you a code-snippet that is copy-paste-ready and demonstrates the procedure for creating a password with the crypt-md5 algorithm.

    Also, you do realize that the entire ISPConfig code-base is available to the public, right?

    Perhaps checkout a copy of the SVN repository contents and dig-around...

    Finally, ISPConfig has a complete API for doing things like creating new users. The newest version is very well-documented. Research it.
     
  18. Typhon

    Typhon New Member

    No, i have created a DB user who have access to ISPC database, i create a query who permit me to add client, the complete page :

    PHP:
    <?php
    // PDO con….

    function crypt_password($cleartext_password) {
            
    $salt="$1$";
            
    $base64_alphabet='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
            for (
    $n=0;$n<8;$n++) {
                
    $salt.=$base64_alphabet[mt_rand(0,63)];
            }
            
    $salt.="$";
            return 
    crypt($cleartext_password,$salt);
        }
    if(isset(
    $_POST['flag']))
    {

            
    $username $_POST['username'];
            
    $password crypt_password($_POST['password']);
            
            
    $query=$db->prepare('INSERT INTO  client(username, password)
            VALUES (:username, :password)'
    );
            
    $query->bindValue(':username'$usernamePDO::PARAM_STR);
            
    $query->bindValue(':password'$passwordPDO::PARAM_STR);
            if(
    $query->execute()){echo 'yes';}
            
    $query->CloseCursor();
    }
    else
    {
    ?>

            <h6 class="commentsTitle"><span>Add client</span></h6>
            <form class="addComment" action="" method="post">
                <input type="text" name="username" class="" value="client..." title="client..." />
                <input type="password" name="password" title="password..." />
                <input type="submit" name="flag" class="submit" value="Add !" />
            </form>
            </div>
    <?php
    }
    ?>
    yeah i know but it's doesn't work, Im don't qualified :D
    That's why i choose it ;o)

    For the moment, the API can create only FTP users…but not client ?
    Thank you very much Till and cbj4074
     
    Last edited: Dec 9, 2011
  19. Typhon

    Typhon New Member

    Can some body help me, please :(
     
  20. cbj4074

    cbj4074 Member HowtoForge Supporter

    Then you may as well read the code!

    The Remoting Client API does indeed support creating, editing, and deleting clients. See the following file in the source:

    Code:
    /remoting_client/API-docs/client_add.html
    
    If you insist on reinventing the wheel, see the following source files for examples of everything you could possibly need:

    Code:
    /interface/web/login/index.php
    /interface/web/login/password_reset.php
    /interface/web/client/client_edit.php
    /interface/lib/classes/auth.inc.php
    /interface/lib/classes/remoting_lib.inc.php
    
    We've given you everything you need here. :cool:
     

Share This Page