Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 3rd March 2006, 03:35
kyriakos kyriakos is offline
Member
 
Join Date: Feb 2006
Posts: 34
Thanks: 3
Thanked 0 Times in 0 Posts
Default MYSQL - isp_isp_user empty fields

Hi,
I notice that isp_isp_user/user_passwort and status are empty.
This is hapening when I create a new or update an existing mail user.
How can I fix it?
Reply With Quote
Sponsored Links
  #2  
Old 3rd March 2006, 11:10
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

You don't have to fix it because it's intended like that. The password is stored in isp_isp_user only for a short moment after you've created the user; after it has been written to /etc/shadow it is removed from isp_isp_user for security reasons (imagine someone hacks your MySQL database and finds all those passwords...).
The status field is only for internal use.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 4th March 2006, 02:18
kyriakos kyriakos is offline
Member
 
Join Date: Feb 2006
Posts: 34
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Thanks falko,
I'm trying to setup postfix to use ispconfig db instead of a custom mysql database. I'm thinking that this is possible because all needed information are already stored on ispconfig db. I think a litle hack in ispconfig_isp_user.lib.php may help me. I don't know exactly and script comments in German don't help me.
I can use some help here.
Reply With Quote
  #4  
Old 4th March 2006, 15:14
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 37,001
Thanks: 840
Thanked 5,650 Times in 4,460 Posts
Default

First you will have to add a new password field. You cannot use the current field for postfix authentication because ISPConfig needs to prepend some chracters to the password to recognize if its encrypted.

Then you will have to add some code in the file /home/admispconfig/ispconfig/lib/ispconfig_isp_user.lib.php

in the functions user_insert and user_upadate

after the lines:

if($go_info["server"]["password_hash"] == 'crypt') {
$passwort = "||||:".crypt($user["user_passwort"],substr($user["user_passwort"],0,2));
} else {
$passwort = "||||:". crypt(stripslashes($user["user_passwort"]), "$1$".md5(time()) );
}
$go_api->db->query("UPDATE isp_isp_user SET user_passwort = '$passwort' where doc_id = '$doc_id'");

That stores a password value without the prepended "||||:" in your password field. Do not change the way ISPConfig stores the values in the current password field or you will break the software!
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 5th March 2006, 13:06
kyriakos kyriakos is offline
Member
 
Join Date: Feb 2006
Posts: 34
Thanks: 3
Thanked 0 Times in 0 Posts
 
Default

I put these fiew lines under user_insert & user_update functions. Its working for password. What variable I have to use in order to create an mail address record? ($mailemail)


///Kyriakos hack 3-3-06<
$mailpasswort = crypt($user["user_passwort"],substr($user["user_passwort"],0,2));
$go_api->db->query("UPDATE isp_isp_user SET mail_passwort = '$mailpasswort' where doc_id = '$doc_id'");

$mailemail = $user["user_email"]."@"."$?????????";
$go_api->db->query("UPDATE isp_isp_user SET mail_email = '$mailemail' where doc_id = '$doc_id'");
///Kyriakos hack 3-3-06>


Thanks
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL installation roblem [/me sad] Nejko Installation/Configuration 16 11th January 2006 14:28
Mandriva 10.2 Perfect Setup Install Problems... ctroyp Installation/Configuration 12 30th December 2005 17:04
Failed at MySQL lhatle Installation/Configuration 4 29th November 2005 02:26
Problem installing ISPConfig, then with MySQL... ctroyp Installation/Configuration 7 26th September 2005 17:37
MySQL issue during install of ISPConfig ricbax Installation/Configuration 4 16th September 2005 10:41


All times are GMT +2. The time now is 20:54.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.