NAUbackup / VmBackup

XenServer simple backup script
228 stars 61 forks source link

Password not working but only when read from file #92

Closed deuks closed 5 years ago

deuks commented 5 years ago

Hi I just started using VmBackup today, and so far everthing has been a breeze! Great tool but this is the issue I'm having: If I run the preview (I wanted to pass the preview before I got to the real thing because my guess is that if I can't pass preview, the actual backup won't execute) with the password in the actual command (rather than calling it from a file), I pass all the tests, everything looks good. The problem is that I can't pass the preview if I save the password to a file and try to run from that file. I used the syntax: ./VmBackup.py _mypassword create-password-file=forvmbackups vm-export=vm-name preview (I've tried other file paths, I was just testing so currently everything is located in the default directory, also tried .passwd files vs normal files.). My syntax to run from file is: ./VmBackup.py password-file=forvmbackups vm-export=vm-name preview. My password did have special characters but my assumption was that this was causing the problems and now it is alphanumeric. This is only throwing up the red flag when I try to run from the file instead of including the password in the command. The file saves to the proper location as well. My version is 3.24

NAUbackup commented 5 years ago

The only way passing the password from a file works is indeed with the encrypted option. Try a simple password to start with to make sure special characters are not the issue. Nothing regarding the password changed between 3.23 and 3.24.

deuks commented 5 years ago

I tried setting root to a basic alphabetic password and even tried rebooting my server and changing the password file's permission to 777 and it still doesn't work. I did try running the preview without reading from the file and once again that worked. When I try to have it read from the encrypted password file it says "['SESSION_AUTHENTICATION_FAILED', 'root', 'Authentication failure'] ERROR - XenAPI authentication error"

deuks commented 5 years ago

Issue solved. The way the documentation was written and as I said in the original post, I was putting the password-file= in the actual preview statement when all you need is the filepath.