[Users] create CT with password
Aistis Zenkevicius
noc at unix.lt
Thu Nov 6 15:23:32 EST 2008
Dietmar, why not. That's why post create script is for - to do the
customizations J
Aistis
From: users-bounces at openvz.org [mailto:users-bounces at openvz.org] On
Behalf Of Dietmar Maurer
Sent: Thursday, November 06, 2008 3:29 PM
To: users at openvz.org
Subject: RE: [Users] create CT with password
Attached is a patch which passes the password to the postcreate script:
VE_ROOTPASSWD .. plain text passwd
VE_CROOTPASSWD .. crypted passwd (md5)
postcreate script can then modify /etc/passwd and /etc/shadow.
what do you think?
- Dietmar
From: users-bounces at openvz.org [mailto:users-bounces at openvz.org] On
Behalf Of Dietmar Maurer
Sent: Donnerstag, 06. November 2008 10:51
To: users at openvz.org
Subject: [Users] create CT with password
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/5a2436db/attachment.html
More information about the Users
mailing list