Page 1 of 4 123 ... LastLast
Results 1 to 10 of 34

Thread: I Need help decrypting other Hard Drive with ecryptfs

  1. #1

    Unhappy I Need help decrypting other Hard Drive with ecryptfs

    Hi, I hope someone here can help me. I'm using OpenSUSE 13.1 and I'm trying to decrypt a Home folder from a different hard drive with ecryptfs but when I use ecryptf-recover-private it gives me this:

    INFO: Searching for encrypted private directories (this might take a while)...
    find: ‘/run/user/1000/gvfs’: Permission denied
    find: ‘/var/run/user/1000/gvfs’: Permission denied



    Does anyone know how to solve this problem? or is there a better way to decrypt the folder from a separate hard drive?

    Any help would be greatly appreciated.

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    13,190
    Blog Entries
    3

    Default Re: I Need help decrypting other Hard Drive with ecryptfs

    Quote Originally Posted by theuniverse View Post
    Hi, I hope someone here can help me. I'm using OpenSUSE 13.1 and I'm trying to decrypt a Home folder from a different hard drive with ecryptfs but when I use ecryptf-recover-private it gives me this:

    INFO: Searching for encrypted private directories (this might take a while)...
    find: ‘/run/user/1000/gvfs’: Permission denied
    find: ‘/var/run/user/1000/gvfs’: Permission denied



    Does anyone know how to solve this problem? or is there a better way to decrypt the folder from a separate hard drive?

    Any help would be greatly appreciated.
    Those particular messages should not cause a problem. What is being searched for is not below those mount points. Perhaps the script is too sensitive.

    Here's another possibility: Create a new user on your system. Make the home directory of that new user on that different hard drive. Give the new user the same UID as that user had (even if it duplicates an existing user). Check if the home directory for that new user has symlinks that are relevant to "ecryptfs" (symlinks for ".ecryptfs" and for ".Private". You might have to fix those if they are not relative links.

    Then login as that user and attempt to mount the private directory.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  3. #3

    Default Re: I Need help decrypting other Hard Drive with ecryptfs

    Quote Originally Posted by nrickert View Post
    Those particular messages should not cause a problem. What is being searched for is not below those mount points. Perhaps the script is too sensitive.

    Here's another possibility: Create a new user on your system. Make the home directory of that new user on that different hard drive. Give the new user the same UID as that user had (even if it duplicates an existing user). Check if the home directory for that new user has symlinks that are relevant to "ecryptfs" (symlinks for ".ecryptfs" and for ".Private". You might have to fix those if they are not relative links.

    Then login as that user and attempt to mount the private directory.
    I'm kind of a newbie, can you please be a little more specific about the symlinks? how and where do I find them or how do I fix them? or what if they don't exist?

  4. #4

    Default Re: I Need help decrypting other Hard Drive with ecryptfs

    Also when creating the new user with the same UID it gives me a conflict error, between the entered username and existing username.

  5. #5
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    13,190
    Blog Entries
    3

    Default Re: I Need help decrypting other Hard Drive with ecryptfs

    Quote Originally Posted by theuniverse View Post
    Also when creating the new user with the same UID it gives me a conflict error, between the entered username and existing username.
    Oops!

    I meant to mention that you should create the new user by directly editing "/etc/passwd" (using "vipw"), and then editing "/etc/shadow" (using "vipw -s"). The fancy ways of creating a user won't like the duplicate and will also want to mess around with files in the home directory.

    When you use ecryptfs for an encrypted home directory, you usually have to have ".ecryptfs" and ".Private" somewhere else, such as in "/home/.ecryptfs", with symlinks to there.

    I've only done this in opensuse. I'm not sure exactly how ubuntu sets that up. Here's part of what I see on a system where I have set it up that way:
    Code:
    % ls -al
    total 16
    drwxr-xr-x 4 rickert users 4096 Jan  6 18:00 .
    drwxr-xr-x 9 root    root  4096 Nov 21 13:36 ..
    lrwxrwxrwx 1 rickert users   24 Apr  4  2013 bin -> ../.ecryptfs/rickert/bin
    drwx------ 3 rickert users 4096 Dec  3 13:57 .config
    lrwxrwxrwx 1 rickert users   32 Apr  4  2013 .csh.expert -> ../.ecryptfs/rickert/.csh.expert
    lrwxrwxrwx 1 rickert users   27 Apr  4  2013 .cshrc -> ../.ecryptfs/rickert/.cshrc
    lrwxrwxrwx 1 rickert users   26 Apr  4  2013 .dmrc -> ../.ecryptfs/rickert/.dmrc
    lrwxrwxrwx 1 rickert users   30 Apr  4  2013 .ecryptfs -> ../.ecryptfs/rickert/.ecryptfs
    lrwxrwxrwx 1 rickert users   24 Apr  4  2013 lib -> ../.ecryptfs/rickert/lib
    lrwxrwxrwx 1 rickert users   27 Apr  4  2013 .login -> ../.ecryptfs/rickert/.login
    dr-x------ 2 rickert   500 4096 Jan  4  2012 Private
    lrwxrwxrwx 1 rickert users   29 Apr  4  2013 .Private -> ../.ecryptfs/rickert/.Private
    lrwxrwxrwx 1 rickert users   25 Apr  4  2013 .ssh -> ../.ecryptfs/rickert/.ssh
    Some of those links are there for my own private reasons. However, the links for ".Private" and for ".ecryptfs" are part of what makes it work. You will notice that I used relative links. If I had used absolute links, such as
    Code:
    .Private -> /home/.ecryptfs/rickert/.Private
    then I would have additional difficulties.

    If this still does not help, then post the output from "ls -al" on that other directory. Make sure that you use code tags for posting. You can generate code tags with the "#" button on the reply edit box (with the code lines selected by your mouse).
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  6. #6

    Default Re: I Need help decrypting other Hard Drive with ecryptfs

    Quote Originally Posted by nrickert View Post
    Oops!

    I meant to mention that you should create the new user by directly editing "/etc/passwd" (using "vipw"), and then editing "/etc/shadow" (using "vipw -s"). The fancy ways of creating a user won't like the duplicate and will also want to mess around with files in the home directory.

    When you use ecryptfs for an encrypted home directory, you usually have to have ".ecryptfs" and ".Private" somewhere else, such as in "/home/.ecryptfs", with symlinks to there.

    I've only done this in opensuse. I'm not sure exactly how ubuntu sets that up. Here's part of what I see on a system where I have set it up that way:
    Code:
    % ls -al
    total 16
    drwxr-xr-x 4 rickert users 4096 Jan  6 18:00 .
    drwxr-xr-x 9 root    root  4096 Nov 21 13:36 ..
    lrwxrwxrwx 1 rickert users   24 Apr  4  2013 bin -> ../.ecryptfs/rickert/bin
    drwx------ 3 rickert users 4096 Dec  3 13:57 .config
    lrwxrwxrwx 1 rickert users   32 Apr  4  2013 .csh.expert -> ../.ecryptfs/rickert/.csh.expert
    lrwxrwxrwx 1 rickert users   27 Apr  4  2013 .cshrc -> ../.ecryptfs/rickert/.cshrc
    lrwxrwxrwx 1 rickert users   26 Apr  4  2013 .dmrc -> ../.ecryptfs/rickert/.dmrc
    lrwxrwxrwx 1 rickert users   30 Apr  4  2013 .ecryptfs -> ../.ecryptfs/rickert/.ecryptfs
    lrwxrwxrwx 1 rickert users   24 Apr  4  2013 lib -> ../.ecryptfs/rickert/lib
    lrwxrwxrwx 1 rickert users   27 Apr  4  2013 .login -> ../.ecryptfs/rickert/.login
    dr-x------ 2 rickert   500 4096 Jan  4  2012 Private
    lrwxrwxrwx 1 rickert users   29 Apr  4  2013 .Private -> ../.ecryptfs/rickert/.Private
    lrwxrwxrwx 1 rickert users   25 Apr  4  2013 .ssh -> ../.ecryptfs/rickert/.ssh
    Some of those links are there for my own private reasons. However, the links for ".Private" and for ".ecryptfs" are part of what makes it work. You will notice that I used relative links. If I had used absolute links, such as
    Code:
    .Private -> /home/.ecryptfs/rickert/.Private
    then I would have additional difficulties.

    If this still does not help, then post the output from "ls -al" on that other directory. Make sure that you use code tags for posting. You can generate code tags with the "#" button on the reply edit box (with the code lines selected by your mouse).
    It seems a little complicated for me, I wouldn't know exactly how to edit the file. Sorry I'm such a linux newbie, I kinda need like step by step instructions.

  7. #7
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    13,190
    Blog Entries
    3

    Default Re: I Need help decrypting other Hard Drive with ecryptfs

    Quote Originally Posted by theuniverse View Post
    Sorry I'm such a linux newbie, I kinda need like step by step instructions.
    I would still request the output from running "ls -al" while you have changed into the home directory of the user on that other disk. And remember to use code tags.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  8. #8

    Default Re: I Need help decrypting other Hard Drive with ecryptfs

    Thanks for trying to help out. First, how do I setup the new user with vipw? how am I supposed to edit the file?

  9. #9
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: I Need help decrypting other Hard Drive with ecryptfs

    On 2014-01-07 04:06, theuniverse wrote:
    >
    > Thanks for trying to help out. First, how do I setup the new user with
    > vipw? how am I supposed to edit the file?


    vipw, which has to be started on a terminal, starts the editor with the
    appropriate file already opened. You set the environment variable
    "EDITOR" to the editor of your choice: I suggest mcedit, provided you
    install 'mc' first. Otherwise, you could use 'joe'.

    For this, you edit the file "/root/.bashrc" to add this entry:

    Code:
    export EDITOR=/usr/bin/mcedit
    Alternatively, you can do:

    Code:
    su -
    EDITOR=/usr/bin/mcedit  vipw

    If you do not do any of this, 'vipw' will default to use 'vi', which you
    probably will not like.


    What he is telling you to do is to find the line of your user and copy
    it, changing the user name and the home directory.


    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

  10. #10
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    13,190
    Blog Entries
    3

    Default Re: I Need help decrypting other Hard Drive with ecryptfs

    Quote Originally Posted by robin_listas View Post
    What he is telling you to do is to find the line of your user and copy
    it, changing the user name and the home directory.
    If he provides the requested directory listing, then I can probably give more detailed step-by-step instructions. But I cannot be sure of that until I see what we have.

    Thanks for helping with "vipw". And yes, "EDITOR=" can be useful.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

Page 1 of 4 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •