Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #31  
Old 29th December 2005, 09:03
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,488
Thanks: 813
Thanked 5,259 Times in 4,123 Posts
Default

In this case the admin has to set a new password. Or your installer creates automatically a new database for each installation incl. new user and pasword.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Sponsored Links
  #32  
Old 29th December 2005, 09:05
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,488
Thanks: 813
Thanked 5,259 Times in 4,123 Posts
Default

Quote:
Originally Posted by danf.1979
Ok, I'll think on something else then. Anyway, I see table isp_server field server_db_passwort in clear text. Is this normal?
Yes, because we need at least one password in clear text to access the database with the ISPConfig Interface. The special problem with userpasswords is, that most users use always the same password. So if you know their database password, you can guess e.g. their email and ftp passwords as well.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #33  
Old 29th December 2005, 12:22
danf.1979 danf.1979 is offline
Senior Member
 
Join Date: Dec 2005
Location: Chile
Posts: 247
Thanks: 4
Thanked 3 Times in 2 Posts
Send a message via MSN to danf.1979
Default

Quote:
Originally Posted by till
In this case the admin has to set a new password. Or your installer creates automatically a new database for each installation incl. new user and pasword.
Yes, I think would be a good solution. Thanks, I'll try to implement it.
Reply With Quote
  #34  
Old 30th December 2005, 01:11
danf.1979 danf.1979 is offline
Senior Member
 
Join Date: Dec 2005
Location: Chile
Posts: 247
Thanks: 4
Thanked 3 Times in 2 Posts
Send a message via MSN to danf.1979
Default

Quote:
Originally Posted by till
In this case the admin has to set a new password. Or your installer creates automatically a new database for each installation incl. new user and pasword.
Could I (in some way) use the root mysql account that use ispconfig for creating new databases and *assign* those databases for a given customer?

I mean, there is already a piece of code that generates a mysql database for a customer in "optionen"/"Datenbanken Neu". I had a look to the code and found function datenbank_insert, but i also did a string search for this function in /home/admispconfig and realize that it seems that it is not called from anywhere. It exists just as a definition in ispconfig_isp_datenbank.lib.php.

How does optionen"/"Datenbanken Neu" use this function?
Reply With Quote
  #35  
Old 30th December 2005, 09:44
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,488
Thanks: 813
Thanked 5,259 Times in 4,123 Posts
Default

Quote:
Originally Posted by danf.1979
Could I (in some way) use the root mysql account that use ispconfig for creating new databases and *assign* those databases for a given customer?
Yes, thats how the "datenbank_insert function works.

Quote:
I mean, there is already a piece of code that generates a mysql database for a customer in "optionen"/"Datenbanken Neu". I had a look to the code and found function datenbank_insert, but i also did a string search for this function in /home/admispconfig and realize that it seems that it is not called from anywhere. It exists just as a definition in ispconfig_isp_datenbank.lib.php.

How does optionen"/"Datenbanken Neu" use this function?
This function is called by the form for adding databases. The form definition is made with the form designer and so the function call is definied in the doctype definition and you can not find it in the code. Doctype definitions are stored in the doctype table in the database.

The framework used for ispconfig is event driven and the datenbank_insert function is called after the database add form has been saved the first time.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #36  
Old 30th December 2005, 18:08
danf.1979 danf.1979 is offline
Senior Member
 
Join Date: Dec 2005
Location: Chile
Posts: 247
Thanks: 4
Thanked 3 Times in 2 Posts
Send a message via MSN to danf.1979
Default

Uhm, this seems even more difficult. It is obvious for me that doctype_def is not there for direct reading. I can't understand a word of it, but I guess its a template system? I think I'll have to learn the form editor to continue ahead?
Reply With Quote
  #37  
Old 30th December 2005, 18:18
danf.1979 danf.1979 is offline
Senior Member
 
Join Date: Dec 2005
Location: Chile
Posts: 247
Thanks: 4
Thanked 3 Times in 2 Posts
Send a message via MSN to danf.1979
Default

Uhm, ok, I had a look to the form editor form name isp_datenbank. Impressive. I'll make a new one and see what i can achieve.
Reply With Quote
  #38  
Old 31st December 2005, 12:58
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,488
Thanks: 813
Thanked 5,259 Times in 4,123 Posts
Default

You dont have to use the form editor. If you copy the sql queries from the datenbank_insert function that where used to create the database it will be sufficient.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #39  
Old 31st December 2005, 15:59
danf.1979 danf.1979 is offline
Senior Member
 
Join Date: Dec 2005
Location: Chile
Posts: 247
Thanks: 4
Thanked 3 Times in 2 Posts
Send a message via MSN to danf.1979
Default

Ok, now I ask the user for the database and his password. What I did is to insert temporarily the selected database and the user password in a table. Then writeconf.php erases the data.
Once is finished I would like to send you the script so you can tell me what you think and comment the code so I can improve it. I would really appreciate it.
I have work to do yet though. I'm searching for info on how to use the "mysqlimport" command so I can import the "nuke.sql" to populate the database.
Reply With Quote
  #40  
Old 31st December 2005, 16:38
danf.1979 danf.1979 is offline
Senior Member
 
Join Date: Dec 2005
Location: Chile
Posts: 247
Thanks: 4
Thanked 3 Times in 2 Posts
Send a message via MSN to danf.1979
 
Default

Uhm, this does not work:
Code:
system("mysqlimport --user=$db_user --password=$pass_word $data_base /var/www/installers/php-nuke/sql/nuke.sql");
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


All times are GMT +2. The time now is 01:42.


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