LxCenter HyperVM & Kloxo Support

Forum



Members   Search      Help    Register    Login    Home
Home » LxCenter » Command-line Management » How to create OS users via API
How to create OS users via API [message #52047] Wed, 31 December 2008 07:02 Go to next message
drank is currently offline drank  Bulgaria
Messages: 1324
Registered: June 2007
Senior Master
Hi, LxHelp

Is it possible to create OS users via the API? Thank you.


Dragomir Denev
DGM
www.dgm.bg
Re: How to create OS users via API [message #52048 is a reply to message #52047] Wed, 31 December 2008 07:10 Go to previous messageGo to next message
Lxhelp
Messages: 23691
Registered: July 2006
The Champion
You can create a client and then a system-user of the same name will be created. You can create a client without adding a domain, and then it will be merely an extra db entry for the system-user.




On Wed, Dec 31, 2008 at 12:02:40PM -0000, Dragomir Denev wrote:
>
>
> Hi, LxHelp
>
> Is it possible to create OS users via the API? Thank you.


Re: How to create OS users via API [message #52049 is a reply to message #52048] Wed, 31 December 2008 07:18 Go to previous messageGo to next message
drank is currently offline drank  Bulgaria
Messages: 1324
Registered: June 2007
Senior Master
Thank you. But how to add a system user to a VPS that does not have lxadmin installed?

Dragomir Denev
DGM
www.dgm.bg
Re: How to create OS users via API [message #52052 is a reply to message #52049] Wed, 31 December 2008 07:25 Go to previous messageGo to next message
Lxhelp
Messages: 23691
Registered: July 2006
The Champion
 
 useradd username
 


On Wed, Dec 31, 2008 at 12:18:42PM -0000, Dragomir Denev wrote:
>
>
> Thank you. But how to add a system user to a VPS that does not have lxadmin installed?


Re: How to create OS users via API [message #52053 is a reply to message #52052] Wed, 31 December 2008 07:32 Go to previous messageGo to next message
drank is currently offline drank  Bulgaria
Messages: 1324
Registered: June 2007
Senior Master
Yes, but how can I do this via the web API (webcommand.php)? Thank you.

Dragomir Denev
DGM
www.dgm.bg
Re: How to create OS users via API [message #52057 is a reply to message #52053] Wed, 31 December 2008 08:04 Go to previous messageGo to next message
drank is currently offline drank  Bulgaria
Messages: 1324
Registered: June 2007
Senior Master
LxHelp?

Dragomir Denev
DGM
www.dgm.bg
Re: How to create OS users via API [message #52060 is a reply to message #52053] Wed, 31 December 2008 08:10 Go to previous messageGo to next message
Lxhelp
Messages: 23691
Registered: July 2006
The Champion
If lxadmin is not there, then how is it possible at all?


On Wed, Dec 31, 2008 at 12:32:22PM -0000, Dragomir Denev wrote:
>
>
> Yes, but how can I do this via the web API (webcommand.php)? Thank you.


Re: How to create OS users via API [message #52062 is a reply to message #52060] Wed, 31 December 2008 08:21 Go to previous messageGo to next message
drank is currently offline drank  Bulgaria
Messages: 1324
Registered: June 2007
Senior Master
Why does lxadmin need to be there? HyperVM also has API, right? I need to create a new VPS (which may not have lxadmin inside) via the web API (which I already do) and then inside this VPS to create an OS user. Is this possible to achieve with the web API? Thank you.

Dragomir Denev
DGM
www.dgm.bg
Re: How to create OS users via API [message #52063 is a reply to message #52062] Wed, 31 December 2008 08:24 Go to previous messageGo to next message
Lxhelp
Messages: 23691
Registered: July 2006
The Champion
That's theoretically possible for openvz, but not at all possible for xen. So we cannot implement the concept. You can create system-user in the main node via hyperVM, but not inside a vps.


On Wed, Dec 31, 2008 at 01:21:02PM -0000, Dragomir Denev wrote:
>
>
> Why does lxadmin need to be there? HyperVM also has API, right? I need to create a new VPS (which may not have lxadmin inside) via the web API (which I already do) and then inside this VPS to create an OS user. Is this possible to achieve with the web API? Thank you.


Re: How to create OS users via API [message #52064 is a reply to message #52063] Wed, 31 December 2008 08:37 Go to previous messageGo to next message
drank is currently offline drank  Bulgaria
Messages: 1324
Registered: June 2007
Senior Master
OK, thank you.
But is it possible to execute shell commands via the web API for a VPS? There is the Command Center screen in the VPS control panel where we can execute shell commands inside the VPS. And since you said that everything which is doable via the CP can also be done via the API, I wander - is there a web API for this feature? Thank you.


Dragomir Denev
DGM
www.dgm.bg
Re: How to create OS users via API [message #52065 is a reply to message #52064] Wed, 31 December 2008 08:42 Go to previous messageGo to next message
Lxhelp
Messages: 23691
Registered: July 2006
The Champion
Yes, it can be done for openvz. The

 
 --action=updateform
 --subaction=commandcenter
 --v-ccenter_command="useradd username"
 



On Wed, Dec 31, 2008 at 01:37:50PM -0000, Dragomir Denev wrote:
>
>
> OK, thank you.
> But is it possible to execute shell commands via the web API for a VPS? There is the Command Center screen in the VPS control panel where we can execute shell commands inside the VPS. And since you said that everything which is doable via the CP can also be done via the API, I wander - is there a web API for this feature? Thank you.


Re: How to create OS users via API [message #52067 is a reply to message #52065] Wed, 31 December 2008 08:54 Go to previous messageGo to next message
drank is currently offline drank  Bulgaria
Messages: 1324
Registered: June 2007
Senior Master
This is almost great, thank you Smile Do you plan to add the Command Center also for Xen or is it impossible to do? Thank you.

Dragomir Denev
DGM
www.dgm.bg
Re: How to create OS users via API [message #52090 is a reply to message #52067] Wed, 31 December 2008 12:03 Go to previous messageGo to next message
Lxhelp
Messages: 23691
Registered: July 2006
The Champion
It is not possible for xen at all. You can do it only via lxadmin.


On Wed, Dec 31, 2008 at 01:54:36PM -0000, Dragomir Denev wrote:
>
>
> This is almost great, thank you :) Do you plan to add the Command Center also for Xen or is it impossible to do? Thank you.


Re: How to create OS users via API [message #52469 is a reply to message #52065] Sun, 04 January 2009 05:27 Go to previous messageGo to next message
drank is currently offline drank  Bulgaria
Messages: 1324
Registered: June 2007
Senior Master
Lxhelp wrote on Wed, 31 December 2008 15:42

Yes, it can be done for openvz. The

 
 --action=updateform
 --subaction=commandcenter
 --v-ccenter_command="useradd username"
 




It doesn't work:
# lphp.exe ../bin/common/commandline.php --action=updateform --subaction=commandcenter --class=vps --name=vps.vm --v-ccenter_command="mkdir /root/tmptmp"

Fatal error: Call to undefined function __cmd_desc_updateform() in /usr/local/lxlabs/hypervm/bin/common/commandline.php on line 28

Am I doing something wrong? Thank you.


Dragomir Denev
DGM
www.dgm.bg
Re: How to create OS users via API [message #52471 is a reply to message #52469] Sun, 04 January 2009 05:43 Go to previous messageGo to next message
Lxhelp
Messages: 23691
Registered: July 2006
The Champion
Use

 
 --action=update
 


thanks.


On Sun, Jan 04, 2009 at 10:27:47AM -0000, Dragomir Denev wrote:
>
>
> Lxhelp wrote on Wed, 31 December 2008 15:42
> > Yes, it can be done for openvz. The
> >
> >
> > --action=updateform
> > --subaction=commandcenter
> > --v-ccenter_command="useradd username"


Re: How to create OS users via API [message #52472 is a reply to message #52471] Sun, 04 January 2009 05:50 Go to previous messageGo to next message
drank is currently offline drank  Bulgaria
Messages: 1324
Registered: June 2007
Senior Master
I tried with --action=update but nothing was created in the VPS (though the command ran successfully).

Dragomir Denev
DGM
www.dgm.bg
Re: How to create OS users via API [message #52474 is a reply to message #52471] Sun, 04 January 2009 05:52 Go to previous messageGo to next message
Lxhelp
Messages: 23691
Registered: July 2006
The Champion
Also, you have to update to the 6922 version for this to work.

thanks.


On Sun, Jan 04, 2009 at 04:13:55PM +0530, Lxhelp wrote:
> Use
>
>
 
>  --action=update
>  



Re: How to create OS users via API [message #52478 is a reply to message #52474] Sun, 04 January 2009 06:08 Go to previous messageGo to next message
drank is currently offline drank  Bulgaria
Messages: 1324
Registered: June 2007
Senior Master
I updated to 6922 but I get this error:
# lphp.exe ../bin/common/commandline.php --action=update --subaction=commandcenter --class=vps --name=vps.vm --v-ccenter_command="mkdir /root/temptemp"

Fatal error: Call to a member function write() on a non-object in /usr/local/lxlabs/hypervm/httpdocs/htmllib/phplib/lib/lxclass.php on line 4993


Dragomir Denev
DGM
www.dgm.bg
Re: How to create OS users via API [message #52481 is a reply to message #52478] Sun, 04 January 2009 06:40 Go to previous messageGo to next message
Lxhelp
Messages: 23691
Registered: July 2006
The Champion
Update to the latest version.


On Sun, Jan 04, 2009 at 11:08:56AM -0000, Dragomir Denev wrote:
>
>
> I updated to 6922 but I get this error:
> # lphp.exe ../bin/common/commandline.php --action=update --subaction=commandcenter --class=vps --name=vps.vm --v-ccenter_command="mkdir /root/temptemp"
>
> Fatal error: Call to a member function write() on a non-object in /usr/local/lxlabs/hypervm/httpdocs/htmllib/phplib/lib/lxclas s.php on line 4993


Re: How to create OS users via API [message #52487 is a reply to message #52481] Sun, 04 January 2009 08:37 Go to previous message
drank is currently offline drank  Bulgaria
Messages: 1324
Registered: June 2007
Senior Master
Now it works just fine, thank you.

Dragomir Denev
DGM
www.dgm.bg
Previous Topic:How to get the list of timezones?
Next Topic:reflect question
Goto Forum:
  


Current Time: Sat May 25 20:00:40 EDT 2013

Total time taken to generate the page: 0.01363 seconds
.:: Contact :: Home :: Privacy ::.

Click here to lend your support to: LxCenter and make a donation at www.pledgie.com !

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software