#972 Issue closed: cryptsetup fails on restore due to missing cracklib dictionaries

Labels: support / question, fixed / solved / done

nikbarron opened issue at 2016-08-18 09:35:

Please fill in the following items before submitting a new issue:

  • rear version (/usr/sbin/rear -V): 1.17.2 / Git
  • OS version (cat /etc/rear/os.conf or lsb_release -a): CentOS 7 (reports as RedHatEnterpriseServer/7)
  • rear configuration files (cat /etc/rear/site.conf or cat /etc/rear/local.conf):

OUTPUT=ISO
BACKUP=NETFS
BACKUP_URL=cifs://swss-nas3/REAR_Backups
BACKUP_OPTIONS="cred=/etc/rear/cifs"

  • Brief description of the issue

There is an issue with restoring a system that uses LUKS encryption, which fails as shown in the attached screenshot with "An error occurred during layout recreation" immediately after the first password prompt to recreate the LUKS volume:

rear-001

Digging into this further I found that the issue is caused by the password quality check on cryptsetyp, which requires the cracklib dictionaries, which appear to be missing from the restore media:

rear-002

The system the ISO was generated from has the cracklib packages installed, so I guess the ISO creation process needs to be amended to include them?

  • Work-around, if any

There's a simple workaround, edit the restore script and add the --force-password switch to the cryptsetup command(s), which skips the password quality check. The restore process then runs fine and restores as expected.

jsmeix commented at 2016-08-18 10:59:

In general when something special is not automatically
included in the rescue/recovery system, you can
specify whatever you want to get it included
by using in /etc/rear/local.conf things like

REQUIRED_PROGS=( "${REQUIRED_PROGS[@]}" progam1 program2 )
COPY_AS_IS=( "${COPY_AS_IS[@]}" file1 file2 directory1 directory2 )

for an example see
/usr/share/rear/conf/examples/SLE12-SP1-btrfs-example.conf
and in general for what you can configure
see /usr/share/rear/conf/default.conf

gdha commented at 2016-08-18 12:03:

Issue #679 is about the same - see the solution provided - it will be included in 1.18
If this is sufficient for you then close this issue please?

nikbarron commented at 2016-08-18 12:15:

Hi,

Sure, it was more of a heads-up, thought it should probably include the cryptlib by default as it includes LUKS support.

Happy to close, awesome work on REAR btw, off to donate now!

gdha commented at 2016-08-18 13:23:

@nikbarron Thank you for your kind donation - it makes my day ;-)

nikbarron commented at 2016-08-18 13:26:

You’re most welcome!

From: gdha [mailto:notifications@github.com]
Sent: 18 August 2016 14:23
To: rear/rear rear@noreply.github.com
Cc: Nik Barron nick.barron@pennantplc.co.uk; Mention mention@noreply.github.com
Subject: Re: [rear/rear] cryptsetup fails on restore due to missing cracklib dictionaries (#972)

@nikbarronhttps://github.com/nikbarron Thank you for your kind donation - it makes my day ;-)


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/rear/rear/issues/972#issuecomment-240721216, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AUH3VAKmpmZIgGmYH6mHdz-9q7e9J0mlks5qhFzKgaJpZM4JnTms.


This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com



This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com


jsmeix commented at 2016-08-18 14:25:

@nikbarron
only FYI if you like to try out the currently
newest rear GitHub master code:

In general regarding how to test the currently
newest rear GitHub master code:
Basically "git clone" it into a directory and
then run rear from within that directory.

# git clone https://github.com/rear/rear.git
# cd rear
# vi etc/rear/local.conf
# usr/sbin/rear -d -D mkbackup

nikbarron commented at 2016-08-18 14:47:

Thanks, will give that a try

Nik

Sent from my Android phone using Symantec TouchDown (www.symantec.com)

-----Original Message-----
From: Johannes Meixner [notifications@github.com]
Received: Thursday, 18 Aug 2016, 15:25
To: rear/rear [rear@noreply.github.com]
CC: Nik Barron [nick.barron@pennantplc.co.uk]; Mention [mention@noreply.github.com]
Subject: Re: [rear/rear] cryptsetup fails on restore due to missing cracklib dictionaries (#972)

@nikbarronhttps://github.com/nikbarron
only FYI if you like to try out the currently
newest rear GitHub master code:

In general regarding how to test the currently
newest rear GitHub master code:
Basically "git clone" it into a directory and
then run rear from within that directory.

git clone https://github.com/rear/rear.git

cd rear

vi etc/rear/local.conf

usr/sbin/rear -d -D mkbackup


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/rear/rear/issues/972#issuecomment-240739377, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AUH3VEqdbduMEVm1tuI9WpditJdkfyqpks5qhGtigaJpZM4JnTms.


This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com



This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com



[Export of Github issue for rear/rear.]