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:
(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:
cracklib dict构建有问题,导致dict访问异常。
解决版本: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