Recover /home/ after deleting /usr/lib

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
2
down vote

favorite












I accidently deleted my /usr/lib folder. I had the genius idea of rebooting to see if it still boots.
Suprise, it doesn't.
My home directory is encrypted and I don't remember the encryption phrase.



However I can boot into a root terminal and access my files. From there I can even log into my account. So as far as I know you don't need the encryption pw if you are logged into the account that encrypted the files.
But for some Reason I still only see the "Access-Your-Private-Data.desktop" file in the /home/MYUSER/ . And also when I run the command: "ecryptfs-recover-private" I'm asked for a recovery passphrase.



All that, even though I'm logged in to my user that encryped the files. Once my UI was still working I never had to enter the recovery phrase.



Is there any way to get back my data without knowing the encryption key but just my User name?










share|improve this question

























    up vote
    2
    down vote

    favorite












    I accidently deleted my /usr/lib folder. I had the genius idea of rebooting to see if it still boots.
    Suprise, it doesn't.
    My home directory is encrypted and I don't remember the encryption phrase.



    However I can boot into a root terminal and access my files. From there I can even log into my account. So as far as I know you don't need the encryption pw if you are logged into the account that encrypted the files.
    But for some Reason I still only see the "Access-Your-Private-Data.desktop" file in the /home/MYUSER/ . And also when I run the command: "ecryptfs-recover-private" I'm asked for a recovery passphrase.



    All that, even though I'm logged in to my user that encryped the files. Once my UI was still working I never had to enter the recovery phrase.



    Is there any way to get back my data without knowing the encryption key but just my User name?










    share|improve this question























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      I accidently deleted my /usr/lib folder. I had the genius idea of rebooting to see if it still boots.
      Suprise, it doesn't.
      My home directory is encrypted and I don't remember the encryption phrase.



      However I can boot into a root terminal and access my files. From there I can even log into my account. So as far as I know you don't need the encryption pw if you are logged into the account that encrypted the files.
      But for some Reason I still only see the "Access-Your-Private-Data.desktop" file in the /home/MYUSER/ . And also when I run the command: "ecryptfs-recover-private" I'm asked for a recovery passphrase.



      All that, even though I'm logged in to my user that encryped the files. Once my UI was still working I never had to enter the recovery phrase.



      Is there any way to get back my data without knowing the encryption key but just my User name?










      share|improve this question













      I accidently deleted my /usr/lib folder. I had the genius idea of rebooting to see if it still boots.
      Suprise, it doesn't.
      My home directory is encrypted and I don't remember the encryption phrase.



      However I can boot into a root terminal and access my files. From there I can even log into my account. So as far as I know you don't need the encryption pw if you are logged into the account that encrypted the files.
      But for some Reason I still only see the "Access-Your-Private-Data.desktop" file in the /home/MYUSER/ . And also when I run the command: "ecryptfs-recover-private" I'm asked for a recovery passphrase.



      All that, even though I'm logged in to my user that encryped the files. Once my UI was still working I never had to enter the recovery phrase.



      Is there any way to get back my data without knowing the encryption key but just my User name?







      boot encryption data-recovery ecryptfs






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 13 at 8:40









      Florian Würmseer

      112




      112




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote













          You should always backup your encryption passphrase and create a separate backup on an external hd ...



          Anyway, I think you didn't delete the key itself.
          You deleted the encfs libraries.



          find /usr/lib/ | grep encfs
          /usr/lib/libencfs.so.6
          /usr/lib/libencfs.so.6.0.2
          /usr/lib/libencfs.so


          Your encryption key sould be at:



          /home/$USER/.ecryptfs


          or



          /home/.ecryptfs/$USER/.ecryptfs


          You need to boot from a live system, mount the home partition with your encrypted home.



          For recovery use:



          sudo ecryptfs-recover-private



          It should find the encrypted home, you only need the login password. Make an external backup after recovery and reinstall your system.






          share|improve this answer





























            up vote
            0
            down vote



            accepted










            Ok I found a way to recover it. Unfortunately most commands to restore the encryption key or installing packages didn't work from the machine as there were no packages at all. I also used another machine to try accessing the encryption key at /home/$USER/.ecryptfs but I got an error that the key was corrupted.



            At the end I installed the same linux version on a new partition, mounted the old one and copied the whole /usr/lib folder of the new installation to the one I crashed.



            After that I was able to boot into my system again and I could decrypt all my files with the user password.






            share|improve this answer




















              Your Answer







              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "89"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              convertImagesToLinks: true,
              noModals: false,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













               

              draft saved


              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1024581%2frecover-home-after-deleting-usr-lib%23new-answer', 'question_page');

              );

              Post as a guest






























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              1
              down vote













              You should always backup your encryption passphrase and create a separate backup on an external hd ...



              Anyway, I think you didn't delete the key itself.
              You deleted the encfs libraries.



              find /usr/lib/ | grep encfs
              /usr/lib/libencfs.so.6
              /usr/lib/libencfs.so.6.0.2
              /usr/lib/libencfs.so


              Your encryption key sould be at:



              /home/$USER/.ecryptfs


              or



              /home/.ecryptfs/$USER/.ecryptfs


              You need to boot from a live system, mount the home partition with your encrypted home.



              For recovery use:



              sudo ecryptfs-recover-private



              It should find the encrypted home, you only need the login password. Make an external backup after recovery and reinstall your system.






              share|improve this answer


























                up vote
                1
                down vote













                You should always backup your encryption passphrase and create a separate backup on an external hd ...



                Anyway, I think you didn't delete the key itself.
                You deleted the encfs libraries.



                find /usr/lib/ | grep encfs
                /usr/lib/libencfs.so.6
                /usr/lib/libencfs.so.6.0.2
                /usr/lib/libencfs.so


                Your encryption key sould be at:



                /home/$USER/.ecryptfs


                or



                /home/.ecryptfs/$USER/.ecryptfs


                You need to boot from a live system, mount the home partition with your encrypted home.



                For recovery use:



                sudo ecryptfs-recover-private



                It should find the encrypted home, you only need the login password. Make an external backup after recovery and reinstall your system.






                share|improve this answer
























                  up vote
                  1
                  down vote










                  up vote
                  1
                  down vote









                  You should always backup your encryption passphrase and create a separate backup on an external hd ...



                  Anyway, I think you didn't delete the key itself.
                  You deleted the encfs libraries.



                  find /usr/lib/ | grep encfs
                  /usr/lib/libencfs.so.6
                  /usr/lib/libencfs.so.6.0.2
                  /usr/lib/libencfs.so


                  Your encryption key sould be at:



                  /home/$USER/.ecryptfs


                  or



                  /home/.ecryptfs/$USER/.ecryptfs


                  You need to boot from a live system, mount the home partition with your encrypted home.



                  For recovery use:



                  sudo ecryptfs-recover-private



                  It should find the encrypted home, you only need the login password. Make an external backup after recovery and reinstall your system.






                  share|improve this answer














                  You should always backup your encryption passphrase and create a separate backup on an external hd ...



                  Anyway, I think you didn't delete the key itself.
                  You deleted the encfs libraries.



                  find /usr/lib/ | grep encfs
                  /usr/lib/libencfs.so.6
                  /usr/lib/libencfs.so.6.0.2
                  /usr/lib/libencfs.so


                  Your encryption key sould be at:



                  /home/$USER/.ecryptfs


                  or



                  /home/.ecryptfs/$USER/.ecryptfs


                  You need to boot from a live system, mount the home partition with your encrypted home.



                  For recovery use:



                  sudo ecryptfs-recover-private



                  It should find the encrypted home, you only need the login password. Make an external backup after recovery and reinstall your system.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Apr 13 at 9:34

























                  answered Apr 13 at 9:25









                  2IRN

                  32316




                  32316






















                      up vote
                      0
                      down vote



                      accepted










                      Ok I found a way to recover it. Unfortunately most commands to restore the encryption key or installing packages didn't work from the machine as there were no packages at all. I also used another machine to try accessing the encryption key at /home/$USER/.ecryptfs but I got an error that the key was corrupted.



                      At the end I installed the same linux version on a new partition, mounted the old one and copied the whole /usr/lib folder of the new installation to the one I crashed.



                      After that I was able to boot into my system again and I could decrypt all my files with the user password.






                      share|improve this answer
























                        up vote
                        0
                        down vote



                        accepted










                        Ok I found a way to recover it. Unfortunately most commands to restore the encryption key or installing packages didn't work from the machine as there were no packages at all. I also used another machine to try accessing the encryption key at /home/$USER/.ecryptfs but I got an error that the key was corrupted.



                        At the end I installed the same linux version on a new partition, mounted the old one and copied the whole /usr/lib folder of the new installation to the one I crashed.



                        After that I was able to boot into my system again and I could decrypt all my files with the user password.






                        share|improve this answer






















                          up vote
                          0
                          down vote



                          accepted







                          up vote
                          0
                          down vote



                          accepted






                          Ok I found a way to recover it. Unfortunately most commands to restore the encryption key or installing packages didn't work from the machine as there were no packages at all. I also used another machine to try accessing the encryption key at /home/$USER/.ecryptfs but I got an error that the key was corrupted.



                          At the end I installed the same linux version on a new partition, mounted the old one and copied the whole /usr/lib folder of the new installation to the one I crashed.



                          After that I was able to boot into my system again and I could decrypt all my files with the user password.






                          share|improve this answer












                          Ok I found a way to recover it. Unfortunately most commands to restore the encryption key or installing packages didn't work from the machine as there were no packages at all. I also used another machine to try accessing the encryption key at /home/$USER/.ecryptfs but I got an error that the key was corrupted.



                          At the end I installed the same linux version on a new partition, mounted the old one and copied the whole /usr/lib folder of the new installation to the one I crashed.



                          After that I was able to boot into my system again and I could decrypt all my files with the user password.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Apr 16 at 8:02









                          Florian Würmseer

                          112




                          112



























                               

                              draft saved


                              draft discarded















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1024581%2frecover-home-after-deleting-usr-lib%23new-answer', 'question_page');

                              );

                              Post as a guest













































































                              Popular posts from this blog

                              pylint3 and pip3 broken

                              Missing snmpget and snmpwalk

                              How to enroll fingerprints to Ubuntu 17.10 with VFS491