This post provides a sample script detecting which interfaces are configured on the system, and in them, which ones do have their links up and at which speed they are operating. Note, that the reported speed within virtual machines may not be correct. A virtualized network adapter has to pretend to have a “speed” because […]
CentOS/RHEL
Configure MySQL Router to Auto Restart of Failure using systemd
The systemd unit file that ships with the MySQL Router 8.0 RPM’s will not automatically restart mysqlrouter on failure. It can be modifed to do so, though, by editing the file /usr/lib/systemd/system/mysqlrouter.service and adding this line: Restart=on-failure Put it right after the “ExecStart” line, so that the file ooks like this: [Unit] Description=MySQL Router After=syslog.target […]
How To Enforce Password Complexity For All Users, Including “root”, By Using the “passwdqc” PAM Module CentOS/RHEL
This post outlines steps to configure password complexity for all the users, including root. The “pam_cracklib.so” PAM module does not check the password complexity for the “root” user by default. So to overcome that the “pam_passwdqc.so” module can be used to apply the restrictions for all the users, including “root”. 1. “pam_passwdqc.so” is provided by […]
PAM password complexity and pam_cracklib credit system in CentOS/RHEL
This post describes the PAM pam_cracklib credit system in relation to Linux PAM password complexity. Overview of PAM The Pluggable Authentication Modules (PAM) is a central, flexible, modular framework used to manage system authentication policies and facilitate user authentication. PAM provides a general Application Programming Interface (API) that privilege granting programs defer to for user […]
Allow cronjobs to run by pam even if user password is expired
The Problem The system’s account will be expired by policy but need to run to cron job by that account. When expired, cron job was failed by PAM with below message: Jul 10 00:31:01 geeklab crond[2860]: CRON (xxx) ERROR: failed to open PAM security session: Success Jul 10 00:31:01 geeklab crond[2860]: CRON (xxx) ERROR: cannot […]
How to Configure Password Expiration and Complexity Requirements in CentOS/RHEL
This post tells how to configure Linux password policy, focussing on password expiration and complexity. Password Expiration To set the default password expiration when creating new accounts on CentOS/RHEL, edit the /etc/login.defs file. PASS_MAX_DAYS 100 This means the maximum number of days a password may be used. Check the man page of login.defs for more […]
How to encrypt traffic between CUPS servers
For security reasons encryption should be used to prevent document disclosure. In that case, we have to encrypt the traffic between the CUPS server. This post outlines the steps to do the same. 1. CUPS is a standards-based, open-source printing system. On CentOS/RHEL during the installation of the cups packages, a certificate and the corresponding […]
How to Add Network Printer via Command Line in CentOS/RHEL
This post explains the steps to add a network printer on a Linux Server. 1. Verify if new printer already exists # lpstat -p Note: This command will list all installed printers. 2. Verify if printer has a DNS record: # host [printer name] 3. If error found in verifying if printer has a DNS […]
How to Remove/Delete All Packages from Channel(s) in SpaceWalk
This post will help you in removing all the rpm packages from the particular channel and then deleting permanently from /var/satellite filesystem. 1. SSH into Spacewalk server as a root user. 2. Run below command to get Spacewalk CLI: # spacecmd 3. List all the available channels: spacecmd {SSM:0}> softwarechannel_list 4. Remove all the packages […]
How To Remove Disk from a LVM Volume Group
Any activities pertaining to shrinking of volumes and file system sizes is considered high risk. One main reason is that we cannot revert and fix the file system if it encounters an error. As a general rule of thumb, a good back out plan should be in place. Virtual machine has a snapshot features and […]