[Users] create CT with password

Dietmar Maurer dietmar at proxmox.com
Thu Nov 6 04:51:09 EST 2008


Hi all,

 

currently you need to use the following command to change the password
inside a CT:

 

vzctl set CTID --userpasswd root:XXX

 

This starts/stop the CT if it is not already running.

 

That is OK unless you have preconfigured appliance templates which does
some

initialization at first startup. Let me explain:

 

1.)    User create the CT: vzctl creat 777 --ostemplate name ...

2.)    User set the password: vzctl set 777 --userpasswd root:XXX
(start/stop CT)

3.)    User starts the CT

 

As you see, there is a totally unnecessary start/stop action. Even
worse, the container

is not fully functional at that time because HOSTNAME, DOMAIN,... in not
set before the

container is started with "vzctl start".

 

I wonder if it would be possible to add a  --userpasswd parameter to the
'create' command? Or maybe

only a --rootpasswd option (because root is always a local user).

 

/etc/passwd and /etc/shadow should be easy to modify directly, or are
there some distributions

with unusual file formats?

 

- Dietmar

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openvz.org/pipermail/users/attachments/20081106/67899d61/attachment.html


More information about the Users mailing list