Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 16th January 2013, 13:51
key key is offline
Junior Member
 
Join Date: Nov 2012
Posts: 15
Thanks: 2
Thanked 0 Times in 0 Posts
Default A terrible thing happened with remoting client api.

I changed only limit_web_quota with clients_update with remoting client api.

It seemed to me that the change was successful with no problem.

But, In fact, it hasn't been successful.

Because, all client's passwords, except me, were changed.

I wrote

$record_record = $client->client_get($session_id, $record['client_id']);
$record_record['limit_web_quota'] = 10;
$client->client_update($session_id, $record['client_id'], 0, $record_record);

in this script.

I guess this api encrypt client's password again for changed passwords are also begin with $1$ salt.

This terrible problem is resolved yet.

Does anyone know a solution?
Reply With Quote
Sponsored Links
  #2  
Old 16th January 2013, 15:58
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,771
Thanks: 821
Thanked 5,331 Times in 4,183 Posts
Default

You have to pass a empty password field if you dont want the password to be changed as the API requires that you pass either a new (cleartext) password or a empty field if you dont want to change the password.

So the corect script is:

$record_record = $client->client_get($session_id, $record['client_id']);
$record_record['limit_web_quota'] = 10;
$record_record['password'] = '';
$client->client_update($session_id, $record['client_id'], 0, $record_record);
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 17th January 2013, 13:27
Croydon Croydon is offline
ISPConfig Developer
 
Join Date: Jul 2007
Location: Koblenz, Germany
Posts: 922
Thanks: 16
Thanked 259 Times in 206 Posts
Default

Starting with 3.0.5 you can pass encrypted passwords, too.
You have to set an additional parameter then:

$record_record = $client->client_get($session_id, $record['client_id']);
$record_record['limit_web_quota'] = 10;
$record_record['password'] = '$1$xxxxxxxxxxxxx'; // encrypted password
$record_record['_ispconfig_pw_crypted'] = 1; // tell the api that you send encrypted pw

$client->client_update($session_id, $record['client_id'], 0, $record_record);
__________________
Marius Cramer

pixcept KG
Reply With Quote
  #4  
Old 20th January 2013, 11:37
key key is offline
Junior Member
 
Join Date: Nov 2012
Posts: 15
Thanks: 2
Thanked 0 Times in 0 Posts
 
Default

Thank you till and Croydon.

I will be careful when I change client_data.
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
Doesnt update zones almere General 20 16th November 2012 14:49
link my domain to my server, impossible! 007007 Installation/Configuration 7 17th January 2012 13:59
DNS Lookups kieron General 4 4th May 2011 19:49
Being Spammed/Hacked/Probed not sure PLEASE HELP! kresser General 10 29th October 2010 17:25
Can't access to my website - after install problem pallermo Installation/Configuration 18 4th June 2010 13:29


All times are GMT +2. The time now is 04:03.


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