centos

fatal: no SASL authentication mechanisms && warning: xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechanisms

If you see your Postfix reporting:

Jun 4 10:45:35 host postfix/smtpd[13609]: warning: xsasl_cyrus_server_get_mechanism_list: no applicable SASL mechanisms
Jun 4 10:45:35 host postfix/smtpd[13609]: fatal: no SASL authentication mechanisms

Troubleshooting the `Failed to start Berkeley Internet Name Domain (DNS)` error message

If the Named service goes down we check its status with systemctl status named or journalctl -xe, however sometimes both commands do not contain any indication of specific zone causing the error:

How to investigate sessions

To list all current sessions:

loginctl list-sessions

To investigate details of particular session run:

loginctl show-session [session_id]

The sessions files are located in /run/systemd/sessions on Fedora-based systems and in /run/systemd/sessions on Debian-based systems.

If sessions fill up the /run directory for 100% then per recommendation on
https://www.centos.org/forums/viewtopic.php?f=48&t=65472:

Recursively copying between two directories including hidden files

Sometimes we need to override large structure of directories and subdirectories with newer files.

There are two ways of copying all the files in one directory including subdirectories and hidden files to another directory:

cd /orig/dir
tar cvf - . | (cd /dest/dir; tar xvf -)

which tars up the current directory to stdout then pipes it to a subshell that first cd's to the destination directory before untarring stdin.

The second way of doing this is using cp:

yes | cp -rT /orig/dir /dest/dir 2> /dev/null

Instaling pip command on CentOS

Enable the epel repository and run:

yum install python-pip to get:

yum install python-pip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.nexcess.net
* epel: mirror.sfo12.us.leaseweb.net
* extras: centos.sonn.com
* updates: centos.sonn.com
Resolving Dependencies
--> Running transaction check
---> Package python-pip.noarch 0:7.1.0-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

Tags:

Rename network interface back to old "eth0" on Fedora/RHEL/CentOS

The easiest way to restore the old way Kernel/modules/udev rename your ethernet interfaces is supplying these kernel parameters to Fedora 19:

net.ifnames=0
biosdevname=0

To do so follow this steps:

  1. Edit /etc/default/grub
  2. At the end of GRUB_CMDLINE_LINUX line append "net.ifnames=0 biosdevname=0"
  3. Save the file
  4. Type "grub2-mkconfig -o /boot/grub2/grub.cfg"
  5. Type "reboot"

Removing the RAID metadata

If you see the “Disk contains BIOS metadata, but is not part of any recognized BIOS RAID sets. Ignoring disk sda” error message during OS installation, then you need to remove the raid metadata the “classic” way:

dmraid -r -E /dev/sda
Do you really want to erase "pdc" ondisk metadata on /dev/sda ? [y/n] :
y

How to keep a detailed audit trail of what’s being done on your Linux systems

Intrusions can take place from both authorized (insiders) and unauthorized (outsiders) users. My personal experience shows that unhappy user can damage the system, especially when they have a shell access. Some users are little smart and removes history file (such as ~/.bash_history) but you can monitor all user executed commands.It is recommended that you log user activity using process accounting. Process accounting allows you to view every command executed by a user including CPU and memory time.

Mdadm Cheat Sheet

Mdadm is the modern tool most Linux distributions use these days to manage software RAID arrays; in the past raidtools was the tool we have used for this. This cheat sheet will show the most common usages of mdadm to manage software raid arrays; it assumes you have a good understanding of software RAID and Linux in general, and it will just explain the commands line usage of mdadm. The examples bellow use RAID1, but they can be adapted for any RAID level the Linux kernel driver supports.

Create a bootable USB flash media drive for CentOS 7

On Mac OSX:

First go to http://isoredirect.centos.org/centos/7/isos/x86_64/ and select nearest to you source, click on it and then download image called CentOS-7-x86_64-Minimal-1611.iso

Older versions:
CentOS-7-x86_64-Minimal-1511.iso
CentOS-7.0-1406-x86_64-Minimal.iso

Tags:

Pages

Subscribe to RSS - centos