Page 1 of 1

Password protected backup anomaly

Posted: Sat Jul 16, 2016 4:34 pm
by Somebeachsomewhere
Found it rather interesting that if using the /enc:1 with a password that contains a ! (exclamation mark) upon an attempted restore I always got invalid password. Experimented on the smallest partition to save time. Once I inserted that ! anywhere in the password I got an invalid password message upon an attempted restore. Don't know if any other characters produce this as couldn't try them all. According to the user manual the password cannot exceed 128 characters (mine certainly didn't) and may contain upper/lowercase letters, numbers, special characters, spaces and non-ASCII characters. In all fairness, I have been upgrading IFW for quite some time from V2 on. Would doing a clean install of 2.99-00 help? Does the ! have a special meaning for IFW? Sure glad I tried it before relying upon it for an actual restore. :o

Re: Password protected backup anomaly

Posted: Sun Jul 17, 2016 6:17 am
by TeraByte Support(PP)
How are you testing this? If you're using a CMD script file, the ! can be problematic due to its function in scripts. For example, "pa!ssword" would end up as "password" because the ! gets removed and "pa!ss!word" would end up as "paword" (assuming the variable 'ss' isn't assigned a value).

Re: Password protected backup anomaly

Posted: Tue Jul 19, 2016 3:39 pm
by Somebeachsomewhere
Thanks for the response. I am indeed calling the password from a cmd script. Didn't realize the significance of ! in a script. The ! is at the very end of the password. I've tried using the password w/o the ! at the end but I still get the invalid password. Can one combine using the enc:/1 option and the stored password of IFW if enclosed in "" for any spaces and both have the same password with admin rights?
BTW I have since changed the pw w/o a ! but I still have the old full backup to try and get past the invalid password response.

Re: Password protected backup anomaly

Posted: Tue Jul 19, 2016 6:53 pm
by TeraByte Support(PP)
The password you ended up with would depend on what followed the ! in the command. To get an idea of what it's doing, you can "echo" the entire command line so you can see it. Do this from the actual script file (comment out the command or just add echo in front of it). For example:

Command: echo imagew /b /d:w0@0x1 /f:i:\testbackup /v /pw:password! /enc:1

...actually comes out as:
imagew /b /d:w0@0x1 /f:i:\testbackup /v /pw:password1

If you use quotes then you may have spaces to deal with too. For example:

Command: imagew /b /d:w0@0x1 /f:i:\testbackup /v /pw:"password!" /enc:1
ends up...
imagew /b /d:w0@0x1 /f:i:\testbackup /v /pw:"password1 "

If you need to use the ! as regular text you need to escape it. For example: /pw:pass^^!word ---would be--- /pw:pass!word

When using special characters in scripts it's generally a good idea to view them to make sure the program is getting the text you're actually trying to send. Examining the IFW.LOG file can help too. Then you can tweak the command as necessary.

>>Can one combine using the enc:/1 option and the stored password of IFW if enclosed in "" for any spaces and both have the same password with admin rights?

Not sure what you're asking. Can you provide an example?

Re: Password protected backup anomaly

Posted: Tue Jul 19, 2016 8:46 pm
by TAC109
!'s are only significant in a DOS script if there is a preceding 'setlocal
enabledelayedexpansion' statement. If you include a 'setlocal
disabledelayedexpansion' statement then !'s will just be treated as
ordinary characters.

wrote:
> Thanks for the response. I am indeed calling the password from a cmd
> script. Didn't realize the significance of ! in a script. The ! is at the
> very end of the password. I've tried using the password w/o the ! at the
> end but I still get the invalid password. Can one combine using the
> enc:/1 option and the stored password of IFW if enclosed in "" for any
> spaces and both have the same password with admin rights?
BTW I have since changed the pw w/o a ! but I still have the old full
backup to try and get past the invalid password response.



Re: Password protected backup anomaly

Posted: Thu Jul 21, 2016 11:09 pm
by Somebeachsomewhere
Thanks Paul. After looking at the user manual (guess I should do the rtfm first) the answer to my nonsensical combine question is found on page 154. When I get a chance will do a trial run of script using that password with an ! and adjust your echo command for my particular setup.

Re: Password protected backup anomaly

Posted: Thu Jul 21, 2016 11:35 pm
by TeraByte Support(PP)
I would recommend that you check the first backup comes out as expected -- that you can open it with the actual password. You don't want to end up locked out for some reason and not know it until later.