Linux Mint 17.2で暗号化された/home/フォルダを回復する方法

Linux Mint 17.2で暗号化された/home/フォルダを回復する方法

質問: 今日の午前にパスワードを変更しましたが、それ以降ログインができないので間違って入力したようです。 Grubメニューから起動し、パスワードのないルートシェルを起動してパスワードをリセットしました。これで新しいパスワードを入力してログイン画面を通過できるので、成功しました。ただし、これを行うとエラーメッセージが表示されます。

Your session only lasted less than 10 seconds. If you have not logged out yourself, this could mean there is some installation problem, or that you may be out of diskspace. Try logging in with one of the failsafe sessions to see if you can fix this problem.

syndaemon: no process found
/etc/mdm/Xsession: Beginning session setup...
localuser:[username] being added to access control list
Can't create dir /home/[username]/Desktop
Can't create dir /home/[username]/Downloads
Can't create dir /home/[username]/Templates
Can't create dir /home/[username]/Public
Can't create dir /home/[username]/Documents
Can't create dir /home/[username]/Music
Can't create dir /home/[username]/Pictures
Can't create dir /home/[username]/Videos
Script for none started at run_im
Script for auto started at run_im
Script for default started at run_im
init: session.migration main process (2322)terminated with status 1
init: logrotate main process (2304) killed by TERM signal
init: Disconnected from notified D-Bus bus

「OK」をクリックするとログイン画面に戻ります。再度ログインしようとすると、同じメッセージが表示されます。

注:上記のテキストには[ユーザー名]が表示されていますが、実際のエラーには実際のユーザー名が表示されます。しかし、私はオンラインアイデンティティに対する編集証があり、上記の印刷されたエラーを確認しました。

