ISPsystem.com Forums

ISPsystem.com Forums (http://forum.ispsystem.com//index.php)
-   Scripting / API (http://forum.ispsystem.com//forumdisplay.php?f=13)
-   -   ISPmanager user.edit change a password (http://forum.ispsystem.com//showthread.php?t=2133)

archux 06-14-2013 06:06 PM

ISPmanager user.edit change a password
 
Hi!

Can you give me a function who will change a password trough api for ISPmanager user?

curl -k -s "http://<ip>/manager/ispmgr?out=text&func=user.edit&elid='.$hosting_id. '&passwd='.$hosting_pass.'&confirm='.$hosting_pass .'&sok=yes"

that is not correct. it's showing me an error...

Of course i can use also a passwd for username, but there will be less security if i will do that...

Best regards!

archux 06-14-2013 07:35 PM

I just checked

if i pass elid than i'm getting ERROR code number 4, if without that Error code 2...

also i tried to use ftp.edit function and there i got error code number 6

Hopefully that will help...

Arturs

archux 06-16-2013 03:49 PM

I found a solution, i am using ssh2 connection and executing a command

ssh2_exec($connection, 'echo -e "'.$hosting_pass.'\n'.$hosting_pass.'" | passwd "'.$hosting_id.'"');

and that's works ;)

So you can close this ticket ;)


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

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.