[GitHub] [cloudstack] dimsijul commented on pull request #4070: Update cloud-set-guest-password.in

2020-07-09 Thread GitBox


dimsijul commented on pull request #4070:
URL: https://github.com/apache/cloudstack/pull/4070#issuecomment-656343686


   > it looks like I am getting a password now, but I am still able to log in 
with my old password. this is the log on the vm. looks like the password isnt 
being changed. any thoghts?
   > 
   > Jul 9 11:55:47 test01 systemd: Created slice User Slice of centos.
   > Jul 9 11:55:47 test01 systemd-logind: New session 3 of user centos.
   > Jul 9 11:55:47 test01 systemd: Started Session 3 of user centos.
   > Jul 9 11:57:44 test01 cloud: Operating System is using network manager
   > Jul 9 11:57:44 test01 cloud: Found password server IP 10.10.10.1 in nmcli 
output
   > Jul 9 11:57:44 test01 cloud: Sending request to password server at 
10.10.10.1
   > Jul 9 11:57:44 test01 cloud: Got response from server at 10.10.10.1
   > Jul 9 11:57:44 test01 cloud: VM has already saved a password from the 
password server at 10.10.10.1
   > Jul 9 11:57:44 test01 cloud: Failed to get password from any server
   
   Hi @gaaray2k,
   
   so the script is running correctly now because you get logs from it. Now, 
after reading the script, I can't exactly tell why you already have a saved 
password from the password server but that cause the script to fail. It might 
be because of the multiple attempts you've done before but I can't be sure. 
Maybe you could reboot the VR to flush all pending passwords and reset the file 
where they are stored. After that, you could test again.
   
   Let me know.
   
   Cheers,
   
   Julien



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [cloudstack] dimsijul commented on pull request #4070: Update cloud-set-guest-password.in

2020-07-08 Thread GitBox


dimsijul commented on pull request #4070:
URL: https://github.com/apache/cloudstack/pull/4070#issuecomment-655723061


   > How do I set this up? the doc instructions dont seem to work.
   > I am running a centos 7 VM
   > downloaded cloud-set-guest-password.in and renamed it 
cloud-set-guest-password
   > moved it to /etc/init.d/
   > chmod +x /etc/init.d/cloud-set-guest-password
   > reset the password.
   > 
   > when the vm boots up, I am able to log in with the old password.
   > 
   > it works on windows.
   > 
   > what am I doing wrong?
   > 
   > CS: 4.14.
   
   Hi @gaaray2k,
   
   you are right, one step is missing. In order to make the script work (wether 
it is Ubuntu, Debian or CentOS) you have to add a systemd service that will 
launch the password script at boot time.
   
   What we do to make this work is to create the file 
/etc/systemd/system/setpassword.service and set it to mode +x with the 
following content :
   
   [Unit]
   Description=script to reset the root password
   Wants=network-online.target
   After=network-online.target
   
   [Service]
   Type=oneshot
   ExecStart=/bin/bash /etc/init.d/cloud-set-guest-password.sh
   
   [Install]
   WantedBy=default.target
   
   This procedure should allow the system to run the cloud-set-guest-password 
script at boot time and as soon as the network is detected and therefore, if a 
password change is pending on the DHCP of the VM, it should be reset. Don't 
forget that this feature only works if the VM's network is set to DHCP.
   
   Let me know if it's ok or if you need further assistance.
   
   Cheers,
   
   Julien



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org