PDA

View Full Version : ISPmanager user.edit change a password


archux
06-14-2013, 06:06 PM
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 ;)