LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-22-2020, 08:14 PM   #1
duupunisher2x
Member
 
Registered: Aug 2020
Posts: 88

Rep: Reputation: Disabled
Changing "iterations" on encrypted hdd with data (already) on it


I encrypted my hdd (not ssd) using 'cryptsetup luksOpen..'.

Code:
"sudo cryptsetup luksFormat /dev/sdx --iter-time #"
I want to change the number of seconds (#) before someone can attempt the passphrase for the 2nd time, supposing I type it incorrectly the first time.

I want to do this on a hdd that has data that is not going to be removed, and already encrypted w/ Luks.

Q1: Can it be done under these conditions?
Q2: If yes, what command(s) would work?

Thx.

Last edited by duupunisher2x; 08-23-2020 at 11:08 PM.
 
Old 08-23-2020, 12:22 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
I'd try using luksAddKey --iter-time then luksRemoveKey the original key. Perhaps luksChangeKey --iter-time works as well. Before doing it on a disk that contains valuable data, I would try this out on a test device.
 
Old 08-23-2020, 11:56 PM   #3
duupunisher2x
Member
 
Registered: Aug 2020
Posts: 88

Original Poster
Rep: Reputation: Disabled
Thanks BDB.

I will try them when I have a practice hdd available to try them on.

I'll close the post for now as I don't know how soon I'll be able to try it.
 
Old 08-24-2020, 01:50 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
You don't need a practice HDD. You need a little free space in your filesystem, then create a loop device. Example for a device of size 1G:
Code:
dd if=/dev/zero of=myloopdevice bs=1M count=1024
losetup -f myloopdevice
If all goes well, the losetup command will tell you the name of a loop device like /dev/loop0. You can then encrypt /dev/loop0 and put a filesystem on it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Will adding data to a hdd that already has data on it using the “dd” command overwrite the pre-existing data? hddfsck Linux - Newbie 17 09-08-2019 06:21 PM
New HDD install w/data recovery from old HDD w/different distro w/encrypted /home forbinproject Linux - Laptop and Netbook 1 02-27-2012 10:18 PM
[SOLVED] Breaking iteration after a given number of iterations (bash). stf92 Linux - Newbie 8 06-14-2011 09:16 AM
I'm getting closer to the answer: Python iterations over nested tuples Mohtek Programming 3 05-24-2010 12:16 PM
eth0: too many iterations (6) in nv_nic_irq bee2643 Linux - Networking 1 01-10-2009 11:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration