OpenVZ Forum



Members   Search      Help    Register    Login    Home
Home » General » Support » Asking about how to create / change password(functions)
Asking about how to create / change password [message #41446] Sat, 22 January 2011 06:25 Go to next message
SomeOne is currently offline SomeOne
Messages: 1
Registered: January 2011
Junior Member
From: 84.36.252*
Hello,
how can my php dev make scritp can make client change the password or make os reload etc, using Openvz with out using control panel ?

Re: Asking about how to create / change password [message #42903 is a reply to message #41446] Wed, 15 June 2011 11:40 Go to previous messageGo to next message
imatwb is currently offline imatwb
Messages: 11
Registered: June 2011
Junior Member
From: 67.129.209*
To set a root password for a container, run command: vzctl exec container_number passwd

You can embed that command into your php script. It's just a matter of correct syntax from there on.
Re: Asking about how to create / change password [message #42932 is a reply to message #41446] Mon, 20 June 2011 16:13 Go to previous message
Paparaciz is currently offline Paparaciz
Messages: 94
Registered: August 2009
Member
From: 78.56.145*
or you can use vzctl special option. keep in mind that vzctl exec requires that container is started, while --userpassw does not.

vzctl set [xxx] --userpasswd [username]:[password]
from the manual


--userpasswd user:password
           Sets password for the given user in a container, creating the user if it does not exists.  Note that this option is not  saved  in
           configuration  file  at  all  (so  --save  flag  is  useless),  it  is  applied to the container (by modifying its /etc/passwd and
           /etc/shadow files).

           In case container root filesystem is not mounted, it is automatically mounted, then all the appropriate file changes are  applied,
           then it is unmounted.

           Note that container should be created before using this option.
Previous Topic:vzdump snapshot: archive file size 10KB
Next Topic:2.6.18-238.12.1.el5.028stab091.1: No filesystems with quota detected.
Goto Forum:
  


Current Time: Fri May 24 01:01:24 EDT 2013
Powered by FUDforum Powered by Parallels Virtuozzo Containers