<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://tech.snathan.org/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://tech.snathan.org/feed.php">
        <title>Senthil&#039;s Tech Wiki/Blog - tech:linux</title>
        <description></description>
        <link>https://tech.snathan.org/</link>
        <image rdf:resource="https://tech.snathan.org/_media/wiki/dokuwiki.svg" />
       <dc:date>2026-04-14T11:34:49+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/account_locked?rev=1513772778&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/adodb?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/apache_configuration?rev=1644755325&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/apache_old_config?rev=1580128047&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/apt_update_resource_overload?rev=1580041649&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/apt_upgrades?rev=1592738853&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/aptitude_undo?rev=1512304013&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/backup_directory_script?rev=1536578866&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/bash_commands?rev=1435146938&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/bash_date?rev=1428579994&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/bash_loops?rev=1601378863&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/bash_script_skeleton?rev=1672057759&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/bionic?rev=1565522817&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/build_add_raid?rev=1417783419&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/check_disk?rev=1433850221&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/check_swap?rev=1423572673&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/chmod_on_directories?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/commands_to_add_users_and_groups?rev=1638793719&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/cpu_usage?rev=1608121685&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/creating_wordpress_websites_on_ub1?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/cron?rev=1417610213&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/debian_release_upgrade?rev=1737980929&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/delete_files_but_not_directories?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/delete_files_using_find?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/disk_space?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/dns_validate?rev=1428579994&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/doveadm_scripting?rev=1620041278&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/etc_skel?rev=1695555014&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/failed_login?rev=1425041901&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/find_command_to_ignore_svn_directories?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/find_command?rev=1417697137&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/gnutls?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/install_nagios_plugin_nrpe_redhat?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/mail_server_setup?rev=1697715188&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/memory_check?rev=1618918081&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/memory_usage?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/mime?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/most_common_packages_v2?rev=1592825248&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/most_common_packages?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/mount_samba_linux_share?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/mount_samba_windows_share?rev=1420203418&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/nagios_nrpe_redhat?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/new_disk?rev=1449318477&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/new_network_card?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/new_server?rev=1466594927&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/nice?rev=1449318477&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/php_ini?rev=1648466929&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/php_server?rev=1606739276&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/ping_test?rev=1457008113&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/pnp4nagios_averages?rev=1483532742&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/pnp4nagios_graphs?rev=1483532742&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/pnp4nagios?rev=1544099275&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/postfix_autoresponder?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/postfix_client_tls?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/postfix_important_settings?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/postfix_relay_on_recipient_domain?rev=1420807671&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/postfix_report?rev=1417697137&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/postfix_spam_control?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/postfixadmin?rev=1757676350&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/purge_linux_images?rev=1471433162&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/redhat_epel?rev=1425988275&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/resize_partition?rev=1739190557&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/reverse_tunnel?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/rotate_logs?rev=1438602391&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/screen?rev=1765023984&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/scripted_email?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/setup_network_groovy?rev=1601378863&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/setup_new_box?rev=1676205007&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/setup_new_vm?rev=1769084781&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/setup_postfix_relay?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/sound_recording_in_linux?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/sq_config?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/squirrelmail?rev=1562498715&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/ssh_filesystem?rev=1425988275&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/start_stop_script?rev=1426074407&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/starting_and_stopping_services_in_ubuntu_linux?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/startup_run?rev=1426074407&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/startup_script_for_shellinabox?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/stop_services?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/sudo_without_password?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/sysctl_config?rev=1466594927&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/throttle_process?rev=1429702967&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/ufw?rev=1735734653&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/upgrade_to_lucid?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/upgrading_wordpress_sites?rev=1416064423&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/useful_network_tools?rev=1572434864&amp;do=diff"/>
                <rdf:li rdf:resource="https://tech.snathan.org/tech/linux/webalizer?rev=1416064423&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://tech.snathan.org/_media/wiki/dokuwiki.svg">
        <title>Senthil's Tech Wiki/Blog</title>
        <link>https://tech.snathan.org/</link>
        <url>https://tech.snathan.org/_media/wiki/dokuwiki.svg</url>
    </image>
    <item rdf:about="https://tech.snathan.org/tech/linux/account_locked?rev=1513772778&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-12-20T12:26:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>account_locked</title>
        <link>https://tech.snathan.org/tech/linux/account_locked?rev=1513772778&amp;do=diff</link>
        <description>Redhat Account locked

If the Linux user account is locked in Redhat, a brute way to remove the lock for all accounts is:


cat /dev/null &gt; /var/log/faillog


Keywords: password failed login attempts</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/adodb?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>adodb</title>
        <link>https://tech.snathan.org/tech/linux/adodb?rev=1416064423&amp;do=diff</link>
        <description>adodb on home unbuntu server

FIXME

When installing some app (I believe it was mantis) got the following warning:



libphp-adodb is no longer installed in /usr/share/adodb. New installation path is now /usr/share/php/adodb.



Please update your php.ini file. Maybe you must also change your web-server configuraton.</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/apache_configuration?rev=1644755325&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-02-13T12:28:45+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>apache_configuration</title>
        <link>https://tech.snathan.org/tech/linux/apache_configuration?rev=1644755325&amp;do=diff</link>
        <description>Apache Configuration (Ubuntu 18.04 Bionic Beaver)

Enable the below


/usr/sbin/a2enmod headers rewrite socache_shmcb


/etc/apache2/apache2.conf

Original vs Modified (Original &lt; and Modified &gt;)


175a176,181
&gt; &lt;Directory /data/www/&gt;
&gt;       Options Indexes FollowSymLinks
&gt;       AllowOverride None
&gt;       Require all granted
&gt; &lt;/Directory&gt;
&gt;
213a220
&gt; LogFormat &quot;%{X-Forwarded-For}i %l %u %t \&quot;%r\&quot; %&gt;s %O \&quot;%{Referer}i\&quot; \&quot;%{User-Agent}i\&quot;&quot; proxycomb
216a224,227
&gt; LogFormat &quot;%h %t %&gt;s %B %D %k&quot;…</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/apache_old_config?rev=1580128047&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-01-27T12:27:27+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>apache_old_config</title>
        <link>https://tech.snathan.org/tech/linux/apache_old_config?rev=1580128047&amp;do=diff</link>
        <description>Apache Configuration (Ubuntu 12.04 Precise Pangolin)

Apache configuration for Ubuntu are at /etc/apache2

httpd.conf

file is an empty file by default.  Update as, Where xxxxxx is the short unqualified host name such as abc01


ServerName xxxxxx
ExtendedStatus On</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/apt_update_resource_overload?rev=1580041649&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-01-26T12:27:29+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>apt_update_resource_overload</title>
        <link>https://tech.snathan.org/tech/linux/apt_update_resource_overload?rev=1580041649&amp;do=diff</link>
        <description>Disable updates (Bionic)


