Enforcing password complexity on CentOS

The pam_pwquality (previously pam_cracklib) module is used to check password complexity against a set of rules. It checks if the password is found in a dictionary; if not, it will continue with additional checks. The config file is /etc/security/pwquality.conf but, if in use, it can be configured in /etc/pam.d/system-auth. To add the password policies, just… Continue reading “Enforcing password complexity on CentOS”

Convert ppk to OpenSSH keypairs

.ppk files are created by PuTTY to store a private key generated by the program. To convert keypairs, first you need to install the package putty and then: Generate the private key: puttygen id_rsa.ppk -O private-openssh -o id_rsa Generate the public key: puttygen id_rsa.ppk -O public-openssh -o id_rsa.pub

rpmdb: Thread died in Berkeley DB library

While trying to update a CentOS server I got this error: [root@washingmashine ~]# yum update error: rpmdb: BDB0113 Thread/process 47226/140411903506496 failed: BDB1507 Thread died in Berkeley DB library error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery error: cannot open Packages index using db5 – (-30973) error: cannot open Packages database in… Continue reading “rpmdb: Thread died in Berkeley DB library”

resize2fs: bad magic number in super-block

After extending a virtual drive on VMWare, I had to add the additional disk space to the logical volume. After adding adding the space, you need to resize the file system. On the infrastructure I was working on, I usually use resize2fs command but this time it didn’t work: [root@washingmashine ~]# resize2fs /dev/mapper/data-archive resize2fs 1.44.6… Continue reading “resize2fs: bad magic number in super-block”