Submitted by Mathew Branwell on Tue, 06/04/2019 - 05:25
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
Submitted by Mathew Branwell on Tue, 08/14/2018 - 17:25
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:
Submitted by Mathew Branwell on Mon, 06/04/2018 - 16:37
After physically replacing the degraded drive with the new one and rebooting the system, run the folowing command to create exactly the same partitioning on /dev/sdb (new drive) as on /dev/sda (healthy existing drive):
sfdisk -d /dev/sda | sfdisk /dev/sdb
You can run
fdisk -l
to check if both hard drives have the same partitioning now.
Next we add /dev/sdb1 to /dev/md126 and /dev/sdb2 to /dev/md127:
mdadm --manage /dev/md126 --add /dev/sdb1
mdadm --manage /dev/md127 --add /dev/sdb2
Submitted by Mathew Branwell on Fri, 03/09/2018 - 15:24
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:
Submitted by Mathew Branwell on Tue, 02/13/2018 - 12:52
Submitted by Mathew Branwell on Sat, 09/02/2017 - 21:06
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
Submitted by Mathew Branwell on Mon, 05/09/2016 - 18:41
To create a patch file simply run:
diff -u functions.php.orig functions.php > a.patch
Submitted by Mathew Branwell on Fri, 04/22/2016 - 03:07
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
Submitted by Mathew Branwell on Tue, 06/02/2015 - 00:13
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.
Submitted by Mathew Branwell on Fri, 02/27/2015 - 00:45
To push an archive file from local to remote server with progress bar use:
rsync --rsh -av -e 'ssh -p #####' --progress --partial file.tgz [email protected]:/backup
To push the content of the directory from local to remote server recursively with progress bar use:
rsync -avz -e 'ssh -p #####' --progress --partial localdirectory/ [email protected]:/backup/
Pages
Recent comments