「TrueCrypt」の版間の差分
(同期) |
|||
(2人の利用者による、間の4版が非表示) | |||
1行目: | 1行目: | ||
− | [[Category: |
+ | [[Category:暗号化]] |
[[Category:ファイルシステム]] |
[[Category:ファイルシステム]] |
||
[[de:TrueCrypt]] |
[[de:TrueCrypt]] |
||
8行目: | 8行目: | ||
{{Related|Tomb}} |
{{Related|Tomb}} |
||
{{Related articles end}} |
{{Related articles end}} |
||
+ | {{Warning| |
||
− | |||
− | + | * 2014年5月から、TrueCrypt の開発は中止され [http://truecrypt.sourceforge.net/ もはやアップデートや修正は行われない] ことになっています。[[dm-crypt]] や [[tcplay]] など他の暗号化プログラムあるいは TrueCrypt のフォークを使用するようにしてください。例えば [http://veracrypt.codeplex.com/ VeraCrypt] は活発に開発されており {{Pkg|veracrypt}} パッケージでインストールできます。VeraCrypt のストレージフォーマットはバージョン 1.0f から TrueCrypt のストレージフォーマットと互換性を持つようになっています。TrueCrypt のコードの監査については [https://www.grc.com/misc/truecrypt/truecrypt.htm] を参照。 |
|
+ | * 2015年9月26日に TrueCrypt の '''Windows''' 版に深刻なセキュリティ問題が2つ発見されました: CVE-2015-7358 と CVE-2015-7359。Windows と Arch Linux で暗号化ボリュームを共有する場合は注意してください。詳しくは [https://veracrypt.codeplex.com/SourceControl/changeset/cf4794372e5dea753b6310f1ca6912c6bfa86d45 1][http://www.theregister.co.uk/2015/09/29/google_flaks_find_admin_elevation_holes_that_gave_truecrypt_audit_the_slip/ 2] を参照。}} |
||
TrueCrypt はフリーでオープンソースのオンザフライ暗号化 (OTFE) プログラムです。TrueCrypt の機能として以下があります: |
TrueCrypt はフリーでオープンソースのオンザフライ暗号化 (OTFE) プログラムです。TrueCrypt の機能として以下があります: |
||
21行目: | 22行目: | ||
== インストール == |
== インストール == |
||
− | {{Note| |
+ | {{Note|既存の TrueCrypt コンテナを開いてアクセスしたいときは [[#cryptsetup を使って TrueCrypt コンテナにアクセス|cryptsetup]] を使用することを推奨します。新しい TrueCrypt コンテナは {{ic|truecrypt}} で作成できます。}} |
− | + | {{Pkg|truecrypt}} パッケージを[[pacman|インストール]]してください。{{Pkg|linux}} 以外のカーネルを使っている場合は、適当なカーネルモジュールもインストールします。 |
|
truecrypt を使って仮想ファイルシステム (例: ファイル) を暗号化する場合は、''truecrypt'' コマンドを実行したときに自動でモジュールがロードされます。 |
truecrypt を使って仮想ファイルシステム (例: ファイル) を暗号化する場合は、''truecrypt'' コマンドを実行したときに自動でモジュールがロードされます。 |
||
33行目: | 34行目: | ||
{{Note| |
{{Note| |
||
+ | * 上記の設定でうまくいかない場合、以下のように "loop" モジュールを追加することで動作します: |
||
− | * This didn't work for me (module truecrypt seems to be non-existent now), but adding "loop" module worked |
||
# tee /etc/modules-load.d/truecrypt.conf <<< "loop" |
# tee /etc/modules-load.d/truecrypt.conf <<< "loop" |
||
# modprobe loop |
# modprobe loop |
||
+ | * Arch の標準カーネルではモジュールのロードは必ずしも手動で行う必要はありません。ただし、カスタムカーネルを使用している場合は '''FUSE''' と '''loop'''、および使用する暗号化アルゴリズム (例: '''AES''', '''XTS''', '''SHA512''') を有効化する必要があります。既存の TrueCrypt コンテナにアクセスするだけなら TrueCrypt のインストールは不要です。 |
||
− | * It does not appear that loading a module applies with TrueCrypt 7.1a, the current version in Arch as of 4/19/2013. The above advice may be outdated with respect to the module, however it is still important to enable '''FUSE''', '''loop''' and your encryption algorithm (e.g. '''AES''', '''XTS''', '''SHA512''') in custom kernels. |
||
− | If you only want to open and access an existing truecrypt container, this can also be done with {{ic|cryptsetup}} i.e. without installing Truecrypt. |
||
}} |
}} |
||
== cryptsetup を使って TrueCrypt コンテナにアクセス == |
== cryptsetup を使って TrueCrypt コンテナにアクセス == |
||
− | バージョン 1.6 から、{{Pkg|cryptsetup}} は TrueCrypt コンテナをネイティブで開けるようになっており、{{Pkg|truecrypt}} パッケージを必要としません。cryptsetup でコンテナを開くには、次のコマンドを実行してください: |
+ | バージョン 1.6 から、{{Pkg|cryptsetup}} は TrueCrypt と VeraCrypt のコンテナをネイティブで開けるようになっており、{{Pkg|truecrypt}} や {{Pkg|veracrypt}} パッケージを必要としません。cryptsetup でコンテナを開くには、次のコマンドを実行してください: |
− | + | # cryptsetup --type tcrypt open container-to-mount container-name |
|
+ | |||
+ | {{ic|container-to-mount}} を開きたい {{ic|/dev}} 下のデバイスファイルやファイルのパスに置き換えてください。コンテナが開かれると {{ic|/dev/mapper/container-name}} というデバイスが新しく認識され、通常のデバイスと同じように {{ic|mount}} できるようになります。 |
||
+ | VeraCrypt コンテナをマウントしたいときは、{{ic|--type tcrypt}} に加えて {{ic|--veracrypt}} オプションを使ってください。カスタム Personal Iteration Multiplier (PIM) を使用する場合、{{ic|--veracrypt-query-pim}} オプションを使ってください。 |
||
− | Replace {{ic|container-to-mount}} with the device file under {{ic|/dev}} or the path to the file you wish to open. Upon successful opening, the plaintext device will appear as {{ic|/dev/mapper/container-name}}, which you can {{ic|mount}} like any normal device. |
||
+ | キーファイルを使用する場合、{{ic|--key-file}} オプションを使ってファイルを指定してください。隠しボリュームを開く場合は {{ic|--tcrypt-hidden}} オプションを使ってください。システムモードで暗号kパされたパーティションあるいはデバイスを開くには {{ic|--tcrypt-system}} オプションを使ってください。 |
||
− | If you are using key files, supply them using the {{ic|--key-file}} option, to open a hidden volume, supply the {{ic|--tcrypt-hidden}} option and for a partition or whole drive that is encrypted in system mode use the {{ic|--tcrypt-system}} option. |
||
− | サポートされているオプションなどの詳細は {{ |
+ | サポートされているオプションなどの詳細は {{man|8|cryptsetup}} を見て下さい。 |
=== /etc/crypttab を使って自動マウント === |
=== /etc/crypttab を使って自動マウント === |
||
55行目: | 57行目: | ||
バージョン 206 から、[[systemd]] は {{ic|/etc/crypttab}} を使用して起動時に TrueCrypt コンテナを (自動的に) マウントすることをサポートしています。 |
バージョン 206 から、[[systemd]] は {{ic|/etc/crypttab}} を使用して起動時に TrueCrypt コンテナを (自動的に) マウントすることをサポートしています。 |
||
+ | 以下のセットアップでは {{ic|/mnt/truecrypt-volume}} にアクセスしたら systemd によって自動的にシステム暗号化モードで {{ic|/dev/sda2}} がマウントされます。ボリュームを開くためのパスフレーズは {{ic|/etc/volume.password}} に記述します。自動マウントを使用するには {{ic|/etc/fstab}} に指定するデバイスファイルは {{ic|/dev/mapper/}} のものでなくてはなりません。{{ic|/dev/disk/by-uuid/}} などは使えません。以下のように {{ic|/dev/disk/}} のデバイスファイル名を使うことで {{ic|/etc/crypttab}} の中で暗号化ボリュームを問題なく識別できます: |
||
− | The following example setup will mount {{ic|/dev/sda2}} in system encryption mode as soon as {{ic|/mnt/truecrypt-volume}} is accessed using systemd's automounting logic. The passphrase to open the volume is given in {{ic|/etc/volume.password}}. Note that the device file given in {{ic|/etc/fstab}} needs to be the one from {{ic|/dev/mapper/}} and not, for example, from {{ic|/dev/disk/by-uuid/}} for automounting logic to kick in. Other than that you can still reliably identify the encrypted volume itself inside of {{ic|/etc/crypttab}} using device file names from {{ic|/dev/disk/}}. |
||
{{hc|/etc/crypttab|<nowiki> |
{{hc|/etc/crypttab|<nowiki> |
||
61行目: | 63行目: | ||
}} |
}} |
||
− | + | 標準の truecrypt ボリュームの場合、''tcrypt-system'' の代わりに ''tcrypt'' を使ってください。隠しボリュームの場合、''tcrypt-hidden'' を使ってください。 |
|
{{hc|/etc/fstab|<nowiki> |
{{hc|/etc/fstab|<nowiki> |
||
67行目: | 69行目: | ||
}} |
}} |
||
+ | ''auto'' のかわりに直接、ファイルシステムやマウントオプションを指定することもできます。[[NTFS]] を通常ユーザーでマウントする場合などで有用です。 |
||
− | Instead of ''auto'', you can put directly your filesystem, and put usual mount options. It is useful with NTFS for mounting as a normal user. |
||
+ | サポートされているオプションなどの詳細は {{man|5|crypttab}} を参照してください。 |
||
− | See {{ic|man crypttab}} for more details and options supported. |
||
== ファイルを仮想ボリュームとして暗号化 == |
== ファイルを仮想ボリュームとして暗号化 == |
||
+ | 以下では仮想ファイルシステムとして扱えるファイルを作成します。ファイルをマウントすれば暗号化ファイルの中にファイルを保存することが可能です。口座の情報やパスワードなど機密情報をシングルファイルに保存して Linux, Windows, macOS などからアクセスできるようにしたい場合に有用です。 |
||
− | The following instructions will create a file that will act as a virtual filesystem, allowing you to mount it and store files within the encrypted file. This is a convenient way to store sensitive information, such as financial data or passwords, in a single file that can be accessed from Linux, Windows, or Macs. |
||
+ | 新しい truecrypt ファイルをインタラクティブに作成するには、ターミナルに以下のコマンドを入力: |
||
− | To create a new truecrypt file interactively, type the following in a terminal: |
||
− | + | # truecrypt -t -c |
|
+ | 指示に従ってファイルを作成できます。設定がよくわからない場合はデフォルトの値を使ってください: |
||
− | Follow the instructions, choosing the default values unless you know what you are doing: |
||
Volume type: |
Volume type: |
||
84行目: | 86行目: | ||
2) Hidden |
2) Hidden |
||
Select [1]: 1 |
Select [1]: 1 |
||
+ | |||
− | |||
Enter file or device path for new volume: /home/user/''EncryptedFile''.tc |
Enter file or device path for new volume: /home/user/''EncryptedFile''.tc |
||
+ | |||
− | |||
Enter volume size (bytes - size/sizeK/sizeM/sizeG): 32M |
Enter volume size (bytes - size/sizeK/sizeM/sizeG): 32M |
||
+ | |||
− | |||
Encryption algorithm: |
Encryption algorithm: |
||
1) AES |
1) AES |
||
102行目: | 104行目: | ||
11) Twofish-Serpent |
11) Twofish-Serpent |
||
Select [1]: 1 |
Select [1]: 1 |
||
+ | |||
− | |||
Hash algorithm: |
Hash algorithm: |
||
1) RIPEMD-160 |
1) RIPEMD-160 |
||
108行目: | 110行目: | ||
3) Whirlpool |
3) Whirlpool |
||
Select [1]: 1 |
Select [1]: 1 |
||
+ | |||
− | |||
− | Filesystem: |
+ | Filesystem: |
− | + | 1) None |
|
− | + | 2) FAT |
|
− | + | 3) Linux Ext2 |
|
− | + | 4) Linux Ext3 |
|
− | + | 5) Linux Ext4 |
|
− | Select [2]: |
+ | Select [2]: 2 |
+ | |||
− | |||
Enter password for new volume '/home/user/''EncryptedFile''.tc': ***************************** |
Enter password for new volume '/home/user/''EncryptedFile''.tc': ***************************** |
||
Re-enter password: ***************************** |
Re-enter password: ***************************** |
||
+ | |||
− | |||
Enter keyfile path [none]: |
Enter keyfile path [none]: |
||
+ | |||
− | |||
Please type at least 320 randomly chosen characters and then press Enter: |
Please type at least 320 randomly chosen characters and then press Enter: |
||
+ | |||
− | |||
Done: 32.00 MB Speed: 10.76 MB/s Left: 0:00:00 |
Done: 32.00 MB Speed: 10.76 MB/s Left: 0:00:00 |
||
Volume created. |
Volume created. |
||
+ | 新しい暗号化ファイルは既存のディレクトリにマウントできます: |
||
− | You can now mount the new encrypted file to a previously-created directory: |
||
− | + | # truecrypt -t /home/user/''EncryptedFile''.tc /home/user/''EncryptedFileFolder'' |
|
− | |||
− | {{Note|Truecrypt requires root privileges and as such, running the above command as a user will attempt to use '''sudo''' for authentication. To work with files as a regular user, please see[[#Mount volumes as a normal user|Mount volumes as a normal user]].}} |
||
− | |||
− | Once mounted, you can copy or create new files within the encrypted directory as if it was any normal directory. When you are you ready to re-encrypt the contents and unmount the directory, run: |
||
− | $ truecrypt -t -d |
||
+ | {{Note|Truecrypt は root 権限を必要とします。通常ユーザーでファイルを使いたい場合は[[#通常ユーザーでボリュームをマウント|通常ユーザーでボリュームをマウント]]を参照してください。}} |
||
− | Again, this will require administrator privileges through the use of '''sudo'''. After running it check if the files that are to be encrypted are indeed no longer in the directory. (might want to try unimportant data first) If they are still there, note that ''rm'' doesn't make the data unrecoverable. |
||
+ | マウントしたら、通常のディレクトリと同じように暗号化ディレクトリの中に新しいファイルをコピー・作成できます。再度暗号化するにはディレクトリをアンマウントします: |
||
− | For more information about truecrypt in general, run: |
||
− | + | # truecrypt -t -d |
|
− | {{Note|As of 1:7.1a-1 dont see a man or info page.}} |
||
+ | 上記のコマンドは管理者権限を必要とします。アンマウントしたら暗号化されたファイルがディレクトリから消えているかどうか確認してください (重要でないデータから試してみると良いでしょう)。 |
||
− | Several options can be passed at the command line, making automated access and creation a simple task. The man page is highly recommended reading. |
||
== 物理ボリュームの暗号化 == |
== 物理ボリュームの暗号化 == |
||
+ | {{Note|1=グラフィカルインターフェイスで問題が起こる場合、{{ic|-t}} フラグを使って CLI モードで起動してみてください。}} |
||
− | {{Note|1= If you are having problems with the graphical interface, you can run in CLI mode with the -t flag.}} |
||
キーファイルを使いたい場合は、次のコマンドでファイルを作成します: |
キーファイルを使いたい場合は、次のコマンドでファイルを作成します: |
||
− | truecrypt --create-keyfile /etc/disk.key |
+ | # truecrypt --create-keyfile /etc/disk.key |
デフォルトでは、ボリュームを解錠するにはパスフレーズとキーの両方が必要になります。 |
デフォルトでは、ボリュームを解錠するにはパスフレーズとキーの両方が必要になります。 |
||
179行目: | 175行目: | ||
# truecrypt -N 1 /dev/sda1 |
# truecrypt -N 1 /dev/sda1 |
||
+ | 外殻ボリュームの空き領域に truecrypt の隠しボリュームを作成: |
||
− | Create a hidden truecrypt volume in the free space of the outer volume: |
||
− | + | # truecrypt --type hidden -c /dev/sda1 |
|
+ | 外殻ボリュームとは異なるパスフレーズまたはキーファイルを使う必要があります。 |
||
− | You need to use another passphrase and/or keyfile here than the one you used for the outer volume. |
||
+ | 外殻 truecrypt ボリュームをアンマップして隠しボリュームをマップ: |
||
− | Unmap the outer truecrypt volume and map the hidden one: |
||
# truecrypt -d /dev/sda1 |
# truecrypt -d /dev/sda1 |
||
# truecrypt -N 1 /dev/sda1 |
# truecrypt -N 1 /dev/sda1 |
||
+ | 隠しボリューム用のパスフレーズを使ってください。TrueCrypt は自動的にパスフレーズを選び取ります。 |
||
− | Just use the passphrase you chose for the hidden volume and TrueCrypt will automatically choose it before the outer. |
||
+ | ファイルシステムを作成してマウント: |
||
− | Create a file system on it (if you have not already) and mount it: |
||
# mkfs.ext4 /dev/mapper/truecrypt1 |
# mkfs.ext4 /dev/mapper/truecrypt1 |
||
# mount /dev/mapper/truecrypt1 /media/disk |
# mount /dev/mapper/truecrypt1 /media/disk |
||
+ | 書き込み保護を有効にして外殻ボリュームをマップ・マウント: |
||
− | Map and mount the outer volume with the hidden write-protected: |
||
− | truecrypt -P /dev/sda1 /media/disk |
+ | # truecrypt -P /dev/sda1 /media/disk |
− | |||
− | == 特殊なファイルシステムのマウント == |
||
− | |||
− | {{Note|Current Versions of truecrypt seem to support NTFS write support by default so the {{ic|--filesystem}} flag no longer seems to be necessary.}} |
||
− | |||
− | In the following example I want to mount a ntfs-volume, but TrueCrypt does not use ''ntfs-3g by'' default (so there is no write access; checked in version 6.1). |
||
− | The following command works for me: |
||
− | truecrypt --filesystem=ntfs-3g --mount /file/you/want/to/mount |
||
− | You may also want to mount ntfs volume without execute flag on all files |
||
− | truecrypt --filesystem=ntfs-3g --fs-options=users,uid=$(id -u),gid=$(id -g),fmask=0113,dmask=0002 |
||
== fstab でボリュームをマウント == |
== fstab でボリュームをマウント == |
||
+ | まず最初に、fstab でマウントを処理するスクリプトを書く必要があります。以下を {{ic|/usr/bin/mount.truecrypt}} として保存してください: |
||
− | First of all, we need to write a script which will handle the way mounting via fstab is done. Place the following in {{ic|/usr/bin/mount.truecrypt}}: |
||
{{bc|<nowiki> |
{{bc|<nowiki> |
||
#!/bin/sh |
#!/bin/sh |
||
231行目: | 217行目: | ||
/bin/truecrypt --text --non-interactive ${DEV} ${MNTPT} ${TCOPTIONS[*]} --fs-options="${OPTIONS%,*}" |
/bin/truecrypt --text --non-interactive ${DEV} ${MNTPT} ${TCOPTIONS[*]} --fs-options="${OPTIONS%,*}" |
||
</nowiki>}} |
</nowiki>}} |
||
+ | ファイルに実行可能属性を付与してください: |
||
− | Also do not forget to make the file executable: |
||
# chmod +x /usr/bin/mount.truecrypt |
# chmod +x /usr/bin/mount.truecrypt |
||
+ | 最後に、fstab に以下のようにデバイスを追加してください: |
||
− | Finally, add the device to fstab somewhat like this: |
||
/dev/sdb3 /mnt truecrypt fs=vfat,defaults 0 0 |
/dev/sdb3 /mnt truecrypt fs=vfat,defaults 0 0 |
||
− | {{Tip| |
+ | {{Tip|上記のスクリプトは {{AUR|truecrypt-mount}} パッケージでもインストールできます。}} |
== 通常ユーザーでボリュームをマウント == |
== 通常ユーザーでボリュームをマウント == |
||
+ | TrueCrypt を使うには root 権限が必要です。このセクションでは通常ユーザーにボリュームへの書き込み権限を与えて、通常ユーザーが TrueCrypt を使えるようにする方法を説明します。 |
||
− | TrueCrypt needs root privileges to work: this procedure will allow normal users to use it, also giving writing permissions to mounted volumes. |
||
− | 以下のどちらの方法でも [[ |
+ | 以下のどちらの方法でも [[sudo]] が必要になります。先に進む前に sudo を設定するようにしてください。 |
=== 方法 1: truecrypt グループを追加 === |
=== 方法 1: truecrypt グループを追加 === |
||
+ | truecrypt という名前の新しいグループを作成して必要な権限を与えます。グループに属しているユーザーは TrueCrypt を使えるようになります。 |
||
− | Create a new group called truecrypt and give it the necessary permissions. Any users that belongs to that group, will be able to use TrueCrypt. |
||
# groupadd truecrypt |
# groupadd truecrypt |
||
+ | sudo の設定を編集: |
||
− | Edit the sudo configuration: |
||
# visudo |
# visudo |
||
+ | sudo の設定ファイルの末尾に以下の行を追加: |
||
− | Append the following lines at the bottom of the sudo configuration file: |
||
# Users in the truecrypt group are allowed to run TrueCrypt as root. |
# Users in the truecrypt group are allowed to run TrueCrypt as root. |
||
%truecrypt ALL=(root) NOPASSWD:/usr/bin/truecrypt |
%truecrypt ALL=(root) NOPASSWD:/usr/bin/truecrypt |
||
+ | 使用するユーザーを truecrypt グループに追加: |
||
− | You can now add your users to the truecrypt group: |
||
# gpasswd -M first_user,second_user,etc truecrypt |
# gpasswd -M first_user,second_user,etc truecrypt |
||
+ | {{Note|上記の変更を適用するには、ユーザーを一度ログアウトさせてから再ログインする必要があります。}} |
||
− | {{Note|In order to make these changes active, any user that has been added to the truecrypt group have to logout.}} |
||
+ | その後、以下のコマンドでデバイスをマウントすることができます: |
||
− | After that, you can mount your device by |
||
− | + | $ truecrypt --mount ''/path/to/device'' ''/path/to/mountpoint'' |
|
+ | デフォルトのマウントポイントは {{ic|/media/truecrypt1}} です。通常、{{ic|--filesystem}} フラグを使ってデバイスのファイルシステムを明示的に指定する必要はありません。 |
||
− | Default mountpoint is {{ic|/media/truecrypt1}}. Normally, it is not necessary to explicitly specify the filesystem of your device using the {{ic|--filesystem}} flag. |
||
+ | truecrypt にはパーミッションマスクを指定すると良いでしょう。そうしないと、マウントしたデバイスの全てのファイルが実行可能になってしまいます。例: |
||
− | It is definitely reasonable to give truecrypt some permission masks. Otherwise, every file on your mounted device will be executable. So instead of the above, you can use |
||
− | + | $ truecrypt --fs-options=users,uid=$(id -u),gid=$(id -g),fmask=0113,dmask=0002 --mount /PATH/TO/DEVICE /PATH/TO/MOUNTPOINT |
|
− | + | 上記のコマンドは bash の設定ファイル ({{ic|~/.bashrc}}) などにエイリアスとして追加できます: |
|
alias tc1='truecrypt --fs-options=users,uid=$(id -u),gid=$(id -g),fmask=0113,dmask=0002 --mount ''/path/to/device"" ''/path/to/mountpoint' |
alias tc1='truecrypt --fs-options=users,uid=$(id -u),gid=$(id -g),fmask=0113,dmask=0002 --mount ''/path/to/device"" ''/path/to/mountpoint' |
||
+ | 指定したデバイスをマウントするには、通常ユーザーで以下のコマンドを使用します: |
||
− | To mount this specific device, use |
||
− | + | $ tc1 |
|
+ | === 方法 2: sudo の簡易化 === |
||
− | as a normal user. |
||
+ | パスワードを入力せずに truecrypt を実行できるようにしたい場合、以下のコマンドを実行: |
||
− | === 方法 2: sudo simplified === |
||
− | |||
− | Simply enable desired user to run truecrypt without a password: |
||
# visudo |
# visudo |
||
+ | そして以下を追加: |
||
− | Append the following: |
||
USERNAME ALL = (root) NOPASSWD:/usr/bin/truecrypt |
USERNAME ALL = (root) NOPASSWD:/usr/bin/truecrypt |
||
+ | もしくは wheel グループを使用する場合: |
||
− | alternatively, if you make use of the wheel group: |
||
%wheel ALL = (root) NOPASSWD:/usr/bin/truecrypt |
%wheel ALL = (root) NOPASSWD:/usr/bin/truecrypt |
||
+ | 通常ユーザーのパーミッションが困る場合、truecrypt のマウントコマンドに {{ic|-u}} フラグを追加してください。例: |
||
− | If you have any difficulties with permissions as a normal user, just add the {{ic|-u}} flag to the truecrypt mount command, for example: |
||
$ truecrypt -u /home/user/''EncryptedFile''.tc /home/user/''EncryptedFileFolder'' |
$ truecrypt -u /home/user/''EncryptedFile''.tc /home/user/''EncryptedFileFolder'' |
||
=== ログイン時に自動マウント === |
=== ログイン時に自動マウント === |
||
+ | スタートアップに以下を追加: |
||
− | Simply add: |
||
{{bc| |
{{bc| |
||
− | + | truecrypt /home/user/''Encrypted File''.tc /home/user/''Encrypted File Folder'' <<EOF |
|
''password'' |
''password'' |
||
EOF |
EOF |
||
}} |
}} |
||
− | + | {{ic|-p}} スイッチは使わないでください。''ps'' などのツールを使ってプロセスの名前からパスワードを確認できてしまいます [http://thoughtyblog.wordpress.com/2009/07/05/truecrypt-linux-hide-password-from-ps/]。 |
|
The most recent truecrypt has a couple of followup questions. If you have expect installed, this will work (assuming no keyfile and no desire to protect hidden volume), saved to a file with root-only perms called from /etc/rc.local: |
The most recent truecrypt has a couple of followup questions. If you have expect installed, this will work (assuming no keyfile and no desire to protect hidden volume), saved to a file with root-only perms called from /etc/rc.local: |
||
324行目: | 308行目: | ||
</nowiki>}} |
</nowiki>}} |
||
+ | 上記はパスワードを普通に入力するのと比べるとセキュアでありませんが、TrueCrypt のファイルシステムが共有ストレージなどにあるときに、暗号化されないままの状態にするよりはましです。 |
||
− | Of course, this isn't as secure as entering your password manually. But for some use cases, such as when your TrueCrypt filesystem is in a file on shared storage, it's better than being unencrypted. |
||
== (シャットダウン時に) ボリュームを安全にアンマウントしてマップを解除 == |
== (シャットダウン時に) ボリュームを安全にアンマウントしてマップを解除 == |
||
+ | 以下のコマンドで指定したデバイスをアンマウントできます: |
||
− | You can unmount a specific device by |
||
# truecrypt -d ''/path/to/mountpoint'' |
# truecrypt -d ''/path/to/mountpoint'' |
||
+ | 全ての truecrypt ボリュームをアンマウントしたい場合はパスを省略してください。 |
||
− | or leave away the path to unmount all truecrypt volumes. |
||
− | + | シャットダウン時に自動的に truecrypt デバイスをアンマウントさせたい場合、以下を {{ic|/etc/rc.local.shutdown}} ファイルに追加: |
|
if (/usr/bin/truecrypt --text --list) |
if (/usr/bin/truecrypt --text --list) |
||
342行目: | 326行目: | ||
} |
} |
||
fi |
fi |
||
+ | ''sleep'' コマンドは取り払ってもかまいません。実際にシャットダウンする前にアンマウントする猶予を与えているだけです。 |
||
− | You can also leave away the ''sleep'' command, it is just to give the unmounting some time to complete before the actual shutdown. |
||
− | |||
− | [[systemd]] を使用している場合、シャットダウン時に truecrypt で暗号化されたファイルシステムを自動的にアンマウントするサービスが [[systemd/サービス]] のページにあります。 |
||
== エラー == |
== エラー == |
||
350行目: | 332行目: | ||
=== TrueCrypt is already running === |
=== TrueCrypt is already running === |
||
− | + | TrueCrypt の起動時に ''TrueCrypt is already running'' というメッセージボックスが表示される場合、ホームディレクトリに ''.TrueCrypt-lock-username'' という名前の隠しファイルが存在しないか確認してください (''username'' はあなたのユーザー名に置き換えて下さい)。ファイルを削除して TrueCrypt を再起動してください。 |
|
=== Deleted stale lockfile === |
=== Deleted stale lockfile === |
||
− | + | Truecrypt の起動後に "Delete stale lockfile [....]" というメッセージが表示される場合、GNOME のログアウト時に ID が一番小さい Truecrypt のプロセスを終了する必要があります。{{ic|/etc/gdm/PostSession/Default}} を編集して exit 0 の前に以下の行を追加してください: |
|
kill $(ps -ef | grep truecrypt | tr -s ' ' | cut -d ' ' -f 2) |
kill $(ps -ef | grep truecrypt | tr -s ' ' | cut -d ' ' -f 2) |
||
362行目: | 344行目: | ||
(暗号化されていない NTFS パーティションは問題なく扱えるのに) 名前にユニコード文字が含まれているファイルやフォルダが TrueCrypt の NTFS ボリュームで表示されない場合、最初に [[NTFS-3G]] ドライバーがインストールされているかどうか確認してください。そして以下のシンボリックリンクを root で作成してください: |
(暗号化されていない NTFS パーティションは問題なく扱えるのに) 名前にユニコード文字が含まれているファイルやフォルダが TrueCrypt の NTFS ボリュームで表示されない場合、最初に [[NTFS-3G]] ドライバーがインストールされているかどうか確認してください。そして以下のシンボリックリンクを root で作成してください: |
||
− | ln -s /sbin/mount.ntfs-3g /sbin/mount.ntfs |
+ | # ln -s /sbin/mount.ntfs-3g /sbin/mount.ntfs |
+ | 自動的に NTFS ボリュームで NTFS-3G ドライバーが使われるようになります。コンソールで以下のように指定するのと同じです: |
||
− | That will cause TrueCrypt to automatically use this driver for NTFS volumes, having the same effect as the explicit use of |
||
− | truecrypt --filesystem=ntfs-3g /path/to/volume |
+ | # truecrypt --filesystem=ntfs-3g /path/to/volume |
− | via the console. |
||
+ | TrueCrypt の GUI (''Settings > Preferences > Mount Options'') で以下のオプションを設定できます: |
||
− | One may also consider setting e.g.: |
||
rw,noatime |
rw,noatime |
||
− | amongst other options in the TrueCrypt GUI (''Settings > Preferences > Mount Options''). |
||
==== FAT ==== |
==== FAT ==== |
||
+ | 同じように、Windows で作成した FAT32 ボリュームは ISO 8859-1 ではなく Unicode が使われることがあります。UTF-8 を使用するには、マウントオプションを設定: |
||
− | Similarly, FAT32 volumes created using Windows may use Unicode rather than ISO 8859-1. In order to use UTF-8 globally, set the mount option: |
||
iocharset=utf8 |
iocharset=utf8 |
||
+ | もしくは、ボリュームをローカルにマウントする際に以下のように指定: |
||
− | Alternatively, when mounting volumes locally use: |
||
--fs-options=iocharset=utf8 |
--fs-options=iocharset=utf8 |
||
+ | |||
+ | linux-4.14.4 から [https://bugs.archlinux.org/task/56781]、デフォルトで UTF8 文字セットが有効になっているため、ISO 8859-1 エンコーディングを使ってボリュームをマウントするには以下のオプションが必要です: |
||
+ | |||
+ | --fs-options=utf8=no |
||
=== アンマウントエラー (device mapper) === |
=== アンマウントエラー (device mapper) === |
||
405行目: | 389行目: | ||
# tee /etc/modules-load.d/truecrypt.conf <<< "loop" |
# tee /etc/modules-load.d/truecrypt.conf <<< "loop" |
||
+ | {{Note|udev 181-5 現在、ループデバイスモジュールは自動ロードされません。上記の設定が必要です。}} |
||
− | {{Note|As of udev 181-5, the loop device module is no longer auto-loaded, and the procedure described here is necessary.}} |
||
+ | 新しいバージョンのカーネルでは起動時にループデバイスが作成されません。ループデバイスが存在しないと、コンテナファイルのマウントに TrueCrypt が失敗します ("Failed to set up a loop device")。ただし最大数のループデバイス (通常は256個) が作成され、マウントができるようになります。 |
||
− | With newer kernel versions there are no loop devices created at startup. If there are no loop devices the first time mounting a container file, TrueCrypt fails ("Failed to set up a loop device") but also creates the maximum number of loop devices (usually 256), mounting should now work. |
||
+ | 問題を回避するにはファイルをマウントする前にループデバイスを作成してください: |
||
− | To avoid this you can create a loop device before mounting a file: |
||
# mknod -m 0660 /dev/loop8 b 7 8 |
# mknod -m 0660 /dev/loop8 b 7 8 |
||
+ | 上記のコマンドで {{ic|/dev/loop8}} が作成されます。起動時にループデバイスを作成するには: |
||
− | This creates {{ic|/dev/loop8}}. Or create some loop devices at startup: |
||
# echo "options loop max_loop=8" > /etc/modprobe.d/eightloop.conf |
# echo "options loop max_loop=8" > /etc/modprobe.d/eightloop.conf |
||
− | + | {{ic|1=max_loop=8}} は必要なデバイスの数に置き換えてください。 |
|
=== システムパーティションのパスワードに en_US キーマップが必要 === |
=== システムパーティションのパスワードに en_US キーマップが必要 === |
||
+ | Xorg を使っている場合、以下のコマンドでキーマップを一時的に変更できます: |
||
− | If you are using Xorg (which you most likely are, should you not know what that is), use the following command to use US keymap until restart: |
||
# setxkbmap us |
# setxkbmap us |
||
429行目: | 413行目: | ||
== 参照 == |
== 参照 == |
||
− | * [http://www.truecrypt.org/ TrueCrypt |
+ | * [http://www.truecrypt.org/ TrueCrypt ホームページ] |
− | * [ |
+ | * [https://www.howtoforge.com/truecrypt_data_encryption HowToForge の Truecrypt チュートリアル] |
* [http://www.privacylover.com/encryption/analysis-is-there-a-backdoor-in-truecrypt-is-truecrypt-a-cia-honeypot/ There is a good chance the CIA has a backdoor?] (via [https://secure.wikimedia.org/wikipedia/en/wiki/Truecrypt wp]) |
* [http://www.privacylover.com/encryption/analysis-is-there-a-backdoor-in-truecrypt-is-truecrypt-a-cia-honeypot/ There is a good chance the CIA has a backdoor?] (via [https://secure.wikimedia.org/wikipedia/en/wiki/Truecrypt wp]) |
2018年2月18日 (日) 20:06時点における最新版
TrueCrypt はフリーでオープンソースのオンザフライ暗号化 (OTFE) プログラムです。TrueCrypt の機能として以下があります:
- 実際のディスクとしてマウントできる仮想的な暗号化ディスク。
- ハードディスクパーティションやストレージデバイス/メディアの全てを暗号化。
- ストレージ暗号化の初期化ベクトルを推測することができる CBC モードよりも安全な LRW モードを全ての暗号化アルゴリズムで使用。
- 通常の"外殻"の暗号化ボリュームの中に"隠しボリューム"を作成可能。パスフレーズやキーファイルが漏れない限り、隠しボリュームをランダムなデータの中から発見するのは不可能。
TrueCrypt と他のディスク暗号化ソリューションの詳しい比較はディスク暗号化#比較表を見て下さい。
目次
インストール
truecrypt パッケージをインストールしてください。linux 以外のカーネルを使っている場合は、適当なカーネルモジュールもインストールします。
truecrypt を使って仮想ファイルシステム (例: ファイル) を暗号化する場合は、truecrypt コマンドを実行したときに自動でモジュールがロードされます。
truecrypt を使って物理デバイス (例: ハードディスクや usb ドライブ) を暗号化する場合は、ブートシーケンスの間にモジュールをロードするようにしてください:
/etc/modules-load.d/
にモジュールを追加:
# tee /etc/modules-load.d/truecrypt.conf <<< "truecrypt"
cryptsetup を使って TrueCrypt コンテナにアクセス
バージョン 1.6 から、cryptsetup は TrueCrypt と VeraCrypt のコンテナをネイティブで開けるようになっており、truecrypt や veracrypt パッケージを必要としません。cryptsetup でコンテナを開くには、次のコマンドを実行してください:
# cryptsetup --type tcrypt open container-to-mount container-name
container-to-mount
を開きたい /dev
下のデバイスファイルやファイルのパスに置き換えてください。コンテナが開かれると /dev/mapper/container-name
というデバイスが新しく認識され、通常のデバイスと同じように mount
できるようになります。
VeraCrypt コンテナをマウントしたいときは、--type tcrypt
に加えて --veracrypt
オプションを使ってください。カスタム Personal Iteration Multiplier (PIM) を使用する場合、--veracrypt-query-pim
オプションを使ってください。
キーファイルを使用する場合、--key-file
オプションを使ってファイルを指定してください。隠しボリュームを開く場合は --tcrypt-hidden
オプションを使ってください。システムモードで暗号kパされたパーティションあるいはデバイスを開くには --tcrypt-system
オプションを使ってください。
サポートされているオプションなどの詳細は cryptsetup(8) を見て下さい。
/etc/crypttab を使って自動マウント
バージョン 206 から、systemd は /etc/crypttab
を使用して起動時に TrueCrypt コンテナを (自動的に) マウントすることをサポートしています。
以下のセットアップでは /mnt/truecrypt-volume
にアクセスしたら systemd によって自動的にシステム暗号化モードで /dev/sda2
がマウントされます。ボリュームを開くためのパスフレーズは /etc/volume.password
に記述します。自動マウントを使用するには /etc/fstab
に指定するデバイスファイルは /dev/mapper/
のものでなくてはなりません。/dev/disk/by-uuid/
などは使えません。以下のように /dev/disk/
のデバイスファイル名を使うことで /etc/crypttab
の中で暗号化ボリュームを問題なく識別できます:
/etc/crypttab
truecrypt-volume /dev/sda2 /etc/volume.password tcrypt-system,noauto
標準の truecrypt ボリュームの場合、tcrypt-system の代わりに tcrypt を使ってください。隠しボリュームの場合、tcrypt-hidden を使ってください。
/etc/fstab
/dev/mapper/truecrypt-volume /mnt/truecrypt-volume auto noauto,x-systemd.automount 0 0
auto のかわりに直接、ファイルシステムやマウントオプションを指定することもできます。NTFS を通常ユーザーでマウントする場合などで有用です。
サポートされているオプションなどの詳細は crypttab(5) を参照してください。
ファイルを仮想ボリュームとして暗号化
以下では仮想ファイルシステムとして扱えるファイルを作成します。ファイルをマウントすれば暗号化ファイルの中にファイルを保存することが可能です。口座の情報やパスワードなど機密情報をシングルファイルに保存して Linux, Windows, macOS などからアクセスできるようにしたい場合に有用です。
新しい truecrypt ファイルをインタラクティブに作成するには、ターミナルに以下のコマンドを入力:
# truecrypt -t -c
指示に従ってファイルを作成できます。設定がよくわからない場合はデフォルトの値を使ってください:
Volume type: 1) Normal 2) Hidden Select [1]: 1 Enter file or device path for new volume: /home/user/EncryptedFile.tc Enter volume size (bytes - size/sizeK/sizeM/sizeG): 32M Encryption algorithm: 1) AES 2) Blowfish 3) CAST5 4) Serpent 5) Triple DES 6) Twofish 7) AES-Twofish 8) AES-Twofish-Serpent 9) Serpent-AES 10) Serpent-Twofish-AES 11) Twofish-Serpent Select [1]: 1 Hash algorithm: 1) RIPEMD-160 2) SHA-1 3) Whirlpool Select [1]: 1 Filesystem: 1) None 2) FAT 3) Linux Ext2 4) Linux Ext3 5) Linux Ext4 Select [2]: 2 Enter password for new volume '/home/user/EncryptedFile.tc': ***************************** Re-enter password: ***************************** Enter keyfile path [none]: Please type at least 320 randomly chosen characters and then press Enter: Done: 32.00 MB Speed: 10.76 MB/s Left: 0:00:00 Volume created.
新しい暗号化ファイルは既存のディレクトリにマウントできます:
# truecrypt -t /home/user/EncryptedFile.tc /home/user/EncryptedFileFolder
マウントしたら、通常のディレクトリと同じように暗号化ディレクトリの中に新しいファイルをコピー・作成できます。再度暗号化するにはディレクトリをアンマウントします:
# truecrypt -t -d
上記のコマンドは管理者権限を必要とします。アンマウントしたら暗号化されたファイルがディレクトリから消えているかどうか確認してください (重要でないデータから試してみると良いでしょう)。
物理ボリュームの暗号化
キーファイルを使いたい場合は、次のコマンドでファイルを作成します:
# truecrypt --create-keyfile /etc/disk.key
デフォルトでは、ボリュームを解錠するにはパスフレーズとキーの両方が必要になります。
/dev/sda1
デバイスに新しいボリュームを作成:
# truecrypt --volume-type=normal -c /dev/sda1
ボリュームを /dev/mapper/truecrypt1
にマップ:
# truecrypt -N 1 /dev/sda1
上記のコマンドが使えない場合は次のコマンドでボリュームをマップしてみてください:
# truecrypt --filesystem=none --slot=1 /dev/sda1
お好きなファイルシステムを選択して、通常通りにディスクをフォーマットします。ただしパスには /dev/mapper/truecrypt1
を使います。例えば ext4 の場合:
# mkfs.ext4 /dev/mapper/truecrypt1
ボリュームをマウント:
# mount /dev/mapper/truecrypt1 /media/disk
ボリュームをマップしてマウント:
# truecrypt /dev/sda1 /media/disk
ボリュームをアンマウントしてマップを解除:
# truecrypt -d /dev/sda1
隠しボリュームの作成
先に、物理ボリュームの暗号化で説明されているように、通常の外殻ボリュームを作成してください。
外殻ボリュームを /dev/mapper/truecrypt1
にマップ:
# truecrypt -N 1 /dev/sda1
外殻ボリュームの空き領域に truecrypt の隠しボリュームを作成:
# truecrypt --type hidden -c /dev/sda1
外殻ボリュームとは異なるパスフレーズまたはキーファイルを使う必要があります。
外殻 truecrypt ボリュームをアンマップして隠しボリュームをマップ:
# truecrypt -d /dev/sda1 # truecrypt -N 1 /dev/sda1
隠しボリューム用のパスフレーズを使ってください。TrueCrypt は自動的にパスフレーズを選び取ります。
ファイルシステムを作成してマウント:
# mkfs.ext4 /dev/mapper/truecrypt1 # mount /dev/mapper/truecrypt1 /media/disk
書き込み保護を有効にして外殻ボリュームをマップ・マウント:
# truecrypt -P /dev/sda1 /media/disk
fstab でボリュームをマウント
まず最初に、fstab でマウントを処理するスクリプトを書く必要があります。以下を /usr/bin/mount.truecrypt
として保存してください:
#!/bin/sh DEV="$1" MNTPT="$2" OPTIONS="" TCOPTIONS="" shift 3 IFS=',' for arg in $*; do case "$arg" in system) TCOPTIONS=(${TCOPTIONS[*]} --m=system);; fs*) TCOPTIONS=(${TCOPTIONS[*]} --filesystem=${arg#*=});; keyfiles*) TCOPTIONS=(${TCOPTIONS[*]} --keyfiles=${arg#*=});; password*) TCOPTIONS=(${TCOPTIONS[*]} --password=${arg#*=}) && echo "password triggered" ;; protect-hidden*) TCOPTIONS=(${TCOPTIONS[*]} --protect-hidden=${arg#*=});; *) OPTIONS="${OPTIONS}${arg},";; esac done /bin/truecrypt --text --non-interactive ${DEV} ${MNTPT} ${TCOPTIONS[*]} --fs-options="${OPTIONS%,*}"
ファイルに実行可能属性を付与してください:
# chmod +x /usr/bin/mount.truecrypt
最後に、fstab に以下のようにデバイスを追加してください:
/dev/sdb3 /mnt truecrypt fs=vfat,defaults 0 0
通常ユーザーでボリュームをマウント
TrueCrypt を使うには root 権限が必要です。このセクションでは通常ユーザーにボリュームへの書き込み権限を与えて、通常ユーザーが TrueCrypt を使えるようにする方法を説明します。
以下のどちらの方法でも sudo が必要になります。先に進む前に sudo を設定するようにしてください。
方法 1: truecrypt グループを追加
truecrypt という名前の新しいグループを作成して必要な権限を与えます。グループに属しているユーザーは TrueCrypt を使えるようになります。
# groupadd truecrypt
sudo の設定を編集:
# visudo
sudo の設定ファイルの末尾に以下の行を追加:
# Users in the truecrypt group are allowed to run TrueCrypt as root. %truecrypt ALL=(root) NOPASSWD:/usr/bin/truecrypt
使用するユーザーを truecrypt グループに追加:
# gpasswd -M first_user,second_user,etc truecrypt
その後、以下のコマンドでデバイスをマウントすることができます:
$ truecrypt --mount /path/to/device /path/to/mountpoint
デフォルトのマウントポイントは /media/truecrypt1
です。通常、--filesystem
フラグを使ってデバイスのファイルシステムを明示的に指定する必要はありません。
truecrypt にはパーミッションマスクを指定すると良いでしょう。そうしないと、マウントしたデバイスの全てのファイルが実行可能になってしまいます。例:
$ truecrypt --fs-options=users,uid=$(id -u),gid=$(id -g),fmask=0113,dmask=0002 --mount /PATH/TO/DEVICE /PATH/TO/MOUNTPOINT
上記のコマンドは bash の設定ファイル (~/.bashrc
) などにエイリアスとして追加できます:
alias tc1='truecrypt --fs-options=users,uid=$(id -u),gid=$(id -g),fmask=0113,dmask=0002 --mount /path/to/device"" /path/to/mountpoint'
指定したデバイスをマウントするには、通常ユーザーで以下のコマンドを使用します:
$ tc1
方法 2: sudo の簡易化
パスワードを入力せずに truecrypt を実行できるようにしたい場合、以下のコマンドを実行:
# visudo
そして以下を追加:
USERNAME ALL = (root) NOPASSWD:/usr/bin/truecrypt
もしくは wheel グループを使用する場合:
%wheel ALL = (root) NOPASSWD:/usr/bin/truecrypt
通常ユーザーのパーミッションが困る場合、truecrypt のマウントコマンドに -u
フラグを追加してください。例:
$ truecrypt -u /home/user/EncryptedFile.tc /home/user/EncryptedFileFolder
ログイン時に自動マウント
スタートアップに以下を追加:
truecrypt /home/user/Encrypted File.tc /home/user/Encrypted File Folder <<EOF password EOF
-p
スイッチは使わないでください。ps などのツールを使ってプロセスの名前からパスワードを確認できてしまいます [2]。
The most recent truecrypt has a couple of followup questions. If you have expect installed, this will work (assuming no keyfile and no desire to protect hidden volume), saved to a file with root-only perms called from /etc/rc.local:
#! /bin/bash expect << EOF spawn /usr/bin/truecrypt ''/path/to/EncryptedFile'' ''/mount/point'' expect "Enter password" send "volume password\n" expect "Enter keyfile" send "\n" expect "Protect hidden volume" send "\n" expect eof; EOF
上記はパスワードを普通に入力するのと比べるとセキュアでありませんが、TrueCrypt のファイルシステムが共有ストレージなどにあるときに、暗号化されないままの状態にするよりはましです。
(シャットダウン時に) ボリュームを安全にアンマウントしてマップを解除
以下のコマンドで指定したデバイスをアンマウントできます:
# truecrypt -d /path/to/mountpoint
全ての truecrypt ボリュームをアンマウントしたい場合はパスを省略してください。
シャットダウン時に自動的に truecrypt デバイスをアンマウントさせたい場合、以下を /etc/rc.local.shutdown
ファイルに追加:
if (/usr/bin/truecrypt --text --list) then { /usr/bin/truecrypt -d sleep 3 } fi
sleep コマンドは取り払ってもかまいません。実際にシャットダウンする前にアンマウントする猶予を与えているだけです。
エラー
TrueCrypt is already running
TrueCrypt の起動時に TrueCrypt is already running というメッセージボックスが表示される場合、ホームディレクトリに .TrueCrypt-lock-username という名前の隠しファイルが存在しないか確認してください (username はあなたのユーザー名に置き換えて下さい)。ファイルを削除して TrueCrypt を再起動してください。
Deleted stale lockfile
Truecrypt の起動後に "Delete stale lockfile [....]" というメッセージが表示される場合、GNOME のログアウト時に ID が一番小さい Truecrypt のプロセスを終了する必要があります。/etc/gdm/PostSession/Default
を編集して exit 0 の前に以下の行を追加してください:
kill $(ps -ef | grep truecrypt | tr -s ' ' | cut -d ' ' -f 2)
ユニコードのファイル/フォルダ名の問題
NTFS
(暗号化されていない NTFS パーティションは問題なく扱えるのに) 名前にユニコード文字が含まれているファイルやフォルダが TrueCrypt の NTFS ボリュームで表示されない場合、最初に NTFS-3G ドライバーがインストールされているかどうか確認してください。そして以下のシンボリックリンクを root で作成してください:
# ln -s /sbin/mount.ntfs-3g /sbin/mount.ntfs
自動的に NTFS ボリュームで NTFS-3G ドライバーが使われるようになります。コンソールで以下のように指定するのと同じです:
# truecrypt --filesystem=ntfs-3g /path/to/volume
TrueCrypt の GUI (Settings > Preferences > Mount Options) で以下のオプションを設定できます:
rw,noatime
FAT
同じように、Windows で作成した FAT32 ボリュームは ISO 8859-1 ではなく Unicode が使われることがあります。UTF-8 を使用するには、マウントオプションを設定:
iocharset=utf8
もしくは、ボリュームをローカルにマウントする際に以下のように指定:
--fs-options=iocharset=utf8
linux-4.14.4 から [3]、デフォルトで UTF8 文字セットが有効になっているため、ISO 8859-1 エンコーディングを使ってボリュームをマウントするには以下のオプションが必要です:
--fs-options=utf8=no
アンマウントエラー (device mapper)
truecrypt のボリュームをアンマウントしようとすると "device-mapper: remove ioctl failed: Device or resource busy" とメッセージが表示される場合、解決方法は Setting > Preferences > System Integration > Kernel Service から次のボックスにチェックを入れて下さい:
Do not use kernel cryptographic services
マウントエラー (device mapper, truecrypt partition)
truecrypt ボリュームをマウントしようとすると、以下のようなメッセージが表示される場合:
Error: device-mapper: create ioctl failed: Device or resource busy Command failed
次を実行してください:
# cryptsetup remove /dev/mapper/truecrypt1
Failed to set up a loop device
TrueCrypt ボリュームを作成・マウントしようとすると "Failed to set up a loop device" というメッセージが表示される場合、最近カーネルをアップデートしたのに再起動していないのが原因です。再起動を行えばエラーはなくなるでしょう。
それでもエラーが消えない場合、loop がカーネルモジュールとしてロードされているか確認してください:
$ lsmod | grep loop
loop がロードされていない場合、modprobe loop
を実行した後に TrueCrypt のコマンドを実行してみてください。それで上手くいくときは、/etc/modules-load.d
のモジュールに loop を追加すると良いでしょう:
# tee /etc/modules-load.d/truecrypt.conf <<< "loop"
新しいバージョンのカーネルでは起動時にループデバイスが作成されません。ループデバイスが存在しないと、コンテナファイルのマウントに TrueCrypt が失敗します ("Failed to set up a loop device")。ただし最大数のループデバイス (通常は256個) が作成され、マウントができるようになります。
問題を回避するにはファイルをマウントする前にループデバイスを作成してください:
# mknod -m 0660 /dev/loop8 b 7 8
上記のコマンドで /dev/loop8
が作成されます。起動時にループデバイスを作成するには:
# echo "options loop max_loop=8" > /etc/modprobe.d/eightloop.conf
max_loop=8
は必要なデバイスの数に置き換えてください。
システムパーティションのパスワードに en_US キーマップが必要
Xorg を使っている場合、以下のコマンドでキーマップを一時的に変更できます:
# setxkbmap us
NTFS ボリュームで Permission denied
パーミッションに問題がないのに、ファイルシステムに変更を加えられない場合、NTFS-3G がインストールされていないのが原因のことがあります。NTFS を見て下さい。