[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 ___ Users mailing list Users@openvz.org https://openvz.org/mailman/listinfo/users
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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dietmar Maurer Sent: Donnerstag, 06. November 2008 10:51 To: users@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 pwhack.diff Description: pwhack.diff ___ Users mailing list Users@openvz.org https://openvz.org/mailman/listinfo/users
RE: [Users] create CT with password
postcreate script can then modify /etc/passwd and /etc/shadow. attached is a modified postcreate script - Dietmar postcreate.sh Description: postcreate.sh ___ Users mailing list Users@openvz.org https://openvz.org/mailman/listinfo/users
RE: [Users] create CT with password
Dietmar, why not. That's why post create script is for - to do the customizations J Aistis From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dietmar Maurer Sent: Thursday, November 06, 2008 3:29 PM To: users@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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dietmar Maurer Sent: Donnerstag, 06. November 2008 10:51 To: users@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 ___ Users mailing list Users@openvz.org https://openvz.org/mailman/listinfo/users