systemctl disable apt-daily.timer
systemctl disable apt-daily-upgrade.timer


APT update resource overload

apt has a daily and weekly update on Ubuntu servers.  On servers with limited CPU and Memory this could pose an issue.  If the servers are inside the firewall and do not require any updates, security or otherwise, it helps to disable this.</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/apt_upgrades?rev=1592738853&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-06-21T11:27:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>apt_upgrades</title>
        <link>https://tech.snathan.org/tech/linux/apt_upgrades?rev=1592738853&amp;do=diff</link>
        <description>Automatic apt upgrades

Recently noticed the following on my daily cron output:


/etc/cron.daily/apt:
Package &#039;mysql-common&#039; has conffile prompt and needs to be upgraded manually


It turns out automatic upgrade of packages is turned on by default in Ubuntu LTS 12.04 Precise Pangolin!!!</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/aptitude_undo?rev=1512304013&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-12-03T12:26:53+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>aptitude_undo</title>
        <link>https://tech.snathan.org/tech/linux/aptitude_undo?rev=1512304013&amp;do=diff</link>
        <description>Aptitude Undo Operation

While in the Aptitude interactive mode, what can you do to undo an accidentally operation. For e.g. a press of the minus key on a large package group!  Aptitude does now allow you do perform a mass undo of the action you just initiated. To undo do the following:</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/backup_directory_script?rev=1536578866&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-09-10T11:27:46+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>backup_directory_script</title>
        <link>https://tech.snathan.org/tech/linux/backup_directory_script?rev=1536578866&amp;do=diff</link>
        <description>Bash script to backup

Directory

Bash script to backup regular files in current directory.  The default backup directory is archive inside the current directory.  Or you may specify a backup directory as the 1st argument to the script.


#!/bin/bash
#
# Backup Regular files to archive/timestamp
#
NOW=$(date +&quot;%Y-%m-%d-%H-%M-%S&quot;)
#
#
if [[ -z $1 ]]
  then
  BACKUPDIR=archive/$NOW
else
  BACKUPDIR=$1/$NOW
fi
mkdir -p $BACKUPDIR
#
for file in $(ls -p | grep -v /$)
do
  cp -p $file $BACKUPDIR/
done…</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/bash_commands?rev=1435146938&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-06-24T11:55:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>bash_commands</title>
        <link>https://tech.snathan.org/tech/linux/bash_commands?rev=1435146938&amp;do=diff</link>
        <description>Advanced bash scripting

&lt;http://www.tldp.org/LDP/abs/html/index.html&gt;

Bash Commands

Finding a size of a file


file_size=$(stat -c%s &quot;$FILENAME&quot;)


Wait for user to strike a key


read -p &quot;Press [Enter] key to start backup...&quot;


Filename from Filepath

Extracting File Name with extension and without extension given full file path</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/bash_date?rev=1428579994&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-04-09T11:46:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>bash_date</title>
        <link>https://tech.snathan.org/tech/linux/bash_date?rev=1428579994&amp;do=diff</link>
        <description>Date formatting in bash shell