私は試した:

  • ハードブートとログイン画面の閉じるボタンを使用してコンピュータを再起動します。
  • 回復モードで起動し、「壊れたパッケージの回復」と「すべてのファイルの確認」を実行します(おそらく「すべてのディレクトリ」、覚えていません)。
  • 私が知っているすべての知識ベースを検索して検索しましたが、まだ解決策が見つかりませんでした。
  • 私が尋ねるのはlinuxquestions.org
  • 同じユーザー名でアカウントを削除して再作成してみました。
  • また、コマンドラインを使用して暗号化されたファイルにアクセスしようとしましたが、失敗しました。

     mint@mint ~ $  ecryptfs-mount-private
     ERROR: Encrypted private directory is not setup properly
    

    返済

    mint@mint ~ $ ecryptfs-unwrap-passphrase /media/34e5c4fa-0621-46cb-83b0-763c2a0dc49c/home/.private/[username]/.ecryptfs/wrapped-passphrase
    Passphrase: 
    Error: Unwrapping passphrase failed [-2]
    Info: Check the system log for more information from libecryptfs
    

    ディスク容量とは何の関係もありません(下で最大のドライブに入ろうとします)。

    mint@mint ~ $ df
    df: ‘/root/.gvfs’: Permission denied
    Filesystem                1K-blocks      Used Available Use% Mounted on
    /cow                        2032928   1676256    250076  88% /
    udev                        1979616         4   1979612   1% /dev
    tmpfs                        404796      1552    403244   1% /run
    /dev/sdb1                   3908100   3876388     31712 100% /cdrom
    /dev/loop0                  1523456   1523456         0 100% /rofs
    none                              4         0         4   0% /sys/fs/cgroup
    tmpfs                       2023964        16   2023948   1% /tmp
    none                           5120         0      5120   0% /run/lock
    none                        2023964        84   2023880   1% /run/shm
    none                         102400        28    102372   1% /run/user
    /dev/mapper/mint--vg-root 956884652 103557812 804696876  12% /media/mint/34e5c4fa-0621-46cb-83b0-763c2a0dc49c
    

    また、以下を試しました。ファイルをインストールしますが、復号化しません。

    mint@mint ~ $ sudo ecryptfs-recover-private
    INFO: Searching for encrypted private directories (this might take a while)...
    INFO: Found [/media/mint/34e5c4fa-0621-46cb-83b0-763c2a0dc49c/home/.ecryptfs/tijmen/.Private].
    Try to recover this directory? [Y/n]: y
    INFO: Found your wrapped-passphrase
    Do you know your LOGIN passphrase? [Y/n] y
    INFO: Enter your LOGIN passphrase...
    Passphrase: 
    Error: Unwrapping passphrase and inserting into the user session keyring failed [-5]
    Info: Check the system log for more information from libecryptfs
    mint@mint ~ $ sudo ecryptfs-recover-private
    INFO: Searching for encrypted private directories (this might take a while)...
    INFO: Found [/media/mint/34e5c4fa-0621-46cb-83b0-763c2a0dc49c/home/.ecryptfs/tijmen/.Private].
    Try to recover this directory? [Y/n]: y
    INFO: Found your wrapped-passphrase
    Do you know your LOGIN passphrase? [Y/n] n
    INFO: To recover this directory, you MUST have your original MOUNT passphrase.
    INFO: When you first setup your encrypted private directory, you were told to record
    INFO: your MOUNT passphrase.
    INFO: It should be 32 characters long, consisting of [0-9] and [a-f].
    
    Enter your MOUNT passphrase: 
    INFO: Success!  Private data mounted at [/tmp/ecryptfs.cQtlJNMc].
    mint@mint ~ $
    

    その他の関連情報 私の内部HDが数ヶ月前に死亡したので、1TBの外部HDDでLinux Mint 17.2を実行しています。これまで、これは魅力のように動作します。いくつかの重要なファイル(KeePassデータベースファイルなど)を検索できるようにしたいので、現在ライブUSBドライブを使用していますが、外付けHDDのインストールはインストール中に「パーティション暗号化」オプションを使用して暗号化されます。

    私はLinux Mintを約6〜8ヶ月ほど使用してきたので、日常的にターミナルを使用することにどのくらい慣れていますが、Linuxが内部的にどのように動作するのか、rootコマンドがどのように動作するのか分かりません。私が自由に使えるオプションがあります。

    これは私がライブUSBで使用しているLinuxディストリビューションです。外付けHDDにインストールしたのと同じディストリビューションです。

    mint@mint ~ $  cat /etc/*-release
    DISTRIB_ID=LinuxMint
    DISTRIB_RELEASE=17.2
    DISTRIB_CODENAME=rafaela
    DISTRIB_DESCRIPTION="Linux Mint 17.2 Rafaela"
    NAME="Ubuntu"
    VERSION="14.04.2 LTS, Trusty Tahr"
    ID=ubuntu
    ID_LIKE=debian
    PRETTY_NAME="Ubuntu 14.04.2 LTS"
    VERSION_ID="14.04"
    HOME_URL="http://www.ubuntu.com/"
    SUPPORT_URL="http://help.ubuntu.com/"
    BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
    cat: /etc/upstream-release: Is a directory
    

    これはカーネルLinux 3.16.0-38-generic x86_64です。

    ライブUSBを使用してすべてのフォルダとファイルを表示できますが、暗号化されているため、実際にはアクセスできません。

    ----最初の回答以降に更新----GAD3Rが私をお勧めしました。

    Boot using Linux-mint LiveCD
    
    Make sure that your target system's hard drive is mounted
    
    Open a terminal
    
    Install ecryptfs-utils documentation
    
    sudo apt-get install -y ecryptfs-utils
    
    And run
    
    sudo ecryptfs-recover-private
    
    Follow the prompts
    

    残念ながら、これは機能しません。

    mint@mint ~ $ sudo apt-get install -y ecryptfs-utils
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    ecryptfs-utils is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 326 not upgraded.
    mint@mint ~ $ sudo ecryptfs-recover-private
    INFO: Searching for encrypted private directories (this might take a while)...
    INFO: Found [/media/mint/34e5c4fa-0621-46cb-83b0-763c2a0dc49c/home/.ecryptfs/tijmen/.Private].
    Try to recover this directory? [Y/n]: y
    INFO: Found your wrapped-passphrase
    Do you know your LOGIN passphrase? [Y/n] y
    INFO: Enter your LOGIN passphrase...
    Passphrase: 
    Error: Unwrapping passphrase and inserting into the user session keyring failed [-5]
    Info: Check the system log for more information from libecryptfs
    mint@mint ~ $ 
    

    ベストアンサー1

    Linux-mint LiveCDを使用した起動

    ターゲットシステムのハードドライブがマウントされていることを確認してください。

    端末を開く

    ecryptfs-utilsのインストール文書

    sudo apt-get install -y ecryptfs-utils
    

    そして走る

    sudo ecryptfs-recover-private
    

    プロンプトに従ってください

    復号化されたデータにアクセスして他の場所に保存します。

    グラフィックファイルブラウザを起動しsudo nautilus て一時ディレクトリに移動することもできます。

    おすすめ記事