Password protected backup anomaly

User discussion and information resource forum for Image products.
Post Reply
Somebeachsomewhere
Posts: 15
Joined: Sun Dec 04, 2011 11:29 pm

Password protected backup anomaly

Post 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
TeraByte Support(PP)
Posts: 1644
Joined: Fri Aug 12, 2011 12:51 am

Re: Password protected backup anomaly

Post 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).
Somebeachsomewhere
Posts: 15
Joined: Sun Dec 04, 2011 11:29 pm

Re: Password protected backup anomaly

Post 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.
TeraByte Support(PP)
Posts: 1644
Joined: Fri Aug 12, 2011 12:51 am

Re: Password protected backup anomaly

Post 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?
TAC109
Posts: 273
Joined: Tue Sep 06, 2011 10:41 pm

Re: Password protected backup anomaly

Post 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.


Somebeachsomewhere
Posts: 15
Joined: Sun Dec 04, 2011 11:29 pm

Re: Password protected backup anomaly

Post 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.
TeraByte Support(PP)
Posts: 1644
Joined: Fri Aug 12, 2011 12:51 am

Re: Password protected backup anomaly

Post 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.
Post Reply