password problem

Hello,

I;ve just joined this list in hopes of solving my password problem on one
dpcument.

First of all I am running openSUSE 11.3, KDE3.5, and LibreOffice 3.3.1
This is going to be a problem for an expert in LibreOffice.

I have a document that I have had for years. Time to time I must open it, edit
it and close it again. It is Libreoffice password protected. A few days ago
I opened the fdocument and then after editing closed it agaim. The other
night I tried to open it again and the password failed. Yes, I entered it
correctly, several times. The same password works on other documents.
Somehow the password changed or was corrupted for this particular document.

Is there a config file somewhere that I can edit and fix the problem?

Bob S

Bob,

My understanding is the ODT files with passwords are encrypted. You need to employ hacker-like software to 'guess' or crack your password.

A quick search of Google shows a range of options like this one...
http://www.intelore.com/openoffice-password-article.php

That said, if you have typed that password many times it is more likely that the file has become corrupted. Look on the Internet for tools to recover corrupted ODT files. Maybe you could try and install the latest version of LO to see if that allows you to open the file - there are posts on the web that explain how the exact same issue seen in OO was solved by upgrading the package to the latest version. On trying to open the file the latest version of OO recognised that the file was corrupt and fixed it.

Bob

Look at what happens carefully. Even experiment on another test doc to
see a slight difference that may be significant.

I've experienced password failures on password protected documents part
way through the loading process after it successfully took my password
and then manufactured a bogus password failure message a certain
distance into the loading process.

The password failure messages are different depending on if you really
keyed in a wrong password or it pops up a bogus message.

Create a test document, password protect it and then ATTEMPT to open it
with a bad password. Is that the password message your real doc is
getting or is it another one? The other one is a bogus message after the
file's been corrupted.

I noticed this on a large spreadsheet that takes quite a while to load.
It would take my password, start to load, and then fail some seconds
later on some internal error and puts up a bogus message.

- --
Bill Gradwohl
Roatan, Honduras
504 9 899 2652

If the password is entered wrong, usually the first file that is decrypted with that password will fail a checksum check and there will be a pretty-immediate failure.

If one of the files is corrupted, its decryption will fail the checksum check after some amount of decryption of other parts of the document have happened. It might still treat it as a password error, even though the password has been working until the particular part of the ODF document fails. If the software offers to attempt to recover, you should try it. (I suspect it is not designed to do that in this case.)

One thing you can do with the file that fails is try to open it with a Zip utility and run a test on it. If the Zip tests all right, it means the corruption occurred during encryption, not later, during writing. If the Zip indicates any part of the document is corrupted, you might see if a Zip repair utility can help.

The corruption could be in the key information rather than in the file (which would be very bad, since there is almost no way to recover if that is the case). If the corruption is in the file, the form of encryption used tends to limit mistakes (that is, things tend to go right again after a while). Because the decrypted file is a compressed stream inside of a Zip, decompression can also go off the rails. But it may be possible to recover whatever there is. But at this point, password recovery won't help because your password is not the problem. It takes some serious forensic tools to now attempt a recovery, and I don't know who might have those that work with the encryptions that are used for ODF documents.

