Bug 1902 - Linux中使用Cryptsetup工具设置加密的文件系统,Anolis OS 23版本执行cryptsetup luksFormat 命令设置密码失败
Summary: Linux中使用Cryptsetup工具设置加密的文件系统,Anolis OS 23版本执行cryptsetup luksFormat 命令设置密码失败
Status: RESOLVED FIXED
Alias: None
Product: Anolis OS 23
Classification: Anolis OS
Component: BaseOS Packages (show other bugs) BaseOS Packages
Version: 23.0
Hardware: x86_64 Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: xuchunmei
QA Contact: xuchunmei
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-15 14:54 UTC by cq01485463
Modified: 2022-08-23 17:48 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cq01485463 alibaba_cloud_group 2022-08-15 14:54:14 UTC
Description of problem:
Linux中使用'Cryptsetup'工具设置加密的文件系统,执行cryptsetup luksFormat 命令设置密码失败

Version-Release number of selected component (if applicable):

NAME="Anolis OS"
VERSION="23"
ID="anolis"
VERSION_ID="23"
PLATFORM_ID="platform:an23"
PRETTY_NAME="Anolis OS 23"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"
BUG_REPORT_URL="https://bugzilla.openanolis.cn/"

How reproducible:


Steps to Reproduce:

1.执行命令创建分区dd if=/dev/zero of=/root/luks_mytest.vol bs=1M count=100

2.执行命令cryptsetup luksFormat /root/luks_mytest.vol创建加密分区

Actual results:

1、在anolis 23版本,加密系统分区创建失败:
cryptsetup luksFormat /root/luks_mytest.vol

WARNING!
========
This will overwrite data on /root/luks_mytest.vol irrevocably.

Are you sure? (Type 'yes' in capital letters): YES
Enter passphrase for /root/luks_mytest.vol:
Verify passphrase:
/usr/share/cracklib/pw_dict: error reading header
Password quality check failed:
 The password fails the dictionary check - error loading dictionary

2、在anolis 8.6版本,创建加密系统加密分区成功

 cat /etc/os-release
NAME="Anolis OS"
VERSION="8.6"
ID="anolis"
ID_LIKE="rhel fedora centos"
VERSION_ID="8.6"
PLATFORM_ID="platform:an8"
PRETTY_NAME="Anolis OS 8.6"
ANSI_COLOR="0;31"
HOME_URL="https://openanolis.cn/"

[root@iZ2ze99l8ukr1gl61grcusZ ~]# cryptsetup  luksFormat /root/my_test.img

WARNING!
========
This will overwrite data on /root/my_test.img irrevocably.

Are you sure? (Type 'yes' in capital letters): YES
Enter passphrase for /root/my_test.img:
Verify passphrase:


Expected results:

不同版本,创建加密分区都可以成功

Additional info:
Comment 1 cq01485463 alibaba_cloud_group 2022-08-15 15:01:54 UTC
(In reply to cq01485463 from comment #0)
> Description of problem:
> Linux中使用'Cryptsetup'工具设置加密的文件系统,执行cryptsetup luksFormat 命令设置密码失败
> 
> Version-Release number of selected component (if applicable):
> 
> NAME="Anolis OS"
> VERSION="23"
> ID="anolis"
> VERSION_ID="23"
> PLATFORM_ID="platform:an23"
> PRETTY_NAME="Anolis OS 23"
> ANSI_COLOR="0;31"
> HOME_URL="https://openanolis.cn/"
> BUG_REPORT_URL="https://bugzilla.openanolis.cn/"
> 
> How reproducible:
> 
> 
> Steps to Reproduce:
> 
> 1.执行命令创建分区dd if=/dev/zero of=/root/luks_mytest.vol bs=1M count=100
> 
> 2.执行命令cryptsetup luksFormat /root/luks_mytest.vol创建加密分区
> 
> Actual results:
> 
> 1、在anolis 23版本,加密系统分区创建失败:
> cryptsetup luksFormat /root/luks_mytest.vol
> 
> WARNING!
> ========
> This will overwrite data on /root/luks_mytest.vol irrevocably.
> 
> Are you sure? (Type 'yes' in capital letters): YES
> Enter passphrase for /root/luks_mytest.vol:
> Verify passphrase:
> /usr/share/cracklib/pw_dict: error reading header
> Password quality check failed:
>  The password fails the dictionary check - error loading dictionary
> 
> 2、在anolis 8.6版本,创建加密系统加密分区成功
> 
>  cat /etc/os-release
> NAME="Anolis OS"
> VERSION="8.6"
> ID="anolis"
> ID_LIKE="rhel fedora centos"
> VERSION_ID="8.6"
> PLATFORM_ID="platform:an8"
> PRETTY_NAME="Anolis OS 8.6"
> ANSI_COLOR="0;31"
> HOME_URL="https://openanolis.cn/"
> 
> [root@iZ2ze99l8ukr1gl61grcusZ ~]# cryptsetup  luksFormat /root/my_test.img
> 
> WARNING!
> ========
> This will overwrite data on /root/my_test.img irrevocably.
> 
> Are you sure? (Type 'yes' in capital letters): YES
> Enter passphrase for /root/my_test.img:
> Verify passphrase:
> 
> 
> Expected results:
> 
> 不同版本,创建加密分区都可以成功
> 
> Additional info:
Comment 2 xuchunmei alibaba_cloud_group 2022-08-15 17:39:22 UTC
cracklib dict构建有问题,导致dict访问异常。
Comment 3 xuchunmei alibaba_cloud_group 2022-08-17 09:45:09 UTC
解决版本:cracklib-2.9.7-2.an23
自验:
[root@anolis ~]# rpm -q cracklib
cracklib-2.9.7-2.an23.x86_64
[root@anolis ~]# cryptsetup luksFormat /root/luks_mytest.vol
WARNING: Device /root/luks_mytest.vol already contains a 'crypto_LUKS' superblock signature.

WARNING!
========
This will overwrite data on /root/luks_mytest.vol irrevocably.

Are you sure? (Type 'yes' in capital letters): YES
Enter passphrase for /root/luks_mytest.vol:
Verify passphrase:
[root@anolis ~]# echo $?
0