#!/bin/bash
TS=$(date +%Y%m%d_%H%M%S);
#
if [[ ! (&quot;$#&quot; == 1) ]]; then
  echo &quot;Usage for $0 : &lt;xxxxxx&gt; required as argument.&quot;
  exit 1
fi</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/bash_loops?rev=1601378863&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-09-29T11:27:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>bash_loops</title>
        <link>https://tech.snathan.org/tech/linux/bash_loops?rev=1601378863&amp;do=diff</link>
        <description>bash loops

while counter


#!/bin/bash
#
SLEEPTIME=5
MAXCOUNT=5
URL=&quot;https://www.example.com/xys&quot;
#
COUNTER=0
while [  $COUNTER -lt $MAXCOUNT ]; do
    let COUNTER=COUNTER+1
    echo &quot;Iteration: $COUNTER
&quot;
    curl -k $URL
    echo &quot;
Status: $?
&quot;
    # Don&#039;t execute for last iteration
    if [  $COUNTER -lt $MAXCOUNT ]; then
      sleep $SLEEPTIME
    fi
done</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/bash_script_skeleton?rev=1672057759&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-12-26T12:29:19+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>bash_script_skeleton</title>
        <link>https://tech.snathan.org/tech/linux/bash_script_skeleton?rev=1672057759&amp;do=diff</link>
        <description>Bash Script Skeleton

Getting Script Directory


SCRIPT_DIR=$( cd -- &quot;$( dirname -- &quot;${BASH_SOURCE[0]}&quot; )&quot; &amp;&gt; /dev/null &amp;&amp; pwd )


Processing Arguments and Help


function help {
  echo &quot;Usage: $0 &lt;domain&gt; &lt;acme-string&gt; [type] [name]&quot;
  echo &quot;Pass both type and name or neither.&quot;
  echo &quot;Default: type=TXT and name=_acme-challenge&quot;
  echo
  echo &quot;E.g.:&quot;
  echo &quot;Setting a TXT record for _acme-challenge:&quot;
}

if [ &quot;$#&quot; -lt 2 ]; then
  help
  exit 1
else
  domain=$1
  acme=$2
fi
if [ &quot;$#&quot; -eq 3 ]; the…</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/bionic?rev=1565522817&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-08-11T11:26:57+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>bionic</title>
        <link>https://tech.snathan.org/tech/linux/bionic?rev=1565522817&amp;do=diff</link>
        <description>Notes about Bionic Beaver, Ubuntu LTS 18.01

Disable cloud-init


sudo touch /etc/cloud/cloud-init.disabled
sudo echo &quot;network: {config: disabled}&quot; &gt; /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg


Also update this


FCheck for the existence of /etc/cloud/cloud.cfg configuration. If the file exists edit the file and change the settings within:
FROM:
preserve_hostname: false
TO:
preserve_hostname: true</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/build_add_raid?rev=1417783419&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-12-05T12:43:39+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>build_add_raid</title>
        <link>https://tech.snathan.org/tech/linux/build_add_raid?rev=1417783419&amp;do=diff</link>
        <description>Building an additional raid

My box already had two hard disks in raid10.  Wanted to add two more disks in a second raid.  Here is what I did.  This was on Ubuntu Trusty.

	*  Boot with Ubuntu install CD
	*  Go into recover mode
	*  Navigate until you hit the partition disk option (had to go forward and backward in the wizard to end up here!)</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/check_disk?rev=1433850221&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-06-09T11:43:41+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>check_disk</title>
        <link>https://tech.snathan.org/tech/linux/check_disk?rev=1433850221&amp;do=diff</link>
        <description>Check Linux Disk / Filesystem

The below will use e2fsck to check with the options of

	*  Use badblocks ( c )
	*  force check, even if system seems clean (f)
	*  Optimize  directories  in  filesystem (D)
	*  Automatically repair (“preen”) the file system (p)</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/check_swap?rev=1423572673&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-02-10T12:51:13+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>check_swap</title>
        <link>https://tech.snathan.org/tech/linux/check_swap?rev=1423572673&amp;do=diff</link>
        <description>Check pswpin and pswpout

Script to check pswpin and pswpout for non-zero values and log/email.


#!/bin/bash
cd /home/senthil/temp_files/pswp
TS=$(date +%Y%m%d_%H%M%S);
cat /proc/vmstat|grep pswp &gt; log/pswp_${TS}.txt
PSZ=`grep -c &quot;^pswpin 0$&quot; log/pswp_${TS}.txt`
if [ $PSZ -eq 0 ]; then
  cat log/pswp_${TS}.txt | mailx -s &quot;Non-zero pswpin&quot; system@example.org
fi</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/chmod_on_directories?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>chmod_on_directories</title>
        <link>https://tech.snathan.org/tech/linux/chmod_on_directories?rev=1416064423&amp;do=diff</link>
        <description>Use this example to chmod only directories


ls -R &lt;path to some directory&gt; |grep &quot;:$&quot;|sed &#039;s/:$//&#039;|xargs chmod g+x 
ls -R &lt;path to some directory&gt; |grep &quot;:$&quot;|sed &#039;s/:$//&#039;|xargs chmod o+x</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/commands_to_add_users_and_groups?rev=1638793719&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-12-06T12:28:39+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>commands_to_add_users_and_groups</title>
        <link>https://tech.snathan.org/tech/linux/commands_to_add_users_and_groups?rev=1638793719&amp;do=diff</link>
        <description>Linux Users and Groups Commands

Simple Example


useradd user007 -m -s /bin/bash
passwd user007
adduser user007 www-data


Adding Group

Adding group someusername with a specific gid of 5001


groupadd -g 5001 someusername


Adding User

Addding user someusername with a specific id, assign to gid 5001, etc</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/cpu_usage?rev=1608121685&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-12-16T12:28:05+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>cpu_usage</title>
        <link>https://tech.snathan.org/tech/linux/cpu_usage?rev=1608121685&amp;do=diff</link>
        <description>CPU Usage

Top Processes with CPU usage - alternative to top


ps -eo pid,ppid,cmd,%mem,%cpu --sort=-%cpu | head</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/creating_wordpress_websites_on_ub1?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>creating_wordpress_websites_on_ub1</title>
        <link>https://tech.snathan.org/tech/linux/creating_wordpress_websites_on_ub1?rev=1416064423&amp;do=diff</link>
        <description>Creating WordPress Websites

This is different from creating wordpress websites in general. Why? Because this is a single install with single database (a set of tables for each website) approach. This reduces the number of installs and locations and keeps maintenance simple across all wordpress websites. There is a different application for wordpress farm that does this - however I am making my own cup of tea here because I like it that way.</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/cron?rev=1417610213&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-12-03T12:36:53+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>cron</title>
        <link>https://tech.snathan.org/tech/linux/cron?rev=1417610213&amp;do=diff</link>
        <description>Crontab

Check all Cron

As root, to check all crontabs


#!/bin/bash
cat /etc/crontab
cat /etc/cron.d/*
cat /etc/cron.daily/*
cat /etc/cron.hourly/*
cat /etc/cron.monthly/*
cat /etc/cron.weekly/*
cat /var/spool/cron/crontabs/*</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/debian_release_upgrade?rev=1737980929&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-27T12:28:49+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>debian_release_upgrade</title>
        <link>https://tech.snathan.org/tech/linux/debian_release_upgrade?rev=1737980929&amp;do=diff</link>
        <description>Upgrading Debian to a new release

These are the steps to upgrade from Bullseye to Bookworm.


# Regenerate SSH Kyes
/bin/rm /etc/ssh/ssh_host_*
/sbin/dpkg-reconfigure openssh-server
#
# Uninstall VirtualBox Guest Additions
/opt/VBoxGuestAdditions-*/uninstall.sh
#
# Perform the upgrade
aptitude unhold linux-image-amd64
aptitude update
aptitude upgrade
aptitude full-upgrade
reboot
aptitude update
aptitude full-upgrade
cat /etc/os-release &gt; ~/before-uprade-os-release.txt
hostnamectl
#
# Release up…</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/delete_files_but_not_directories?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>delete_files_but_not_directories</title>
        <link>https://tech.snathan.org/tech/linux/delete_files_but_not_directories?rev=1416064423&amp;do=diff</link>
        <description>Command to delete files but not directories (folders)


find . -type f -exec rm {} \; -print


----------

Keyword: Unix, Linux, ubuntu</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/delete_files_using_find?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>delete_files_using_find</title>
        <link>https://tech.snathan.org/tech/linux/delete_files_using_find?rev=1416064423&amp;do=diff</link>
        <description>Deleting files with a certain extension across directories

This will delete all *.txt.gzip files

find . -name “*.txt.gz” -exec rm -rf “{}” \;</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/disk_space?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>disk_space</title>
        <link>https://tech.snathan.org/tech/linux/disk_space?rev=1416064423&amp;do=diff</link>
        <description>Get Disk Space

One liner to get total, used and available disk space


df -Pk|awk &#039;{ sum2 += $2 ; sum3 += $3 ; sum4 += $4} END { print sum2/1024/1024 &quot; G, &quot; sum3/1024/1024 &quot; G, &quot; sum4/1024/1024 &quot; G&quot;}&#039;</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/dns_validate?rev=1428579994&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-04-09T11:46:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>dns_validate</title>
        <link>https://tech.snathan.org/tech/linux/dns_validate?rev=1428579994&amp;do=diff</link>
        <description>Validate DNS with nslookup

To validate that the correct DNS entries are in the DNS

Validate script (nsvalidate)


#!/bin/bash
HOSTN=$1
HOSTI=$2
RHOST=`nslookup -type=A $HOSTN|grep Address|grep -v &quot;#53$&quot;|cut -d&quot; &quot; -f2`
if [ $HOSTI != $RHOST ]; then
  echo &quot;Mismatch: $HOSTN expected $HOSTI but returned $RHOST&quot;
fi</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/doveadm_scripting?rev=1620041278&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-05-03T11:27:58+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>doveadm_scripting</title>
        <link>https://tech.snathan.org/tech/linux/doveadm_scripting?rev=1620041278&amp;do=diff</link>
        <description>Doveadm scripting

Below is an approach to scripting automatic processing of the Inbox.  

Delete old emails

The script below is to purge emails from certain senders, and/or certain subject and after a certain number of days. The scripts are installed on</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/etc_skel?rev=1695555014&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-09-24T11:30:14+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>etc_skel</title>
        <link>https://tech.snathan.org/tech/linux/etc_skel?rev=1695555014&amp;do=diff</link>
        <description>Update /etc/skel

Set the default user parameters as follows

dot toprc

Below are the manual settings in the order of

	*  Refresh every 1 second
	*  Show individual CPUs
	*  Color
	*  Save settings permanently


s 1
1
z
SHIFT+W


Setup top to custom specifications by create a .toprc file in /etc/skel</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/failed_login?rev=1425041901&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-02-27T12:58:21+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>failed_login</title>
        <link>https://tech.snathan.org/tech/linux/failed_login?rev=1425041901&amp;do=diff</link>
        <description>Too many failed logins


cat /dev/null &gt; /var/log/faillog</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/find_command_to_ignore_svn_directories?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>find_command_to_ignore_svn_directories</title>
        <link>https://tech.snathan.org/tech/linux/find_command_to_ignore_svn_directories?rev=1416064423&amp;do=diff</link>
        <description>Ignore svn directories but list all other directories that are not empty

This one works to ignore svn directories but list all other directories that are not empty

find &lt;dome diretory path&gt; -depth -type d -empty -name .svn -prune</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/find_command?rev=1417697137&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-12-04T12:45:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>find_command</title>
        <link>https://tech.snathan.org/tech/linux/find_command?rev=1417697137&amp;do=diff</link>
        <description>find command

Common uses

Deleting old files with find command

Below is an example of deleting MySQL backups older than 7 days


BACKUPLOC=&quot;/path/to/backups&quot;
MYSQLBACKUPLOC=&quot;$BACKUPLOC/mysql&quot;
find $MYSQLBACKUPLOC/backup*.sql.gz -mtime +7 -exec rm {} \;</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/gnutls?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>gnutls</title>
        <link>https://tech.snathan.org/tech/linux/gnutls?rev=1416064423&amp;do=diff</link>
        <description>HTTPS Virtual Hosts on Ubuntu 8.04 LTS Server

Using gnutls for https virtual hosts

Resources

Extensible Development » HTTPS Virtual Hosts on Ubuntu 8.04 LTS Server

OutOfOrder.cc  mod_gnutls

NameBasedSSLVHostsWithSNI - Httpd Wiki


Steps done based on itwarlocks.com


ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.9.tar.gz
ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.4.6.tar.gz
ftp://gnutls.hellug.gr/pub/gnutls/gnutls-2.10.0.tar.bz2
http://www.outoforder.cc/downloads/mod_gnutls/m…</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/install_nagios_plugin_nrpe_redhat?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>install_nagios_plugin_nrpe_redhat</title>
        <link>https://tech.snathan.org/tech/linux/install_nagios_plugin_nrpe_redhat?rev=1416064423&amp;do=diff</link>
        <description>Install Nagios Plugin and NRPE on Redhat

Prerequisite install

	*  xinetd
	*  openssl-devel

Redhat 3rd party libraries if added to yum can let you install nrpe via yum.  However, below is an explanation of now to compile this locally.

Download and Extract files</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/mail_server_setup?rev=1697715188&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-10-19T11:33:08+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mail_server_setup</title>
        <link>https://tech.snathan.org/tech/linux/mail_server_setup?rev=1697715188&amp;do=diff</link>
        <description>Mail Server Setup

This is how I set up my mail server on

	*  Ubuntu Ubuntu 14.04.5 LTS
	*  Dovecot 2.2.9 (dovecot --version)
	*  Postfix 2.11.0 (postconf mail_version)
	*  Postfix Admin 2.3.5
	*  Squirrel Mail 1.4.22 
	*  MySQL Ver 14.14 Distrib 5.5.57 (mysql</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/memory_check?rev=1618918081&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-04-20T11:28:01+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>memory_check</title>
        <link>https://tech.snathan.org/tech/linux/memory_check?rev=1618918081&amp;do=diff</link>
        <description>Check High Memory usage and restart Apache

Script to check memory usage and take the following actions if memory is high. Uses nagios plugin to get check memory usage.

	*  Sends email to Admin
	*  Restarts Apache 
	*  Saves process list in timestamped file in /tmp directory for reference</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/memory_usage?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>memory_usage</title>
        <link>https://tech.snathan.org/tech/linux/memory_usage?rev=1416064423&amp;do=diff</link>
        <description>Find Memory Usage

System memory used and free

Total Used and Free Memory in MBytes (in that order)


free -m|grep &quot;buffers/cache&quot;|cut -d&quot;:&quot; -f2


Memory by Process

Raw


ps -e -orss=,args= | sort -b -k1,1n | pr -TW$COLUMNS


Human readable


ps -e -orss=,args= | sort -b -k1,1n | awk &#039;{ split( &quot;KB MB GB&quot; , v ); s=1; while( $1&gt;1024 ){ $1/=1024; s++ } print int($1) &quot; &quot; v[s] &quot; &quot; $2 }&#039;</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/mime?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mime</title>
        <link>https://tech.snathan.org/tech/linux/mime?rev=1416064423&amp;do=diff</link>
        <description>MIME Information

Resources

Using PEAR&#039;s mimeDecode module  evolt.org

Using PEAR (Ubuntu)

PHP MIME Decoder class

MIME-tools - search.cpan.org

PEAR path issue on Ubuntu


Using PHP PEAR

Manual  generation and sending of a MIME mail

Manual  perform decoding

Mail_mimeDecode - Example

seeking optimal way to parse an email sent to my PHP script via PIPE  php, email, parse

Processing an email with attachment(s) using PHP and PEAR Mail class</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/most_common_packages_v2?rev=1592825248&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-06-22T11:27:28+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>most_common_packages_v2</title>
        <link>https://tech.snathan.org/tech/linux/most_common_packages_v2?rev=1592825248&amp;do=diff</link>
        <description>Most Common Packages (v2)

Below is the list of most common packages that are usually required by a Linux/Ubuntu server and is best to install it right away.

Use aptitude command line option

aptitude -y install &lt;package_name&gt;

	*  mailutils
	*  apache2-utils</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/most_common_packages?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>most_common_packages</title>
        <link>https://tech.snathan.org/tech/linux/most_common_packages?rev=1416064423&amp;do=diff</link>
        <description>Most Common Packages

Below is the list of most common packages that are usually required by a Linux/Ubuntu server and is best to install it right away.

Use aptitude command line option

aptitude -y install &lt;package_name&gt;

	*  apache2-utils
	*  backuppc</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/mount_samba_linux_share?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mount_samba_linux_share</title>
        <link>https://tech.snathan.org/tech/linux/mount_samba_linux_share?rev=1416064423&amp;do=diff</link>
        <description>Mounting Linux (Ubuntu) Shares in Windows (7)

Allowing a directory in Linux to be accessible in Windows. Let&#039;s assume the Linux box is called ulin1

Initial steps

	*  First choose the Linux Directory to mount. In this case it is /xyvol/
	*  Change the file permissions on this volume to be 770 and group to be root:&lt;your user id&gt;</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/mount_samba_windows_share?rev=1420203418&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-01-02T12:56:58+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mount_samba_windows_share</title>
        <link>https://tech.snathan.org/tech/linux/mount_samba_windows_share?rev=1420203418&amp;do=diff</link>
        <description>Mounting Windows Shares in Linux (Ubuntu)

List what fstab has for reference later


# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use &#039;blkid -o value -s UUID&#039; to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# &lt;file system&gt; &lt;mount point&gt;   &lt;type&gt;  &lt;options&gt;       &lt;dump&gt;  &lt;pass&gt;
proc            /proc           proc    nodev,noexec,nosui…</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/nagios_nrpe_redhat?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>nagios_nrpe_redhat</title>
        <link>https://tech.snathan.org/tech/linux/nagios_nrpe_redhat?rev=1416064423&amp;do=diff</link>
        <description>Steps to Install Nagios Remote Plug-ins Execution (NRPE) daemon

The Monitored (target) host was running Redhat and the Monitoring (source) host was running Ubuntu.

Install (Target)

	*  yum -y install nagios-nrpe.x86_64

Configure (Target)

	*  Edit /etc/nagios/nrpe.cfg</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/new_disk?rev=1449318477&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-12-05T12:27:57+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>new_disk</title>
        <link>https://tech.snathan.org/tech/linux/new_disk?rev=1449318477&amp;do=diff</link>
        <description>Add New Disk in Linux

Check Disk is installed


fdisk -l|grep Disk


Partition Disk

Assuming new disk is sdc


fdisk /dev/sdc


Commands


p - to print the partition table
n - to create new
w - to write


Make file system

Assume you created a single partition on sdc1</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/new_network_card?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>new_network_card</title>
        <link>https://tech.snathan.org/tech/linux/new_network_card?rev=1416064423&amp;do=diff</link>
        <description>Installing/Configuring New Network Adapter

Linux (unlike Windows) has all of it&#039;s hardware adapters on the Kernel.  When new hardware is installed it should show up in the lshw command.  In this case if this is a new network card connected to PCI-E slot, it should show up under PCI-E.</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/new_server?rev=1466594927&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2016-06-22T11:28:47+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>new_server</title>
        <link>https://tech.snathan.org/tech/linux/new_server?rev=1466594927&amp;do=diff</link>
        <description>Things to setup on a New (Ubuntu/Linux) server

	*  Mail
		*  Setup postfix
		*  Setup alias such that local mail gets forwarded (/etc/aliases)

	*  SSH
		*  Generate SSH private and public keys

	*  Tuning
		*  Change swapiness and other parameters based on server needs -</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/nice?rev=1449318477&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-12-05T12:27:57+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>nice</title>
        <link>https://tech.snathan.org/tech/linux/nice?rev=1449318477&amp;do=diff</link>
        <description>CPU Priority

Nice is used to set CPU priority.  

Niceness runs from

	*  -20, the highest priority, lowest niceness, to 
	*  19, the lowest priority, highest niceness and
	*  Zero is the default

Yes, this is a bit counter-intuitive.

To reduce to</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/php_ini?rev=1648466929&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-03-28T11:28:49+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>php_ini</title>
        <link>https://tech.snathan.org/tech/linux/php_ini?rev=1648466929&amp;do=diff</link>
        <description>Recommended php.ini Settings

The default php.ini settings are quite narrow.  Considering today&#039;s server&#039;s memory, CPU, storage, etc, the first thing in a default install is to improve upon these.  None of these should affect existing application, especially if you are increasing the resources (which is the case here)</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/php_server?rev=1606739276&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-11-30T12:27:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>php_server</title>
        <link>https://tech.snathan.org/tech/linux/php_server?rev=1606739276&amp;do=diff</link>
        <description>PHP Server Variables


&lt;?php
print_r($_SERVER);
?&gt;</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/ping_test?rev=1457008113&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2016-03-03T12:28:33+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ping_test</title>
        <link>https://tech.snathan.org/tech/linux/ping_test?rev=1457008113&amp;do=diff</link>
        <description>Ping / TCP Ping Test

Script to check for ping or TCP in a loop and email a limited number of times an error occurs


#!/bin/bash
#
TIMEOUT=2
PORT=443
MAXEMAILS=40
IP=xxx.xxx.xxx.xxx
EMAIL=someone@example.com
SUBJECT=ping_test
#
errcnt=0
while true; do
  /usr/lib/nagios/plugins/check_tcp -H $IP -p $PORT -t $TIMEOUT
  if [ $? -ne 0 ]
         then
         (( errcnt += 1 ))
         if [ $errcnt -lt $MAXEMAILS ]
           then
           echo &quot;Error Count: $errcnt&quot;|mailx -s $SUBJECT $EMAIL
     …</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/pnp4nagios_averages?rev=1483532742&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-01-04T12:25:42+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>pnp4nagios_averages</title>
        <link>https://tech.snathan.org/tech/linux/pnp4nagios_averages?rev=1483532742&amp;do=diff</link>
        <description>pnp4nagios extracting averages

Extract average for previous month for given server, metric


#!/bin/bash
HN=$1
DB=$2
CF=$3
if [ &quot;$DB&quot; = &quot;&quot; ]; then
    DB=&quot;Memory_Usage&quot;
fi
rrd1=&quot;${DB}.rrd&quot;
if [ &quot;$CF&quot; = &quot;&quot; ]; then
    CF=&quot;AVERAGE&quot;
fi
PERFDATA_DIR=/var/lib/pnp4nagios/perfdata
cd $PERFDATA_DIR
#
stime=$(date -d &quot;`date +%Y%m01` -1 month&quot; +%s)
etime=$(date -d &quot;`date +%Y%m01`&quot; +%s)
rrdtool fetch $PERFDATA_DIR/$HN/${DB}.rrd $CF -s $stime -e $etime | \
  grep -v nan | \
  awk &#039;{sum+=$2; ++n} END {avg=s…</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/pnp4nagios_graphs?rev=1483532742&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-01-04T12:25:42+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>pnp4nagios_graphs</title>
        <link>https://tech.snathan.org/tech/linux/pnp4nagios_graphs?rev=1483532742&amp;do=diff</link>
        <description>pnp4nagios extracting graphs

Bash script to extract graphs for previous month


#!/bin/bash
#
WDIR=/path/to/script
OUTDIR=$WDIR/output/monthly_graphs
mkdir -p $OUTDIR
INPFILE=$WDIR/month_graphs.txt
GRZIP=$WDIR/month_graphs.zip
#
# 1st day of last month
stime=$(date -d &quot;`date +%Y%m01` -1 month&quot; +%s)
# 1st day of this month
etime=$(date -d &quot;`date +%Y%m01`&quot; +%s)
#
while read HN DB; do
  GURL=&quot;http://localhost/pnp4nagios/image?host=${HN}&amp;srv=${DB}&amp;view=1&amp;start=${stime}&amp;end=${etime}&quot;
  PNGF=&quot;$OUTDIR…</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/pnp4nagios?rev=1544099275&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-12-06T12:27:55+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>pnp4nagios</title>
        <link>https://tech.snathan.org/tech/linux/pnp4nagios?rev=1544099275&amp;do=diff</link>
        <description>Setting up pnp4nagios on Ubuntu 12.04 LTS Precise Pangolin

Prerequisites

nagios3 is installed.

Install


aptitude install pnp4nagios


Configuring Bulk Mode with NPCD

nagios.cfg

In /etc/nagios3/nagios.cfg, update process_performance_data=1.  Use the sed command or just edit the file!</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/postfix_autoresponder?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>postfix_autoresponder</title>
        <link>https://tech.snathan.org/tech/linux/postfix_autoresponder?rev=1416064423&amp;do=diff</link>
        <description>Resources

&lt;http://nefaria.com/project_index/autoresponse/&gt;

&lt;http://www.howtoforge.com/how-to-set-up-a-postfix-autoresponder-with-autoresponse&gt;</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/postfix_client_tls?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>postfix_client_tls</title>
        <link>https://tech.snathan.org/tech/linux/postfix_client_tls?rev=1416064423&amp;do=diff</link>
        <description>Postfix Client TLS Support

Resource

&lt;http://www.postfix.org/TLS_README.html#client_tls&gt;

Instructions

Generating SSL Key

Run the following commands: 



cd /etc/postfix
mkdir ssl
cd ssl
openssl genrsa -rand /etc/passwd:/etc/resolv.conf 2048 &gt; smtpd.key
chmod 400 smtpd.key
openssl req -new -key smtpd.key &gt; smtpd.csr
#  Enter the certificate information.
#  The &quot;common name&quot; is the mail server DNS name.</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/postfix_important_settings?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>postfix_important_settings</title>
        <link>https://tech.snathan.org/tech/linux/postfix_important_settings?rev=1416064423&amp;do=diff</link>
        <description>Important Postfix Settings

When using as SMTP relay for other servers on LAN

Make sure to set inet_interfaces = all

Sometimes this is set to localhost and will not allow relays

Make sure to set mynetworks = 127.0.0.0/8 192.168.0/28

So the Local</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/postfix_relay_on_recipient_domain?rev=1420807671&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-01-09T12:47:51+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>postfix_relay_on_recipient_domain</title>
        <link>https://tech.snathan.org/tech/linux/postfix_relay_on_recipient_domain?rev=1420807671&amp;do=diff</link>
        <description>Choose relay based on recipient domain

To choose an SMTP relay server based on the recipient domain.  

/etc/postfix/main.cf


#relayhost =
#Remove any relayhost entry
smtp_sender_dependent_authentication = yes
transport_maps = hash:/etc/postfix/transport</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/postfix_report?rev=1417697137&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-12-04T12:45:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>postfix_report</title>
        <link>https://tech.snathan.org/tech/linux/postfix_report?rev=1417697137&amp;do=diff</link>
        <description>Setting up daily mail reporting using pflogsumm

pflogsumm is a perl script used for postfix mail reporting.

Setup

	*  Create directory /var/log/postfixrep
	*  Copy pflogsumm into directory /usr/local/bin/pflogsumm
	*  Create file /etc/cron.daily as below - change hard-coded email</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/postfix_spam_control?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>postfix_spam_control</title>
        <link>https://tech.snathan.org/tech/linux/postfix_spam_control?rev=1416064423&amp;do=diff</link>
        <description>Resources to control spam using postfix

	*  Text file of postfix configuration to reduce spam
	*  &lt;http://en.linuxreviews.org/HOWTO_Stop_spam_using_Postfix&gt;
	*  &lt;http://www.howtoforge.com/block_spam_at_mta_level_postfix&gt;
	*  &lt;http://www.akadia.com/services/postfix_uce.html&gt;
	*  Postfix configuration: reject_rbl_client
	*  &lt;http://www.yolinux.com/TUTORIALS/Postfix.html&gt;
	*  Postfix Configuration Parameters
	*  HowTos-postfix restrictions - CentOS Wiki
	*  Slamming Spam: A Guide for System Admini…</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/postfixadmin?rev=1757676350&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-09-12T11:25:50+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>postfixadmin</title>
        <link>https://tech.snathan.org/tech/linux/postfixadmin?rev=1757676350&amp;do=diff</link>
        <description>Postfix Admin

Install and Configure

	*  Create web domain (or sub-domain)
	*  Download stable release (not latest)
	*  Extract files to domain root directory
	*  Create database and user
	*  Update Apache configuration to point to public directory</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/purge_linux_images?rev=1471433162&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2016-08-17T11:26:02+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>purge_linux_images</title>
        <link>https://tech.snathan.org/tech/linux/purge_linux_images?rev=1471433162&amp;do=diff</link>
        <description>Purge Old Linux Headers/Images with aptitude

If there is limited space on /boot, this becomes a necessity.  Identify what packages are installed and what is current with the following commands:


dpkg -l linux-image-\* | grep ^ii
uname -a


Sample output</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/redhat_epel?rev=1425988275&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-03-10T11:51:15+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>redhat_epel</title>
        <link>https://tech.snathan.org/tech/linux/redhat_epel?rev=1425988275&amp;do=diff</link>
        <description>How to Enable EPEL Repository for RHEL

Resources

	*  How to Enable EPEL Repository for RHEL/CentOS 7.x/6.x/5.x
	*  EPEL - FedoraProject
	*  Index of /pub/epel/6Server/x86_64
	*  CentOS / RHEL: Delete Old Yum Repositories and Configuration Files

Steps


wget https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6   
wget http://mirror.us.leaseweb.net/epel/6/i386/epel-release-6-8.noarch.rpm
cp RPM-GPG-KEY-EPEL-6 /etc/pki/rpm-gpg/
rpm -ivh epel-release-6-8.noarch.rpm
yum repolist</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/resize_partition?rev=1739190557&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-02-10T12:29:17+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>resize_partition</title>
        <link>https://tech.snathan.org/tech/linux/resize_partition?rev=1739190557&amp;do=diff</link>
        <description>Resize Partition (with preserving data)

Steps to resizing partition without losing data


PARTNUM=1
MPNAME=/dev/sda
#
MPNAME1=${MPNAME}${PARTNUM}
#
# Unmount partition
umount $MPNAME1
# Check file system
fsck -n $MPNAME1
#
fdisk -l $MPNAME1
fdisk $MPNAME
# Inside fdisk, do the below
# p - print partition table
# d - delete said partition
# n - create new partition
# w - to write changes back
#
# Check file system
e2fsck -f $MPNAME1
# To resize to full partition size
resize2fs $MPNAME1
# Get siz…</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/reverse_tunnel?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reverse_tunnel</title>
        <link>https://tech.snathan.org/tech/linux/reverse_tunnel?rev=1416064423&amp;do=diff</link>
        <description>Creating a reverse tunnel – Use for creating your own VPN to a network behind firewall with no incoming ports open

Setup for the SSH server that is connected to the internet (this is the server in the Home Network)

	*  Establish a SSH server that is always ON.</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/rotate_logs?rev=1438602391&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-08-03T11:46:31+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>rotate_logs</title>
        <link>https://tech.snathan.org/tech/linux/rotate_logs?rev=1438602391&amp;do=diff</link>
        <description>Log Rotation script

Short of using logrotate, below is a quick and simple script to do the same.

Script

Example of haproxy log rotation


#!/bin/bash
#
LOGDIR=/var/log
LOGFILE=haproxy.log
TARDIR=/data/log
#
LOGDIRFILE=${LOGDIR}/${LOGFILE}
cp $LOGDIRFILE ${TARDIR}/${LOGFILE}.`date +%Y%m%d_%H%M%S`
cat /dev/null &gt; $LOGDIRFILE
exit</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/screen?rev=1765023984&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-12-06T12:26:24+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>screen</title>
        <link>https://tech.snathan.org/tech/linux/screen?rev=1765023984&amp;do=diff</link>
        <description>Screen Usage

Practical screen usage notes

Screen Commands

List of more important screen commands to effectively operate screen

When NOT in screen
  Command  Description screen -D  Power Detach - Close everything but keep the screens running in background. This is when you are done working!</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/scripted_email?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>scripted_email</title>
        <link>https://tech.snathan.org/tech/linux/scripted_email?rev=1416064423&amp;do=diff</link>
        <description>Scripted Email

Used to send email to list of people from flat file.  Usually when sending from server you want the reply-to set correctly so the replies go to a proper email account.

Input File

The input file is cre.txt and has the following format</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/setup_network_groovy?rev=1601378863&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-09-29T11:27:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>setup_network_groovy</title>
        <link>https://tech.snathan.org/tech/linux/setup_network_groovy?rev=1601378863&amp;do=diff</link>
        <description>Network Settings on Ubuntu Focus

Location: /etc/netplan/00-installer-config.yaml


# This is the network config written by &#039;subiquity&#039;
network:
  ethernets:
    enp0s3:
      addresses:
      - 192.168.1.60/24
      gateway4: 192.168.1.1
      nameservers:
        addresses:
        - 192.168.1.39
        - 192.168.1.1
        search:
        - example.org
    enp0s8:
      addresses:
      - 192.168.56.60/24
      gateway4: 192.168.56.1
      nameservers: {}
  version: 2</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/setup_new_box?rev=1676205007&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-02-12T12:30:07+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>setup_new_box</title>
        <link>https://tech.snathan.org/tech/linux/setup_new_box?rev=1676205007&amp;do=diff</link>
        <description>Setting up a new Linux box

This page goes through the various settings that take place to setup a new Ubuntu box. In this case I was setting Ubuntu 12.04 Precise Pangolin.

Install Configuration / Steps

	*  Hardware details
		*  AMD 3 core CPU
		*</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/setup_new_vm?rev=1769084781&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2026-01-22T12:26:21+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>setup_new_vm</title>
        <link>https://tech.snathan.org/tech/linux/setup_new_vm?rev=1769084781&amp;do=diff</link>
        <description>Setting up a new Linux VM

This is similar to Setup New Liux (Physical) Box

This page goes through the various settings that take place to setup a new Ubuntu VM. In this case I was setting Ubuntu 20.10 Groovy Gorilla.

Debian / Bookworm

Specific steps for Debian/Bookworm

Add non-free repositories</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/setup_postfix_relay?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>setup_postfix_relay</title>
        <link>https://tech.snathan.org/tech/linux/setup_postfix_relay?rev=1416064423&amp;do=diff</link>
        <description>Setup Postfix to function as relay host

Setup Postfix to function as relay host with authentication

	*  Create a password maps file
	*  You can create multiple entries in the sasl_passwd file for multiple domains


echo &quot;mailserver.example.com username:password&quot; &gt;&gt; /etc/postfix/sasl_passwd
chown root:root /etc/postfix/sasl_passwd
chmod 600 /etc/postfix/sasl_passwd
postmap /etc/postfix/sasl_passwd</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/sound_recording_in_linux?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sound_recording_in_linux</title>
        <link>https://tech.snathan.org/tech/linux/sound_recording_in_linux?rev=1416064423&amp;do=diff</link>
        <description>Sound Recording in Linux

GUI - gnome sound recorder

Application --&gt; Sound &amp; Video --&gt; Sound Recorder

Command line sound recorder

To record in stereo (option -c 2), wav format (option -t), for 10 seconds (option -d) to file ed.wav


arecord -d 10 -t wav -c 2 ed.wav</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/sq_config?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sq_config</title>
        <link>https://tech.snathan.org/tech/linux/sq_config?rev=1416064423&amp;do=diff</link>
        <description>Squirrel Mail Config - Postfix &amp; Dovecot

Below is the full configuration file (config.php) for Squirrel Mail with Postfix and Dovecot.

Make sure

	*  $data_dir                 = &#039;/var/squirrelmail/data/&#039;;
	*  $attachment_dir           = &#039;/var/squirrelmail/attach/&#039;;</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/squirrelmail?rev=1562498715&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-07-07T11:25:15+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>squirrelmail</title>
        <link>https://tech.snathan.org/tech/linux/squirrelmail?rev=1562498715&amp;do=diff</link>
        <description>Squirrelmail Notes

Squirrelmail back-end login

The 1st invocation of Squirrelmail is slow for reasons I could not figure out.  Also I have a number of filters setup on Squirrelmail that I want it to execute periodically - this allows my other IMAP clients to already have the mail in the correct folders.  Setup this cronjob to take care of this.</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/ssh_filesystem?rev=1425988275&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-03-10T11:51:15+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ssh_filesystem</title>
        <link>https://tech.snathan.org/tech/linux/ssh_filesystem?rev=1425988275&amp;do=diff</link>
        <description>SSH Filesystem

SSH Filesystem is a tool you would wonder why no one ever told you about.  Instead of battling with Samba share or NFS, here is an easy solution that uses traditional SSH!

You do need to install sshfs, but that is only a few seconds.</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/start_stop_script?rev=1426074407&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-03-11T11:46:47+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>start_stop_script</title>
        <link>https://tech.snathan.org/tech/linux/start_stop_script?rev=1426074407&amp;do=diff</link>
        <description>Script to start/stop jobs

Startup scripts samples.

Start

THIS DOES NOT QUITE WORK!  The job starts but the pid is not the real pid!  So the stop is also bad because of this.


#!/bin/bash
RUN_FILE=/var/run/somejob.pid
nohup some-job &gt; /dev/null 2&gt;&amp;1 &amp;
echo $! &gt;&gt; $RUN_FILE
exit</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/starting_and_stopping_services_in_ubuntu_linux?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>starting_and_stopping_services_in_ubuntu_linux</title>
        <link>https://tech.snathan.org/tech/linux/starting_and_stopping_services_in_ubuntu_linux?rev=1416064423&amp;do=diff</link>
        <description>Starting and Stopping Services in Ubuntu Linux

sysv-rc-conf

sysv-rc-conf is a great tool for the job

Example: The following services were disabled using the tool


â service      1       2       3       4       5       0       6       S      â
â ----------------------------------------------------------------------------â
â db2exc      [ ]     [X]     [X]     [X]     [X]     [ ]     [ ]     [ ]     â
â clamav-da$  [ ]     [X]     [X]     [X]     [X]     [ ]     [ ]     [ ]     â
â clamav-fr$ …</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/startup_run?rev=1426074407&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-03-11T11:46:47+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>startup_run</title>
        <link>https://tech.snathan.org/tech/linux/startup_run?rev=1426074407&amp;do=diff</link>
        <description>Run command on startup

This was tested on Redhat

Append the below line to /etc/rc.local


/sbin/runuser -s /bin/sh -l nobody -c &#039;/etc/haproxy/start-hap&#039;


where

	*  s - run in shell
	*  l - run as user
	*  c - command to run</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/startup_script_for_shellinabox?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>startup_script_for_shellinabox</title>
        <link>https://tech.snathan.org/tech/linux/startup_script_for_shellinabox?rev=1416064423&amp;do=diff</link>
        <description>Start up script for Shell in a Box

This is running on Ubuntu 12.04


#!/bin/sh
# Start/stop the shellinaboxd daemon.
#
### BEGIN INIT INFO
# Provides:          shellinaboxd
# Required-Start:    $syslog $time
# Required-Stop:     $syslog $time
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Shell in web browser
# Description:       Shell In A Box implements a web server that can export arbitrary 
#                    command line tools to a web based terminal emulato…</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/stop_services?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>stop_services</title>
        <link>https://tech.snathan.org/tech/linux/stop_services?rev=1416064423&amp;do=diff</link>
        <description>Stop Services on Ubuntu

Below is the list of services that will pretty much bring the server to idle and do nothing.


/etc/init.d/anacron stop
/etc/init.d/cron stop
/etc/init.d/apache2 stop
/etc/init.d/mysql stop
/etc/init.d/postfix stop
/etc/init.d/courier-authdaemon stop
/etc/init.d/courier-imap stop
/etc/init.d/courier-imap-ssl stop
/etc/init.d/dovecot stop
/etc/init.d/privoxy stop
/etc/init.d/rsync stop
/etc/init.d/shellinaboxd stop</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/sudo_without_password?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sudo_without_password</title>
        <link>https://tech.snathan.org/tech/linux/sudo_without_password?rev=1416064423&amp;do=diff</link>
        <description>sudo without password

Enable /etc/sudoers file for editing


chmod 640 /etc/sudoers


To enable edit /etc/sudoers as:


26c26
&lt; %sudo ALL=(ALL:ALL) NOPASSWD: ALL
---
&gt; %sudo ALL=(ALL:ALL) ALL


----------

Keyword: visudo</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/sysctl_config?rev=1466594927&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2016-06-22T11:28:47+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>sysctl_config</title>
        <link>https://tech.snathan.org/tech/linux/sysctl_config?rev=1466594927&amp;do=diff</link>
        <description>Settings for /etc/sysctl.conf

For VM Host


vm.swappiness = 0
vm.overcommit_memory = 2
vm.overcommit_ratio = 50</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/throttle_process?rev=1429702967&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-04-22T11:42:47+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>throttle_process</title>
        <link>https://tech.snathan.org/tech/linux/throttle_process?rev=1429702967&amp;do=diff</link>
        <description>Throttle background processes

Example to throttle the number of unzips running when a large number of files need to be unzipped


#!/bin/sh
cd /data/somefolder/rzips
TARD=/data/somefolder/anotherfolder
LOGF=/data/somefolder/unziplog
COUNTER=0
for z in *.zip; do
  LOGFILE=$LOGF/${z}.log
  CNTUNZIP=`ps -ef|grep -c unzip`
  while [ $CNTUNZIP -gt 51 ]; do
    sleep 1
    CNTUNZIP=`ps -ef|grep -c unzip`
  done
  let COUNTER=COUNTER+1
  echo &quot;#: $COUNTER - Unzipping $z&quot;
  nohup unzip $z -x LOG* -d $T…</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/ufw?rev=1735734653&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-01-01T12:30:53+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ufw</title>
        <link>https://tech.snathan.org/tech/linux/ufw?rev=1735734653&amp;do=diff</link>
        <description>UFW - Uncomplicated Firewall

Setup of UFW on Precise Pangolin LTS 12.04 (Ubuntu)

Steps

The steps below will make the firewall active, but almost non-existent.  This is a better way to start in my opinion especially for a soft firewall. My router takes care of the hard firewall and only ports that need to be open or open, so it begs to setup another filter here.  So (at least for me) the sole purpose of this firewall is to block specific (also read dynamic) incoming (or may be even outgoing) t…</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/upgrade_to_lucid?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>upgrade_to_lucid</title>
        <link>https://tech.snathan.org/tech/linux/upgrade_to_lucid?rev=1416064423&amp;do=diff</link>
        <description>Upgrading to Lucid

&lt;https://help.ubuntu.com/community/LucidUpgrades&gt;</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/upgrading_wordpress_sites?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>upgrading_wordpress_sites</title>
        <link>https://tech.snathan.org/tech/linux/upgrading_wordpress_sites?rev=1416064423&amp;do=diff</link>
        <description>Upgrading WordPress websites

This is slightly different from the standard instructions although most of the standard instructions will apply. It is different because

	*  The way I have installed WordPress is to enable it from a single install path for all websites</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/useful_network_tools?rev=1572434864&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-10-30T11:27:44+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>useful_network_tools</title>
        <link>https://tech.snathan.org/tech/linux/useful_network_tools?rev=1572434864&amp;do=diff</link>
        <description>Commonly Used Network Commands / Tools

Define DNS Servers

Add/update DNS Server configurations in /etc/resolv.conf in the format nameserver &lt;IP-Address&gt;, one for each line.  The /etc/resolve.conf file does get overwritten each time the system is rebooted.  In Ububtu the /etc/resolvconf/resolv.conf.d/head is the source file and updating it keeps the changes permanent.  In distros (such as Redhat) you can make the /etc/resolv.conf file read-only by</description>
    </item>
    <item rdf:about="https://tech.snathan.org/tech/linux/webalizer?rev=1416064423&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-11-15T15:13:43+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>webalizer</title>
        <link>https://tech.snathan.org/tech/linux/webalizer?rev=1416064423&amp;do=diff</link>
        <description>webalizer info

Dependent packages


aptitude install libpng3-dev libgd2-xpm-dev</description>
    </item>
</rdf:RDF>