You may also be able to find a backup of the unencrypted file on your system. You should look for that. Also, if you can reconstruct from an earlier version of the file, that would be good. JeepNut was able to find a backup to recover a seriously-corrupted file (crash during save) in a post last Friday. Look in Tools | Options | LibreOffice | Paths and see where the Backups are in the list of Paths used by LibreOffice. You might also be able to find something in Temporary files (that's a stretch).

- Dennis

> I have a document that I have had for years. Time to time I must open it,
> edit it and close it again. It is Libreoffice password protected. A few
> days ago I opened the fdocument and then after editing closed it agaim.
> The other night I tried to open it again and the password failed.

Bob

Thanks for the repies, to the three of you. I will answer Bill first. The
other two suggestions will require some work but I will try them and report
back.

Look at what happens carefully. Even experiment on another test doc to
see a slight difference that may be significant.

I've experienced password failures on password protected documents part
way through the loading process after it successfully took my password
and then manufactured a bogus password failure message a certain
distance into the loading process.

The password failure messages are different depending on if you really
keyed in a wrong password or it pops up a bogus message.

Create a test document, password protect it and then ATTEMPT to open it
with a bad password. Is that the password message your real doc is
getting or is it another one? The other one is a bogus message after the
file's been corrupted.

OK, as you suggested I created a test document and followed your advice.
The failure messages on both my doc and the terst doc were exactly the same
and failed immediately. No loading. I used bogey passwords several times on
the test doc and then used the correct one. It opened prroperly so there was
no corruption from trying that.

Thanks for trying to help. It is appreciated.

Bob S

Because LO is based on OOo code, I did:
<http://www.google.com/webhp?&q=openoffice+%2Bpassword+corrupt>
and came up with these:
<http://openoffice.org/bugzilla/show_bug.cgi?id=88946>
[.ods file corrupted, won't accept password after repair]
<http://user.services.openoffice.org/en/forum/viewtopic.php?f=9&t=10401&start=0>
[[Solved] Recover a corrupt ods file protected with password]

Those might be of help. I didn't bother to look at any of the other
possible links.

......<lots of snipping so we can focus>..........

Dennis. sooooo, following your advice:

One thing you can do with the file that fails is try to open it with a Zip
utility and run a test on it. If the Zip tests all right, it means the
corruption occurred during encryption, not later, during writing. If the
Zip indicates any part of the document is corrupted, you might see if a Zip
repair utility can help.

OK, I opened the file as a zip. Here is what I got:

Archive: Experience.zip
extracting: mimetype
extracting: content.xml
extracting: layout-cache
extracting: manifest.rdf
extracting: styles.xml
extracting: meta.xml
extracting: Configurations2/accelerator/current.xml
   creating: Configurations2/progressbar/
   creating: Configurations2/floater/
   creating: Configurations2/popupmenu/
   creating: Configurations2/toolpanel/
   creating: Configurations2/menubar/
   creating: Configurations2/toolbar/
   creating: Configurations2/images/Bitmaps/
   creating: Configurations2/statusbar/
extracting: settings.xml
  inflating: META-INF/manifest.xml

I don't quite understand what you mean by running a test on it. All, or most
of those files have now appeared in the directory where I unzipped the file.
Are they useful for any recovery?

We hsave determined....what ??

The corruption could be in the key information rather than in the file
(which would be very bad, since there is almost no way to recover if that
is the case). If the corruption is in the file, the form of encryption
used tends to limit mistakes (that is, things tend to go right again after
a while). Because the decrypted file is a compressed stream inside of a
Zip, decompression can also go off the rails. But it may be possible to
recover whatever there is.

Do you think this is what happened to me?

But at this point, password recovery won't help
because your password is not the problem. It takes some serious forensic
tools to now attempt a recovery, and I don't know who might have those that
work with the encryptions that are used for ODF documents.

You're saying this is NOT my problem since I was able to unzip it?

You may also be able to find a backup of the unencrypted file on your
system. You should look for that. Also, if you can reconstruct from an
earlier version of the file, that would be good. JeepNut was able to find a
backup to recover a seriously-corrupted file (crash during save) in a post
last Friday. Look in Tools | Options | LibreOffice | Paths and see where
the Backups are in the list of Paths used by LibreOffice. You might also
be able to find something in Temporary files (that's a stretch).

Nope, I checked that out and there was nothing. I also did a lot of googling
and followed some URLs suggested on this thread. Saw something about using a
hex-editor but didn't understand it, and it didn't seem as though the
circumstances were the same.

Hope you or someone else can guide me a little further along this path.

Bob S

Bob,

No worries about running the test. It looks like the file extracted without any problem. Most Zip utilities have an option to test a package rather than extract it. The test report would indicate whether or not one of the files had some sort of discrepancy. You can try it, but it looks like it should pass.

The difficulty for you is that all of those files are still encrypted.

It appears that it is not the Zip that is corrupted, so you have to consider that there was an encryption failure.

Now we need someone who can use the manifest.xml and those individual files and see which ones can be decrypted with the known password.

Depending on which file is damaged, you might be able to try operating without it.

I don't have any tools that will do this, although there are some ways we might be able to manipulate the manifest to trick LibreOffice into doing it for us.

I don't know how to talk you through this. So it depends on having the document to manipulate and either knowing the password or sending modifications back to you to see if you can get one of the modifications to open far enough to be useful.

So I suppose it comes down to how willing you are to let the document out of your hands, even in its encrypted form.

- Dennis

...

Did you look at the links that I provided to you? Make a copy of the
file & then try doing the edits with a hexeditor (Gvim or similar).
If you don't know how to do that, send me a copy of the file & I'll do
it for you.

How is being able to access the encrypted Zip streams in a Hex editor going to help Bob?

All of the extracted files (except the mimetype) are encryptions of the original compressed files. They are shown as extracted because the ciphertext is not itself compressed. The plaintext is. The META-INF/manifest.xml is not encrypted, so it can be read decompressed.

It seems clear that there is nothing wrong with the Zip itself.

So what bits do you propose to fiddle?

- Dennis

Please bottom post & please do not cc me as I read the msgs on the list;
I don't really need extra copies :slight_smile:

Regarding your question: the files et al in the links regarding OOo also
extract properly - see:
http://openoffice.org/bugzilla/show_bug.cgi?id=88946#c4
and that attachment. The problem with that (and supposedly the files in
the forum posts) file is in the manifest.xml itselft. It extracts just
fine for me. However the file is corrupt & I was able to repair and use
the password supplied by the author to open the file.

My point is that it is possible that Bob _may_ have the same issue; he
won't know until he checks. I suppose at this point that anything *is*
worth checking/trying...
...

Hello NoOp, thanks for the reply

Yes, I went to those URLs and read them over several times. I had difficulty
unerstanding what was beng done and wasn't sure if the circumstaances were
the same as mine. I guess I need to analyze them carefully.

My file is an .odt (simply text) There are no Samba, no server etc. I don't
understand when it is said a "double manfest" I have a. manifest.rdf alone
and a manifest.xml inside the folder META-INF. I couldn't figure out which
file to open in the hex-editor or what to delete. I need a little gidcance
here.

Unfortunately I cannot send you the file as I explained to Dennis. It contains
very sensetive information. I do appreciate the offer though, as I do
Dennis'es.

Once that editing is done, how is it incorporated back into the original .odt
file? Please have patience with me on this. You are correct, as you stated
to Dennis. what do I have to lose? Try what might work. I hope that you hav
the answer/fix for this.

Thanks again. Bob S

Bob,

No worries about running the test. It looks like the file extracted
without any problem. Most Zip utilities have an option to test a package
rather than extract it. The test report would indicate whether or not one
of the files had some sort of discrepancy. You can try it, but it looks
like it should pass.

OK, I did. No errors

The difficulty for you is that all of those files are still encrypted.

OK understood

It appears that it is not the Zip that is corrupted, so you have to
consider that there was an encryption failure.

Now we need someone who can use the manifest.xml and those individual files
and see which ones can be decrypted with the known password.

OK, I guess that means special knowledge by someone. I tried opening manifest
ans see it is a binary. It needs something called knewstickerstub which I
don;t have an aren't able to install. Might be able to find it somehow but
don't really know if I need it.

Depending on which file is damaged, you might be able to try operating
without it.

Hmmm How would I do that?

I don't have any tools that will do this, although there are some ways we
might be able to manipulate the manifest to trick LibreOffice into doing it
for us.

I don't know how to talk you through this. So it depends on having the
document to manipulate and either knowing the password or sending
modifications back to you to see if you can get one of the modifications to
open far enough to be useful.

So I suppose it comes down to how willing you are to let the document out
of your hands, even in its encrypted form.

- Dennis. I am sure you are a most trustworty person, but this document
cntains very personal information which could even be dangerous to me. That
is why it is encrypted. I was/am a fairly high ranking officer in a federal
law enforcement agency. I would have to give that some very serious thought.

Bob S

I agree, seeing if there is something to repair in the manifest is definitely worth trying.

- Dennis

PS: I decline your invitation to bottom post.

Send a copy of the manifest.xml to Dennis and me; that way we can
compare against an uncorrupted password protected document to see if
there is anything obvious in the manifest.xml. That way you won't need
to send the entire file. If there if nothing obvious, then I can ask on
the dev list to see if there is something they can recommend.

Gary