<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux &#8211; Andromedabay Store</title>
	<atom:link href="https://andromedabay.ddns.net/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://andromedabay.ddns.net</link>
	<description>Your source of Technical Insight and Interesting Stuff</description>
	<lastBuildDate>Thu, 13 Jul 2023 23:01:22 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.5</generator>

<image>
	<url>https://andromedabay.ddns.net/wp-content/uploads/2015/08/cropped-myicon-32x32.png</url>
	<title>Linux &#8211; Andromedabay Store</title>
	<link>https://andromedabay.ddns.net</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Kernel Build, Module/Driver Programming &#038; Kernel Headers &#8211; Debian Linux</title>
		<link>https://andromedabay.ddns.net/kernel-build-simple-module-driver-programming-kernel-headers-debian-linux/</link>
					<comments>https://andromedabay.ddns.net/kernel-build-simple-module-driver-programming-kernel-headers-debian-linux/#respond</comments>
		
		<dc:creator><![CDATA[Hammad Rauf]]></dc:creator>
		<pubDate>Tue, 17 Jan 2023 02:00:08 +0000</pubDate>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[Kernel]]></category>
		<category><![CDATA[Kernel-Build]]></category>
		<category><![CDATA[Kernel-Headers]]></category>
		<category><![CDATA[Linux-Mint]]></category>
		<category><![CDATA[LMDE]]></category>
		<category><![CDATA[Module]]></category>
		<category><![CDATA[Module-Programming]]></category>
		<guid isPermaLink="false">https://andromedabay.ddns.net/?p=1260</guid>

					<description><![CDATA[I wanted to obtain the Source Code for Linux Kernel for my Debian installation, and build it just for the sake of curiosity. I will]]></description>
										<content:encoded><![CDATA[<div class='booster-block booster-read-block'>
                <div class="twp-read-time">
                	<i class="booster-icon twp-clock"></i> <span>Read Time:</span>7 Minute, 56 Second                </div>

            </div><p>I wanted to obtain the Source Code for Linux Kernel for my Debian installation, and build it just for the sake of curiosity. I will document here the steps I used for Kernel sources download, and build. I also explored writing a simple Module and loading/unloading it in the installed and running Kernel. You may wish to read <a title="Install Debian Linux on x86/AMD64 Computer with Latest Kernel" href="https://andromedabay.ddns.net/install-debian-linux-on-x86-amd64-computer/" target="_blank" rel="noopener">my older post</a> about how to install the Linux Mint Debian Edition (LMDE) with the latest Kernel binary image, before continuing.</p>
<h2><span style="text-decoration: underline;">Contents</span></h2>
<ul>
<li><a href="#debian-kernel-build">Debian Kernel Build</a></li>
<li><a href="#writing-simple-module">Writing a Simple Module</a></li>
<li><a href="#install-kernel-headers">Install Kernel Headers</a></li>
<li><a href="#further-reading">Further Reading</a></li>
</ul>
<h2 id="debian-kernel-build"><span style="text-decoration: underline;">Debian Kernel Build</span></h2>
<h4>Sub-Contents</h4>
<ul>
<li>What is Kernel?</li>
<li>What is Make?</li>
<li>Download Sources for Kernel and Configure for Build</li>
<li>Start the Build</li>
</ul>
<h4>What is Kernel?</h4>
<p>Kernel is the core system software in a Linux Operating System. It is responsible for managing system resources, such as memory and CPU allocation, and providing a bridge between application software and hardware. The kernel also provides services to user-space programs, such as system calls, and acts as an abstraction layer between the computer&#8217;s hardware and the software that runs on it. Linux Kernel is open source software, meaning that its Source Code is available publicly and can be easily downloaded, modified and compiled by anyone. It is mostly written in C/C++ programming languages.</p>
<h4>What is Make?</h4>
<p>The &#8220;make&#8221; tool is a program that is commonly used by C/C++ programmers to automate the process of building and compiling software. It uses a &#8220;makefile&#8221; (a simple text file containing a set of rules) to determine how to build the software. The &#8220;makefile&#8221; specifies how source code files are to be transformed into executable programs, and describes the dependencies between the source code files. When you run the &#8220;make&#8221; command, it reads the &#8220;makefile&#8221; and automatically builds the software in the correct order, using the appropriate commands to compile and link the source code files. This can save a lot of time and effort, as the &#8220;makefile&#8221; can be set up to automatically handle tasks such as dependency checking, parallel builds and it can also handle cross-compilation.<br />
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2435427972424429"
     crossorigin="anonymous"></script><br />
<ins class="adsbygoogle"
     style="display:block; text-align:center;"
     data-ad-layout="in-article"
     data-ad-format="fluid"
     data-ad-client="ca-pub-2435427972424429"
     data-ad-slot="3797637297"></ins><br />
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script></p>
<h4>Download Sources for Kernel and Configure for Build</h4>
<p>You will need to enable the sources repositories for LMDE Linux, so that it can locate the source code files for your version of the Kernel.</p>
<p>To enable the LMDE Installation to search for source code do the following:</p>
<p>OS Key (Or Start Menu) &#8211;&gt; Software Sources &#8211;&gt; Official Repositories &#8211;&gt; Enable (Source Code Repositories, Debug Symbols). {Screen Shot}</p>
<figure id="attachment_1283" aria-describedby="caption-attachment-1283" style="width: 931px" class="wp-caption aligncenter"><img fetchpriority="high" decoding="async" class="wp-image-1283 size-full" src="https://andromedabay.ddns.net/wp-content/uploads/2023/01/LMDE-SoftwareSources-Source-code-repositories.png" alt="LMDE - Dialog Box for Software-Sources - Code Repositories enabled" width="931" height="534" srcset="https://andromedabay.ddns.net/wp-content/uploads/2023/01/LMDE-SoftwareSources-Source-code-repositories.png 931w, https://andromedabay.ddns.net/wp-content/uploads/2023/01/LMDE-SoftwareSources-Source-code-repositories-600x344.png 600w, https://andromedabay.ddns.net/wp-content/uploads/2023/01/LMDE-SoftwareSources-Source-code-repositories-300x172.png 300w, https://andromedabay.ddns.net/wp-content/uploads/2023/01/LMDE-SoftwareSources-Source-code-repositories-768x441.png 768w" sizes="(max-width: 931px) 100vw, 931px" /><figcaption id="caption-attachment-1283" class="wp-caption-text">LMDE &#8211; Dialog Box for Software-Sources &#8211; Code Repositories enabled</figcaption></figure>
<p>Use the following sequence of commands to download Debian Linux source code</p>
<pre class="EnlighterJSRAW" data-enlighter-language="bash">cd ~/Downloads
sudo apt-get install build-essential fakeroot rsync git
sudo apt-get build-dep linux
apt-get source linux
cd linux-version
# OR
cd linux-6.0.12</pre>
<h4>Start the Build</h4>
<p>Use the following commands to start the Build process. Once started it can take several hours to compile the Kernel.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="bash">cd ~/Downloads/linux-version
## OR
cd ~/Downloads/linux-6.0.12

debian/rules orig
debian/rules debian/control


## Make Changes in Loaded Modules, etc. OR Just examine only....
make menuconfig
# OR
# make all
# make nconfig
# make xconfig, etc.

## NOW COMPILE
fakeroot debian/rules binary

</pre>
<h2 id="writing-simple-module"><span style="text-decoration: underline;">Writing a Simple Module</span></h2>
<h4>Sub-Contents</h4>
<ul>
<li>What is a Module?</li>
<li>Sample Hello Message Module Code</li>
<li>Compile Module</li>
<li>Load and Unload Module</li>
</ul>
<h4>What is a Module?</h4>
<p>In Linux kernel, a module is a piece of code that can be loaded and unloaded into the kernel at runtime. This allows the kernel to be extended and modified without having to be completely rebuilt. Modules are typically used to add support for new hardware devices or to provide new kernel functionality.</p>
<p>Each module has its own set of functions and data structures that can be accessed by other parts of the kernel. When a module is loaded, it is given a unique identifier and added to a list of currently loaded modules. Once a module is loaded, it can be used by other parts of the kernel and can also register itself to be notified of certain events or to receive certain data.</p>
<p>Modules can be loaded and unloaded using the &#8220;insmod&#8221; and &#8220;rmmod&#8221; commands, respectively. The kernel also provide a feature called &#8220;Kernel Probes&#8221; which allows for dynamic instrumentation of the kernel, and can be used for tracing, debugging and performance analysis.</p>
<p>The module also have their own versioning, dependencies and license information, which can be queried using the &#8220;modinfo&#8221; command.</p>
<h4>Sample Hello Message Module Source Code</h4>
<p>The following C source code defines a simple &#8220;Hello World!&#8221; type basic module, that is actually doing nothing more than demonstrating how modules can be compiled and loaded in Linux kernel.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="cpp">// Save as filename: hello.c

#include &lt;linux/init.h&gt;
#include &lt;linux/module.h&gt;

// Module metadata
MODULE_AUTHOR("Hammad Rauf");
MODULE_DESCRIPTION("Hello world Module.");
MODULE_LICENSE("GPL");

static int hello_init(void)
{
        printk(KERN_INFO "Hello, world! The Module has been loaded.\n");
        return 0;
}
static void hello_exit(void)
{
        printk(KERN_INFO "Goodbye, cruel world. Module unloading.\n");
}

module_init(hello_init);
module_exit(hello_exit);</pre>
<p>The following &#8220;Makefile&#8221; will take care of compiling this module properly. You will need to download and install Linux Kernel Headers (See the next section in this post), before issuing the make command.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">obj-m += hello.o

PWD=$(shell pwd)
VER=$(shell uname -r)
KERNEL_BUILD=/lib/modules/$(VER)/build


all:
        make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:
        make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean</pre>
<p>Make sure that the above 2 files are saved in one folder.</p>
<h4>Compile A Module</h4>
<p>To compile the sample Module change into the folder where you copied the files from previous sub-section. Then type the following command:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="bash">make
# OR
make all</pre>
<p>In case of errors you may want to delete all generated files by issuing the command:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="bash">make clean</pre>
<h4>Load and Unload Module</h4>
<p>In Debian Linux, you can load a kernel module using the &#8220;modprobe&#8221; command. The &#8220;modprobe&#8221; command is used to add or remove a module from the Linux kernel.</p>
<p>To load a module, you can use the following syntax:</p>
<div class="bg-black mb-4 rounded-md">
<div class="p-4 overflow-y-auto">
<pre class="EnlighterJSRAW" data-enlighter-language="bash">sudo modprobe MODULE_NAME</pre>
<p>For example, to load the &#8220;hello&#8221; module, you would use the following command:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="bash">sudo modprobe hello</pre>
<p>Alternatively, you can use the &#8220;insmod&#8221; command, which is the older command to insert modules into the kernel, but it is less recommended than &#8220;modprobe&#8221; because it does not handle dependencies and other configurations.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="bash">sudo insmod /path/to/MODULE_NAME.ko</pre>
<p>Once a module is loaded, you can check if it is loaded by using the &#8220;lsmod&#8221; command, which displays the status of modules in the Linux kernel.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="bash">lsmod | grep MODULE_NAME</pre>
<p>You can also use the &#8220;modinfo&#8221; command to get information about a module, such as the version, author, and description.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="bash">modinfo MODULE_NAME</pre>
<p>Please note that you need to have root privilege or use &#8220;sudo&#8221; command to execute the above commands.</p>
</div>
</div>
<h2 id="install-kernel-headers"><span style="text-decoration: underline;">Install Kernel Headers</span></h2>
<h4>Sub-Contents</h4>
<ul>
<li>What are Kernel Headers and Why are they needed?</li>
<li>Installing the Kernel Headers</li>
</ul>
<h4>What are Kernel Headers and Why are they needed?</h4>
<p>Linux kernel headers are a collection of header files that provide the interface between the Linux kernel and user-space programs. These header files define the data structures, macros, and function prototypes that are used by the kernel and by the system libraries that provide system calls to user-space programs. Header files are a way for C/C++ programmers to package <em>source code data definitions</em> and <em>source code instructions</em> separately from each other. One of the uses of Header files,  by using Header files source code instructions can be changed easily by programmers, while the Headers (source code data definitions) remain unchanged, and in turn may not break other dependent parts of the Operating System.</p>
<p>The headers are typically located in the &#8220;/usr/src/linux-headers-version-architecture&#8221; directory, where version is the version of the kernel and architecture is the architecture of the system (e.g. x86_64, amd64, arm64, etc.).</p>
<p>These headers are used by developers to write kernel modules, device drivers, and other software that needs to interact with the kernel. They are also used by system libraries and user-space programs that need to make system calls to the kernel. When compiling custom Linux Kernel Modules, you will be needed Kernel Headers on your local Linux installation.</p>
<p>The headers are also used when building the kernel module, and are required to build some other software such as VirtualBox, VMware, and nvidia graphics driver that need to interact with kernel.</p>
<h4>Installing the Kernel Headers</h4>
<p>You can install the headers package for your specific version of the kernel by using package manager of your Linux distribution, for example in Ubuntu or Debian you can use the command</p>
<pre class="EnlighterJSRAW" data-enlighter-language="bash">sudo apt-get install linux-headers-$(uname -r)</pre>
<h2 id="further-reading"><span style="text-decoration: underline;">Further Reading</span></h2>
<ol>
<li><a href="https://andromedabay.ddns.net/install-debian-linux-on-x86-amd64-computer/" target="_blank" rel="noopener">https://andromedabay.ddns.net/install-debian-linux-on-x86-amd64-computer/</a>, Install LMDE on a x86/AMD64 computer with latest Kernel binary, Date Accessed: January 1, 2023</li>
<li><a href="https://www.debian.org/doc/manuals/debian-kernel-handbook/ch-common-tasks.html" target="_blank" rel="noopener">https://www.debian.org/doc/manuals/debian-kernel-handbook/ch-common-tasks.html</a>, Debian Kernel Handbook &#8211; Common Tasks, Date Accessed: January 16, 2023</li>
<li><a href="https://medium.com/dvt-engineering/how-to-write-your-first-linux-kernel-module-cf284408beeb" target="_blank" rel="noopener">https://medium.com/dvt-engineering/how-to-write-your-first-linux-kernel-module-cf284408beeb</a>, How to write your first linux kernel module, Date Accessed: January 16, 2023</li>
<li><a href="https://stackoverflow.com/questions/3140478/fatal-module-not-found-error-using-modprobe" target="_blank" rel="noopener">https://stackoverflow.com/questions/3140478/fatal-module-not-found-error-using-modprobe</a> StackOverflow Question Example Module, Date Accessed: January 16, 2023</li>
</ol>


		<div class=" twp-social-share  booster-clear">

						    <header class="twp-plugin-title twp-share-title">
			        <h2>Share</h2>
			    </header>
			
		    <div class="twp-share-container">
				<div class="twp-social-icons twp-social-facebook">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'https://www.facebook.com/sharer/sharer.php?u=http://andromedabay.ddns.net/kernel-build-simple-module-driver-programming-kernel-headers-debian-linux/'); "  href="https://www.facebook.com/sharer/sharer.php?u=http://andromedabay.ddns.net/kernel-build-simple-module-driver-programming-kernel-headers-debian-linux/" >
			                                <span class="twp-social-count"><span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M 23.25 9 L 15 9 L 15 0.75 C 15 0.335938 14.664062 0 14.25 0 L 9.75 0 C 9.335938 0 9 0.335938 9 0.75 L 9 9 L 0.75 9 C 0.335938 9 0 9.335938 0 9.75 L 0 14.25 C 0 14.664062 0.335938 15 0.75 15 L 9 15 L 9 23.25 C 9 23.664062 9.335938 24 9.75 24 L 14.25 24 C 14.664062 24 15 23.664062 15 23.25 L 15 15 L 23.25 15 C 23.664062 15 24 14.664062 24 14.25 L 24 9.75 C 24 9.335938 23.664062 9 23.25 9 Z M 23.25 9" /></svg></span></span>												<span class="twp-share-media">

													<span class="twp-share-label">
                                                        <span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M22.675 0h-21.35c-.732 0-1.325.593-1.325 1.325v21.351c0 .731.593 1.324 1.325 1.324h11.495v-9.294h-3.128v-3.622h3.128v-2.671c0-3.1 1.893-4.788 4.659-4.788 1.325 0 2.463.099 2.795.143v3.24l-1.918.001c-1.504 0-1.795.715-1.795 1.763v2.313h3.587l-.467 3.622h-3.12v9.293h6.116c.73 0 1.323-.593 1.323-1.325v-21.35c0-.732-.593-1.325-1.325-1.325z" /></svg></span>
				                                        <span class="twp-label-title">
				                                            Facebook				                                        </span>
				                                    </span>
												</span>
																					</a>
									</div><div class="twp-social-icons twp-social-twitter">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'https://twitter.com/intent/tweet?text=Kernel%20Build,%20Module/Driver%20Programming%20&#038;%20Kernel%20Headers%20&#8211;%20Debian%20Linux&#038;url=http://andromedabay.ddns.net/kernel-build-simple-module-driver-programming-kernel-headers-debian-linux/'); "  href="https://twitter.com/intent/tweet?text=Kernel%20Build,%20Module/Driver%20Programming%20&#038;%20Kernel%20Headers%20&#8211;%20Debian%20Linux&#038;url=http://andromedabay.ddns.net/kernel-build-simple-module-driver-programming-kernel-headers-debian-linux/" >
			                                <span class="twp-social-count"><span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M 23.25 9 L 15 9 L 15 0.75 C 15 0.335938 14.664062 0 14.25 0 L 9.75 0 C 9.335938 0 9 0.335938 9 0.75 L 9 9 L 0.75 9 C 0.335938 9 0 9.335938 0 9.75 L 0 14.25 C 0 14.664062 0.335938 15 0.75 15 L 9 15 L 9 23.25 C 9 23.664062 9.335938 24 9.75 24 L 14.25 24 C 14.664062 24 15 23.664062 15 23.25 L 15 15 L 23.25 15 C 23.664062 15 24 14.664062 24 14.25 L 24 9.75 C 24 9.335938 23.664062 9 23.25 9 Z M 23.25 9" /></svg></span></span>												<span class="twp-share-media">
													<span class="twp-share-label">
                                                        <span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"></path></svg></span>
				                                        <span class="twp-label-title">
				                                            Twitter				                                        </span>
												    </span>
												</span>
																					</a>
									</div><div class="twp-social-icons twp-social-pinterest">										<a class="twp-icon-holder" rel="nofollow" href="javascript:twp_be_pinterest()">
											<span class="twp-social-count"><span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M 23.25 9 L 15 9 L 15 0.75 C 15 0.335938 14.664062 0 14.25 0 L 9.75 0 C 9.335938 0 9 0.335938 9 0.75 L 9 9 L 0.75 9 C 0.335938 9 0 9.335938 0 9.75 L 0 14.25 C 0 14.664062 0.335938 15 0.75 15 L 9 15 L 9 23.25 C 9 23.664062 9.335938 24 9.75 24 L 14.25 24 C 14.664062 24 15 23.664062 15 23.25 L 15 15 L 23.25 15 C 23.664062 15 24 14.664062 24 14.25 L 24 9.75 C 24 9.335938 23.664062 9 23.25 9 Z M 23.25 9" /></svg></span></span>				                                <span class="twp-share-media">
													<span class="twp-share-label">
                                                        <span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2"></path></svg></span>
				                                        <span class="twp-label-title">
				                                            Pinterest				                                        </span>
				                                    </span>
												</span>
																					</a>
									</div><div class="twp-social-icons twp-social-linkedin">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'http://www.linkedin.com/shareArticle?mini=true&#038;title=Kernel%20Build,%20Module/Driver%20Programming%20&#038;%20Kernel%20Headers%20&#8211;%20Debian%20Linux&#038;url=http://andromedabay.ddns.net/kernel-build-simple-module-driver-programming-kernel-headers-debian-linux/'); "  href="http://www.linkedin.com/shareArticle?mini=true&#038;title=Kernel%20Build,%20Module/Driver%20Programming%20&#038;%20Kernel%20Headers%20&#8211;%20Debian%20Linux&#038;url=http://andromedabay.ddns.net/kernel-build-simple-module-driver-programming-kernel-headers-debian-linux/" >
																							<span class="twp-share-media">
				                                    <span class="share-media-nocount">
													    <svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg>				                                    </span>
													<span class="twp-share-label twp-label-title">
				                                        LinkedIn				                                    </span>
												</span>
																					</a>
										</div><div class="twp-social-icons twp-social-email">										<a class="twp-icon-holder" rel="nofollow"  href="mailto:?subject=:&amp;body= Kernel Build, Module/Driver Programming &#038; Kernel Headers &#8211; Debian Linux http://andromedabay.ddns.net/kernel-build-simple-module-driver-programming-kernel-headers-debian-linux/">
																							<span class="twp-share-media">
				                                    <span class="share-media-nocount">
													    <svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M0 3v18h24v-18h-24zm6.623 7.929l-4.623 5.712v-9.458l4.623 3.746zm-4.141-5.929h19.035l-9.517 7.713-9.518-7.713zm5.694 7.188l3.824 3.099 3.83-3.104 5.612 6.817h-18.779l5.513-6.812zm9.208-1.264l4.616-3.741v9.348l-4.616-5.607z" /></svg>				                                    </span>
				                                    <span class="twp-share-label twp-label-title">
				                                        Email				                                    </span>
												</span>
																					</a>
										</div><div class="twp-social-icons twp-social-vk">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'http://vk.com/share.php?url=http://andromedabay.ddns.net/kernel-build-simple-module-driver-programming-kernel-headers-debian-linux/&#038;caption=Kernel%20Build,%20Module/Driver%20Programming%20&#038;%20Kernel%20Headers%20&#8211;%20Debian%20Linux'); "  href="http://vk.com/share.php?url=http://andromedabay.ddns.net/kernel-build-simple-module-driver-programming-kernel-headers-debian-linux/&#038;caption=Kernel%20Build,%20Module/Driver%20Programming%20&#038;%20Kernel%20Headers%20&#8211;%20Debian%20Linux" >
																							<span class="twp-share-media">
				                                    <span class="share-media-nocount">
													    <svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M22,7.1c0.2,0.4-0.4,1.5-1.6,3.1c-0.2,0.2-0.4,0.5-0.7,0.9c-0.5,0.7-0.9,1.1-0.9,1.4c-0.1,0.3-0.1,0.6,0.1,0.8 c0.1,0.1,0.4,0.4,0.8,0.9h0l0,0c1,0.9,1.6,1.7,2,2.3c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.3c0,0.1,0,0.2,0,0.4 c0,0.1-0.1,0.2-0.3,0.3c-0.1,0.1-0.4,0.1-0.6,0.1l-2.7,0c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.1-0.5-0.2l-0.2-0.1 c-0.2-0.1-0.5-0.4-0.7-0.7s-0.5-0.6-0.7-0.8c-0.2-0.2-0.4-0.4-0.6-0.6C14.8,15,14.6,15,14.4,15c0,0,0,0-0.1,0c0,0-0.1,0.1-0.2,0.2 c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.1-0.1,0.3-0.2,0.5c-0.1,0.2-0.1,0.5-0.1,0.8c0,0.1,0,0.2,0,0.3c0,0.1-0.1,0.2-0.1,0.2l0,0.1 c-0.1,0.1-0.3,0.2-0.6,0.2h-1.2c-0.5,0-1,0-1.5-0.2c-0.5-0.1-1-0.3-1.4-0.6s-0.7-0.5-1.1-0.7s-0.6-0.4-0.7-0.6l-0.3-0.3 c-0.1-0.1-0.2-0.2-0.3-0.3s-0.4-0.5-0.7-0.9s-0.7-1-1.1-1.6c-0.4-0.6-0.8-1.3-1.3-2.2C2.9,9.4,2.5,8.5,2.1,7.5C2,7.4,2,7.3,2,7.2 c0-0.1,0-0.1,0-0.2l0-0.1c0.1-0.1,0.3-0.2,0.6-0.2l2.9,0c0.1,0,0.2,0,0.2,0.1S5.9,6.9,5.9,7L6,7c0.1,0.1,0.2,0.2,0.3,0.3 C6.4,7.7,6.5,8,6.7,8.4C6.9,8.8,7,9,7.1,9.2l0.2,0.3c0.2,0.4,0.4,0.8,0.6,1.1c0.2,0.3,0.4,0.5,0.5,0.7s0.3,0.3,0.4,0.4 c0.1,0.1,0.3,0.1,0.4,0.1c0.1,0,0.2,0,0.3-0.1c0,0,0,0,0.1-0.1c0,0,0.1-0.1,0.1-0.2c0.1-0.1,0.1-0.3,0.1-0.5c0-0.2,0.1-0.5,0.1-0.8 c0-0.4,0-0.8,0-1.3c0-0.3,0-0.5-0.1-0.8c0-0.2-0.1-0.4-0.1-0.5L9.6,7.6C9.4,7.3,9.1,7.2,8.7,7.1C8.6,7.1,8.6,7,8.7,6.9 C8.9,6.7,9,6.6,9.1,6.5c0.4-0.2,1.2-0.3,2.5-0.3c0.6,0,1,0.1,1.4,0.1c0.1,0,0.3,0.1,0.3,0.1c0.1,0.1,0.2,0.1,0.2,0.3 c0,0.1,0.1,0.2,0.1,0.3s0,0.3,0,0.5c0,0.2,0,0.4,0,0.6c0,0.2,0,0.4,0,0.7c0,0.3,0,0.6,0,0.9c0,0.1,0,0.2,0,0.4c0,0.2,0,0.4,0,0.5 c0,0.1,0,0.3,0,0.4s0.1,0.3,0.1,0.4c0.1,0.1,0.1,0.2,0.2,0.3c0.1,0,0.1,0,0.2,0c0.1,0,0.2,0,0.3-0.1c0.1-0.1,0.2-0.2,0.4-0.4 s0.3-0.4,0.5-0.7c0.2-0.3,0.5-0.7,0.7-1.1c0.4-0.7,0.8-1.5,1.1-2.3c0-0.1,0.1-0.1,0.1-0.2c0-0.1,0.1-0.1,0.1-0.1l0,0l0.1,0 c0,0,0,0,0.1,0s0.2,0,0.2,0l3,0c0.3,0,0.5,0,0.7,0S21.9,7,21.9,7L22,7.1z"></path></svg>				                                    </span>
													<span class="twp-share-label twp-label-title">
				                                        VK				                                    </span>
												</span>
																					</a>
										</div>			</div>
		</div>

	]]></content:encoded>
					
					<wfw:commentRss>https://andromedabay.ddns.net/kernel-build-simple-module-driver-programming-kernel-headers-debian-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Install Debian Linux on x86/AMD64 Computer with Latest Kernel</title>
		<link>https://andromedabay.ddns.net/install-debian-linux-on-x86-amd64-computer/</link>
					<comments>https://andromedabay.ddns.net/install-debian-linux-on-x86-amd64-computer/#comments</comments>
		
		<dc:creator><![CDATA[Hammad Rauf]]></dc:creator>
		<pubDate>Sat, 31 Dec 2022 03:20:00 +0000</pubDate>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[Kernel Update]]></category>
		<category><![CDATA[LMDE]]></category>
		<category><![CDATA[Mint]]></category>
		<guid isPermaLink="false">https://andromedabay.ddns.net/?p=1227</guid>

					<description><![CDATA[Disclaimer: These instructions are tested on my computer system and software, your computer system and software may be different. These instructions are meant to document]]></description>
										<content:encoded><![CDATA[<div class='booster-block booster-read-block'>
                <div class="twp-read-time">
                	<i class="booster-icon twp-clock"></i> <span>Read Time:</span>8 Minute, 22 Second                </div>

            </div><blockquote><p><em><strong>Disclaimer:</strong> These instructions are tested on my computer system and software, your computer system and software may be different. These instructions are meant to document my update process. You may use them for your installation, at your own risk.</em></p></blockquote>
<p>Debian (<a href="https://www.debian.org/intro/why_debian" target="_blank" rel="noopener">Why Debian?</a>) is a distribution of the free Linux Operating system. It is core distribution on which <a href="https://ubuntu.com/download/desktop" target="_blank" rel="noopener">Ubuntu</a>, <a href="https://kubuntu.org/getkubuntu/" target="_blank" rel="noopener">Kubuntu</a>, <a href="https://www.raspberrypi.com/software/" target="_blank" rel="noopener">RaspberryPi OS</a>, and many other distributions are based. It makes sense to work on a Debian installation, because this way your work should be mostly compatible with Ubuntu, Raspberry Pi, etc.</p>
<p><a href="https://linuxmint.com/" target="_blank" rel="noopener">Linux-Mint</a> is well known Ubuntu based Linux Distribution which uses Windows like Cinnamon Desktop. Linux-Mint has another similar distribution based on Debian, the core on which Ubuntu is based, it is called <a href="https://linuxmint.com/download_lmde.php" target="_blank" rel="noopener">LMDE</a>. LMDE is short for &#8220;Linux Mint Debian Edition&#8221;. Its current version is 5, LMDE 5 &#8220;Elsie&#8221;. In this blog I will be describing how I installed it on my computer.</p>
<h3>Contents</h3>
<ul>
<li><a href="#download-iso">Download ISO</a></li>
<li><a href="#bootable-usb">Bootable USB</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#update-installation">Update Installation</a></li>
<li><a href="#update-kernel">Update Kernel</a></li>
<li><a href="#fix-update-manager">Fix Update Manager</a></li>
<li><a href="#reference">References</a></li>
</ul>
<ol start="1">
<li id="download-iso">
<h3>Download the ISO Image</h3>
</li>
</ol>
<p>The ISO Image Installation file of the LMDE can be downloaded from the <a href="https://linuxmint.com/edition.php?id=297" target="_blank" rel="noopener">LMDE Download Page</a>. Either use the direct Download mirror sites close to your location or use a Torrent downloading client like BitTorrent/uTorrent. You have the option to choose 64-bit or 32-bit version. Since I had a fairly new computer, I downloaded the 64-bit version.</p>
<ol start="2">
<li id="bootable-usb">
<h3>Burn a Bootable USB Disk</h3>
</li>
</ol>
<p>Next we need to have a bootable installation media. Since my computer had the capability to boot from a USB stick I created a bootable USB stick with LMDE image file. Other options are to create a bootable CR/DVD ROM, if you have an internal or External DVD drive available.</p>
<p>To create the bootable USB Stick I downloaded <a href="https://www.balena.io/etcher/" target="_blank" rel="noopener">Etcher (Bootable USB Creator) from the  Download Page</a>. Install Etcher. Once Installed launch Etcher, provide the path to the downloaded ISO file as the source, the destination must be your USB Thumb drive. Burn the image and let it complete. Once it is completed, you can close Etcher.</p>
<ol start="3">
<li id="installation">
<h3>Installation</h3>
</li>
</ol>
<p>I had a spare Hard Disk (256 GB) available to me that was not being used for anything else. So I decided to keep my Windows 11 and LMDE on separate disks, and install LMDE on the 256 GB Hard Disk. Although Linux and Windows 11 can be installed on the same disk also, but I would recommend separate disk. It will be much easier to boot into either one, Windows or LMDE by using the boot sequence hot key (F11, F2, DEL  Keys etc.) during the boot process. The disk size can be as small as 32GB but I would recommend a 64GB hard disk or SSD.</p>
<p>Insert the bootable USB disk in the computer and reboot or start the computer. You may have to press the boot sequence hot key (F11, F2, DEL  Keys etc.) during the boot process, to select the USB disk and boot from it. Once the LMDE starts up, play around and the Menu&#8217;s and applications. Nothing is installed yet on your computer, it is loading everything from the USB stick.</p>
<p>Once you are ready to install, click on the CD ROM Icon on the desktop that says &#8211; &#8220;Install Linux Mint&#8221;. This will start the permanent installation of LMDE on your computer. The rest of the installation process is somewhat similar to the <a href="https://linuxmint-installation-guide.readthedocs.io/en/latest/install.html" target="_blank" rel="noopener">Linux-Mint Installation Steps</a> documented on the Linux-Mint website. Once you have installed it please continue with the next steps given below.</p>
<p>During the Installation if you are installing on a Computer that already has another Operating System like Windows 11 installed on it, you will get an additional prompt for installing GRUB. GRUB is a Boot Loader that lets you choose which OS to boot your computer to. You have the option to install it on either disk/SSD, the disk for LMDE or the Disk for Windows 11 (It does not damage Windows 11 installation). I would recommend installing it on the LMDE disk/SSD. You can also choose not to install GRUB, but then during EFI Boot process the LMDE disk/SSD may not be detected, and you may need to run &#8220;Boot Repair&#8221; from the Live LMDE USB stick you prepared earlier. You can use &#8220;Boot Repair&#8221; and/or &#8220;GRUB Customizer&#8221; to tailor GRUB as per your liking later.</p>
<p>The found out out that there was no direct way of updating my Graphics Driver and Sound Driver, and the instructions given for Linux-Mint do not match the LMDE distribution. The only way forward as suggested on the <a href="https://forums.linuxmint.com/viewtopic.php?f=248&amp;t=370744" target="_blank" rel="noopener">help forum</a> was to update the Linux Kernel. It is documented below.</p>
<p><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2435427972424429"
     crossorigin="anonymous"></script><br />
<ins class="adsbygoogle"
     style="display:block; text-align:center;"
     data-ad-layout="in-article"
     data-ad-format="fluid"
     data-ad-client="ca-pub-2435427972424429"
     data-ad-slot="3797637297"></ins><br />
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script></p>
<h4>Time Adjustment on Dual OS Systems</h4>
<p>On Computer systems where Windows 11 is also installed the System Clock time is altered by LMDE every time you boot into that. To prevent that from happening, open a Terminal (Console) session. and type the following command:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">timedatectl set-local-rtc 1</pre>
<ol start="4">
<li id="update-installation">
<h3>Update the Installation</h3>
</li>
</ol>
<p>In these steps we will be installing the absolutely latest version of Debian Kernel available. This version of kernel is usually not supported by the LMDE distribution. But we want to install it  anyway because our computer Device Drivers are not working properly.</p>
<p>Before you start updating the kernel, it is a good idea to update the installation of LMDE. Just click on the Shield Icon (LMDE Update Manager) in the lower right corner next to the system clock. Make sure everything is selected, and then let it run. It will download all updates (including a slightly newer Kernel image), and install them. You will have to reboot the computer after updates are installed. The Kernel image installed by the update manager is not the latest kernel image available, so it may not solve your driver issues. Follow the steps in the next section to explicitly download the latest kernel.</p>
<figure id="attachment_1256" aria-describedby="caption-attachment-1256" style="width: 300px" class="wp-caption aligncenter"><img decoding="async" class="size-medium wp-image-1256" src="https://andromedabay.ddns.net/wp-content/uploads/2022/12/LMDE-Update-Manager-Icons-300x58.png" alt="LMDE Update Manager Icons" width="300" height="58" srcset="https://andromedabay.ddns.net/wp-content/uploads/2022/12/LMDE-Update-Manager-Icons-300x58.png 300w, https://andromedabay.ddns.net/wp-content/uploads/2022/12/LMDE-Update-Manager-Icons.png 513w" sizes="(max-width: 300px) 100vw, 300px" /><figcaption id="caption-attachment-1256" class="wp-caption-text">LMDE Update Manager Icons</figcaption></figure>
<ol start="5">
<li id="update-kernel">
<h3>Update the Kernel</h3>
</li>
</ol>
<p>To install the latest Kernel version available for LMDE perform the following steps on a Terminal Console screen, one step at a time.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">uname -r
uname -n
uname -a</pre>
<p>The above 3 commands will list the name and version of the currently installed LMDE Kernel version and Computer name. This information will be useful in determining which newer version of Kernel to install in the next steps.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">sudo apt update
sudo apt search linux-image</pre>
<p>The first command updates all repositories for the package manager. The Second command shows all packages that can be installed with the words &#8220;linux-image&#8221; which marks Kernel images. You will see a list of many available kernel images. At the time of this writing, for a Intel/AMD based CPU the kernel image that determined to be the latest is &#8220;linux-image-6.0.0-0.deb11.2-amd64&#8221;. So you can issue the command to install it, and then reboot your system with the next command given.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">sudo apt install linux-image-6.0.0-0.deb11.2-amd64
sudo reboot</pre>
<p>Hopefully everything works out and you are able to log back in to LMDE. All your Device Driver issues should be resolved now, since you are running the latest kernel available. To check that your kernel is indeed the latest one type the following commands.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">uname -r
uname -n
uname -a</pre>
<ol start="6">
<li id="fix-update-manager">
<h3>Force Update Manger to Show Latest Kernel Images</h3>
</li>
</ol>
<p>LMDE Update Manager is a very nice tool that automatically finds the latest updates for all software packages installed on your system and prompts you for installing them periodically. But there can be an issue with that now since you have updated the kernel version to be the absolutely latest version. The official LMDE distribution is still using an older Kernel version. So when the official LMDE distribution starts supporting a slightly newer version of the kernel, which is slightly newer but still older then the version of the kernel you have already installed in above steps, you will be prompted to install it. This is not a big issue, you can always uncheck that version of the kernel from the list of software to be updated. But an interesting trick was mention on <a href="https://www.linuxcapable.com/how-to-install-linux-kernel-mainline-on-debian-11-bullseye/" target="_blank" rel="noopener">this site</a>. I am documenting it below.</p>
<p>Use a text editor  (with &#8220;sudo&#8221; privileges) to create a file &#8220;preferences&#8221; with the following contents in the folder /etc/apt/.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">Package: *
Pin: release a=bullseye
Pin-Priority: 500

Package: linux-image-amd64
Pin:release a=unstable
Pin-Priority: 1000

Package: *
Pin: release a=unstable
Pin-Priority: 100</pre>
<p>Alternatively you can use the following command from Terminal/Console to do the above directly from command line.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">sudo tee /etc/apt/preferences&lt;&lt;EOF
Package: *
Pin: release a=bullseye
Pin-Priority: 500

Package: linux-image-amd64
Pin:release a=unstable
Pin-Priority: 1000

Package: *
Pin: release a=unstable
Pin-Priority: 100
EOF
</pre>
<p>Afterwards make sure that the file contents are like we expect. To confirm use the following command from Terminal/Console.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic">sudo cat /etc/apt/preferences</pre>
<p>&nbsp;</p>
<ol start="7">
<li id="reference">
<h3>Reference Links</h3>
</li>
</ol>
<ul>
<li><i><a href="https://www.debian.org/intro/why_debian" target="_blank" rel="noopener">https://www.debian.org/intro/why_debian</a>, Why Debian?, Date Accessed: December 30, 2022</i></li>
<li><i><a href="https://ubuntu.com/download/desktop" target="_blank" rel="noopener">https://ubuntu.com/download/desktop</a>, Ubuntu Desktop, Date Accessed: December 30, 2022</i></li>
<li><i><a href="https://kubuntu.org/getkubuntu/" target="_blank" rel="noopener">https://kubuntu.org/getkubuntu/</a>, Kubuntu, Date Accessed: December 30, 2022</i></li>
<li><i><a href="https://www.raspberrypi.com/software/" target="_blank" rel="noopener">https://www.raspberrypi.com/software/</a>, RaspberryPi OS, Date Accessed: December 30, 2022</i></li>
<li><i><a href="https://linuxmint.com/" target="_blank" rel="noopener">https://linuxmint.com/</a>, Linux-Mint, Date Accessed: December 30, 2022</i></li>
<li><i><a href="https://linuxmint.com/download_lmde.php" target="_blank" rel="noopener">https://linuxmint.com/download_lmde.php</a>, LMDE, Date Accessed: December 30, 2022</i></li>
<li><i><a href="https://linuxmint.com/edition.php?id=297" target="_blank" rel="noopener">https://linuxmint.com/edition.php?id=297</a>, LMDE Download Page, Date Accessed: December 30, 2022</i></li>
<li><i><a href="https://www.balena.io/etcher/" target="_blank" rel="noopener">https://www.balena.io/etcher/</a>, Etcher (Bootable USB Creator) Download Page, Date Accessed: December 30, 2022</i></li>
<li><i><a href="https://linuxmint-installation-guide.readthedocs.io/en/latest/install.html" target="_blank" rel="noopener">https://linuxmint-installation-guide.readthedocs.io/en/latest/install.html</a>, Linux-Mint Installation Steps, Date Accessed: December 30, 2022</i></li>
<li><i><a href="https://forums.linuxmint.com/viewtopic.php?f=248&amp;t=370744" target="_blank" rel="noopener">https://forums.linuxmint.com/viewtopic.php?f=248&amp;t=370744</a>, Author&#8217;s LMDE Forum Support Question for Drivers, Date Accessed: December 30, 2022</i></li>
<li><i><a href="https://www.linuxcapable.com/how-to-install-linux-kernel-mainline-on-debian-11-bullseye/" target="_blank" rel="noopener">https://www.linuxcapable.com/how-to-install-linux-kernel-mainline-on-debian-11-bullseye/</a>, Update Kernel, Date Accessed: December 30, 2022</i></li>
</ul>


		<div class=" twp-social-share  booster-clear">

						    <header class="twp-plugin-title twp-share-title">
			        <h2>Share</h2>
			    </header>
			
		    <div class="twp-share-container">
				<div class="twp-social-icons twp-social-facebook">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'https://www.facebook.com/sharer/sharer.php?u=http://andromedabay.ddns.net/install-debian-linux-on-x86-amd64-computer/'); "  href="https://www.facebook.com/sharer/sharer.php?u=http://andromedabay.ddns.net/install-debian-linux-on-x86-amd64-computer/" >
			                                <span class="twp-social-count"><span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M 23.25 9 L 15 9 L 15 0.75 C 15 0.335938 14.664062 0 14.25 0 L 9.75 0 C 9.335938 0 9 0.335938 9 0.75 L 9 9 L 0.75 9 C 0.335938 9 0 9.335938 0 9.75 L 0 14.25 C 0 14.664062 0.335938 15 0.75 15 L 9 15 L 9 23.25 C 9 23.664062 9.335938 24 9.75 24 L 14.25 24 C 14.664062 24 15 23.664062 15 23.25 L 15 15 L 23.25 15 C 23.664062 15 24 14.664062 24 14.25 L 24 9.75 C 24 9.335938 23.664062 9 23.25 9 Z M 23.25 9" /></svg></span></span>												<span class="twp-share-media">

													<span class="twp-share-label">
                                                        <span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M22.675 0h-21.35c-.732 0-1.325.593-1.325 1.325v21.351c0 .731.593 1.324 1.325 1.324h11.495v-9.294h-3.128v-3.622h3.128v-2.671c0-3.1 1.893-4.788 4.659-4.788 1.325 0 2.463.099 2.795.143v3.24l-1.918.001c-1.504 0-1.795.715-1.795 1.763v2.313h3.587l-.467 3.622h-3.12v9.293h6.116c.73 0 1.323-.593 1.323-1.325v-21.35c0-.732-.593-1.325-1.325-1.325z" /></svg></span>
				                                        <span class="twp-label-title">
				                                            Facebook				                                        </span>
				                                    </span>
												</span>
																					</a>
									</div><div class="twp-social-icons twp-social-twitter">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'https://twitter.com/intent/tweet?text=Install%20Debian%20Linux%20on%20x86/AMD64%20Computer%20with%20Latest%20Kernel&#038;url=http://andromedabay.ddns.net/install-debian-linux-on-x86-amd64-computer/'); "  href="https://twitter.com/intent/tweet?text=Install%20Debian%20Linux%20on%20x86/AMD64%20Computer%20with%20Latest%20Kernel&#038;url=http://andromedabay.ddns.net/install-debian-linux-on-x86-amd64-computer/" >
			                                <span class="twp-social-count"><span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M 23.25 9 L 15 9 L 15 0.75 C 15 0.335938 14.664062 0 14.25 0 L 9.75 0 C 9.335938 0 9 0.335938 9 0.75 L 9 9 L 0.75 9 C 0.335938 9 0 9.335938 0 9.75 L 0 14.25 C 0 14.664062 0.335938 15 0.75 15 L 9 15 L 9 23.25 C 9 23.664062 9.335938 24 9.75 24 L 14.25 24 C 14.664062 24 15 23.664062 15 23.25 L 15 15 L 23.25 15 C 23.664062 15 24 14.664062 24 14.25 L 24 9.75 C 24 9.335938 23.664062 9 23.25 9 Z M 23.25 9" /></svg></span></span>												<span class="twp-share-media">
													<span class="twp-share-label">
                                                        <span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"></path></svg></span>
				                                        <span class="twp-label-title">
				                                            Twitter				                                        </span>
												    </span>
												</span>
																					</a>
									</div><div class="twp-social-icons twp-social-pinterest">										<a class="twp-icon-holder" rel="nofollow" href="javascript:twp_be_pinterest()">
											<span class="twp-social-count"><span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M 23.25 9 L 15 9 L 15 0.75 C 15 0.335938 14.664062 0 14.25 0 L 9.75 0 C 9.335938 0 9 0.335938 9 0.75 L 9 9 L 0.75 9 C 0.335938 9 0 9.335938 0 9.75 L 0 14.25 C 0 14.664062 0.335938 15 0.75 15 L 9 15 L 9 23.25 C 9 23.664062 9.335938 24 9.75 24 L 14.25 24 C 14.664062 24 15 23.664062 15 23.25 L 15 15 L 23.25 15 C 23.664062 15 24 14.664062 24 14.25 L 24 9.75 C 24 9.335938 23.664062 9 23.25 9 Z M 23.25 9" /></svg></span></span>				                                <span class="twp-share-media">
													<span class="twp-share-label">
                                                        <span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2"></path></svg></span>
				                                        <span class="twp-label-title">
				                                            Pinterest				                                        </span>
				                                    </span>
												</span>
																					</a>
									</div><div class="twp-social-icons twp-social-linkedin">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'http://www.linkedin.com/shareArticle?mini=true&#038;title=Install%20Debian%20Linux%20on%20x86/AMD64%20Computer%20with%20Latest%20Kernel&#038;url=http://andromedabay.ddns.net/install-debian-linux-on-x86-amd64-computer/'); "  href="http://www.linkedin.com/shareArticle?mini=true&#038;title=Install%20Debian%20Linux%20on%20x86/AMD64%20Computer%20with%20Latest%20Kernel&#038;url=http://andromedabay.ddns.net/install-debian-linux-on-x86-amd64-computer/" >
																							<span class="twp-share-media">
				                                    <span class="share-media-nocount">
													    <svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg>				                                    </span>
													<span class="twp-share-label twp-label-title">
				                                        LinkedIn				                                    </span>
												</span>
																					</a>
										</div><div class="twp-social-icons twp-social-email">										<a class="twp-icon-holder" rel="nofollow"  href="mailto:?subject=:&amp;body= Install Debian Linux on x86/AMD64 Computer with Latest Kernel http://andromedabay.ddns.net/install-debian-linux-on-x86-amd64-computer/">
																							<span class="twp-share-media">
				                                    <span class="share-media-nocount">
													    <svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M0 3v18h24v-18h-24zm6.623 7.929l-4.623 5.712v-9.458l4.623 3.746zm-4.141-5.929h19.035l-9.517 7.713-9.518-7.713zm5.694 7.188l3.824 3.099 3.83-3.104 5.612 6.817h-18.779l5.513-6.812zm9.208-1.264l4.616-3.741v9.348l-4.616-5.607z" /></svg>				                                    </span>
				                                    <span class="twp-share-label twp-label-title">
				                                        Email				                                    </span>
												</span>
																					</a>
										</div><div class="twp-social-icons twp-social-vk">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'http://vk.com/share.php?url=http://andromedabay.ddns.net/install-debian-linux-on-x86-amd64-computer/&#038;caption=Install%20Debian%20Linux%20on%20x86/AMD64%20Computer%20with%20Latest%20Kernel'); "  href="http://vk.com/share.php?url=http://andromedabay.ddns.net/install-debian-linux-on-x86-amd64-computer/&#038;caption=Install%20Debian%20Linux%20on%20x86/AMD64%20Computer%20with%20Latest%20Kernel" >
																							<span class="twp-share-media">
				                                    <span class="share-media-nocount">
													    <svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M22,7.1c0.2,0.4-0.4,1.5-1.6,3.1c-0.2,0.2-0.4,0.5-0.7,0.9c-0.5,0.7-0.9,1.1-0.9,1.4c-0.1,0.3-0.1,0.6,0.1,0.8 c0.1,0.1,0.4,0.4,0.8,0.9h0l0,0c1,0.9,1.6,1.7,2,2.3c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.3c0,0.1,0,0.2,0,0.4 c0,0.1-0.1,0.2-0.3,0.3c-0.1,0.1-0.4,0.1-0.6,0.1l-2.7,0c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.1-0.5-0.2l-0.2-0.1 c-0.2-0.1-0.5-0.4-0.7-0.7s-0.5-0.6-0.7-0.8c-0.2-0.2-0.4-0.4-0.6-0.6C14.8,15,14.6,15,14.4,15c0,0,0,0-0.1,0c0,0-0.1,0.1-0.2,0.2 c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.1-0.1,0.3-0.2,0.5c-0.1,0.2-0.1,0.5-0.1,0.8c0,0.1,0,0.2,0,0.3c0,0.1-0.1,0.2-0.1,0.2l0,0.1 c-0.1,0.1-0.3,0.2-0.6,0.2h-1.2c-0.5,0-1,0-1.5-0.2c-0.5-0.1-1-0.3-1.4-0.6s-0.7-0.5-1.1-0.7s-0.6-0.4-0.7-0.6l-0.3-0.3 c-0.1-0.1-0.2-0.2-0.3-0.3s-0.4-0.5-0.7-0.9s-0.7-1-1.1-1.6c-0.4-0.6-0.8-1.3-1.3-2.2C2.9,9.4,2.5,8.5,2.1,7.5C2,7.4,2,7.3,2,7.2 c0-0.1,0-0.1,0-0.2l0-0.1c0.1-0.1,0.3-0.2,0.6-0.2l2.9,0c0.1,0,0.2,0,0.2,0.1S5.9,6.9,5.9,7L6,7c0.1,0.1,0.2,0.2,0.3,0.3 C6.4,7.7,6.5,8,6.7,8.4C6.9,8.8,7,9,7.1,9.2l0.2,0.3c0.2,0.4,0.4,0.8,0.6,1.1c0.2,0.3,0.4,0.5,0.5,0.7s0.3,0.3,0.4,0.4 c0.1,0.1,0.3,0.1,0.4,0.1c0.1,0,0.2,0,0.3-0.1c0,0,0,0,0.1-0.1c0,0,0.1-0.1,0.1-0.2c0.1-0.1,0.1-0.3,0.1-0.5c0-0.2,0.1-0.5,0.1-0.8 c0-0.4,0-0.8,0-1.3c0-0.3,0-0.5-0.1-0.8c0-0.2-0.1-0.4-0.1-0.5L9.6,7.6C9.4,7.3,9.1,7.2,8.7,7.1C8.6,7.1,8.6,7,8.7,6.9 C8.9,6.7,9,6.6,9.1,6.5c0.4-0.2,1.2-0.3,2.5-0.3c0.6,0,1,0.1,1.4,0.1c0.1,0,0.3,0.1,0.3,0.1c0.1,0.1,0.2,0.1,0.2,0.3 c0,0.1,0.1,0.2,0.1,0.3s0,0.3,0,0.5c0,0.2,0,0.4,0,0.6c0,0.2,0,0.4,0,0.7c0,0.3,0,0.6,0,0.9c0,0.1,0,0.2,0,0.4c0,0.2,0,0.4,0,0.5 c0,0.1,0,0.3,0,0.4s0.1,0.3,0.1,0.4c0.1,0.1,0.1,0.2,0.2,0.3c0.1,0,0.1,0,0.2,0c0.1,0,0.2,0,0.3-0.1c0.1-0.1,0.2-0.2,0.4-0.4 s0.3-0.4,0.5-0.7c0.2-0.3,0.5-0.7,0.7-1.1c0.4-0.7,0.8-1.5,1.1-2.3c0-0.1,0.1-0.1,0.1-0.2c0-0.1,0.1-0.1,0.1-0.1l0,0l0.1,0 c0,0,0,0,0.1,0s0.2,0,0.2,0l3,0c0.3,0,0.5,0,0.7,0S21.9,7,21.9,7L22,7.1z"></path></svg>				                                    </span>
													<span class="twp-share-label twp-label-title">
				                                        VK				                                    </span>
												</span>
																					</a>
										</div>			</div>
		</div>

	]]></content:encoded>
					
					<wfw:commentRss>https://andromedabay.ddns.net/install-debian-linux-on-x86-amd64-computer/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>MS-SQL: connecting Python on Linux &#8211; using Active Directory Credentials and Kerberos</title>
		<link>https://andromedabay.ddns.net/ms-sql-connecting-python-on-linux-using-active-directory-credentials-and-kerberos/</link>
					<comments>https://andromedabay.ddns.net/ms-sql-connecting-python-on-linux-using-active-directory-credentials-and-kerberos/#respond</comments>
		
		<dc:creator><![CDATA[Hammad Rauf]]></dc:creator>
		<pubDate>Tue, 26 Sep 2017 22:30:15 +0000</pubDate>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Kerberos]]></category>
		<category><![CDATA[MS-SQL Server]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[AD]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[MS-SQL]]></category>
		<category><![CDATA[ODBC]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[pymssql]]></category>
		<category><![CDATA[pyodbc]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[SQL]]></category>
		<guid isPermaLink="false">https://hammadr.wordpress.com/?p=328</guid>

					<description><![CDATA[Microsoft SQL Server (MS-SQL) is a very popular database server. Following the 3-tier architecture many applications use it as the back end database server. Apart]]></description>
										<content:encoded><![CDATA[<div class='booster-block booster-read-block'>
                <div class="twp-read-time">
                	<i class="booster-icon twp-clock"></i> <span>Read Time:</span>7 Minute, 19 Second                </div>

            </div><p>Microsoft SQL Server (MS-SQL) is a very popular database server. Following the 3-tier architecture many applications use it as the back end database server. Apart from Microsoft Windows based applications sometimes the application are deployed on Linux servers. What is required when connecting a Python Application (on Linux) to a MS-SQL back-end using Windows (Active Directory Domain) user account? After some searching on the Internet a solution was found that allowed this possibility.</p>
<p>Following is a summary of what is needed in order to accomplish this connection between a Python application running on Linux and MS-SQL back-end using Active Directory user account credentials. The contents below are based on several different web-sites where parts of the solution were discovered. These steps have been verified on CentOS Linux 6.8 (RHEL 6.8). I have collected all the steps in one article.</p>
<h2>Installing MS-SQL Driver (Pyodbc and Microsoft ODBC SQL Driver)</h2>
<p>It turns out that it is not possible to use &#8220;pymssql&#8221; to connect using Active Directory user account on Linux Centos 6.8 (RHEL 6.8). The pymssql python driver library only supports MS-SQL user accounts. So for this problem we had to use &#8220;pyodbc&#8221; with Microsoft provided ODBC SQL Driver.</p>
<p>To install &#8220;pyodbc&#8221; and MS ODBC SQL Driver use the following steps.</p>
<pre>sudo yum install gcc-c++
sudo yum install python-devel
sudo yum install python-pip
sudo yum install unixODBC-devel
sudo pip install pyodbc # failed
OR
sudo yum install pyodbc</pre>
<p>Now as root or Super User type the following. This will update the &#8220;yum&#8221; repositories list to include Microsoft published RHEL software site.</p>
<pre>sudo su
curl https://packages.microsoft.com/config/rhel/6/prod.repo &gt; /etc/yum.repos.d/mssql-release.repo
exit</pre>
<p>Now type the following to download the MS ODBC SQL Server driver. There are some optional components that you may find useful. These steps also update the $PATH environment variable to include the optional tools.</p>
<pre>sudo yum remove unixODBC-utf16 unixODBC-utf16-devel
sudo ACCEPT_EULA=Y yum install msodbcsql
sudo ACCEPT_EULA=Y yum install mssql-tools # optional
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' &gt;&gt; ~/.bash_profile
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' &gt;&gt; ~/.bashrc
source ~/.bashrc
sudo yum install unixODBC-devel # optional</pre>
<p>Use the following steps to verify that the pyodbc and MS-ODBC SQL Driver installed correctly.</p>
<pre>ls -l /usr/lib64/libodbc*
odbc_config --version --longodbcversion --cflags --ulen --libs --odbcinstini --odbcini
odbcinst -j
isql --version
ls -l /opt/microsoft/msodbcsql/lib64/
dltest /opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0 SQLGetInstalledDrivers
dltest /opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.9.0 SQLGetInstalledDrivers
cat /etc/odbcinst.ini # should contain a section called [ODBC Driver 13 for SQL Server]</pre>
<h2>Connecting Via DSN</h2>
<p>You may want to create a Data Source Name (DSN) to connect to the database. If that is the case then create a text file with the following contents and save it as &#8220;myconnection_dsn_stub.dsn&#8221;.</p>
<pre>[MyDSNName]
Driver      = ODBC Driver 13 for SQL Server
Description = My Database DSN
Trace       = No
Server      = db_server.mycontoso.com,1433</pre>
<p>Now register the DSN entry and test connection in Python. Note that &#8220;Trusted connection = yes&#8221; forces the driver to use Active Directory (Kerberos) user account.</p>
<pre>cat /etc/odbcinst.ini
sudo odbcinst -i -s -f ./mycnonection_dsn_stub.dsn -l
cat /etc/odbc.ini
python -c "import pyodbc; print(pyodbc.connect('DSN=MyDSNName;DATABASE=db_name;UID=ad_user_id;PWD=*****;Trusted_Connection=yes'))"</pre>
<p>If you have not installed and configured Kerberos (See below) then you will get following error message.</p>
<pre>Traceback (most recent call last):
File "", line 1, in
pyodbc.Error: ('HY000', "[HY000] [unixODBC][Microsoft][ODBC Driver 13 for SQL Server]SSPI Provider: Credentials cache file '/tmp/krb5cc_500' not found (851968) (SQLDriverConnectW)")</pre>
<p><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-2435427972424429"
     crossorigin="anonymous"></script><br />
<ins class="adsbygoogle"
     style="display:block; text-align:center;"
     data-ad-layout="in-article"
     data-ad-format="fluid"
     data-ad-client="ca-pub-2435427972424429"
     data-ad-slot="3797637297"></ins><br />
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script></p>
<h2>Install Kerberos</h2>
<p>Linux servers use Kerberos to work with Microsoft Windows Active Directory Domain servers. Kerberos provides a reliable and secure way for Linux servers to authenticate on Active Directory domains.</p>
<p>Install Kerberos by using the following steps.</p>
<pre>sudo yum install krb5-workstation
cat /etc/krb5.conf</pre>
<p>To configure Kerberos to work in your Active Directory domains, you need to configure it. On a Windows Desktop computer perform the following steps to find out the Domain controller server name. Replace DOMAIN_NAME with actual domain name i.e. contoso.com .</p>
<pre>C:\&gt; nslookup
&gt; set type=all
&gt; _ldap._tcp.dc._msdcs.MYCONTOSO.COM
mycontoso.com nameserver = my-domain-controller-server.MYCONTOSO.com
......................
ping my-domain-controller-server.MYCONTOSO.com</pre>
<p>Now configure Kerberos as follows. Please note that the contents of &#8220;/etc/krb5.conf&#8221; file are shown as &#8220;cat&#8221; command output.</p>
<pre>sudo cp /etc/krb5.conf /etc/krb5.conf_backup
ls -l /etc/krb5*
sudo vi /etc/krb5.conf
cat /etc/krb5.conf
[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log

[libdefaults]
default_realm = MYCONTOSO.COM

[realms]
MYCONTOSO.COM = {
kdc = my-domain-controller-server.MYCONTOSO.com
}

[domain_realm]
.mycontoso.com = MYCONTOSO.COM
mycontoso.com = MYCONTOSO.COM</pre>
<p>Kerberos works by passing the user account and password information to Active Directory server, which authenticates the user. If the user is authenticated successfully then a temporary Kerberos Ticket is saved in &#8220;/tmp/krb5cc&#8221; file. This ticket can be used to login to Windows Servers before the ticket expires.</p>
<p>To obtain Kerberos Ticket interactively, for testing the connection type the following commands.</p>
<pre>kinit AD_USER_ID@MYCONTOSO.COM
# Enter User Password

klist  # Lists Kerberos Tickets
# Ticket cache: FILE:/tmp/krb5cc_500
# Default principal: AD_USER_ID@MYCONTOSO.COM
#
# Valid starting Expires Service principal
# 08/31/17 14:17:29 09/01/17 00:17:50 krbtgt/MYCONTOSO.COM@MYCONTOSO.COM
# renew until 09/01/17 14:17:29
# 08/31/17 14:18:56 09/01/17 00:17:50 MSSQLSvc/db_server.mycontoso.com:1433@MYCONTOSO.COM
# renew until 09/01/17 14:17:29</pre>
<h2>Connecting Python With Kerberos Ticket</h2>
<p>To test Connection with current Kerberos ticket type the following. Please note that this connection method is not using the DSN that we created earlier.</p>
<pre>$ cat testConnection.py
import pyodbc
cnxn = pyodbc.connect('DRIVER={ODBC Driver 13 for SQL Server};SERVER=db_server.mycontonso.com,1433;DATABASE=db_name;Trusted_Connection=yes')
cursor = cnxn.cursor()
cursor.execute('SELECT TOP 10 [ServerName],[RunID],[JobID],[TimeStamp] FROM [db_name].[dbo].[table_name] ORDER BY [RunID] DESC')
row = cursor.fetchone()
if not row:
print("No rows returned.")
while row:
print("ServerName=%s, JobID=%d, TimeStamp=%s" % (row[0], row[2], row[3]))
row = cursor.fetchone()
cnxn.close()

$ python testConnection.py</pre>
<p>Following is an example of how Python code can be used to obtain fresh Kerberos ticket and then connect to the MS-SQL database back-end.</p>
<pre>from subprocess import Popen, PIPE
import pyodbc

# Login Credentials
userid="AD_USER_ID"
password='******'
realm="MYCONTOSO.COM"
kinit = '/usr/bin/kinit'

# Get Fresh Kerberos Ticket
kinit_args = [ kinit, '%s@%s' % (userid, realm) ]
kinit = Popen(kinit_args, stdin=PIPE, stdout=PIPE, stderr=PIPE)
kinit.stdin.write('%s\n' % password)
kinit.wait()

cnxn = pyodbc.connect('DRIVER={ODBC Driver 13 for SQL Server};SERVER=db_server.mycontoso.com,1433;DATABASE=db_name;Trusted_Connection=yes')
cursor = cnxn.cursor()
cursor.execute('''SELECT TOP 10 CAST([ServerName] AS VARCHAR) AS SERVERNAME
,[RunID]
,[JobID]
,CAST([LongText] AS VARCHAR(MAX)) AS LONGTEXT
,[TimeStamp]
FROM [db_name].[dbo].[table_name]''')
row = cursor.fetchone()
if not row:
print("No rows returned.")
while row:
print("ServerName=%s, LongText=%s, JobID=%d, TimeStamp=%s" % (row[0], row[3], row[2], row[4]))
row = cursor.fetchone()
cnxn.close()</pre>
<div class="wpapp_widget"><div id="elements_wrapper_wpapp_paypal_button_0"><div class="wpapp_payment_subject"><span class="payment_subject"><strong>Is this content useful for you? Support this site by donating any amount....(takes you to Paypal website).</strong></span></div><select id="select_wpapp_paypal_button_0" name="select_wpapp_paypal_button_0" class=""><option value="proud-supporter-2-donation">Proud Supporter - $2 Donation</option><option value="bronze-supporter-5-donation">Bronze Supporter - $5 Donation</option><option value="silver-supporter-10-donation">Silver Supporter - $10 Donation</option><option value="gold-supporter-20-donation">Gold Supporter - $20 Donation</option></select><div class="wpapp_other_amount_label"><strong>Other Amount</strong></div><div class="wpapp_other_amount_input"><input type="number" min="1" step="any" name="wpapp_other_amt" title="Other Amount" value="" placeholder="" class="wpapp_other_amt_input" style="max-width:80px;" /></div><div style="margin-bottom:10px;"></div></div>    <div class="wpapp-ppcp-button-wrapper">

    <!-- PayPal button container where the button will be rendered -->
    <div id="wpapp_paypal_button_0" style="width: 250px;"></div>

    <script type="text/javascript">
        document.addEventListener( "wpapp_paypal_sdk_loaded", function() { 
            //Anything that goes here will only be executed after the PayPal SDK is loaded.
            console.log('PayPal JS SDK is loaded for WPAPP.');

            /**
             * See documentation: https://developer.paypal.com/sdk/js/reference/
             */
            paypal.Buttons({
                /**
                 * Optional styling for buttons.
                 * 
                 * See documentation: https://developer.paypal.com/sdk/js/reference/#link-style
                 */
                style: {
                    color: 'blue',
                    shape: 'rect',
                    height: 35,
                    label: 'checkout',
                    layout: 'vertical',
                },

                // Triggers when the button first renders.
                onInit: onInitHandler,

                // Triggers when the button is clicked.
                onClick: onClickHandler,

                // Setup the transaction.
                createOrder: createOrderHandler,

                // Handle the onApprove event.
                onApprove: onApproveHandler,

                // Handle unrecoverable errors.
                onError: onErrorHandler,

                // Handles onCancel event.
                onCancel: onCancelHandler,

            })
            .render('#wpapp_paypal_button_0')
            .catch((err) => {
                console.error('PayPal Buttons failed to render');
            });

            function onInitHandler(data, actions) {
                //This function is called when the button first renders.
            }

            function onClickHandler(data, actions) {
                //This function is called when the button is clicked.
            }

            
            /**
             * See documentation: https://developer.paypal.com/sdk/js/reference/#link-createorder
             */
            async function createOrderHandler() {
                // Create the order in PayPal using the PayPal API.
                // https://developer.paypal.com/docs/checkout/standard/integrate/
                // The server-side Create Order API is used to generate the Order. Then the Order-ID is returned.                    
                console.log('Setting up the AJAX request for create-order call.');

                // First, select the interacted button's wrapper div by its ID (so  we can target various elements within it)
                const wrapper_div_interacted_button = document.getElementById('elements_wrapper_wpapp_paypal_button_0');
                //console.log(wrapper_div_interacted_button);

                // Read the select element and get the selected option's value and text.
                js_on_page_embed_button_id = 'wpapp_paypal_button_0';
                var selectId = 'select_' + js_on_page_embed_button_id; // Construct the select ID
                var selectElement = document.getElementById(selectId);
                //console.log("Select Element: ", selectElement);

                //Get the other amount field value.
                var other_amount_input = wrapper_div_interacted_button.querySelector('.wpapp_other_amt_input');

                //Get the reference field value.
                var pp_reference_field = wrapper_div_interacted_button.querySelector('.wp_pp_button_reference');

                let pp_bn_data = {};
                pp_bn_data.transient_name = '6b01fa7439fad_wpapp_paypal_button_0';
                pp_bn_data.on_page_button_id = 'wpapp_paypal_button_0';
                pp_bn_data.selected_val = selectElement.value;//value of the selected option. (we can use it get the item name from the transient).
                pp_bn_data.other_amount_val = other_amount_input ? other_amount_input.value : '';
                pp_bn_data.pp_reference_field = pp_reference_field ? pp_reference_field.value : '';
                console.log('WPAPP Button Data Below');
                console.log(pp_bn_data);

                //Ajax action: <prefix>_pp_create_order 
                let post_data = 'action=wpapp_pp_create_order&data=' + JSON.stringify(pp_bn_data) + '&_wpnonce=6db09d5180';
                //console.log('Post Data: ', post_data);//Debugging purposes only.

                try {
                    // Using fetch for AJAX request. This is supported in all modern browsers.
                    const response = await fetch("https://andromedabay.ddns.net/wp-admin/admin-ajax.php", {
                        method: "post",
                        headers: {
                            'Content-Type': 'application/x-www-form-urlencoded'
                        },
                        body: post_data
                    });

                    const response_data = await response.json();

                    if (response_data.order_id) {
                        console.log('Create-order API call to PayPal completed successfully.');
                        //If we need to see the order details, uncomment the following line.
                        //const order_data = response_data.order_data;
                        //console.log('Order data: ' + JSON.stringify(order_data));
                        return response_data.order_id;
                    } else {
                        const error_message = JSON.stringify(response_data);
                        console.error('Error occurred during create-order call to PayPal. ' + error_message);
                        throw new Error(error_message);
                    }
                } catch (error) {
                    console.error(error);
                    alert('Could not initiate PayPal Checkout...\n\n' + JSON.stringify(error));
                }
            }

            async function onApproveHandler(data, actions) {
                console.log('Successfully created a transaction.');

                // Show the spinner while we process this transaction.
                // First, select the button container by its ID.
                const pp_button_container = document.getElementById('wpapp_paypal_button_0');
                // Then, navigate to the parent element of the PPCP button container.
                const parent_wrapper = pp_button_container.parentElement;
                // Finally, within the parent wrapper, select the spinner container
                const pp_button_spinner_container = parent_wrapper.querySelector('.wpapp-pp-button-spinner-container');
                //console.log('Button spinner container: ', pp_button_spinner_container);

                pp_button_container.style.display = 'none'; //Hide the buttons
                pp_button_spinner_container.style.display = 'inline-block'; //Show the spinner.

                // Capture the order in PayPal using the PayPal API.
                // https://developer.paypal.com/docs/checkout/standard/integrate/
                // The server-side capture-order API is used. Then the Capture-ID is returned.
                console.log('Setting up the AJAX request for capture-order call.');
                let pp_bn_data = {};
                pp_bn_data.order_id = data.orderID;
                pp_bn_data.on_page_button_id = 'wpapp_paypal_button_0';
                pp_bn_data.transient_name = '6b01fa7439fad_wpapp_paypal_button_0';
                //pp_bn_data.custom_field = encodeURIComponent(custom_data);//If you have any custom data to send to the server (it needs to be URI encoded so special characters are not lost.)

                //Ajax action: <prefix>_pp_capture_order
                let post_data = 'action=wpapp_pp_capture_order&data=' + JSON.stringify(pp_bn_data) + '&_wpnonce=6db09d5180';
                try {
                    const response = await fetch("https://andromedabay.ddns.net/wp-admin/admin-ajax.php", {
                        method: "post",
                        headers: {
                            'Content-Type': 'application/x-www-form-urlencoded'
                        },
                        body: post_data
                    });

                    const response_data = await response.json();
                    const txn_data = response_data.txn_data;
                    const error_detail = txn_data?.details?.[0];
                    const error_msg = response_data.error_msg;//Our custom error message.
                    // Three cases to handle:
                    // (1) Recoverable INSTRUMENT_DECLINED -> call actions.restart()
                    // (2) Other non-recoverable errors -> Show a failure message
                    // (3) Successful transaction -> Show confirmation or thank you message

                    if (response_data.capture_id) {
                        // Successful transaction -> Show confirmation or thank you message
                        console.log('Capture-order API call to PayPal completed successfully.');

                        //Redirect to the Thank you page URL if it is set.
                        return_url = 'https://andromedabay.ddns.net/thanks/';
                        if( return_url ){
                            //redirect to the Thank you page URL.
                            console.log('Redirecting to the Thank you page URL: ' + return_url);
                            window.location.href = return_url;
                            return;
                        } else {
                            //No return URL is set. Just show a success message.
                            console.log('No return URL is set in the settings. Showing a success message.');

                            //We are going to show the success message in the wpapp-ppcp-button-wrapper's container.
                            txn_success_msg = 'Transaction completed successfully! Feel free to browse our site for another checkout.';
                            // Select all elements with the class 'wpapp-ppcp-button-wrapper'
                            var button_divs = document.querySelectorAll('.wpapp-ppcp-button-wrapper');

                            // Loop through the NodeList and update each element
                            button_divs.forEach(function(div, index) {
                                div.innerHTML = '<div id="wpapp-btn-txn-success-msg-' + index + '" class="wpapp-btn-txn-success-msg">' + txn_success_msg + '</div>';
                            });

                            // Scroll to the success message container of the button we are interacting with.
                            const interacted_button_container_element = document.getElementById(elements_wrapper_wpapp_paypal_button_0);
                            if (interacted_button_container_element) {
                                interacted_button_container_element.scrollIntoView({ behavior: 'smooth', block: 'start' });
                            }
                            return;
                        }

                    } else if (error_detail?.issue === "INSTRUMENT_DECLINED") {
                        // Recoverable INSTRUMENT_DECLINED -> call actions.restart()
                        console.log('Recoverable INSTRUMENT_DECLINED error. Calling actions.restart()');
                        return actions.restart();
                    } else if ( error_msg && error_msg.trim() !== '' ) {
                        //Our custom error message from the server.
                        console.error('Error occurred during PayPal checkout process.');
                        console.error( error_msg );
                        alert( error_msg );
                    } else {
                        // Other non-recoverable errors -> Show a failure message
                        console.error('Non-recoverable error occurred during PayPal checkout process.');
                        console.error( error_detail );
                        //alert('Unexpected error occurred with the transaction. Enable debug logging to get more details.\n\n' + JSON.stringify(error_detail));
                    }

                    //Return the button and the spinner back to their orignal display state.
                    pp_button_container.style.display = 'block'; // Show the buttons
                    pp_button_spinner_container.style.display = 'none'; // Hide the spinner

                } catch (error) {
                    console.error(error);
                    alert('PayPal returned an error! Transaction could not be processed. Enable the debug logging feature to get more details...\n\n' + JSON.stringify(error));
                }
            }

            function onErrorHandler(err) {
                console.error('An error prevented the user from checking out with PayPal. ' + JSON.stringify(err));
                alert( 'Error occurred during PayPal checkout process.\n\n' + JSON.stringify(err) );
            }
            
            function onCancelHandler (data) {
                console.log('Checkout operation cancelled by the customer.');
                //Return to the parent page which the button does by default.
            }            

        });
    </script>

    <style>
        @keyframes wpapp-pp-button-spinner {
            to {transform: rotate(360deg);}
        }
        .wpapp-pp-button-spinner {
            margin: 0 auto;
            text-indent: -9999px;
            vertical-align: middle;
            box-sizing: border-box;
            position: relative;
            width: 60px;
            height: 60px;
            border-radius: 50%;
            border: 5px solid #ccc;
            border-top-color: #0070ba;
            animation: wpapp-pp-button-spinner .6s linear infinite;
        }
        .wpapp-pp-button-spinner-container {
            width: 100%;
            text-align: center;
            margin-top:10px;
            display: none;
        }
    </style>
    <div class="wpapp-pp-button-spinner-container">
        <div class="wpapp-pp-button-spinner"></div>
    </div>    
    </div><!-- end of button-wrapper -->
    </div>
<h2>Further Reading</h2>
<p>The following list is not complete, but it provides some pointers for further reading on the topics discussed in this article.</p>
<ol>
<li style="list-style-type: none;">
<ol>
<li>Python Kerberos Kinit &#8211; <a href="https://pypi.python.org/pypi/kerberos" target="_blank" rel="noopener">https://pypi.python.org/pypi/kerberos</a> , Date accessed: September 26, 2017</li>
<li>Python Kerberos &#8211; <a href="http://python-notes.curiousefficiency.org/en/latest/python_kerberos.html" target="_blank" rel="noopener">http://python-notes.curiousefficiency.org/en/latest/python_kerberos.html</a> , Date accessed: September 26, 2017</li>
<li>CentOS Home page- <a href="https://wiki.centos.org/FrontPage" target="_blank" rel="noopener">https://wiki.centos.org/FrontPage</a> , Date accessed: September 26, 2017</li>
<li>Three Tier Architecture &#8211; <a href="https://en.wikipedia.org/wiki/Multitier_architecture#Three-tier_architecture" target="_blank" rel="noopener">https://en.wikipedia.org/wiki/Multitier_architecture#Three-tier_architecture</a> , Date accessed: September 26, 2017</li>
<li>Kerberos Reference &#8211; <a href="https://web.mit.edu/kerberos/" target="_blank" rel="noopener">https://web.mit.edu/kerberos/</a> , Date accessed: September 26, 2017</li>
<li>pyodbc Driver/Bridge &#8211; <a href="https://mkleehammer.github.io/pyodbc/" target="_blank" rel="noopener">https://mkleehammer.github.io/pyodbc/</a> , Date accessed: September 26, 2017</li>
<li>Microsoft ODBC SQL Driver installation &#8211; <a href="https://docs.microsoft.com/en-us/sql/connect/python/pyodbc/step-1-configure-development-environment-for-pyodbc-python-development" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/sql/connect/python/pyodbc/step-1-configure-development-environment-for-pyodbc-python-development</a> , Date accessed: September 26, 2017</li>
<li>Microsoft ODBC Driver installation 2 &#8211; <a href="https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server</a> , Date accessed: September 26, 2017</li>
<li>Active Directory &#8211; <a href="https://en.m.wikipedia.org/wiki/Active_Directory" target="_blank" rel="noopener">https://en.m.wikipedia.org/wiki/Active_Directory</a> , Date accessed: September 26, 2017</li>
</ol>
</li>
</ol>


		<div class=" twp-social-share  booster-clear">

						    <header class="twp-plugin-title twp-share-title">
			        <h2>Share</h2>
			    </header>
			
		    <div class="twp-share-container">
				<div class="twp-social-icons twp-social-facebook">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'https://www.facebook.com/sharer/sharer.php?u=http://andromedabay.ddns.net/ms-sql-connecting-python-on-linux-using-active-directory-credentials-and-kerberos/'); "  href="https://www.facebook.com/sharer/sharer.php?u=http://andromedabay.ddns.net/ms-sql-connecting-python-on-linux-using-active-directory-credentials-and-kerberos/" >
			                                <span class="twp-social-count"><span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M 23.25 9 L 15 9 L 15 0.75 C 15 0.335938 14.664062 0 14.25 0 L 9.75 0 C 9.335938 0 9 0.335938 9 0.75 L 9 9 L 0.75 9 C 0.335938 9 0 9.335938 0 9.75 L 0 14.25 C 0 14.664062 0.335938 15 0.75 15 L 9 15 L 9 23.25 C 9 23.664062 9.335938 24 9.75 24 L 14.25 24 C 14.664062 24 15 23.664062 15 23.25 L 15 15 L 23.25 15 C 23.664062 15 24 14.664062 24 14.25 L 24 9.75 C 24 9.335938 23.664062 9 23.25 9 Z M 23.25 9" /></svg></span></span>												<span class="twp-share-media">

													<span class="twp-share-label">
                                                        <span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M22.675 0h-21.35c-.732 0-1.325.593-1.325 1.325v21.351c0 .731.593 1.324 1.325 1.324h11.495v-9.294h-3.128v-3.622h3.128v-2.671c0-3.1 1.893-4.788 4.659-4.788 1.325 0 2.463.099 2.795.143v3.24l-1.918.001c-1.504 0-1.795.715-1.795 1.763v2.313h3.587l-.467 3.622h-3.12v9.293h6.116c.73 0 1.323-.593 1.323-1.325v-21.35c0-.732-.593-1.325-1.325-1.325z" /></svg></span>
				                                        <span class="twp-label-title">
				                                            Facebook				                                        </span>
				                                    </span>
												</span>
																					</a>
									</div><div class="twp-social-icons twp-social-twitter">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'https://twitter.com/intent/tweet?text=MS-SQL:%20connecting%20Python%20on%20Linux%20&#8211;%20using%20Active%20Directory%20Credentials%20and%20Kerberos&#038;url=http://andromedabay.ddns.net/ms-sql-connecting-python-on-linux-using-active-directory-credentials-and-kerberos/'); "  href="https://twitter.com/intent/tweet?text=MS-SQL:%20connecting%20Python%20on%20Linux%20&#8211;%20using%20Active%20Directory%20Credentials%20and%20Kerberos&#038;url=http://andromedabay.ddns.net/ms-sql-connecting-python-on-linux-using-active-directory-credentials-and-kerberos/" >
			                                <span class="twp-social-count"><span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M 23.25 9 L 15 9 L 15 0.75 C 15 0.335938 14.664062 0 14.25 0 L 9.75 0 C 9.335938 0 9 0.335938 9 0.75 L 9 9 L 0.75 9 C 0.335938 9 0 9.335938 0 9.75 L 0 14.25 C 0 14.664062 0.335938 15 0.75 15 L 9 15 L 9 23.25 C 9 23.664062 9.335938 24 9.75 24 L 14.25 24 C 14.664062 24 15 23.664062 15 23.25 L 15 15 L 23.25 15 C 23.664062 15 24 14.664062 24 14.25 L 24 9.75 C 24 9.335938 23.664062 9 23.25 9 Z M 23.25 9" /></svg></span></span>												<span class="twp-share-media">
													<span class="twp-share-label">
                                                        <span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"></path></svg></span>
				                                        <span class="twp-label-title">
				                                            Twitter				                                        </span>
												    </span>
												</span>
																					</a>
									</div><div class="twp-social-icons twp-social-pinterest">										<a class="twp-icon-holder" rel="nofollow" href="javascript:twp_be_pinterest()">
											<span class="twp-social-count"><span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M 23.25 9 L 15 9 L 15 0.75 C 15 0.335938 14.664062 0 14.25 0 L 9.75 0 C 9.335938 0 9 0.335938 9 0.75 L 9 9 L 0.75 9 C 0.335938 9 0 9.335938 0 9.75 L 0 14.25 C 0 14.664062 0.335938 15 0.75 15 L 9 15 L 9 23.25 C 9 23.664062 9.335938 24 9.75 24 L 14.25 24 C 14.664062 24 15 23.664062 15 23.25 L 15 15 L 23.25 15 C 23.664062 15 24 14.664062 24 14.25 L 24 9.75 C 24 9.335938 23.664062 9 23.25 9 Z M 23.25 9" /></svg></span></span>				                                <span class="twp-share-media">
													<span class="twp-share-label">
                                                        <span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2"></path></svg></span>
				                                        <span class="twp-label-title">
				                                            Pinterest				                                        </span>
				                                    </span>
												</span>
																					</a>
									</div><div class="twp-social-icons twp-social-linkedin">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'http://www.linkedin.com/shareArticle?mini=true&#038;title=MS-SQL:%20connecting%20Python%20on%20Linux%20&#8211;%20using%20Active%20Directory%20Credentials%20and%20Kerberos&#038;url=http://andromedabay.ddns.net/ms-sql-connecting-python-on-linux-using-active-directory-credentials-and-kerberos/'); "  href="http://www.linkedin.com/shareArticle?mini=true&#038;title=MS-SQL:%20connecting%20Python%20on%20Linux%20&#8211;%20using%20Active%20Directory%20Credentials%20and%20Kerberos&#038;url=http://andromedabay.ddns.net/ms-sql-connecting-python-on-linux-using-active-directory-credentials-and-kerberos/" >
																							<span class="twp-share-media">
				                                    <span class="share-media-nocount">
													    <svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg>				                                    </span>
													<span class="twp-share-label twp-label-title">
				                                        LinkedIn				                                    </span>
												</span>
																					</a>
										</div><div class="twp-social-icons twp-social-email">										<a class="twp-icon-holder" rel="nofollow"  href="mailto:?subject=:&amp;body= MS-SQL: connecting Python on Linux &#8211; using Active Directory Credentials and Kerberos http://andromedabay.ddns.net/ms-sql-connecting-python-on-linux-using-active-directory-credentials-and-kerberos/">
																							<span class="twp-share-media">
				                                    <span class="share-media-nocount">
													    <svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M0 3v18h24v-18h-24zm6.623 7.929l-4.623 5.712v-9.458l4.623 3.746zm-4.141-5.929h19.035l-9.517 7.713-9.518-7.713zm5.694 7.188l3.824 3.099 3.83-3.104 5.612 6.817h-18.779l5.513-6.812zm9.208-1.264l4.616-3.741v9.348l-4.616-5.607z" /></svg>				                                    </span>
				                                    <span class="twp-share-label twp-label-title">
				                                        Email				                                    </span>
												</span>
																					</a>
										</div><div class="twp-social-icons twp-social-vk">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'http://vk.com/share.php?url=http://andromedabay.ddns.net/ms-sql-connecting-python-on-linux-using-active-directory-credentials-and-kerberos/&#038;caption=MS-SQL:%20connecting%20Python%20on%20Linux%20&#8211;%20using%20Active%20Directory%20Credentials%20and%20Kerberos'); "  href="http://vk.com/share.php?url=http://andromedabay.ddns.net/ms-sql-connecting-python-on-linux-using-active-directory-credentials-and-kerberos/&#038;caption=MS-SQL:%20connecting%20Python%20on%20Linux%20&#8211;%20using%20Active%20Directory%20Credentials%20and%20Kerberos" >
																							<span class="twp-share-media">
				                                    <span class="share-media-nocount">
													    <svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M22,7.1c0.2,0.4-0.4,1.5-1.6,3.1c-0.2,0.2-0.4,0.5-0.7,0.9c-0.5,0.7-0.9,1.1-0.9,1.4c-0.1,0.3-0.1,0.6,0.1,0.8 c0.1,0.1,0.4,0.4,0.8,0.9h0l0,0c1,0.9,1.6,1.7,2,2.3c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.3c0,0.1,0,0.2,0,0.4 c0,0.1-0.1,0.2-0.3,0.3c-0.1,0.1-0.4,0.1-0.6,0.1l-2.7,0c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.1-0.5-0.2l-0.2-0.1 c-0.2-0.1-0.5-0.4-0.7-0.7s-0.5-0.6-0.7-0.8c-0.2-0.2-0.4-0.4-0.6-0.6C14.8,15,14.6,15,14.4,15c0,0,0,0-0.1,0c0,0-0.1,0.1-0.2,0.2 c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.1-0.1,0.3-0.2,0.5c-0.1,0.2-0.1,0.5-0.1,0.8c0,0.1,0,0.2,0,0.3c0,0.1-0.1,0.2-0.1,0.2l0,0.1 c-0.1,0.1-0.3,0.2-0.6,0.2h-1.2c-0.5,0-1,0-1.5-0.2c-0.5-0.1-1-0.3-1.4-0.6s-0.7-0.5-1.1-0.7s-0.6-0.4-0.7-0.6l-0.3-0.3 c-0.1-0.1-0.2-0.2-0.3-0.3s-0.4-0.5-0.7-0.9s-0.7-1-1.1-1.6c-0.4-0.6-0.8-1.3-1.3-2.2C2.9,9.4,2.5,8.5,2.1,7.5C2,7.4,2,7.3,2,7.2 c0-0.1,0-0.1,0-0.2l0-0.1c0.1-0.1,0.3-0.2,0.6-0.2l2.9,0c0.1,0,0.2,0,0.2,0.1S5.9,6.9,5.9,7L6,7c0.1,0.1,0.2,0.2,0.3,0.3 C6.4,7.7,6.5,8,6.7,8.4C6.9,8.8,7,9,7.1,9.2l0.2,0.3c0.2,0.4,0.4,0.8,0.6,1.1c0.2,0.3,0.4,0.5,0.5,0.7s0.3,0.3,0.4,0.4 c0.1,0.1,0.3,0.1,0.4,0.1c0.1,0,0.2,0,0.3-0.1c0,0,0,0,0.1-0.1c0,0,0.1-0.1,0.1-0.2c0.1-0.1,0.1-0.3,0.1-0.5c0-0.2,0.1-0.5,0.1-0.8 c0-0.4,0-0.8,0-1.3c0-0.3,0-0.5-0.1-0.8c0-0.2-0.1-0.4-0.1-0.5L9.6,7.6C9.4,7.3,9.1,7.2,8.7,7.1C8.6,7.1,8.6,7,8.7,6.9 C8.9,6.7,9,6.6,9.1,6.5c0.4-0.2,1.2-0.3,2.5-0.3c0.6,0,1,0.1,1.4,0.1c0.1,0,0.3,0.1,0.3,0.1c0.1,0.1,0.2,0.1,0.2,0.3 c0,0.1,0.1,0.2,0.1,0.3s0,0.3,0,0.5c0,0.2,0,0.4,0,0.6c0,0.2,0,0.4,0,0.7c0,0.3,0,0.6,0,0.9c0,0.1,0,0.2,0,0.4c0,0.2,0,0.4,0,0.5 c0,0.1,0,0.3,0,0.4s0.1,0.3,0.1,0.4c0.1,0.1,0.1,0.2,0.2,0.3c0.1,0,0.1,0,0.2,0c0.1,0,0.2,0,0.3-0.1c0.1-0.1,0.2-0.2,0.4-0.4 s0.3-0.4,0.5-0.7c0.2-0.3,0.5-0.7,0.7-1.1c0.4-0.7,0.8-1.5,1.1-2.3c0-0.1,0.1-0.1,0.1-0.2c0-0.1,0.1-0.1,0.1-0.1l0,0l0.1,0 c0,0,0,0,0.1,0s0.2,0,0.2,0l3,0c0.3,0,0.5,0,0.7,0S21.9,7,21.9,7L22,7.1z"></path></svg>				                                    </span>
													<span class="twp-share-label twp-label-title">
				                                        VK				                                    </span>
												</span>
																					</a>
										</div>			</div>
		</div>

	]]></content:encoded>
					
					<wfw:commentRss>https://andromedabay.ddns.net/ms-sql-connecting-python-on-linux-using-active-directory-credentials-and-kerberos/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Linux Based Monitoring Setup</title>
		<link>https://andromedabay.ddns.net/linux-based-monitoring-setup/</link>
					<comments>https://andromedabay.ddns.net/linux-based-monitoring-setup/#respond</comments>
		
		<dc:creator><![CDATA[Hammad Rauf]]></dc:creator>
		<pubDate>Wed, 03 Aug 2016 19:26:34 +0000</pubDate>
				<category><![CDATA[BASH Shell]]></category>
		<category><![CDATA[IT Infrastructure Systems]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[Gnome-Terminal]]></category>
		<category><![CDATA[Screen]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[Terminator]]></category>
		<guid isPermaLink="false">https://hammadr.wordpress.com/?p=104</guid>

					<description><![CDATA[This post describes how to setup easy to re-use monitoring on a Linux desktop system. We will need Screen and Terminator. We will monitor the]]></description>
										<content:encoded><![CDATA[<div class='booster-block booster-read-block'>
                <div class="twp-read-time">
                	<i class="booster-icon twp-clock"></i> <span>Read Time:</span>2 Minute, 30 Second                </div>

            </div><p>This post describes how to setup easy to re-use monitoring on a Linux desktop system. We will need Screen and Terminator. We will monitor the Django (A python web application) console output.</p>
<h2>Screen &#8211; A virtual Terminal Emulator</h2>
<p>We will first install Screen. Screen is a Virtual Terminal Emulator specially created for multitasking. It allows you to start a program that logs output to console, in an off-screen session. You can later Attach or Detach to that screen session to look at the output.</p>
<h2>Terminator &#8211; A Terminal program</h2>
<p>Terminator is a fancy Terminal with easy to use launch options. It is available through the EPEL yum repository.</p>
<h2>Install Required Tools</h2>
<pre>sudo yum install screen
sudo yum install terminator</pre>
<p>OR</p>
<pre>sudo apt-get install screen
sudo apt-get install terminator</pre>
<h2>Script for Starting Screen Sessions</h2>
<p>Save the following scripts as &#8220;start-django-portal.sh&#8221; in /home/username folder. Then chmod +x FileName.sh.</p>
<pre>#!/bin/sh
screen -S django_portal -md python ~/PycharmProjects/mysite/manage.py runserver &amp;
sleep 4
screen –ls
/usr/bin/firefox http://127.0.0.1:8000</pre>
<h2>Script for Monitoring Screen Sessions</h2>
<p>Save the following scripts as &#8220;monitor-screens.sh&#8221; in /home/username folder. Then chmod +x FileName.sh.</p>
<pre>#!/bin/bash
DISP_ARRAY=(636x420+0+0 636x420-0+0 636x420+0-0 636x420-0-0)
DISP_ARRAY2=(77x23+0+0 77x23-0+0 77x23+0-0 77x23-0-0)
COUNT=0
for scr in $(screen -ls | grep "Detached" | awk '{print $1}')
do
# echo $scr
echo ${DISP_ARRAY[$COUNT]}
# gnome-terminal -e "screen -r $scr" --geometry=${DISP_ARRAY2[$COUNT]} --background=black --foreground=white --title=$scr
terminator -e "screen -r $scr" --geometry=${DISP_ARRAY[$COUNT]} --title=$scr &amp;
COUNT=$(((COUNT+1)%4))
done
exit $?</pre>
<h2>Desktop Launcher for Screen Start</h2>
<p>This launcher is for GNOME Desktop. Save the following as &#8220;start-django-portal.desktop&#8221; in /home/username/Desktop folder. You can save a suitable screen capture PNG image in /home/username/Icons folder to work as icon</p>
<pre>#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Name=Start Django-Portal
Icon=/home/username/Icons/img.PNG
Exec="/home/username/start-django-portal.sh"
Comment=Script to start Django-Portal
Categories=Development;
Terminal=false</pre>
<h2>Desktop Launcher for Screen Monitor</h2>
<p>This launcher is for the GNOME desktop. Save the following as &#8220;monitor-screens.desktop&#8221; in /home/username/Desktop folder. You can save a suitable screen capture PNG image in /home/username/Icons folder to work as icon.</p>
<pre>#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Name=Monitor Screens
Icon=/home/username/Icons/img2.PNG
Exec="/home/username/monitor-screens.sh"
Comment=Script to monitor detached Screen sessions
Categories=Development;
Terminal=false</pre>
<figure id="attachment_118" aria-describedby="caption-attachment-118" style="width: 1184px" class="wp-caption alignnone"><a href="https://andromedabay.ddns.net/wp-content/uploads/2016/08/screens-monitor.png"><img decoding="async" class="wp-image-118 size-full" src="https://andromedabay.ddns.net/wp-content/uploads/2016/08/screens-monitor.png" alt="Image showing 4 Screens Monitoring Consoles on Linux Desktop" width="1184" height="542" srcset="https://andromedabay.ddns.net/wp-content/uploads/2016/08/screens-monitor.png 1184w, https://andromedabay.ddns.net/wp-content/uploads/2016/08/screens-monitor-600x275.png 600w, https://andromedabay.ddns.net/wp-content/uploads/2016/08/screens-monitor-300x137.png 300w, https://andromedabay.ddns.net/wp-content/uploads/2016/08/screens-monitor-1024x469.png 1024w, https://andromedabay.ddns.net/wp-content/uploads/2016/08/screens-monitor-768x352.png 768w" sizes="(max-width: 1184px) 100vw, 1184px" /></a><figcaption id="caption-attachment-118" class="wp-caption-text">Figure 1: A sample of the monitoring windows. In this case 4 Screen sessions are being monitored in 1 corner of screen each.</figcaption></figure>
<h2>Further Reading</h2>
<p>Have a look at the Screen manual pages (or try <a href="http://ss64.com/bash/screen.html" target="_blank" rel="noopener">this link</a>) for more insight into using screen.</p>


		<div class=" twp-social-share  booster-clear">

						    <header class="twp-plugin-title twp-share-title">
			        <h2>Share</h2>
			    </header>
			
		    <div class="twp-share-container">
				<div class="twp-social-icons twp-social-facebook">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'https://www.facebook.com/sharer/sharer.php?u=http://andromedabay.ddns.net/linux-based-monitoring-setup/'); "  href="https://www.facebook.com/sharer/sharer.php?u=http://andromedabay.ddns.net/linux-based-monitoring-setup/" >
			                                <span class="twp-social-count"><span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M 23.25 9 L 15 9 L 15 0.75 C 15 0.335938 14.664062 0 14.25 0 L 9.75 0 C 9.335938 0 9 0.335938 9 0.75 L 9 9 L 0.75 9 C 0.335938 9 0 9.335938 0 9.75 L 0 14.25 C 0 14.664062 0.335938 15 0.75 15 L 9 15 L 9 23.25 C 9 23.664062 9.335938 24 9.75 24 L 14.25 24 C 14.664062 24 15 23.664062 15 23.25 L 15 15 L 23.25 15 C 23.664062 15 24 14.664062 24 14.25 L 24 9.75 C 24 9.335938 23.664062 9 23.25 9 Z M 23.25 9" /></svg></span></span>												<span class="twp-share-media">

													<span class="twp-share-label">
                                                        <span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M22.675 0h-21.35c-.732 0-1.325.593-1.325 1.325v21.351c0 .731.593 1.324 1.325 1.324h11.495v-9.294h-3.128v-3.622h3.128v-2.671c0-3.1 1.893-4.788 4.659-4.788 1.325 0 2.463.099 2.795.143v3.24l-1.918.001c-1.504 0-1.795.715-1.795 1.763v2.313h3.587l-.467 3.622h-3.12v9.293h6.116c.73 0 1.323-.593 1.323-1.325v-21.35c0-.732-.593-1.325-1.325-1.325z" /></svg></span>
				                                        <span class="twp-label-title">
				                                            Facebook				                                        </span>
				                                    </span>
												</span>
																					</a>
									</div><div class="twp-social-icons twp-social-twitter">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'https://twitter.com/intent/tweet?text=Linux%20Based%20Monitoring%20Setup&#038;url=http://andromedabay.ddns.net/linux-based-monitoring-setup/'); "  href="https://twitter.com/intent/tweet?text=Linux%20Based%20Monitoring%20Setup&#038;url=http://andromedabay.ddns.net/linux-based-monitoring-setup/" >
			                                <span class="twp-social-count"><span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M 23.25 9 L 15 9 L 15 0.75 C 15 0.335938 14.664062 0 14.25 0 L 9.75 0 C 9.335938 0 9 0.335938 9 0.75 L 9 9 L 0.75 9 C 0.335938 9 0 9.335938 0 9.75 L 0 14.25 C 0 14.664062 0.335938 15 0.75 15 L 9 15 L 9 23.25 C 9 23.664062 9.335938 24 9.75 24 L 14.25 24 C 14.664062 24 15 23.664062 15 23.25 L 15 15 L 23.25 15 C 23.664062 15 24 14.664062 24 14.25 L 24 9.75 C 24 9.335938 23.664062 9 23.25 9 Z M 23.25 9" /></svg></span></span>												<span class="twp-share-media">
													<span class="twp-share-label">
                                                        <span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"></path></svg></span>
				                                        <span class="twp-label-title">
				                                            Twitter				                                        </span>
												    </span>
												</span>
																					</a>
									</div><div class="twp-social-icons twp-social-pinterest">										<a class="twp-icon-holder" rel="nofollow" href="javascript:twp_be_pinterest()">
											<span class="twp-social-count"><span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M 23.25 9 L 15 9 L 15 0.75 C 15 0.335938 14.664062 0 14.25 0 L 9.75 0 C 9.335938 0 9 0.335938 9 0.75 L 9 9 L 0.75 9 C 0.335938 9 0 9.335938 0 9.75 L 0 14.25 C 0 14.664062 0.335938 15 0.75 15 L 9 15 L 9 23.25 C 9 23.664062 9.335938 24 9.75 24 L 14.25 24 C 14.664062 24 15 23.664062 15 23.25 L 15 15 L 23.25 15 C 23.664062 15 24 14.664062 24 14.25 L 24 9.75 C 24 9.335938 23.664062 9 23.25 9 Z M 23.25 9" /></svg></span></span>				                                <span class="twp-share-media">
													<span class="twp-share-label">
                                                        <span class="booster-svg-icon"><svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M12.289,2C6.617,2,3.606,5.648,3.606,9.622c0,1.846,1.025,4.146,2.666,4.878c0.25,0.111,0.381,0.063,0.439-0.169 c0.044-0.175,0.267-1.029,0.365-1.428c0.032-0.128,0.017-0.237-0.091-0.362C6.445,11.911,6.01,10.75,6.01,9.668 c0-2.777,2.194-5.464,5.933-5.464c3.23,0,5.49,2.108,5.49,5.122c0,3.407-1.794,5.768-4.13,5.768c-1.291,0-2.257-1.021-1.948-2.277 c0.372-1.495,1.089-3.112,1.089-4.191c0-0.967-0.542-1.775-1.663-1.775c-1.319,0-2.379,1.309-2.379,3.059 c0,1.115,0.394,1.869,0.394,1.869s-1.302,5.279-1.54,6.261c-0.405,1.666,0.053,4.368,0.094,4.604 c0.021,0.126,0.167,0.169,0.25,0.063c0.129-0.165,1.699-2.419,2.142-4.051c0.158-0.59,0.817-2.995,0.817-2.995 c0.43,0.784,1.681,1.446,3.013,1.446c3.963,0,6.822-3.494,6.822-7.833C20.394,5.112,16.849,2,12.289,2"></path></svg></span>
				                                        <span class="twp-label-title">
				                                            Pinterest				                                        </span>
				                                    </span>
												</span>
																					</a>
									</div><div class="twp-social-icons twp-social-linkedin">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'http://www.linkedin.com/shareArticle?mini=true&#038;title=Linux%20Based%20Monitoring%20Setup&#038;url=http://andromedabay.ddns.net/linux-based-monitoring-setup/'); "  href="http://www.linkedin.com/shareArticle?mini=true&#038;title=Linux%20Based%20Monitoring%20Setup&#038;url=http://andromedabay.ddns.net/linux-based-monitoring-setup/" >
																							<span class="twp-share-media">
				                                    <span class="share-media-nocount">
													    <svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M19.7,3H4.3C3.582,3,3,3.582,3,4.3v15.4C3,20.418,3.582,21,4.3,21h15.4c0.718,0,1.3-0.582,1.3-1.3V4.3 C21,3.582,20.418,3,19.7,3z M8.339,18.338H5.667v-8.59h2.672V18.338z M7.004,8.574c-0.857,0-1.549-0.694-1.549-1.548 c0-0.855,0.691-1.548,1.549-1.548c0.854,0,1.547,0.694,1.547,1.548C8.551,7.881,7.858,8.574,7.004,8.574z M18.339,18.338h-2.669 v-4.177c0-0.996-0.017-2.278-1.387-2.278c-1.389,0-1.601,1.086-1.601,2.206v4.249h-2.667v-8.59h2.559v1.174h0.037 c0.356-0.675,1.227-1.387,2.526-1.387c2.703,0,3.203,1.779,3.203,4.092V18.338z"></path></svg>				                                    </span>
													<span class="twp-share-label twp-label-title">
				                                        LinkedIn				                                    </span>
												</span>
																					</a>
										</div><div class="twp-social-icons twp-social-email">										<a class="twp-icon-holder" rel="nofollow"  href="mailto:?subject=:&amp;body= Linux Based Monitoring Setup http://andromedabay.ddns.net/linux-based-monitoring-setup/">
																							<span class="twp-share-media">
				                                    <span class="share-media-nocount">
													    <svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M0 3v18h24v-18h-24zm6.623 7.929l-4.623 5.712v-9.458l4.623 3.746zm-4.141-5.929h19.035l-9.517 7.713-9.518-7.713zm5.694 7.188l3.824 3.099 3.83-3.104 5.612 6.817h-18.779l5.513-6.812zm9.208-1.264l4.616-3.741v9.348l-4.616-5.607z" /></svg>				                                    </span>
				                                    <span class="twp-share-label twp-label-title">
				                                        Email				                                    </span>
												</span>
																					</a>
										</div><div class="twp-social-icons twp-social-vk">										<a class="twp-icon-holder" rel="nofollow"  onclick="twp_be_popup_new_window( event,'http://vk.com/share.php?url=http://andromedabay.ddns.net/linux-based-monitoring-setup/&#038;caption=Linux%20Based%20Monitoring%20Setup'); "  href="http://vk.com/share.php?url=http://andromedabay.ddns.net/linux-based-monitoring-setup/&#038;caption=Linux%20Based%20Monitoring%20Setup" >
																							<span class="twp-share-media">
				                                    <span class="share-media-nocount">
													    <svg class="booster-svg" aria-hidden="true" role="img" focusable="false" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path fill="currentColor" d="M22,7.1c0.2,0.4-0.4,1.5-1.6,3.1c-0.2,0.2-0.4,0.5-0.7,0.9c-0.5,0.7-0.9,1.1-0.9,1.4c-0.1,0.3-0.1,0.6,0.1,0.8 c0.1,0.1,0.4,0.4,0.8,0.9h0l0,0c1,0.9,1.6,1.7,2,2.3c0,0,0,0.1,0.1,0.1c0,0.1,0,0.1,0.1,0.3c0,0.1,0,0.2,0,0.4 c0,0.1-0.1,0.2-0.3,0.3c-0.1,0.1-0.4,0.1-0.6,0.1l-2.7,0c-0.2,0-0.4,0-0.6-0.1c-0.2-0.1-0.4-0.1-0.5-0.2l-0.2-0.1 c-0.2-0.1-0.5-0.4-0.7-0.7s-0.5-0.6-0.7-0.8c-0.2-0.2-0.4-0.4-0.6-0.6C14.8,15,14.6,15,14.4,15c0,0,0,0-0.1,0c0,0-0.1,0.1-0.2,0.2 c-0.1,0.1-0.2,0.2-0.2,0.3c-0.1,0.1-0.1,0.3-0.2,0.5c-0.1,0.2-0.1,0.5-0.1,0.8c0,0.1,0,0.2,0,0.3c0,0.1-0.1,0.2-0.1,0.2l0,0.1 c-0.1,0.1-0.3,0.2-0.6,0.2h-1.2c-0.5,0-1,0-1.5-0.2c-0.5-0.1-1-0.3-1.4-0.6s-0.7-0.5-1.1-0.7s-0.6-0.4-0.7-0.6l-0.3-0.3 c-0.1-0.1-0.2-0.2-0.3-0.3s-0.4-0.5-0.7-0.9s-0.7-1-1.1-1.6c-0.4-0.6-0.8-1.3-1.3-2.2C2.9,9.4,2.5,8.5,2.1,7.5C2,7.4,2,7.3,2,7.2 c0-0.1,0-0.1,0-0.2l0-0.1c0.1-0.1,0.3-0.2,0.6-0.2l2.9,0c0.1,0,0.2,0,0.2,0.1S5.9,6.9,5.9,7L6,7c0.1,0.1,0.2,0.2,0.3,0.3 C6.4,7.7,6.5,8,6.7,8.4C6.9,8.8,7,9,7.1,9.2l0.2,0.3c0.2,0.4,0.4,0.8,0.6,1.1c0.2,0.3,0.4,0.5,0.5,0.7s0.3,0.3,0.4,0.4 c0.1,0.1,0.3,0.1,0.4,0.1c0.1,0,0.2,0,0.3-0.1c0,0,0,0,0.1-0.1c0,0,0.1-0.1,0.1-0.2c0.1-0.1,0.1-0.3,0.1-0.5c0-0.2,0.1-0.5,0.1-0.8 c0-0.4,0-0.8,0-1.3c0-0.3,0-0.5-0.1-0.8c0-0.2-0.1-0.4-0.1-0.5L9.6,7.6C9.4,7.3,9.1,7.2,8.7,7.1C8.6,7.1,8.6,7,8.7,6.9 C8.9,6.7,9,6.6,9.1,6.5c0.4-0.2,1.2-0.3,2.5-0.3c0.6,0,1,0.1,1.4,0.1c0.1,0,0.3,0.1,0.3,0.1c0.1,0.1,0.2,0.1,0.2,0.3 c0,0.1,0.1,0.2,0.1,0.3s0,0.3,0,0.5c0,0.2,0,0.4,0,0.6c0,0.2,0,0.4,0,0.7c0,0.3,0,0.6,0,0.9c0,0.1,0,0.2,0,0.4c0,0.2,0,0.4,0,0.5 c0,0.1,0,0.3,0,0.4s0.1,0.3,0.1,0.4c0.1,0.1,0.1,0.2,0.2,0.3c0.1,0,0.1,0,0.2,0c0.1,0,0.2,0,0.3-0.1c0.1-0.1,0.2-0.2,0.4-0.4 s0.3-0.4,0.5-0.7c0.2-0.3,0.5-0.7,0.7-1.1c0.4-0.7,0.8-1.5,1.1-2.3c0-0.1,0.1-0.1,0.1-0.2c0-0.1,0.1-0.1,0.1-0.1l0,0l0.1,0 c0,0,0,0,0.1,0s0.2,0,0.2,0l3,0c0.3,0,0.5,0,0.7,0S21.9,7,21.9,7L22,7.1z"></path></svg>				                                    </span>
													<span class="twp-share-label twp-label-title">
				                                        VK				                                    </span>
												</span>
																					</a>
										</div>			</div>
		</div>

	]]></content:encoded>
					
					<wfw:commentRss>https://andromedabay.ddns.net/linux-based-monitoring-setup/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Lazy Loading (feed)

Served from: andromedabay.ddns.net @ 2026-11-21 15:09:24 by W3 Total Cache
-->