Go Back   ISPsystem.com Forums > Modifications / Add-ons > Scripting / API

Notices

Reply
 
Thread Tools
Old 06-14-2013, 06:06 PM   #1
Junior Member
 
Join Date: Dec 2011
Posts: 7
archux is on a distinguished road
Default 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 is offline   Reply With Quote
Old 06-14-2013, 07:35 PM   #2
Junior Member
 
Join Date: Dec 2011
Posts: 7
archux is on a distinguished road
Default

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 is offline   Reply With Quote
Old 06-16-2013, 03:49 PM   #3
Junior Member
 
Join Date: Dec 2011
Posts: 7
archux is on a distinguished road
Default

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

Last edited by archux; 06-16-2013 at 04:03 PM.
archux is offline   Reply With Quote
Reply

Thread Tools

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 02:37 AM.