Hello Kirk,
Yes, when I issue the command sh /etc.init.d/cloud-set-guest-password -- I do not get any errors back.
Reviewing /var/log/messages:
[root@CentOS63 ~]# cat /var/log/messages |grep cloud-set-guest-password
[root@CentOS63 ~]#
The bash -x output is:
[root@CentOS63 ~]# bash -x /etc/init.d/cloud-set-guest-password
+ user=root
+ DHCP_FOLDERS='/var/lib/dhclient/* /var/lib/dhcp3/* /var/lib/dhcp/*'
+ password_received=0
+ file_count=0
+ error_count=0
+ for DHCP_FILE in '$DHCP_FOLDERS'
+ '[' -f /var/lib/dhclient/dhclient-eth0.leases ']'
+ file_count=1
++ tr -d '\;'
++ awk '{print $NF}'
++ tail -1
++ grep dhcp-server-identifier /var/lib/dhclient/dhclient-eth0.leases
+ PASSWORD_SERVER_IP=IP.OF.INSTANCE
+ '[' -n IPOFINSTANCE]'
+ logger -t cloud 'Found password server IP IP.OF.INSTANCE in /var/lib/dhclient/dhclient-eth0.leases'
+ logger -t cloud 'Sending request to password server at 66.232.104.214'
++ wget -q -t 3 -T 20 -O - --header 'DomU_Request: send_my_password' IP.OF.INSTANCE:8080
+ password=$'saved_password\r'
++ tr -d '\r'
++ echo $'saved_password\r'
+ password=saved_password
+ '[' 0 -eq 0 ']'
+ logger -t cloud 'Got response from server at IP.OF.INSTANCE'
+ case $password in
+ logger -t cloud 'VM has already saved a password from the password server at IP.OF.INSTANCE'
+ continue
+ for DHCP_FILE in '$DHCP_FOLDERS'
+ '[' -f /var/lib/dhclient/resolv.conf.predhclient.eth0 ']'
+ file_count=2
++ tr -d '\;'
++ awk '{print $NF}'
++ tail -1
++ grep dhcp-server-identifier /var/lib/dhclient/resolv.conf.predhclient.eth0
+ PASSWORD_SERVER_IP=
+ '[' -n '' ']'
+ logger -t cloud 'Could not find password server IP in /var/lib/dhclient/resolv.conf.predhclient.eth0'
+ error_count=1
+ for DHCP_FILE in '$DHCP_FOLDERS'
+ '[' -f '/var/lib/dhcp3/*' ']'
+ for DHCP_FILE in '$DHCP_FOLDERS'
+ '[' -f '/var/lib/dhcp/*' ']'
+ '[' 0 == 0 ']'
+ '[' 1 == 2 ']'
+ logger -t cloud 'Did not need to change password.'
+ exit 0
[root@CentOS63 ~]#
Kirk, reviewing that output, the IP addresses labeled as IP.OF.INSTANCE is the IP of the instance of course; but not the IP of the host node, could that be my issue at hand, if so; do I need to configure / alter cloud-set-guest-password?
- Maurice
Yes, when I issue the command sh /etc.init.d/cloud-set-guest-password -- I do not get any errors back.
Reviewing /var/log/messages:
[root@CentOS63 ~]# cat /var/log/messages |grep cloud-set-guest-password
[root@CentOS63 ~]#
The bash -x output is:
[root@CentOS63 ~]# bash -x /etc/init.d/cloud-set-guest-password
+ user=root
+ DHCP_FOLDERS='/var/lib/dhclient/* /var/lib/dhcp3/* /var/lib/dhcp/*'
+ password_received=0
+ file_count=0
+ error_count=0
+ for DHCP_FILE in '$DHCP_FOLDERS'
+ '[' -f /var/lib/dhclient/dhclient-eth0.leases ']'
+ file_count=1
++ tr -d '\;'
++ awk '{print $NF}'
++ tail -1
++ grep dhcp-server-identifier /var/lib/dhclient/dhclient-eth0.leases
+ PASSWORD_SERVER_IP=IP.OF.INSTANCE
+ '[' -n IPOFINSTANCE]'
+ logger -t cloud 'Found password server IP IP.OF.INSTANCE in /var/lib/dhclient/dhclient-eth0.leases'
+ logger -t cloud 'Sending request to password server at 66.232.104.214'
++ wget -q -t 3 -T 20 -O - --header 'DomU_Request: send_my_password' IP.OF.INSTANCE:8080
+ password=$'saved_password\r'
++ tr -d '\r'
++ echo $'saved_password\r'
+ password=saved_password
+ '[' 0 -eq 0 ']'
+ logger -t cloud 'Got response from server at IP.OF.INSTANCE'
+ case $password in
+ logger -t cloud 'VM has already saved a password from the password server at IP.OF.INSTANCE'
+ continue
+ for DHCP_FILE in '$DHCP_FOLDERS'
+ '[' -f /var/lib/dhclient/resolv.conf.predhclient.eth0 ']'
+ file_count=2
++ tr -d '\;'
++ awk '{print $NF}'
++ tail -1
++ grep dhcp-server-identifier /var/lib/dhclient/resolv.conf.predhclient.eth0
+ PASSWORD_SERVER_IP=
+ '[' -n '' ']'
+ logger -t cloud 'Could not find password server IP in /var/lib/dhclient/resolv.conf.predhclient.eth0'
+ error_count=1
+ for DHCP_FILE in '$DHCP_FOLDERS'
+ '[' -f '/var/lib/dhcp3/*' ']'
+ for DHCP_FILE in '$DHCP_FOLDERS'
+ '[' -f '/var/lib/dhcp/*' ']'
+ '[' 0 == 0 ']'
+ '[' 1 == 2 ']'
+ logger -t cloud 'Did not need to change password.'
+ exit 0
[root@CentOS63 ~]#
Kirk, reviewing that output, the IP addresses labeled as IP.OF.INSTANCE is the IP of the instance of course; but not the IP of the host node, could that be my issue at hand, if so; do I need to configure / alter cloud-set-guest-password?
- Maurice
On Apr 26, 2013, at 01:34 AM, Kirk Kosinski <kirkkosin...@gmail.com> wrote:
Does the script work if you run it manually? If not, run bash -x
cloud-set-guest-password and provide the complete output.
Is it running on boot? Check for entries in /var/log/messages and
provide any output.
Best regards,
Kirk
On 04/25/2013 08:58 PM, David Nalley wrote:
> On Thu, Apr 25, 2013 at 11:50 PM, Maurice Lawler <maurice.law...@me.com> wrote:
>> Greetings:
>>
>> Try as I might, I cannot seem to get the password reset tool to work with
>> the instances created from a password enabled template.
>>
>> From what I read all that is required is:
>>
>>
>> Use the following steps to begin the Linux OS installation:
>>
>> Download the script file cloud-set-guest-password:
>>
>> Linux: http://cloudstack.org/dl/cloud-set-guest-password
>> Windows:
>> http://sourceforge.net/projects/cloudstack/files/Password%20Management%20Scripts/CloudInstanceManager.msi/download
>>
>> Copy this file to /etc/init.d.
>> On some Linux distributions, copy the file to /etc/rc.d/init.d.
>> Run the following command to make the script executable:
>>
>> chmod +x /etc/init.d/cloud-set-guest-password
>>
>> Depending on the Linux distribution, continue with the appropriate step.
>> On Fedora, CentOS/RHEL, and Debian, run:
>>
>> chkconfig --add cloud-set-guest-password
>>
>> Which I have done just fine, but suspended / stopping the instance and
>> resetting root password does not work; along with that the system assigned
>> root password does not take either.
>>
>>
>> Please advise.
>>
>>
>>
>>
>
> What's the output of:
>
> chkconfig --list | grep cloud-set-guest-password
>
> --David
>