Password protected backup anomaly

User discussion and information resource forum for Image products.

Password protected backup anomaly

Postby Somebeachsomewhere » Sat Jul 16, 2016 9:34 am

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

Re: Password protected backup anomaly

Postby TeraByte Support(PP) » Sat Jul 16, 2016 11:17 pm

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).
Paul Purviance
TeraByte Support
TeraByte Support(PP)
 
Posts: 1089
Joined: Thu Aug 11, 2011 5:51 pm

Re: Password protected backup anomaly

Postby Somebeachsomewhere » Tue Jul 19, 2016 8:39 am

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 4:29 pm

Re: Password protected backup anomaly

Postby TeraByte Support(PP) » Tue Jul 19, 2016 11:53 am

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?
Paul Purviance
TeraByte Support
TeraByte Support(PP)
 
Posts: 1089
Joined: Thu Aug 11, 2011 5:51 pm

Re: Password protected backup anomaly

Postby TAC109 » Tue Jul 19, 2016 1:46 pm

!'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.


TAC109
 
Posts: 215
Joined: Tue Sep 06, 2011 3:41 pm

Re: Password protected backup anomaly

Postby Somebeachsomewhere » Thu Jul 21, 2016 4:09 pm

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

Re: Password protected backup anomaly

Postby TeraByte Support(PP) » Thu Jul 21, 2016 4:35 pm

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.
Paul Purviance
TeraByte Support
TeraByte Support(PP)
 
Posts: 1089
Joined: Thu Aug 11, 2011 5:51 pm


Return to Image for DOS/Linux/Windows