date
int64
1,220B
1,719B
question_description
stringlengths
28
29.9k
accepted_answer
stringlengths
12
26.4k
question_title
stringlengths
14
159
1,468,835,896,000
I cannot connect to my Fedora 31 Workstation GUI via "Screen Sharing" from any other (non-Linux) machine. I am almost certain this is due to the encryption that the VNC server for "Screen Sharing" is using. However, I am behind the firewall on my LAN and do not need external access whatsoever, so I do not need encrypt...
Running these commands disabled VNC encryption and allows the connection to work on Fedora 31: gsettings set org.gnome.desktop.remote-desktop.vnc encryption "['none']" sudo firewall-cmd --permanent --add-service=vnc-server sudo firewall-cmd --reload #finally, reboot the machine/VM sudo reboot now
How can I disable VNC encryption in default/built-in "Screen Sharing" on Fedora 31 Desktop?
1,468,835,896,000
I am using rdesktop on a Fedora laptop to connect to Windows computers at work. To make it easier, I've made an alias in my .bashrc: alias companyremote='rdesktop -u USER -p - -g 1920x1040 -K' So I just have to type companyremote NAME to connect to a given computer. But I don't want to store my passwords in plainte...
A password agent (also known as a keychain/keyring or secrets store) is the tool for this. The idea is to keep all your passwords in an encrypted database protected by a master password. The agent starts when you log in, gets the master password from you, then decrypts individual passwords for other programs on requ...
How can I store an encrypted rdesktop password for easier sign-in?
1,468,835,896,000
my girlfriend bought Lenovo Essential G500 i5-3230 and I installed Linux Mint 16 on it with full disk encryption. It is standard installation with encryption using dmcrypt and LUKS. But there is a problem with screen brightness, it is set to 0 before it even ask for password to encrypted partitions. I partly fixed it ...
You need to add that script to your initramfs. On Debian (I suspect Mint is the same), it appears that the password prompt comes from /usr/share/initramfs-tools/scripts/local-top/cryptroot. That script arranges itself to be called last out of the local-top scripts. There is a parallel set of directories in /etc intend...
How to set laptop screen brightness just after boot with full disk encryption
1,468,835,896,000
I received an file encrypted with the public key I generated but I can't get it to decrypt. Steps: gpg --gen-key default options gpg --export -a <email> > pub.key sent the pub.key received the encrypted file cat <file> | gpg The error: $ cat cred.gpg | gpg gpg: key 71980D35: secret key without public key - skipped g...
Note the error message: it doesn't say that the secret key is missing (it isn't), it says the public key is missing. gpg: key 71980D35:secret key without public key- skipped In RSA, some numbers (d, p, q, u) are private and others (n, e) are public. Only the 2 public numbers are required for encryption and signature v...
gpg: "secret key not available" when sec & pub key are in keyring
1,468,835,896,000
I want to block any kind of access to a certain directory unless a password is provided. It could be my root or account password. The directory is residing on an NTFS partition, and this method needs to work for Windows as well, as I'm accessing the partition from both Linux and Windows interchangeably. It could be im...
TrueCrypt, or another encryption method, is probably the way to go with this.
How to lock a directory?
1,468,835,896,000
I was looking at dm-crypt and have seen that you can use whatever filesystem you like on top of the encrypted drive. So I was wondering if a journaled filesystem is a good idea as opposed to a non-journaled one. Also, what filesystem would be best to deal with power failures with an encrypted drive?
Journaling is a technique that helps with recovery from problems that occur when multi-write operations are interrupted. Such interruptions can leave the file system in an inconsistent state between writes. Interruptions can happen with "normal" block devices and dm-crypt block devices alike. For a file system, a bloc...
Is a journaling filesystem a good idea with a dm-crypt encrypted drive?
1,468,835,896,000
I want to use GPG for local encryption only, and after reading the man file, I'm doing the following in order to encrypt a whole directory: I zip the directory with a password "zip -r -e foo foo", then I encrypt it with "gpg -c foo.zip" using a passphrase. Is this an elegant and secure way of encrypting directories? ...
Is this an elegant and secure way of encrypting directories? Elegant -- no. Secure -- as secure as gpg. Am I using GPG's full cryptographic power? Yes. Are there better alternatives? tar the directory first instead of zip. gpg compresses data anyway.
Encrypting directories with gpg [duplicate]
1,468,835,896,000
Can I decrypt an ecryptfs Private directory from a script? My basic use case for this type of activity is for doing remote backups. Imagine you have a machine (call it privatebox) with an encrypted private directory that stores your photos (or some other sensitive information). It is only decrypted upon logging in. An...
Okay I figured this out. Thanks for your help Xen2050, I don't have enough reputation here to give you an upvote (yet). Here's the bash script that works for me: #Set this variable to your mount passphrase. Ideally you'd get this from $1 input so that the actual value isn't stored in bash script. That would defeat the...
Non-interactive ecryptfs directory encrypt/decrypt
1,468,835,896,000
Is there a command to extract information about the algorithm that is used (RSA, ECDSA, 3DES ...) for SSH keys, regardless of the format (pem, der etc)? I looked into openssl, but I could not find anything about this.
You can use next command to get the type of the key (RSA, DSA, etc): # ssh-keygen -l -f .ssh/id_rsa 2048 SHA256:4+Na0ttfBkspSFSYnRjwbwja8/b708lRxzqjPBzLJMw ........ (RSA) # ssh-keygen -l -f .ssh/id_dsa 1024 SHA256:F6h53Zu0A9M094CbszkwxfQ5L2EZ0kUEpLkH0dp1alU ........ (DSA) # ssh-keygen -l -f .ssh/id_ed25519 256 SHA256:...
Extract ssh key algorithm
1,468,835,896,000
I need to encrypt and be able to decrypt files with openssl, currently I do this simply with: openssl enc -aes-256-cbc -salt -in "$input_filename" -out "$output_filename" and the decryption with: openssl enc -aes-256-cbc -d -salt -in "$input_filename" -out "$output_filename" But with large files, I would like to se...
You should try openssl enc -aes-256-cbc -d -salt -in "$input_filename" | pv -W >> "$output_filename" From the Manual: -W, --wait: Wait until the first byte has been transferred before showing any progress information or calculating any ETAs. Useful if the program you are piping to or from requires extra information ...
How to use pv to show progress of openssl encryption / decryption?
1,468,835,896,000
I read a lot of articles about using gpg to encrypt email, but I would like to use it to encrypt some files - mainly a bunch of *.isos. I'm going to describe what I thought I would do, so you can shoot me or just add some suggestions. I'm going to do tar -cvjf myiso.iso.tar.bz2 myiso.iso and them I plan to encrypt th...
You can use GPG to symmetrically encrypt a file with a passphrase (gpg -c). If the passphrase has enough entropy, you don't need an extra step of generating a secret key. What does “enough entropy” mean? Your encryption needs to withstand offline attacks, where the attacker can make cracking attempts as fast as his ha...
Encrypt files using gpg (and them symetric encrypting the key) - is it a normal thing to do in the *nix world?
1,468,835,896,000
http://codahale.com/how-to-safely-store-a-password/ with what does OpenBSD store the password by default? They say bcrypt is way more secure then hashing. I googled' it and obsd supports bcrypt, but does it use it by default? Thank you!
From: http://www.openbsd.org/papers/bcrypt-paper.pdf We have implemented bcrypt and deployed it as part of the OpenBSD operating system. Bcrypt has been the default password scheme since OpenBSD 2.1
Does OpenBSD use bcrypt by default?
1,468,835,896,000
I've changed my password to X and the shadow file has changed to: ahmad:$1$oYINSKjP$eCkCtJV/2dXerAD57WQPj/:15425:0:99999:7::: I see the encrypted X as $1$oYINSKjP$eCkCtJV/2dXerAD57WQPj/. How can I retrieve the encrypted X without changing the password? openssl or any other command to use?
Your password isn't encrypted. It is hashed. A salted MD5 hash has been generated and written to /etc/shadow. You cannot retrieve original value. The original value X has been hashed in this format: $id$salt$encrypted - id == 1 stands for MD5 (see NOTES on manpage of crypt(3))
Encrypt word X to /etc/shadow encryption
1,468,835,896,000
I need to send a private key file to someone (a trusted sysadmin) securely. I suggested a couple options, but he replied as follows: Hi, I don't have neither LastPass nor GnuPGP but I'm using ssl certificates - this message is signed with such so you will be able to send a message to me and encrypt it with my pub...
You can do openssl smime -encrypt -text -in <file> smime.p7s where <file> is the file you want to encrypt. If the file smime.p7s is in DER format instead of PEM, you will have to convert it with : openssl pkcs7 -inform DER -outform PEM -in smime.p7s -out smime.pem You obtain a file you can send to your sysadmin. If ...
How to encyrpt a message using someone's SSL smime.p7s file
1,468,835,896,000
I am trying to parental control myself by restricting web access via OpenDNS. The OpenDNS account password will be handed to someone trustworthy. Now, I want to put some restriction on the /etc/resolv.conf, perhaps using a key or password, but not the root password. Also I do not want to compromise the accessibility b...
No, not the way you're trying to do it. Root has access to every file on the system. You can make it harder to modify the file (note: it has to be publicly readable), but if you have root access, you can't prevent yourself from modifying it. There is no password protection feature for files. Even if there was one, bei...
Password protecting a system file? (e.g. /etc/resolv.conf)
1,468,835,896,000
I know that GnuPG is all about security, thus it's not giving many chance of retrieve private keys (otherwise anyone could do it) but I've got a private key, and my own rev.asc file. I had to reinstall my Ubuntu box (former Ubuntu Studio) and I have backup of /home and /etc. Is it possible to recover my GnuPG key inst...
By default, GPG stores everything under the .gnupg directory in your home directory. (Your encrypted private key should be in ~/.gnupg/secring.gpg). Restoring the entire ~/.gnupg directory from your backup will do the trick.
How to restore GnuPG key after reinstall?
1,468,835,896,000
If I install Debian, I can choose to set up the disk using an encrypted LVM. But what exactly does this set up? Is just the partition table encrypted, or are all files on all partitions encrypted?
When you use this option, the installer creates a few partitions: a /boot partition, which is used to store the kernel and bootloader; depending on your system, a special firmware (e.g., EFI) partition; and an encrypted partition which contains a single LVM physical volume. Inside that encrypted LVM physical volume, t...
What is an encrypted LVM?
1,468,835,896,000
More recent AMD CPUs have a feature named Secure Memory Encryption SME which if available can be explicitly be enabled by adding this parameter to linux' command line. mem_encrypt=on (according to https://libvirt.org/kbase/launch_security_sev.html) I am unsure if my system (with an AMD EPYC cpu) has this feature enab...
If SME is supported (CPUID shows the corresponding bit set) and enabled (the appropriate MSR bit is set), /proc/cpuinfo will contain the sme flag. You can verify this by looking at the kernel code which detects SME: the SME feature, which is reflected directly in /proc/cpuinfo, is cleared if SME isn’t fully enabled. Y...
How to know if a AMD cpu's SME feature is enabled?
1,446,884,727,000
In Debian 7 it seems like ssh doesn't accept ed25519 keys. support for ECDSA was not added until end of 2013, but wheezy is older How do I enable this in Debian 7?
There are updated openssh client and server packages in Wheezy Backports. According to the changelog, the backported version can work with ED25519 keys: openssh (1:6.6p1-4~bpo70+1) wheezy-backports; urgency=low Rebuild for wheezy-backports. -- Colin Watson Wed, 30 Apr 2014 09:59:29 +0100 [...] openssh (1:6.5p1-...
Enable ed25519 in Debian wheezy
1,446,884,727,000
I have full disk encryption on my arch linux laptop. When i power on the machine it prompts me for my disk password. My system is encrypted by following the LVM on luks archwiki page. the prompt says something like "a password is required for the cryptlvm volume" i would like to change this to feature some imformation...
I found out that that you can make a custom initramfs module with mkinitcpio that prints out such information. Ensure you follow this correctly, otherwise your kernel will panic. To do so, you can create files under: /usr/lib/initcpio/hooks/MODULENAME /usr/lib/initcpio/install/MODULENAME /usr/lib/initcpio/install/M...
custom prompt for system encryption password entry on startup
1,446,884,727,000
I am reading the postgresql database documentation, but I can't found nothing about encrypting the database files to prevent someone to see the data without the database password. There is some way to make postgresql safe if someone, for example, get physical access to the server? I know that Linux can encrypt the par...
To protect your data against physical access to the server, you need to move the encryption/decryption at least partially off the server. If your server can boot and mount its encrypted partitions without external help, then it's vulnerable. If you only care about physical removal, involving a reboot of the server, th...
Encrypt postgresql database
1,446,884,727,000
If I only encrypt the home directory, what are some common ways for information to leak out to the unencrypted part of the file system? Aside from the obvious problems like swap space files in /tmp are there any common Linux programs leaking information (those which are nearly certainly part of a normal installation...
Aside from home directories, there are three directory hierarchies with writable data: /etc, /tmp and /var. /etc contains system configuration files, most of which are typically not sensitive. But there can be sensitive data there, e.g. wifi passwords. /tmp can potentially contain sensitive data; just about any progr...
Information leaks out of encrypted file system
1,446,884,727,000
I have an encrypted hard drive on my Lan Server. It was encrypted using luks/dm-crypt. The server has a NFS v4 running to share files in the Lan. It works, except for the encrypted USB hard drive. If the client mounts the shares into his file system, he finds an empty folder where the decrypted files should be. This i...
With the Linux kernel NFS server, if you export a directory tree, this does not include any filesystems mounted on that tree. See the description of the nohide option in the exports(5) man page. You need to export the mounted filesystem explicitly, i.e. you need a separate line in exports for /exports/user1/data1. Fur...
NFS v4 export encrypted partition. Client mounts empty dir
1,446,884,727,000
I have certain folders in my Linux partition which I need to make sure no one can access unless the log in with my login password (or root one). I know that during installation I can encrypt with LUKS and I can encrypt certain folders with encfs / Truecrypt. However the encryption password is independent from current ...
You will need to use a different user than the account that you are setting up encryption for (this is primarily the 'root' user but could be any user who has access to 'sudo'). Do the following: Install these packages: "apt-get install ecryptfs-utils cryptsetup" Run the following using either root or a user with roo...
How to encrypt Linux (Debian 8) post-installation and what are the consequences?
1,446,884,727,000
After validating of my public XMPP service on xmpp.net, I've got the error: Warning: Server offers no forward-secret ciphers. Grade capped to A-. Is there an easy way to enable these ciphers? As title states, I have Debian Stable and ejabberd installed from its repository. ADDITION I've checked all the servers listed...
There is no known possibility to restrict Debian 7 Wheezy's ejabberd 2.1.10 to use certain ciphers. The only solution is to upgrade to a more recent ejabberd version, Debian 8 Jessie's ejabberd 14.07 for example.
Debian Wheezy, ejabberd and forward secrecy
1,446,884,727,000
I have some encrypted volumes that I use with my Xubuntu machine. One volume is a container file that is mapped to /dev/loop0 and encrypted using plain dm-crypt; another volume is a USB hard drive encrypted using dm-crypt/LUKS. What I'd like to know is what would happen if I accidentally shut down the computer without...
The short answer is that encrypted volumes are not really more at risk. The encrypted volumes have a single point of failure in the information at the beginning of the volumes that maps the password (or possibly several passwords for systems like LUKS) to the encryption key for the data. (That is why it is a good ide...
Are encrypted volumes more vulnerable to power loss?
1,446,884,727,000
My Raspberry Pi is set up as a PHP MySQL (Percona) server and I think that I have managed to make it quite resilient against online attacks but it is still very vulnerable against someone just taking out the SD card and reading all my data. I guess I could encrypt the important stuff in MySql but the encryption keys w...
There are three separate issues involved in what you are trying to accomplish. Encrypting an existing system. The correct way to do this would be to back up your exisiting install to another drive and start with a fresh install and rsync your relevant system files across once you have set up your encrypted Pi. This ...
Arch Linux Encrypt entire drive
1,446,884,727,000
I'd like to use dropbear as an alternative, minimal ssh-server and -client. dropbear allows the use of private-public-keys for ssh-access, although the keys are not identical to the ones used by openssh and have to be converted using the dropbearconvert-command (which is easy to do). The issue I'm having is that drop...
It appears that dbclient is entirely willing to read the private key from a named pipe or FIFO. So with bash's process substitution, you can write: dbclient -i <(cat .ssh/id_dropbear) user@server So if you have a GPG encrypted .ssh/id_dropbear.gpg, you can write it as: dbclient -i <(gpg --decrypt .ssh/id_dropbear.gpg...
encrypt private keys for dropbear ssh-access
1,446,884,727,000
I believe that the exact procedure below worked for me two weeks ago, but now it doesn't. I start with an RSA private key rsa.pem and generate my own self-signed certificate: openssl req -new -x509 -key rsa.pem -out rsa.cer then I try to create a p12 file: openssl pkcs12 -export -out rsa.p12 -inkey rsa.pem -in rsa.ce...
Turns out to be a character encoding issue with the dashes, which is confused from copy & pasting. I just re-typed the command and it worked.
How to produce p12 file with RSA private key and self-signed certificate
1,446,884,727,000
I am trying to copy a directory from one system to another with rsync; but it erred. Can you please advise me on what to check? Command: [M root@aMachine ~]# rsync -e "ssh -c blowfish" -v -a /home/aDir/ [email protected]:/home/aDir Output: ssh_dispatch_run_fatal: no matching cipher found rsync: connection unexpectedl...
You are trying to force the use of the blowfish cipher ("ssh -c blowfish"). According to your configuration, this cipher is not available (the SSH configuration, by default, shows the default configuration settings as comments). Unless you have any compelling reason to do so (none was mentioned in your post), do not f...
"no matching cipher found" error in `rsync`
1,446,884,727,000
My home server runs OpenBSD 5.3 with Samba serving files to several Windows machines. I wrote a script to backup video files by encrypting each file with openssl enc -aes-256-cbc and uploading it to Amazon S3. To test one possible restore scenario, I tried running the script on a file, downloading the file to one of...
AES-CBC-256 fully specifies an encryption algorithm and a decryption algorithm. Given a plaintext, a key and an IV, two implementations of AES-256-CBC encryption will produce the same ciphertext. Given a ciphertext, a key and an IV, two implementations of AES-256-CBC will produce the same plaintext. The IV is a random...
Decrypting a file encrypted on a different system
1,446,884,727,000
We have an automated sync-routine that uses useradd to create new users on a Ubuntu 10.04 machine. The application launching the routine provided both username and CRYPT-encrypted password. However, since we changed how passwords are handled in order to include LDAP support, passwords now don't have to be CRYPT but ca...
Why not authenticate those users for which you only have an unsalted SHA-1 hash of their password by another means than /etc/shadow. Using PAM, you can have as many authentication modules as you want and stack them as you want. You can keep pam_unix.so for some users and use pam_ldap.so for the rest.
Can linux use a mix of SHA-1 and CRYPT passwords?
1,446,884,727,000
I just tried to set up Debian in a VM (just testing, before installing it on a real system). I have set up 4 drives in total. 2 drives that simulate pen drives, on which I want to install the boot loader and boot file system later, and another 2 drives. Every drive is configured as encrypted RAID1 (md0_crypt and md1_c...
As the message describes you can't put /boot in an encryption container. For unlocking the encryption container you need to access some utilities. If these utilities are inside the encryption container you are in a deadlock situation. As a work-around use a unencrypted small 3rd raid container holding only the /boot f...
Encrypt boot file system
1,446,884,727,000
Yesterday I was trying using the Debian install in rescue mode in order to fix my Grub (The menu-item for Debian was suddenly gone). Now I wasn't able to fix it and didn't have a lot of time, so I thought I'd just reinstall Debian (I know, windows style :P). Problem was that I had installed Debian using full disk encr...
Gave up and formatted the drive containing the lvm as I was really in need of more space.
Recovering overwritten LVM metadata
1,446,884,727,000
I was trying to encrypt all the HDD during the installation process of Debian 8 Jessie using full disk encryption + LVM, and I did it, but, there are a little "problem". Before the system asks me the password to unlock the disk, it display a message: Loading, please wait... [5.004102] sd 2:0:0:0: [sda] Assuming drive ...
It's not an error, so you shouldn't try to make it go away. The scripts in your initramfs are opportunistically checking to see if they can activate the LVM VG that contains your root device before they bother asking for a passphrase to decrypt any encrypted devices. In the case that your root device is not encrypted,...
Debian error message: "Unable to find LVM volume", but then boots successfully
1,446,884,727,000
So far I have a Debian NAS with a samba share accessible from a Windows client by user credentials. Within that share I have a folder of images encrypted by ecryptfs. A friend of mine have agreed to "host" a synced copy of my encrypted images on his NAS, but at the same time I want a synced copy/access of decrypted im...
If you were using a tool like eCryptfs that decrypts file "on-the-fly", you could mount and share the decrypted data in a "Visible" folder, and also separately share the encrypted data in the ".Private" folder. The "Visible" folder's decrypted data is only visible while mounted, and it doesn't take up any extra disk s...
How to encrypt data in a folder in a samba share, and share it both encrypted and decrypted?
1,446,884,727,000
I am wondering if it is possible to : Store a mailbox in a way that the system administrator (ie: root) cannot see it User(s) with the valid credentials would be able to see it AND be able to search quickly in it, preferably via http access I know that I can: Encrypt on the partition level, but it won't disallow t...
This is impossible: root can always access all data. Even if you encrypt it, as soon as you decrypt it for access, root can snoop on the data, and snoop on your credentials as well. You cannot protect anything from the local root. You can store files on a machine whose administrator you don't rust, but you need to enc...
Is there a good way to encrypt and store a mailbox while still being able to quickly access and search it?
1,446,884,727,000
I'm trying to use encryption inside a virtual machine. The problem is that the AES-NI doesn't seem to be passed to the guest virtual machine. I have Vt-x enabled. This is my host cpuinfo: processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 42 model name : Intel(R) Core(TM) i7-...
That's the normal state in Virtualbox, see here.
AES-NI not passed to guest in Virtualbox
1,446,884,727,000
I am considering building a small home server. I'd like to encrypt some folders on this server, therefore using the instruction set aes-ni which is supported by newer (mostly Intel) chips would be advantageous. Is there a way to use aes-ni with Debian, or is there at least an alternative kernel that supports it? [edit...
It does look like it is configured in the config you listed (as CONFIG_CRYPTO_AES_NI_INTEL=m, which means configured as a module), but regardless, it is easy to build your own custom Debian kernels. See the Debian Kernel Handbook. You want 1.10, the version online is 1.09 which is out of date. The only downside of com...
Use aes-ni in Debian
1,446,884,727,000
Concise question: Is it possible to somehow bind partition encryption to hardware so it is impossible(very hard) to copy system to another PC and run there? Full story: We have a small embedded PC with Linux running inside a device, we develop. As the device turns on, embedded PC just runs, showing data to users unti...
You can bind encrypted data to a specific device using a Trusted Platform Module (TPM). These have become quite common in x86 laptops over the last few years, and can be installed in many servers too. Using a TPM, you can generate an encryption key which only exists in the module, and encrypt data using that; if you g...
Prevent encrypted partition from running on other PC
1,446,884,727,000
How can I encrypt a large file with a public key so that no one other than who has the private key be able to decrypt it? I don't want to use GPG!
This could be used to encrpyt a file mypic.png, given you already have a private/public keypair in ccbild-key.pem/ccbild-crt.pem. (You can find a guide to creating a keypair in this answer.) # encrypt openssl smime -encrypt -aes-256-cbc -binary -in mypic.png -outform DER -out mypic.png.der ccbild-crt.pem # decrypt op...
How can I encrypt a large file with OpenSSL using RSA keys?
1,446,884,727,000
I've read in various places, such as in this question that using an ssh key pair without a passphrase allows attackers to steal your private key if they gain access to your account. I assumed that by "steal" it meant they could fairly easily do a brute-force attack to try every possible private key until they found o...
That question is worried about private keys stored on the server unencrypted. It's a scenario like: workstation 1 ---> gateway -> final server ⋮ | workstation n ------/ and the OP is worried about private keys on "gateway", which is a shared machine with multiple users. It is not possible to steal ...
Is it *really* possible to directly steal a private key if it uses no passphrase?
1,446,884,727,000
On my Debian Linux system during the install I decided to use disk encryption (the one offered during a regulard Debian install). When the system boots up I need to enter a password and then the "real" boot begins. Could someone explain how this encryption is performed? Does it happen before or after the filesystem'...
/boot is not encrypted (the BIOS would have no way to decrypt it...). It could be ext4, but there really isn't any need for it to be. It usually doesn't get written to. The BIOS reads GRUB from the MBR, then GRUB reads the rest of itself, the kernel, and the initramfs from /boot. The initramfs prompts you for the pass...
Encrypted disk filesystem compatibilities
1,446,884,727,000
I do not hold a deep understanding of computer science concepts but would like to learn more about how the utility encfs works. I have a few question regarding the concept of filesystem in regards to encfs. It is said that encfs is a cryptographic filesystem wiki link. 1)To encrypt the files encfs is moving around bl...
I think that behind your description, there is a misconception. The unencrypted data is not stored on the disk at any point. When you write to a file in the encfs filesystem, the write instruction goes to the encfs process; the encfs process encrypts the data (in memory) and writes the ciphertext to a file. The file n...
How to understand the filesystem concepts used by encfs?
1,446,884,727,000
I currently have an unencrypted external hard drive that I use as a backup for my encrypted (with LUKS) main machine. To update my backup, I simply log in to the main machine and rsync to my external hard drive. Clearly, having an unencrypted backup for material that was worth encrypting in the first place is a bad id...
Nowadays cryptsetup itself supports non-destructively transforming an unencrypted partition into a encrypted LUKS device with the reencrypt subcommand. Assuming that your external drive is accessible via /dev/sdX and the current filesystem is located on /dev/sdXY you need first shrink the filesystem to make room for t...
Encrypting a currently used external hard drive such that it can be updated with rsync?
1,446,884,727,000
Windows allows the selective encrypting of certain files or folders. I currently have a Windows folder that is set to "encrypt contents to secure data". (The Windows partition is NTFS.) If I mount this drive under Linux, is there anyway to decrypt the contents of the directory so that I can read the files without havi...
According to the NTFS-3G FAQ, you can't read or write encrypted files: [...] Reading and writing transparently compressed files are fully supported, but reading or writing encrypted files are not supported at the moment. [...] So you'll need to do that from Windows at this point.
Use Linux to read contents of Windows encrypted folder
1,446,884,727,000
I'm using ext4 encryption. https://wiki.archlinux.org/index.php/Ext4#Using_file-based_encryption Before I decrypt a directory, I can see lots of encrypted filenames in it. I would like to copy the encrypted files so that I can decrypt them on a different machine. I could do this with ecryptfs. How do I do this with ...
You can see encrypted & padded filenames, but you should be unable to read file contents. So trying to copy the files unencrypted will result in errors such as: cp: cannot open 'vault/YgI8PdDi8wY33ksRNQJSvB' for reading: Required key not available So you are pretty much not supposed to do this. The practical answer i...
Copying ext4 encrypted files
1,446,884,727,000
I need to encrypt and decrypt a password using bash script. For that, I'm using openssl. The decryption is needed because I'm moving the password between hosts. The weird thing is it looks like the encryption has an expiration time. To encrypt (not on bash script): echo P@$$word| openssl enc -aes-128-cbc -a -salt -pas...
The error you have after waiting some time to decrypt the password, and you mentioning it seems the method "has an expiration time" is because the random generated salt varies over time. (e.g. it will be different every day) When encrypting, the 1st characters of the encrypted password are the salt used when encryptin...
encrypt/decrypt string with openssl error
1,446,884,727,000
How do I format LUKS encrypted disk if I don't know the passphrase? I recently switched my HDD for a new SSD disk in my laptop and now when I connect the old HDD externally I can't mount disk event with the right passphrase (I assume I am doing something wrong at this point). However I want to format that disk and use...
If you want to overwrite the data of the encrypted disk with non-encrypted data anyway (i.e. you don't care about the current contents), you don't have to unlock the drive/partition first. If the partition has a particular uncommon partition type, you might want to change that, but it is not necessary. You can just u...
Formatting LUKS encrypted disk
1,406,962,112,000
Using tar in multi-volume mode relies on a ENOSPC error to detect the end of the first tape and prompt the user for the next tape. To simulate this behaviour consider the following example by writing to /dev/full tar -cvf - --multi-volume . > /dev/full as expected results in [...] Prepare volume #2 for ‘-’ and hit re...
It's not possible to propagate write errors back through a pipeline And even if it were possible with some kind of hack, the pipes are buffering and by the time the pipe reader tries to "signal" the pipe writer, the latter could've already written the data which is causing the error further down the line, already got ...
End of tape detection (ENOSPC) in tar multi-volume mode with pipes for encryption
1,406,962,112,000
I need to encrypt an SSD drive and I have opted to use dm-crypt. This is not something I do on a regular basis. So far I have successfully cleared the memory cells of my SSD with the ATA secure erase command. I have also filled the entire disk with random data using: dd if=/dev/urandom of=/dev/sdx bs=4096 status=prog...
dd if=/dev/urandom of=/dev/sdx bs=4096 status=progress This command will overwrite the entire drive with random data. That random data will stay there until you write other data, or secure-erase, or TRIM. In other words, will the random data that I generated with dd still reside inside of the encrypted partitions ...
Filling SSD with Random Data for Encryption with Dm-Crypt
1,406,962,112,000
I have a system (VM, actually) with Linux Mint 15 on it. The disk is encrypted, but I remember that password -- just not the password for my account. I've tried changing the command in GRUB from ro to rw init=/bin/bash, per guides online, but that doesn't seem to play nicely with the disk encryption. Is there a way...
This is actually way easier than you might think. Here's how you do it: Boot into a Live CD. Decrypt and mount your partition on your hard disk. If you have a couple of partitions that all get mounted at boot, you will need to mount all of those, and in the correct order. Note that while you can get away with it this...
Resetting password in Linux Mint when disk is encrypted
1,406,962,112,000
I'm using WeeChat for quite a while on different machines now. All instances are using the same settings over and over again. When I connect, everything is fine, like this output from WeeChat, just some certificate warnings, but I usually ignore them (as I'm connecting to my own server without any valid certs): 11:39:...
I asked the guys at #weechat and they know this issue. It's a major bug in GnuTLS 3.2.2, it also breaks other stuff like webkit, wget, etc. Downgrading (or waiting for a fixed version) fixed this issue, it's not a weechat problem. Follow this issues: https://bugs.archlinux.org/task/36207 https://bugs.archlinux.org/ta...
WeeChat decryption fails while reading from data socket
1,406,962,112,000
I have a computer running OpenSUSE 12.1, 64-bit, default install. How it works currently: I turn on the computer It goes through the boot process At some point during boot, I am asked for password to decrypt an encrypted partition The problem is there is a timeout on this prompt, so I have to sit next to computer a...
Have a look at this Opensuse forum thread. It reveals that it's an issue with systemd's default unit timeout and not respecting the timeout setting in crypttab. It also provides a workaround -- letting the initrd take care of it, with an /etc/crypttab entry like this (i.e. adding the initrd) cr_sdb3 /dev/disk...
How to disable timeout of password prompt for partition decryption during boot?
1,406,962,112,000
Always when I install Linux OS (e.g. Ubuntu), there is a possibility to encrypt the home directory. I was asking myself why is this useful. Is it good in the case when my harddrive is corrupted and I have to go to my manufacturer and let the harddrive at him for about a month for the reparation or exchange? He can't d...
What you described is the use case of using home encryption. There is a lot of sensitive data stored in other areas, so encrypting home doesn't really give you much protection, but well, it's better than nothing. The disadvantages are kind of obvious: if you forget your password you will never get access to your data...
Encryption of home directory for securing data after harddisk corruption
1,406,962,112,000
I've recently been teaching myself about the BSDs and decided to pick up a NetBSD VPS. I don't always log in to this box every day (it's not actually doing anything that important), but I'd still like to monitor root's mail. To that end, I started looking into how to forward root's mail to an external account. I learn...
You could create a normal user, e.g. juser, and add it to the /etc/aliases file on the right hand side of the root entry. For normal forwarding of root-mail you would just create a .forward (which contains your external e-mail address) in the home directory of juser. Regarding encryption you can use a MDA (mail delive...
How to automatically encrypt, sign, and forward root's email?
1,406,962,112,000
i am trying to do arch(or any distro)-install with encrypted boot partition(lvm - uefi) during installation. i am trying really hard to get it to working but i get this error in picture below. i searched a lot but i didn't get anywhere i believe it is possible because of this option (GRUB_ENABLE_CRYPTODISK=1) in grub ...
grub-install is expecting to find /boot, but cannot, because according to your lsblk, it's at /mnt/boot... so you aren't chrooted into the new installation at this time. But I agree with Sheldon: having the EFI System Partition (ESP for short) inside a Linux encrypted partition won't work. The UEFI firmware wants to f...
Grub install with encrypted Boot partition
1,406,962,112,000
If I only have an SSH pubkey, how can I encrypt an ex.: IP address (so a short string), only using the ssh pubkey? For decryption, the other party would have the pair of the pubkey, so the private key, with which it can decrypt the string.
Here is one way to do that: First of all you should install the latest versions of OpenSSL and OpenSSH. Before we can encrypt the plaintext with our public key, we must export our public key into a PEM format suitable for OpenSSL's consumption openssl rsa -in ~/.ssh/id_rsa -pubout ~/.ssh/id_rsa.pub.pem then you can e...
How to encrypt a string with my SSH pubkey?
1,406,962,112,000
I'm trying to accomplish encrypting my OS w/ LVM on RHEL 7.2 and have it boot without entering a password by using a key on an unencrypted partition. LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert home rhel -wi-ao---- 22.35g root rhe...
I needed to add the path to my keyfile to dracut.confand rebuild initramfs. echo 'install_items+="/media/key"' >> /etc/dracut.conf dracut -fv
RHEL: FDE w/o password - boot from key on partition
1,406,962,112,000
Hmm, I would like to know what is happening with the data on the Linux swap partition when the Linux system is turned off and by the next start the Windows operating system via GRUB2 will start. 3 questions Will Windows be able to access the data from the Linux swap partition if Linux is turned off the right way? Wi...
To questions 1 and 2: Yes, Windows is able to access the data from the swap partition. But is not able to interpret these data by default. So you could analyse the partition using some tools, but Windows would not display any data by default. To question 3: The swap partition (or file) does not contain a mirror of the...
What is happening with the Linux swap partition data when running Windows via dual-boot
1,406,962,112,000
I'm running Linux on my Laptop and wish to protect my data in case the machine is lost or stolen. I've configured an encrypted ArchLinux environment and have everything working the way that I want. Now I wish to add suspend to disk functionality, which necessitates swap space. If I allocate swap space as a file on th...
If the root filesystem is encrypted, all files written to the filesystem, whether they be plain text files or swap files will all be encrypted.
Is it necessary to encrypt a swap * file * if it will reside on an encrypted root filesytem?
1,406,962,112,000
I have a partition that contains all my personal stuff, which is mounted at boot under /home/myuser/foo. I would like to synchronize it on the cloud via Dropbox or Copy.com, but I don't trust them, so I have to encrypt the data in some way. As I understood, it creates a "volume" when opened, and the data is clear onl...
Instead of encrypting a whole volume, which is the TrueCrypt, LUKS and loopback approach, you can also encrypt the individual files you store in the cloud. Doing that manually with pgp before copying the file to your cloud synchronized directory is one way, but a bit cumbersome. EncFS may be a solution for you instea...
Dropbox/Copy.com & Truecrypt
1,406,962,112,000
I'm actually trying to setup LUKS on a Red Hat 9.2 Server. Here is the problem : I can't do yum install cryptsetup-luks or dnf install cryptsetup-luks. When I try to use one of these command I have the following output : no match for parameter: cryptsetup-luks error: unable to find a match: cryptsetup-luks I don't re...
The package is called just cryptsetup. It used to be called cryptsetup-luks way back in RHEL 6 but since RHEL 7 it's just cryptsetup and it's in the BaseOS repository so you don't need any other extra repository.
How to install cryptsetup-luks
1,406,962,112,000
I used to use openssl aes-256-cbc, but the problem I have with this is when I try to decrypt in a different version of the distro it fails, as if it depends also on some internal key or something, instead of depending solely on the password. So I have to keep a different encrypted file for each version of the distro, ...
You could use gpg -c file.txt, since GPG supports encrypting a file with a passphrase and symmetric encryption. The issue with openssl is most likely either a version mismatch or you're simply not using the right command. You could pull down the most recent code for openssl command line utility off github and compile ...
How to encrypt a text file in a portable manner based solely on a password?
1,406,962,112,000
I'm using a dual boot system with Windows 8 and Fedora 31 KDE on my PC. I've encrypted my external hard disk with VeraCrypt in Windows. Windows recognizes this external hard drive and I can unlock the encrypted hard disk with VeraCrypt on Windows. My problem is that Fedora does not recognize the encrypted hard disk. A...
When your hard disk is connected, open a command line and type sudo blkid to list all available partitions. Graphically, you can see them with GParted. Locate the partition that you wish to mount. Once you know know it (something like "/dev/sdc1"), open Veracrypt GUI, choose a slot for mounting, and provide the path t...
Encrypted external hard disk not recognized
1,406,962,112,000
I've actually just started dabbling in the raspeberry pi but no stranger to hacking around these controllers. Having said that, my knowledge is lacking in a few areas. A little about what I want to try to achieve: I am fooling around with one of the pi cameras and the picamera module for raspberry Pi. I'm trying to r...
I would suggest using dm-crypt. This is a block level encryption system, support in kernel. This way, all encryption is handled OS/Kernel level, and is transparent to the user. At a high level: Wipe the disk with fdisk, and create a single partition spanning the entire disk (henceforth referred to as /dev/sdX1) Cr...
auto mount encrypted USB
1,406,962,112,000
I have such boot sequence: system boots from external disk, right after start it asks about password for LVM encrypted partition (which holds /root and /home), I enter it, the partitions are mounted, boot continues, everybody happy. This was openSUSE 11.4. I upgraded to 13.2 and now the boot loader (grub) does not ask...
I had a similar problem, installing openSuSE 13.2 x86_64 from scratch, using a boot partition and an encrypted LVM containing root and swap. (Side note: It's not easy to do that actually since when creating an lvm partition the installer UI will not even let you chose "encrypt this device", you can "ungrey" the checkb...
How to make grub mount encrypted LVM partition
1,406,962,112,000
i'm new and i hope to find an answer here. Please tell me, if you need more information. I have an disk encryption for my home partition on Linux 4.13.0-43-generic x86_64 (Ubuntu 16.04.4 LTS). Today when I started the laptop, I got the message, that my disk is full and there is no available space any more. With the di...
/home/.ecryptfs/bianca/.Private contains the encrypted versions of all your home files, when you're logged in they're decrypted on-the-fly to your home (~ or /home/bianca). It should be approximately the same size as your home when you're logged in. Delete (or backup/move) some files out of your home, not directly fro...
Disk encryption with ecryptfs - full disk
1,406,962,112,000
Basic setup: - Operating System: CentOS 7 (64 bit) - Grub 2 - separate boot partition with ext4 - luks encryption (aes-xts-plain64:sha512) on two disc partitions which both need to be unlocked by password at boot time - after being unlocked both partitions are mounted on / as raid1 btrfs filesystem Right now I am lo...
So is dropbear really like the right and only choice for remote access during boot time? I did some additional research on dracut which is used to build the initramfs image on CentOS and it shows the option "--sshkey " which needs to be combined with the module load option "ssh-client" in /etc/dracut.conf. It looks to...
How to use openSSH for disc encryption at boot time (OpenSSH vs. Dropbear)
1,406,962,112,000
Let say that cryptsetup benchmarks gives 2 GiB/s performance. Is it per queue so on 4 core processor I could read from disk at 8 GiB/s (assuming I wasn't limited by SATA etc. and it would scale perfectly) or does it already take it into account?
cryptsetup benchmark only uses a single core. You can see this in top while it's running, it never goes beyond 100% of one core only. I'm not quite sure how cryptsetup benchmark performance relates to actual performance on physical storage media; a tmpfs based loop device gives 2GiB/s according to pv, while the benchm...
Is cryptsetup benchmark for single or multiple queues
1,406,962,112,000
I'm looking for any information regarding how secure an encrypted Linux file system is when contained in a VirtualBox virtual drive on a Windows host? Specifically I'm looking for answers to the following questions: Does the fact it is hosted as a guest system expose the encrypted data to any new attack vectors? Asid...
The guest operating system runs inside the host. The host has full control over everything that the guest does and everything that goes in or out of the guest. Thus any confidential information that becomes accessible to the guest is also accessible to the host. A rogue process on the host can access everything in the...
Encrypted FileSystem in VirtualBox
1,406,962,112,000
I have an embedded Linux system with unencrypted kernel image and initramfs in NAND flash. My RootFS is in SD card. I want to encrypted some files on SD Card as my SD card is easily accessible physically. For this I am planing to use eCryptfs. But I want to keep the keys inside NAND flash in kernel image or initramfs....
If you didn't have an initramfs, you could do it with kernel parameters. Just add a random string as kernel parameter and then use /proc/cmdline as the key for your encryption. If it's not easy to add such parameters to your boot loader, the Linux kernel has a CMDLINE config option that lets you compile it in. (Note: ...
eCryptfs key in kernel image or initramfs
1,406,962,112,000
I'm trying to design a firmware update system for an embedded Linux system. My plan is to send an image that can be mounted on the target system, so I don't need to unpack the entire file. I also want to encrypt the image, and optionally compress it as well. Since the build system for creating this image is going to b...
Despiting the weak security of cryptloop according to this. You can use usermode FS creator like: buildroot genext2fs.sh or android make_ext4fs. with combination with aespipe tool for host creation of your encrypted image without root/superuser privilege. But you need to patch the losetup(at least or mount) with loo...
Encrypting loopback images without using a loopback device
1,406,962,112,000
I'm trying to create an encrypted data folder which could periodically take snapshots of the current state of it. The snapshot should be an encrypted one, and I should be able to take snapshots without "unmounting" the encrypted folder. Is this possible? It seems like I could encrypt folders with EncFS, eCryptfs and g...
It is certainly possible, in one way or another. I do this wiht an image file, two layers of file system (ZFS), and one layer of dm-crypt. The setup is easy to describe: Put a snapshot-capable and transaction-resistent filesystem on the image file, put a new image file on that filesystem. Make an encrypted block devic...
Snapshottable encrypted folder
1,522,347,185,000
I'd like to create one-time encrypted partition with a random key which will be wiped on reboot. I found a manual about swap encryption, but swap is just a block device which doesn't have any file system on it. Also I found full system encryption which is unacceptable, I want only one partition. Both methods are not m...
Swap is actually very close to what you want — with swap, you put the swap flag in /etc/crypttab, which tells the boot up scripts to run mkswap on the block device at boot. You basically want the same thing, but with mkfs instead of mkswap. At least here, that's already supported with the tmp[=fstype] flag. You can ch...
Disposable Encrypted Partition
1,522,347,185,000
I have a desire to have an entire drive or volume encrypted and the volume to be write-enabled on restart of a linux system; does a method exist to provide that functionality? What I'm looking to do is have something like a security system or dashcam write to an encrypted volume with a public key so that the volume wo...
Filesystems simply don't work write-only; it's read-only or read-write. In a filesystem you cd somewhere and ls somewhere, all of these are read operations. If you can only encrypt (write) but not decrypt (read) you're simply not getting anywhere (with a filesystem on a block layer). So for you, it's files or pipes, o...
Asymmetric drive encryption
1,522,347,185,000
f2fs supports per-file encryption, however I can't find any resources about it. I know about eCryptFS, LUKS and encfs, that's not the same.
f2fs-tools includes, as of v.1.9, a tool for encryption management in the f2fs filesystem: f2fscrypt The manual page includes an example that shows how to encrypt a directory (along with instructions on how to setup a f2fs filesytem that supports encryption). The only alternative to f2fscrypt that I know of is fscr...
How to encrypt a file or a folder on f2fs?
1,522,347,185,000
I would like to have a setting, where Ubuntu Server is installed and booting from a flash drive (SanDisk Cruzer Fit 8GB), with two HDDs running in RAID1 and 4 drives running with RAID0 (only 1 drive at the beginning and adding up more over time). All drives, except for the pen drive should be encrypted and decrypted ...
If you set up your system so that swap is on the HDDs you can run your flash boot drive as read-only and have all writes go to an overlay file system in swap. A writeup of how to do this is at https://help.ubuntu.com/community/aufsRootFileSystemOnUsbFlash - use the overlayfs instructions instead of aufs. You can put ...
Prevent lots of writes on Ubuntu Server running from flash drive
1,522,347,185,000
Tonight I decided I wanted to tweak the configuration of my Debian install on my netbook (Ideapad S10-2) to work better with the SSD I put in it. I have done this before and never had any issues but just in case I double-checked what I was doing against the Debian SSD Optimization guide and everything seemed right. At...
Get to a shell ( boot into rescue / single user mode if needed ) and just mount -o remount,rw /. Or if you are booting from a rescue cd, then it knows nothing about /etc/fstab, so just don't specify the -o discard when mounting.
Followed SSD-optimization advice, now root partition won't mount rw
1,522,347,185,000
I would like to understand more about the Linux boot process and how encryption works for the boot partition. I have a few questions. I know that a UEFI system must have a ESP partition, which can be mounted either in /boot/efi or /efi. The ESP partition contains the bootloader and the kernel. On my Endeavour OS syst...
When you have an UEFI system, its firmware will expect to find at least the first part of whatever you want booted in ESP. That first part could be the UEFI version of GRUB, some other bootloader like systemd-boot, or a unified kernel image with EFISTUB. (If you use Secure Boot, and the firmware won't let you change t...
Encrypted boot partition: advantage of encrypted boot partition
1,522,347,185,000
I have get informed on how prepare a LUKS system & partitions, giving a key/passphrase, etc. But for a new fresh install of linux. How to encrypt an already installed/configured linux system ? EDIT I have made my linux system as a server. I need it crypted, and I would like to test encryption without to reinstall anyt...
Make another partition (or image file) with an encrypted fs for your data. Moving root on the fly to an encrypted fs on the same disk does not work.
Encrypt existing disk with LUKS?
1,522,347,185,000
When encrypting a file with symmetric key, most common utilities (such as gpg, mcrypt, etc) store information in the encrypted message which can be used to verify integrity of the key during decryption. E.g., if the wrong key is entered during decryption, gpg will retort with: gpg: decryption failed: bad key Supp...
As an alternative to my other answer, I'd like to offer something else. Something beautiful ... dm-crypt. Plain dm-crypt (without LUKS) doesn't store anything about the key; on the contrary, cryptsetup is perfectly happy to open a plain device with any password and start using it. Allow me to illustrate: [root:tmp]# f...
File encryption utility without key integrity check (symmetric key)
1,522,347,185,000
I need to enlarge my / (root) partition, I have a lot of space on my /home partition so how can I do this? The drive is encrypted with LUKS. My system is Fedora 20. I have another thread here which mentions system-config-lvm but this seems to be a outdated tool as it is not installed or in the repositories. Gparted do...
The answer is in this thread.... Exerpt: Therefore, the steps would be like this: Shrink the /home "filesystem". (e.g. if it is ext4, it should be resized using resize2fs). Shrink the /home LVM partition (/dev/mapper/fedora_hostname-home) size so that it completely includes /home shrinked filesystem using lvreduce If...
How can I resize my encrypted root and home partitions, to give root more space?
1,522,347,185,000
Does anyone know of a good Howto on how to fully encrypt a HDD (even the /boot!) with GRUB2? Is it possible using fedora 14 or ubuntu 10.04?
Here is the link: http://xercestech.com/full-system-encryption-for-linux.geek
Full disc encryption with GRUB2
1,522,347,185,000
How does Grub's MD5 algorithm work? When you run grub-md5-crypt and enter the same password each time you get different results. Generally md5 is supposed to always return the same hash, so why does grub's version return something different each time? Also, considering that, how is it then determining you are entering...
The grub source code is the best place to find out. The necessary logic is in stage2/md5.c in: int md5_password (const char *key, char *crypted, int check) It produces strings of the form: $1$aaaaaaaa$bbbbbbbbbbbbbbbbbbbbbb where the "aaaaaaaa" sequence is a random salt, and "bbbbbbbbbbbbbbbbbbbbbb" is the result of ...
Grub MD5 Crypt algorithm
1,522,347,185,000
Simple question. With rar rar X file.tar -p"mypass" With 7z 7z X file.7z -p"mypass" Vim can encrypt file using :X and every time you want to open file must use the password. The question is: is possible to pass the pass as argument like rar and 7z? A thing like this vim filex.enc.txt -P"mypass"
With --cmd you can give Vim a command to run before reading the file on the command line (as if it was part of your ~/.vimrc file). By setting the key option to the value of the encryption key in this way, you may give the encryption key on the command line: $ vim --cmd "set key=mysecretkey" myencryptedfile
vim: is possible to open a encrypted file using cli?
1,522,347,185,000
I've followed this guideline to the point where I encrypt the target partition: cryptsetup -h sha256 -c aes-xts-plain64 -s 512 luksFormat /dev/nvme0n1p3 Then, the error appears, even though I'd unmounted the home partition previously like so: umount -l /home The reason for the -l-flag was that it didn't work without ...
umount -l is so called lazy unmount -- for busy filesystems this waits until the filesystem is no longer in use before really unmounting it. From mount manpage: -l, --lazy Lazy unmount. Detach the filesystem from the file hierarchy now, and clean up all references to this filesystem as soon as it is not busy anymore...
cryptsetup luksFormat error "Device /dev/nvme0n1p3 is in use. Can not proceed with format operation."
1,522,347,185,000
I am trying to download an update for a piece of software, and my package manager says that the key is invalid and thus warns me. W: Failed to fetch https://deb.torproject.org/torproject.org/dists/buster/InRelease The following signatures were invalid: EXPKEYSIG 74A941BA219EC810 deb.torproject.org archive signing key...
From 2019.www.torproject.org/docs/debian.html.en, you can run these commands to add the key to the trusted apt keys, I only added sudo: curl https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --import gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add - ...
Author's GPG subkey has expired, what can I do?
1,522,347,185,000
To encrypt a file using a person's public key, I can use the following command. gpg --recipient [email protected] --encrypt --armor file_name I don't quite understand when this command has multiple --recipient parameters. Below is an example. gpg --recipient [email protected] --recipient [email protected] --encrypt -...
In this case, does it mean file_name.asc can be decrypted by both user's corresponding private key? Yes, any of the recipient keys will be able to decrypt the message. Strictly speaking, the message is encrypted using a common key, and that key is encrypted using each provided public key. Thus any of the correspondi...
What does it mean by gpg encrypting a file with multiple recipients?
1,522,347,185,000
I have this file I use to set my username and password before exporting the value. #!/bin/bash echo -n "User:"; read user echo -n "Password:"; read -s password export http_proxy=http://$user:$password@$domain:$portnum if curl -silent http://www.google.com | grep authentication_failed; then echo NO CONNECT ...
I am unable to reproduce the issue you mentioned with password showing up in the output from the history command. The password showing up in the output from printenv and export -p is working as intended. Those commands display the environment variables, and that's where you put the http_proxy string. The environment v...
What are ways to encrypt a password inside an environment variable
1,522,347,185,000
I have some RNA-seq files need to be decrypted. For example 1672_WTSI-OESO_005_w3.tar.gz.gpg Likely I have key for that in same folder 1672_WTSI-OESO_005_w3.gpgkey I have also have a file name 1672_WTSI-OESO_005_w3.md5 Inside that I have 884f9fa72fb7f6adbba95dc677eb0ec9 1672_WTSI-OESO_005_w3.tar.gz.gpg EDITED ...
The file is, according to the GnuPG output that you show, a file encrypted using the CAST5 algorithm. This is a symmetric encryption algorithm, meaning that you should just be able to use the passphrase in that .gpgkey file with gpg --decrypt to decrypt it (without importing it into your keyring; it's not that kind o...
Decrypting GnuPG-encrypted files
1,522,347,185,000
This is more of a educational and curiosity question, rather than tying to fix a problem. I have an Ubuntu system using LUKS. lsblk shows this: Noteably, / is encrypted but /boot and /boot/efi are not. This is important because LUKS needs /boot to be unencrypted in order to boot GRUB. But... / contains /boot. So it s...
The devices (partitions) that / and /boot reside on are different, and one can be encrypted while the other is not.  GRUB knows how to find /boot by using something like set root=(hd0,1) or search --hint=... as defined in grub.cfg. Since GRUB can handle booting into multiple OS's installed simultaneously, the / file s...
LUKS - How can / be encrypted but /boot and /boot/efi are not?
1,522,347,185,000
Let's assume I lost a LUKS encrypted USB pen drive. I think the file system type (ext4/fat32/...) doesn't play a role. A foreign person finds it. Of course he cannot access my data because he doesn't have the password. But he can change a single byte in the middle of the "raw" data so the data is damaged. After the pe...
It is possible but not with "plain" LUKS, you need to set up authenticated encryption. This is possible with LUKS v2, you need to create the LUKS device using the --integrity option with luksFormat. This will basically add checksums for the encrypted data to ensure integrity, without it LUKS/dm-crypt simply doesn't ca...
Is it possible to check if a LUKS device has been damaged by a foreign person?
1,522,347,185,000
I have /etc/crypttab as follows: sda7_crypt UUID=<...> /dev/sda8:/keyfile luks,discard,keyscript=/lib/esi/tpm_key_pass sda7_crypt is my root filesystem, so I use update-initramfs to decrypt it from early on (otherwise I could not continue boot). Yet systemd automatically creates a systemd-cryptsetup@sda7_crypt.servic...
Turns out this is 2 individual systemd issues, specifically how systemd-cryptsetup-generator works. It doesn't recognize keyscript=... option, so it chokes on keys that are valid for passdev like /dev/sda8:/keyfile. The systemd units automatically generated by systemd-cryptsetup-generator are not smart enough to rec...
why does systemd cryptsetup try to remount the root partition already mounted?
1,522,347,185,000
Is it possible to set up a bootloader that automatically begins shredding the header.img file and then the encrypted partition itself upon X failed attempts at decrypting the partition? If this does not already exist - is it possible to create any such software without extensive work? Cheers,
Yes (for your own bootloader / initramfs) and No (for a thief who tries to decrypt it from a Live CD and thus circumvents your trap). So the question is, which situation are you trying to cover here... From a security standpoint it's not a good idea since it doesn't work and the password should be impossible to brutef...
Automatically shred LUKS partition upon X failed decryption attempts?
1,522,347,185,000
I created 2 test folders: mkdir /home/oshiro/Desktop/encrypted mkdir /home/oshiro/Desktop/decrypted oshiro@debian:~/Desktop$ ls -l total 8 drwxr-xr-x 2 oshiro oshiro 4096 Feb 15 20:34 decrypted drwxr-xr-x 2 oshiro oshiro 4096 Feb 15 20:33 encrypted I installed encfs: sudo aptitude install encfs I then tried using e...
Solution: usermod -aG fuse <your-username> reboot
Difficulty with EncFS on Debian
1,522,347,185,000
I'm trying to figure out encfs, but am having some difficulty. This is what I have done so far: I created 2 test folders mkdir /home/oshiro/Desktop/encrypted mkdir /home/oshiro/Desktop/decrypted The difficulty is that the next command gives me a permission denied message: encfs /home/oshiro/Desktop/encrypted /home/os...
I fixed the problem by running the following command before mounting: sudo chmod +x /usr/bin/fusermount
Difficulty with EncFS on CentOS
1,522,347,185,000
I have my hard disk encrypted with LUKS, but I make regular backups to an unencrypted external harddrive. Is there any reason I shouldn't setup LUKS on my backup drive as well? Obviously, the big thing will be keeping track of the key/passphrase, but I believe I have that in hand. I'm more concerned about obsolescence...
I'm more concerned about obsolescence of LUKS What about USB mass storage support? The underlying PATA or SATA disk access? (It's already pretty hard to find motherboards with PATA ports.) How about Linux itself, or USB for that matter? As frostschutz said, it depends very much on why you are encrypting the main dri...
Any reason not to use LUKS on a backup drive?
1,479,187,367,000
How to encrypt a file using the command below, if the recipient mail is not showing up when I type the --list-keys command. Sample Encrypt file command using GPG gpg --output "output_filename" --encrypt --recipient [email protected] "input_filename" Output for gpg --list-keys shows to imported public keys one is Use...
You can use the identifier instead of an email address: gpg --output "output_filename" --encrypt --recipient FXXXXX3D "input_filename" (You should really specify the full fingerprint but that's another story.)
How to encrypt if public key does not have email
1,479,187,367,000
When I try to LUKS encrypt a partition on a CentOS 7 server using the command cryptsetup -y luksFormat /dev/sda4, the attempt fails with the error Cannot format device /dev/sda4 which is still in use. How can I resolve this error and successfully LUKS encrypt the partition? Here is the terminal record: [root@localh...
Is the goal to completely destroy everything on your current /data disk and create a new, entirely empty encrypted volume? Because that's what you're doing with this command. That's what the whole "WARNING: This will overwrite data on /dev/sda4 irrevocably" thing is about. You will lose all the current data, and start...
Cannot format device /dev/sda4 which is still in use