<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="/feed_style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <tabi:metadata xmlns:tabi="https://github.com/welpo/tabi">
        <tabi:base_url>&#x2F;</tabi:base_url>
        <tabi:separator>
            •
        </tabi:separator>
        <tabi:about_feeds>This is a web feed, also known as an Atom feed. Subscribe by copying the URL from the address bar into your newsreader. Visit About Feeds to learn more and get started. It&#x27;s free.</tabi:about_feeds>
        <tabi:visit_the_site>Visit website</tabi:visit_the_site>
        <tabi:recent_posts>Recent posts</tabi:recent_posts>
        <tabi:last_updated_on>Updated on $DATE</tabi:last_updated_on>
        <tabi:default_theme></tabi:default_theme>
        <tabi:post_listing_date>date</tabi:post_listing_date>
        <tabi:current_section>Linux</tabi:current_section>
    </tabi:metadata><link rel="extra-stylesheet" href="/skins/indigo_ingot.css?h=d429472afbb246441b1a" /><title>Andrew Wippler's Sketchpad - Linux</title>
        <subtitle>Ideas, blog, etc. </subtitle>
    <link href="/tags/linux/atom.xml" rel="self" type="application/atom+xml"/>
    <link href="/tags/linux/" rel="alternate" type="text/html"/>
    <generator uri="https://www.getzola.org/">Zola</generator><updated>2025-09-08T09:03:20.706302+00:00</updated><id>/tags/linux/atom.xml</id><entry xml:lang="en">
        <title>Recompiling AbiWord</title>
        <published>2025-09-08T09:03:20.706302+00:00</published>
        <updated>2025-09-08T09:03:20.706302+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2025-09-08-recompiling-abiword/" type="text/html"/>
        <id>/2025-09-08-recompiling-abiword/</id>
        
            <content type="html">&lt;p&gt;In my quest to replace Google Docs, I came across AbiWord, Gnome&#x27;s editor. It looks newer than LibreOffice, appears feature complete, and has footnote support. The only problem is that it does not have keyboard shortcuts for footnotes. This is how I compiled AbiWord from the git source:&lt;&#x2F;p&gt;
&lt;h2 id=&quot;install-the-dependencies&quot;&gt;Install the dependencies&lt;&#x2F;h2&gt;
&lt;pre data-lang=&quot;bash&quot; class=&quot;language-bash z-code&quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; dnf install gcc gcc-c++ make autoconf automake libtool intltool m4 pkgconfig gtk3-devel libgsf-devel libxml2-devel glib2-devel libX11-devel libXext-devel libXpm-devel libXft-devel gperf bison flex libjpeg-turbo-devel libtiff-devel libpng-devel poppler-glib-devel cairo-devel pango-devel atk-devel gdk-pixbuf2-devel desktop-file-utils docbook2X docbook-dtds libxslt-devel libICE-devel libSM-devel libuuid-devel libIDL-devel boost-devel&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;build&quot;&gt;Build&lt;&#x2F;h2&gt;
&lt;p&gt;To build, one has to do &quot;the normal Unix installation method&quot;: &lt;code&gt;.&#x2F;autogen.sh&lt;&#x2F;code&gt;, &lt;code&gt;.&#x2F;configure --prefix=$HOME&#x2F;abi-install&lt;&#x2F;code&gt;&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-1-1&quot;&gt;&lt;a href=&quot;#fn-1&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt;, &lt;code&gt;make -j$(nproc)&lt;&#x2F;code&gt;, and &lt;code&gt;make install&lt;&#x2F;code&gt;. However, on my Fedora 42 install, I received the error:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; class=&quot;language-bash z-code&quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;.&#x2F;autogen.sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;libtoolize:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; putting auxiliary files in &lt;span class=&quot;z-string z-quoted z-single z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;.&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;.&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;libtoolize:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; copying file &lt;span class=&quot;z-string z-quoted z-single z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;.&#x2F;ltmain.sh&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;libtoolize:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; putting macros in AC_CONFIG_MACRO_DIRS, &lt;span class=&quot;z-string z-quoted z-single z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;m4&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;.&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;libtoolize:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; copying file &lt;span class=&quot;z-string z-quoted z-single z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;m4&#x2F;libtool.m4&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;libtoolize:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; copying file &lt;span class=&quot;z-string z-quoted z-single z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;m4&#x2F;ltoptions.m4&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;libtoolize:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; copying file &lt;span class=&quot;z-string z-quoted z-single z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;m4&#x2F;ltsugar.m4&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;libtoolize:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; copying file &lt;span class=&quot;z-string z-quoted z-single z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;m4&#x2F;ltversion.m4&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;libtoolize:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; copying file &lt;span class=&quot;z-string z-quoted z-single z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-string z-begin z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;m4&#x2F;lt~obsolete.m4&lt;span class=&quot;z-punctuation z-definition z-string z-end z-shell&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;configure.ac:58:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; error: possibly undefined macro: AC_MSG_ERROR If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation.&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;autoreconf:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; error: &#x2F;usr&#x2F;bin&#x2F;autoconf failed with exit status: 1&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;Running&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; .&#x2F;configure&lt;span class=&quot;z-variable z-parameter z-option z-shell&quot;&gt;&lt;span class=&quot;z-punctuation z-definition z-parameter z-shell&quot;&gt; --&lt;&#x2F;span&gt;enable-maintainer-mode&lt;&#x2F;span&gt; ...&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;configure:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; error: cannot find required auxiliary files: compile missing install-sh config.guess config.sub&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;That meant I needed an additional package:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; class=&quot;language-bash z-code&quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;z-source z-shell z-bash&quot;&gt;&lt;span class=&quot;z-meta z-function-call z-shell&quot;&gt;&lt;span class=&quot;z-variable z-function z-shell&quot;&gt;sudo&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;span class=&quot;z-meta z-function-call z-arguments z-shell&quot;&gt; dnf install autoconf-archive&lt;&#x2F;span&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;After recompiling, I found out that my added shortcuts did not integrate properly. I filed an issue against the repo and am awaiting a response.&lt;&#x2F;p&gt;
&lt;section class=&quot;footnotes&quot;&gt;
&lt;ol class=&quot;footnotes-list&quot;&gt;
&lt;li id=&quot;fn-1&quot;&gt;
&lt;p&gt;the prefix is to have a second, butchered version available to test. I can continue using distro version of AbiWord if this doesn&#x27;t work out. &lt;a href=&quot;#fr-1-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;section&gt;
</content>
        </entry><entry xml:lang="en">
        <title>Moving to Desktop GNU&#x2F;Linux from Windows&#x2F;Mac</title>
        <published>2017-04-14T14:00:00+00:00</published>
        <updated>2017-04-14T14:00:00+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2017-04-14-moving-to-desktop-gnulinux-from-windowsmac/" type="text/html"/>
        <id>/2017-04-14-moving-to-desktop-gnulinux-from-windowsmac/</id>
        
            <content type="html">&lt;p&gt;There are many curious individuals who tinker with GNU&#x2F;Linux as a Server OS and want to experience what it is like as a Desktop OS. The switch is often hindered by two obstacles:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Some daily use programs are not available. (i.e. Photoshop, iTunes, etc.)&lt;&#x2F;li&gt;
&lt;li&gt;The unknown of what to do if something goes wrong or what do I do to get my 3d graphics driver installed and working.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;While these are valid reasons and definitely show stoppers for some, others can safely migrate to GNU&#x2F;Linux.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-obstacle-of-programs&quot;&gt;The obstacle of programs&lt;&#x2F;h2&gt;
&lt;p&gt;I like Krita as an alternative to Photoshop. The menu options are nearly the same and I do not have to install a silly theme (like I have to do in Gimp) or re-learn photo editing just to recognize where everything is at. I have successfully installed Photoshop CS4 with wine without any issues, but Krita is more featured than CS4. Darktable is also a good alternative to Photoshop RAW&#x2F;bridge.&lt;&#x2F;p&gt;
&lt;p&gt;Rhythmbox connects to iPhones&#x2F;iPods the same way as iTunes does, but without the store. iTunes does run on a recent version of wine quite well. Some might also want to check out &lt;a class=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.clementine-player.org&#x2F;&quot;&gt;Clementine&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Most every program has an alternative. Alternatives can be found via &lt;a class=&quot;external&quot; href=&quot;http:&#x2F;&#x2F;alternativeto.net&#x2F;&quot;&gt;alternativeto.net&lt;&#x2F;a&gt; or software recommendations on StackExchange.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;the-unknown-obstacles&quot;&gt;The unknown obstacles&lt;&#x2F;h2&gt;
&lt;p&gt;To use GNU&#x2F;Linux successfully as the primary Desktop OS, in my opinion, one must have a desktop with worthy hardware. I consider myself an AMD guy. I like the price for performance and I rarely do CPU intensive tasks on my desktop. When AMD bought ATI, I was also happy as ATI was my favorite graphics card. Unfortunately, most Desktop GNU&#x2F;Linux users are developers and need that extra performance. They have desktop workstations that have Nvidia graphics cards in them with Intel CPUs. You will often find that Desktop GNU&#x2F;Linux performs better, is easier to use, and has more tutorials for Nvidia graphics cards and how to get them working.&lt;&#x2F;p&gt;
</content>
        </entry><entry xml:lang="en">
        <title>Easy unix epoch timestamps from CLI</title>
        <published>2016-12-23T14:00:27+00:00</published>
        <updated>2016-12-23T14:00:27+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2016-12-23-easy-unix-epoch-timestamps-from-cli/" type="text/html"/>
        <id>/2016-12-23-easy-unix-epoch-timestamps-from-cli/</id>
        
            <content type="html">&lt;p&gt;While working on various projects and ultimately the need for a Unix timestamp for expiring swift objects in OpenStack, I needed a quick way to convert past, present, and future timestamps to the Unix epoch. Traditionally, I went to google, searched for a Unix timestamp converter, and retrieved my seconds that way. Unfortunately in exams, you are not allowed to visit external websites.&lt;&#x2F;p&gt;
&lt;p&gt;If you know how to read documentation, you will already know that the &lt;code&gt;date&lt;&#x2F;code&gt; command has this feature already built in. An excerpt from the docs is as follows:&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt; ...
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;       Show the local time for 9AM next Friday on the west coast of the US
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;              $ date --date=&amp;#39;TZ=&amp;quot;America&#x2F;Los_Angeles&amp;quot; 09:00 next Fri&amp;#39;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;DATE STRING
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;       The  --date=STRING  is  a mostly free format human readable date string
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;       such as &amp;quot;Sun, 29 Feb 2004 16:21:42 -0800&amp;quot; or &amp;quot;2004-02-29  16:21:42&amp;quot;  or
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;       even  &amp;quot;next Thursday&amp;quot;.  A date string may contain items indicating cal‐
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;       endar date, time of day, time zone, day of week, relative  time,  rela‐
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;       tive date, and numbers.  An empty string indicates the beginning of the
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;       day.  The date string format is more complex than is easily  documented
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;       here but is fully described in the info documentation.
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;...
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Further reading of the docs will point you in specifically formatting a return string by doing a &lt;code&gt;date +%s&lt;&#x2F;code&gt;. So when the time comes to expire an object from swift at 17:00 next Friday, you can do something like:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;swift post container file -H &#x27;X-Delete-On: &lt;&#x2F;code&gt;date +%s --date=&quot;17:00 next Friday&quot;&lt;code&gt;&#x27;&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
</content>
        </entry><entry xml:lang="en">
        <title>Using Puppet to host a private RPM repository</title>
        <published>2016-11-18T14:00:46+00:00</published>
        <updated>2016-11-18T14:00:46+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2016-11-18-using-puppet-to-host-a-private-rpm-repository/" type="text/html"/>
        <id>/2016-11-18-using-puppet-to-host-a-private-rpm-repository/</id>
        
            <content type="html">&lt;p&gt;A repository is a place where files are stored, indexed, and available through a package manager to anyone who has the repository information. With &lt;code&gt;rpm&lt;&#x2F;code&gt; based systems, a repository is created with a tool called &lt;code&gt;createrepo&lt;&#x2F;code&gt;. Most of the time, publicly available repositories already offer the packages your server needs. When you have a custom application you want to deploy (or even rebuild an existing application with your patches), it is best to distribute that package with a repository rather than a file share or some other means. Often a folder structure is created so that differing client OS versions can connect to the same repository and access versions compiled to that specific release. In my example below, I am not creating this folder structure as I am only serving one major release - Centos 7 - and the packages I am generating are website directories which are just a collection of portable code.&lt;&#x2F;p&gt;
&lt;p&gt;A private repository is not a tricky feat - all you have to do is serve the repository via https and require http basic authentication. You then configure the clients to connect to the repository with the basic authentication in the URL string (i.e. &lt;code&gt;baseurl=https:&#x2F;&#x2F;user:pass@repo.example.com&#x2F;&lt;&#x2F;code&gt;). The HTTPS protocol is not required to serve a repository, but it does prevent network snoopers from seeing your repository credentials.&lt;&#x2F;p&gt;
&lt;p&gt;Now that we know what is needed for a private repository, we can then define it in our puppet code.&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;node &amp;#39;repo.example.com&amp;#39; {
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  file { &amp;#39;&#x2F;var&#x2F;yumrepos&amp;#39;:
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    ensure =&amp;gt; directory,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  }
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  createrepo { &amp;#39;yumrepo&amp;#39;:
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    repository_dir =&amp;gt; &amp;#39;&#x2F;var&#x2F;yumrepos&#x2F;yumrepo&amp;#39;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    repo_cache_dir =&amp;gt; &amp;#39;&#x2F;var&#x2F;cache&#x2F;yumrepos&#x2F;yumrepo&amp;#39;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    enable_cron    =&amp;gt; false, #optional cron job to generate new rpms every 10 minutes
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  }
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  package { &amp;#39;httpd&amp;#39;:
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    ensure =&amp;gt; installed,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  }
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  httpauth { &amp;#39;repouser&amp;#39;:
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    ensure    =&amp;gt; present,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    file      =&amp;gt; &amp;#39;&#x2F;usr&#x2F;local&#x2F;nagios&#x2F;etc&#x2F;htpasswd.users&amp;#39;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    password  =&amp;gt; &amp;#39;some-long-password&amp;#39;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    mechanism =&amp;gt; basic,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    require   =&amp;gt; Package[&amp;#39;httpd&amp;#39;],
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  }
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  file { &amp;#39;&#x2F;usr&#x2F;local&#x2F;nagios&#x2F;etc&#x2F;htpasswd.users&amp;#39;:
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    ensure =&amp;gt; file,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    owner  =&amp;gt; &amp;#39;nginx&amp;#39;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    mode   =&amp;gt; &amp;#39;0644&amp;#39;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  }
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  class{&amp;#39;nginx&amp;#39;:
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    manage_repo    =&amp;gt; true,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    package_source =&amp;gt; &amp;#39;nginx-mainline&amp;#39;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  }
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  nginx::resource::vhost{&amp;quot;$::fqdn&amp;quot;:
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    www_root             =&amp;gt; &amp;#39;&#x2F;var&#x2F;yumrepos&#x2F;yumrepo&amp;#39;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    index_files          =&amp;gt; [],
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    autoindex            =&amp;gt; &amp;#39;on&amp;#39;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    rewrite_to_https     =&amp;gt; true,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    ssl                  =&amp;gt; true,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    auth_basic           =&amp;gt; &amp;#39;true&amp;#39;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    auth_basic_user_file =&amp;gt; &amp;#39;&#x2F;usr&#x2F;local&#x2F;nagios&#x2F;etc&#x2F;htpasswd.users&amp;#39;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    ssl_cert             =&amp;gt; &amp;quot;&#x2F;etc&#x2F;puppetlabs&#x2F;puppet&#x2F;ssl&#x2F;public_keys&#x2F;$::fqdn.pem&amp;quot;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    ssl_key              =&amp;gt; &amp;quot;&#x2F;etc&#x2F;puppetlabs&#x2F;puppet&#x2F;ssl&#x2F;private_keys&#x2F;$::fqdn.pem&amp;quot;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    vhost_cfg_prepend    =&amp;gt; {
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;      &amp;#39;default_type&amp;#39;     =&amp;gt; &amp;#39;text&#x2F;html&amp;#39;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    }
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  }
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;}
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;For the above code to work, we need the required modules:&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;mod &amp;#39;palli&#x2F;createrepo&amp;#39;, &amp;#39;1.1.0&amp;#39;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;mod &amp;quot;puppet&#x2F;nginx&amp;quot;, &amp;quot;0.4.0&amp;quot;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;mod &amp;quot;jamtur01&#x2F;httpauth&amp;quot;, &amp;quot;0.0.3&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;We can then use the following declaration on our nodes to use this repository.&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;yumrepo {&amp;#39;private-repo&amp;#39;:
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  descr           =&amp;gt; &amp;#39;My Private Repo - x86_64&amp;#39;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  baseurl         =&amp;gt; &amp;#39;https:&#x2F;&#x2F;repouser:some-long-password@repo.example.com&#x2F;&amp;#39;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  enabled         =&amp;gt; &amp;#39;true&amp;#39;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  gpgcheck        =&amp;gt; &amp;#39;false&amp;#39;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  metadata_expire =&amp;gt; &amp;#39;1&amp;#39;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;}
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You now have a fully functional private repository - deploy your awesome software.&lt;&#x2F;p&gt;
</content>
        </entry><entry xml:lang="en">
        <title>The future without Microsoft Office products </title>
        <published>2016-07-29T14:00:00+00:00</published>
        <updated>2016-07-29T14:00:00+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2016-07-29-the-future-without-microsoft-office-products/" type="text/html"/>
        <id>/2016-07-29-the-future-without-microsoft-office-products/</id>
        
            <content type="html">&lt;p&gt;I recently submitted a proposal to remove Microsoft Office from off my network and switch to Google Apps for Work and LibreOffice. This would incur a cost savings of ~$17.50 per user per month (GAFW $5 plan versus Office 2016 Professional Plus, Corporate, Open License, License Only). Some may argue that there are better license options with Microsoft and the $508 per user per 2 years (with the open license; source: http:&#x2F;&#x2F;mla.microsoft.com) is not a fair estimation, however, it is not fair to compare a stagnant version of Office versus the always updated version of GAFW or LibreOffice.&lt;&#x2F;p&gt;
&lt;p&gt;With LibreOffice, I can contribute a patch, submit it upstream, get it reviewed, and have it accepted into main stream. If I couldn&#x27;t wait for it to get to upstream, I could recompile with my patch and get it deployed in a matter of hours. This is the power and strength of open source software. Even with Google Apps, I submit a feature request, wait for it, and get the updated version when it arrives - I don&#x27;t have to buy a new version to get this new feature. This is the power of SaaS.
Word processing is also not proprietary. What you see on the screen in Microsoft Office, Google Apps, or LibreOffice will be what you get when you print it out or email it. LibreOffice and Microsoft Office save in formats that are compatible with each other. LibreOffice reads and writes docx and xlsx, and Microsoft Office reads and writes odf and ods.&lt;&#x2F;p&gt;
&lt;p&gt;The biggest hurdle to switch is that Microsoft Office included odbc connectors in a spreadsheet program (Excel) instead of directing users to a database program (access). LibreOffice did it right by making a spreadsheet program (calc) do spreadsheet things only and their database (base) connect via odbc to other databases. LibreOffice has Microsoft beat in that you can open more odbc types such as a MySQL database.&lt;&#x2F;p&gt;
&lt;p&gt;Before marrying me, my wife was a secretary for 5 years. All she used was Microsoft Office products until she used my computer to type a recipe document. Her response was, &quot;this is different.&quot; She told me later that she had to look for her formatting tools, but when she found them there was no difference except the tools she used were in different places than where they were in Microsoft Office. This is by far the best reason to use LibreOffice and Google Apps - you can save money and lose none of the features.&lt;&#x2F;p&gt;
</content>
        </entry><entry xml:lang="en">
        <title>Puppet with Mac and GNU&#x2F;Linux</title>
        <published>2016-07-08T14:00:00+00:00</published>
        <updated>2016-07-08T14:00:00+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2016-07-08-puppet-with-mac-and-gnulinux/" type="text/html"/>
        <id>/2016-07-08-puppet-with-mac-and-gnulinux/</id>
        
            <content type="html">&lt;p&gt;Puppet on Mac is a mixture of Puppet on Linux and Windows. Registry settings are called &quot;secrets&quot; and to make things easier, you need to install homebrew.&lt;&#x2F;p&gt;
&lt;p&gt;Enforcing a local admin is a little bit tedious. In the past few OSX releases, the have changed their password hashing algorithm several times. This causes a few case statements based on release version in order to set up one single local admin.&lt;&#x2F;p&gt;
&lt;p&gt;Secret management is a little more complicated than Windows registry management. First, you need to find your secret decoder website (&lt;a class=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20150409073759&#x2F;http:&#x2F;&#x2F;secrets.blacktree.com&#x2F;&quot;&gt;which is now only available in the archive&lt;&#x2F;a&gt;), next you need to&lt;a class=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;halyard&#x2F;puppet-boxen&#x2F;blob&#x2F;master&#x2F;manifests&#x2F;osx_defaults.pp&quot;&gt; rip out the puppet code to manage secrets&lt;&#x2F;a&gt; (because nobody thought it wise to follow Puppet best practice and make a module do only one thing) and make your own personal company module, and finally you are ready to define an OSX secret. I use &lt;code&gt;boxen::osx_defaults&lt;&#x2F;code&gt; to set up the Mac equivalent of legalNoticeText with this code:&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  boxen::osx_defaults { &amp;quot;loginwindowtext&amp;quot; :
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    domain =&amp;gt; &amp;#39;&#x2F;Library&#x2F;Preferences&#x2F;com.apple.loginwindow.plist&amp;#39;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    key    =&amp;gt; &amp;#39;LoginwindowText&amp;#39;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    value  =&amp;gt; &amp;quot;This computer system is the property of ....&amp;quot;,
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;  }
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Managing a GNU&#x2F;Linux workstation is similar to OSX and Windows only you know what you are doing and everything makes sense because smart people write and manage the software. I choose to use KDM as the greeter is easier to customize and make the default Desktop Environment to be GNOME. On my greeter background, I have the legalNoticeText properly formatted to my liking and saved in the background image. So far I am the only GNU&#x2F;Linux workstation on Puppet so I haven&#x27;t configured it to a great extent. It does help between re-installs though :)&lt;&#x2F;p&gt;
</content>
        </entry><entry xml:lang="en">
        <title>Learn GNU&#x2F;Linux the easy way</title>
        <published>2016-06-10T14:00:00+00:00</published>
        <updated>2016-06-10T14:00:00+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2016-06-10-learn-gnulinux-the-easy-way/" type="text/html"/>
        <id>/2016-06-10-learn-gnulinux-the-easy-way/</id>
        
            <content type="html">&lt;p&gt;Let&#x27;s face it, Linux is a kernel and no matter what distribution you use, it is all the same. You have a repository of packages, you get a package manager to manage your packages, you get a desktop environment, and you get freedom to tinker down to the lowest level of the kernel to configure things like IP routing and forwarding.&lt;&#x2F;p&gt;
&lt;p&gt;Differences lie in the release cycle of the distribution, package names, and the default desktop environment - though you can find spins to even change that part. Each are trying to tackle a specific problem and come with a solution. It may be security, research, UI, stability, or even high performance computing.&lt;&#x2F;p&gt;
&lt;p&gt;If starting out, pick a user friendly distribution like Ubuntu or Debian. Use it with the defaults for 6 months while trying to learn as much as you can. Then move onto the specific use cases for Enterprise, you can use CentOS, RedHat, Ubuntu, or SUSE (you will get the best hardware&#x2F;software support if you go that route) for home use, you may want to go with Debian, Ubuntu, Arch, Gentoo, Fedora or anything you want to use; for embedded, you may go with Debian, Yocto, Gentoo, OpenEmbedded, OpenWRT, and others; for stability and security, you may want to go with Debian or one of the Enterprise distributions.&lt;&#x2F;p&gt;
&lt;p&gt;At the end of the day, it is all built upon the Linux kernel - unless you are using the Debian BSD fork.&lt;&#x2F;p&gt;
</content>
        </entry><entry xml:lang="en">
        <title>Access Samba shares from Chromebook</title>
        <published>2016-05-24T14:10:50+00:00</published>
        <updated>2016-05-24T14:10:50+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2016-05-24-access-samba-shares-from-chromebook/" type="text/html"/>
        <id>/2016-05-24-access-samba-shares-from-chromebook/</id>
        
            <content type="html">&lt;p&gt;Chromebooks are cloud focused. Many Chromebooks come with very limited storage in hopes you would be storing everything in the cloud. While this is a great habit to practice, in all reality, how likely are you to store 2tb of data in the cloud? Not many cloud providers even offer plans for that much storage.&lt;&#x2F;p&gt;
&lt;p&gt;Today marks a milestone - &lt;a class=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;chrome.google.com&#x2F;webstore&#x2F;detail&#x2F;network-file-share-for-ch&#x2F;ndjpildffkeodjdaeebdhnncfhopkajk&quot;&gt;Google has released an extension to the Chromebook file app to access Samba shares&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Samba is the implementation in which Windows file shares are broadcasted across the network. There is also an open source version of the implementation known by the name of Samba which is found on most Linux distributions as well as at &lt;a class=&quot;external&quot; href=&quot;http:&#x2F;&#x2F;samba.org&quot;&gt;http:&#x2F;&#x2F;Samba.org&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Enjoy accessing your network shares on ChromeOS, and don&#x27;t forget to &lt;a class=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;GoogleChrome&#x2F;chromeos_network_file_share&#x2F;issues&quot;&gt;file bug reports&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
</content>
        </entry><entry xml:lang="en">
        <title>5 Things to do after installing X</title>
        <published>2016-05-06T14:00:00+00:00</published>
        <updated>2016-05-06T14:00:00+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2016-05-06-5-things-to-do-after-installing-x/" type="text/html"/>
        <id>/2016-05-06-5-things-to-do-after-installing-x/</id>
        
            <content type="html">&lt;p&gt;Congratulations, you have installed X! Here are 5 things to do right now:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Change your background&lt;&#x2F;li&gt;
&lt;li&gt;Install needless software&lt;&#x2F;li&gt;
&lt;li&gt;Customize your font size&lt;&#x2F;li&gt;
&lt;li&gt;Take a screenshot&lt;&#x2F;li&gt;
&lt;li&gt;Share about your experience on social media!&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;This post is mainly a response to all of those 10 things to do after installing Ubuntu 16.04 blog posts.&lt;&#x2F;p&gt;
</content>
        </entry><entry xml:lang="en">
        <title>How to fix Error: Transaction check error with dnf&#x2F;yum</title>
        <published>2016-02-08T15:00:06+00:00</published>
        <updated>2016-02-08T15:00:06+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2016-02-08-how-to-fix-error-transaction-check-error-with-dnfyum/" type="text/html"/>
        <id>/2016-02-08-how-to-fix-error-transaction-check-error-with-dnfyum/</id>
        
            <content type="html">&lt;p&gt;When a &lt;code&gt;dnf&lt;&#x2F;code&gt; or &lt;code&gt;yum&lt;&#x2F;code&gt; process gets interrupted, you may get the below error:&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;Running transaction check
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;Transaction check succeeded.
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;Running transaction test
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;The downloaded packages were saved in cache until the next successful transaction.
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;You can remove cached packages by executing &amp;#39;dnf clean packages&amp;#39;.
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;Error: Transaction check error:
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;file &#x2F;usr&#x2F;share&#x2F;doc&#x2F;avahi-libs&#x2F;README from install of avahi-libs-0.6.32-0.4.rc.fc23.i686 conflicts
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;with file from package avahi-libs-0.6.31-43.fc23.x86_64
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;When presented with &lt;code&gt;Error: Transaction check error&lt;&#x2F;code&gt;, you are unable to install, update, or upgrade your system. The solution is to attempt to install the program (or download the files), locate them on your system, and manually update them using rpm.&lt;&#x2F;p&gt;
&lt;p&gt;In the example above, I want to update &lt;code&gt;avahi-libs&lt;&#x2F;code&gt; to a later version, but an older version still exists on my system. The &lt;code&gt;dnf&lt;&#x2F;code&gt; process was interrupted before it could erase the older version. Hence, the error means manual intervention of the problem is required. To fix, one needs to locate the newer version and use the &lt;code&gt;rpm&lt;&#x2F;code&gt; command to forcefully install the update. In other words, do the following:&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;find &#x2F;var&#x2F;cache&#x2F;dnf&#x2F; -iname avahi-libs-0.6.32* -type f
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;rpm -Uvh --replacefiles &#x2F;path&#x2F;to&#x2F;avahi-libs-0.6.32-0.4.rc.fc23.i686.rpm
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;There is a good chance that the file you need is in &lt;code&gt;&#x2F;var&#x2F;cache&#x2F;dnf&#x2F;&lt;&#x2F;code&gt; already and does not need to be downloaded from a mirror.&lt;&#x2F;p&gt;
</content>
        </entry><entry xml:lang="en">
        <title>Switching from Active Directory to Samba4</title>
        <published>2015-12-21T14:00:46+00:00</published>
        <updated>2015-12-21T14:00:46+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2015-12-21-switching-from-active-directory-to-samba4/" type="text/html"/>
        <id>/2015-12-21-switching-from-active-directory-to-samba4/</id>
        
            <content type="html">&lt;p&gt;Active Directory is solid, secure, and stable platform for user, group, and computer management. I would go as far and say that it is probably the backbone of 99.9% of all organizations world wide. So why would anyone want to switch away from Active Directory? The answer to that question is varied, but the most common reason why are:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Reduce licensing costs (per user&#x2F;device cals)&lt;&#x2F;li&gt;
&lt;li&gt;Reduce Windows foot print&lt;&#x2F;li&gt;
&lt;li&gt;Advanced features of AD are not needed&lt;&#x2F;li&gt;
&lt;li&gt;Less than 5,000 users&lt;&#x2F;li&gt;
&lt;li&gt;Because &amp;lt;insert_favorite_software&amp;gt; is greater than &amp;lt;insert_hated_software&amp;gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Let us get started on switching to a Samba4 backend.&lt;&#x2F;p&gt;
&lt;p&gt;This guide assumes the following:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;You already have a domain environment&lt;&#x2F;li&gt;
&lt;li&gt;The forest functional level is 2003 or greater&lt;&#x2F;li&gt;
&lt;li&gt;The domain functional level is not greater than 2008 R2&lt;&#x2F;li&gt;
&lt;li&gt;You are running CentOS&#x2F;RedHat 7 as your Samba4 host and it is a vanilla minimal install with no added repositories (i.e. you just installed it)&lt;&#x2F;li&gt;
&lt;li&gt;Your domain is: AD.ANDREWWIPPLER.COM and your NETBIOS is AD.&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h2 id=&quot;installing-samba4&quot;&gt;Installing Samba4&lt;&#x2F;h2&gt;
&lt;p&gt;The samba version that ships with CentOS is compiled in legacy NT4 emulation mode. In order to get the AD emulation, we will need to compile Samba4 (Don&#x27;t worry, it is very easy and compiles under 20 minutes with a 2 core processor.)&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;cd &#x2F;usr&#x2F;src&#x2F;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;wget https:&#x2F;&#x2F;download.samba.org&#x2F;pub&#x2F;samba&#x2F;stable&#x2F;samba-4.3.2.tar.gz
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo tar xf samba-4.3.2.tar.gz
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;cd samba-4.3.2&#x2F;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now we need to install the build tools. (The most updated list is located &lt;a class=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;wiki.samba.org&#x2F;index.php&#x2F;Operating_system_requirements&#x2F;Dependencies_-_Libraries_and_programs#Red_Hat_Enterprise_Linux_.2F_CentOS_.2F_Scientific_Linux&quot;&gt;here&lt;&#x2F;a&gt;)&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo yum install perl gcc attr libacl-devel libblkid-devel \
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    gnutls-devel readline-devel python-devel gdb pkgconfig \
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    krb5-workstation zlib-devel setroubleshoot-server libaio-devel \
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    setroubleshoot-plugins policycoreutils-python \
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    libsemanage-python perl-ExtUtils-MakeMaker perl-Parse-Yapp \
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    perl-Test-Base popt-devel libxml2-devel libattr-devel \
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    keyutils-libs-devel cups-devel bind-utils libxslt \
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    docbook-style-xsl openldap-devel autoconf python-crypto
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The next step is to compile and run:&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;.&#x2F;configure
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;make -j 2
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# The number 2 should be relative to the number of cores on your machine
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo make install
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This process should take less than 20 minutes. After it is done compiling, it will install to &lt;code&gt;&#x2F;usr&#x2F;local&#x2F;samba&#x2F;&lt;&#x2F;code&gt;. To make it easier to run the new commands, let us add the paths to our global path:&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo cat &amp;lt;&amp;lt; EOF &amp;gt; &#x2F;etc&#x2F;profile.d&#x2F;samba.sh
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;##add samba to PATH
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;export PATH=&#x2F;usr&#x2F;local&#x2F;samba&#x2F;bin&#x2F;:&#x2F;usr&#x2F;local&#x2F;samba&#x2F;sbin&#x2F;:$PATH
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;EOF
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo chmod 0644 &#x2F;etc&#x2F;profile.d&#x2F;samba.sh
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;. &#x2F;etc&#x2F;profile
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;preparing-the-system-to-join-ad&quot;&gt;Preparing the system to join AD&lt;&#x2F;h2&gt;
&lt;p&gt;Now that Samba is installed, we need to configure our system to interact with Active Directory as well and set up BIND9.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;network-related&quot;&gt;Network related&lt;&#x2F;h3&gt;
&lt;p&gt;A static IP as well as DNS must be configured properly for this to work. Ensure the appropriate settings are in &lt;code&gt;&#x2F;etc&#x2F;sysconfig&#x2F;network-scripts&#x2F;ifcfg-(iface-name)&lt;&#x2F;code&gt;. The DNS servers must be an Active Directory domain controller and you should be able to ping it. If modification is done to this file, you will need to restart NetworkManager for changes to take effect. The desired result is to have &lt;code&gt;&#x2F;etc&#x2F;resolv.conf&lt;&#x2F;code&gt; appear like the following:&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# Generated by NetworkManager
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;search ad.andrewwippler.com
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;nameserver 192.168.1.201
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;In my lab, 192.168.1.201 is a Windows 2008 R2 server named DC1.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;hostname-related&quot;&gt;Hostname related&lt;&#x2F;h3&gt;
&lt;p&gt;If you have not named your CentOS install, it is best to do it now. You will also need to verify that pinging your hostname works and it returns with the ip of the interface you set and not the loopback interface.&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo hostname dc2.ad.andrewwippler.com
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo echo &amp;#39;dc2.ad.andrewwippler.com&amp;#39; &amp;gt; &#x2F;etc&#x2F;hostname
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;echo &amp;#39;192.168.1.202 dc2 dc2.ad.andrewwippler.com&amp;#39; &amp;gt;&amp;gt; &#x2F;etc&#x2F;hosts
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;kerberos-related&quot;&gt;Kerberos related&lt;&#x2F;h3&gt;
&lt;p&gt;Ensure &lt;code&gt;&#x2F;etc&#x2F;krb5.conf&lt;&#x2F;code&gt; has the following. The domain needs to be in all caps.&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;...
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;[libdefaults]
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    ...
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    dns_lookup_realm = false
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    dns_lookup_kdc = true
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    default_realm = AD.ANDREWWIPPLER.COM
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;...
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;testing&quot;&gt;Testing&lt;&#x2F;h3&gt;
&lt;p&gt;We can now test our DNS and Kerberos settings with two simple commands.&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;kinit administrator
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This should ask you for the domain administrator&#x27;s password. Once entered you can verify everything is working with &lt;code&gt;klist&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;joining-active-directory&quot;&gt;Joining Active Directory&lt;&#x2F;h2&gt;
&lt;p&gt;At this point, we have not started Samba, nor do we need to until the very end. We can now issue the join command (with BIND9 support)&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo samba-tool domain join ad.andrewwippler.com DC -Uadministrator --realm=AD.ANDREWWIPPLER.COM --dns-backend=BIND9_DLZ
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now we will have to configure bind. For convenience sake, I have included my &lt;code&gt;&#x2F;etc&#x2F;named.conf&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;&#x2F;&#x2F;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;&#x2F;&#x2F; named.conf
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;&#x2F;&#x2F;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;options {
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;	listen-on port 53 { any; };
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;	listen-on-v6 port 53 { any; };
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;	directory 	&amp;quot;&#x2F;var&#x2F;named&amp;quot;;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;	dump-file 	&amp;quot;&#x2F;var&#x2F;named&#x2F;data&#x2F;cache_dump.db&amp;quot;;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;	statistics-file &amp;quot;&#x2F;var&#x2F;named&#x2F;data&#x2F;named_stats.txt&amp;quot;;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;	memstatistics-file &amp;quot;&#x2F;var&#x2F;named&#x2F;data&#x2F;named_mem_stats.txt&amp;quot;;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;	allow-query     { any; };
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;	recursion yes;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;	dnssec-enable yes;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;	dnssec-validation yes;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;	dnssec-lookaside auto;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;	&#x2F;* Path to ISC DLV key *&#x2F;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;	bindkeys-file &amp;quot;&#x2F;etc&#x2F;named.iscdlv.key&amp;quot;;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;	managed-keys-directory &amp;quot;&#x2F;var&#x2F;named&#x2F;dynamic&amp;quot;;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;	pid-file &amp;quot;&#x2F;run&#x2F;named&#x2F;named.pid&amp;quot;;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;	session-keyfile &amp;quot;&#x2F;run&#x2F;named&#x2F;session.key&amp;quot;;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        &#x2F;&#x2F;samba
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        tkey-gssapi-keytab &amp;quot;&#x2F;usr&#x2F;local&#x2F;samba&#x2F;private&#x2F;dns.keytab&amp;quot;;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;};
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;logging {
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        channel default_debug {
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;                file &amp;quot;data&#x2F;named.run&amp;quot;;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;                severity dynamic;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        };
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;};
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;zone &amp;quot;.&amp;quot; IN {
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;	type hint;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;	file &amp;quot;named.ca&amp;quot;;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;};
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;include &amp;quot;&#x2F;etc&#x2F;named.rfc1912.zones&amp;quot;;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;include &amp;quot;&#x2F;etc&#x2F;named.root.key&amp;quot;;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;&#x2F;&#x2F;samba
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;include &amp;quot;&#x2F;usr&#x2F;local&#x2F;samba&#x2F;private&#x2F;named.conf&amp;quot;;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;allowing-access&quot;&gt;Allowing access&lt;&#x2F;h2&gt;
&lt;p&gt;Now that we have a functioning samba server (even though it hasn&#x27;t started yet), we need to allow it through SELinux and the firewall. Below are the commands to do just that:&lt;&#x2F;p&gt;
&lt;h3 id=&quot;firewall&quot;&gt;Firewall&lt;&#x2F;h3&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo firewall-cmd --add-port=389&#x2F;tcp --permanent
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo firewall-cmd --add-port=389&#x2F;udp --permanent
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo firewall-cmd --add-port=636&#x2F;tcp --permanent
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo firewall-cmd --add-port=53&#x2F;tcp --permanent
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo firewall-cmd --add-port=53&#x2F;udp --permanent
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo firewall-cmd --add-port=88&#x2F;tcp --permanent
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo firewall-cmd --add-port=88&#x2F;udp --permanent
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo firewall-cmd --add-port=464&#x2F;tcp --permanent
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo firewall-cmd --add-port=464&#x2F;udp --permanent
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo firewall-cmd --add-port=135&#x2F;tcp --permanent
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo firewall-cmd --add-port=137&#x2F;udp --permanent
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo firewall-cmd --add-port=139&#x2F;tcp --permanent
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo firewall-cmd --add-port=138&#x2F;udp --permanent
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo firewall-cmd --add-port=445&#x2F;tcp --permanent
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo firewall-cmd --add-port=3268&#x2F;tcp --permanent
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo firewall-cmd --reload
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h3 id=&quot;selinux&quot;&gt;SELinux&lt;&#x2F;h3&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo chown named:named &#x2F;usr&#x2F;local&#x2F;samba&#x2F;private&#x2F;dns
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo chgrp named &#x2F;usr&#x2F;local&#x2F;samba&#x2F;private&#x2F;dns.keytab
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo chmod g+r &#x2F;usr&#x2F;local&#x2F;samba&#x2F;private&#x2F;dns.keytab
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo chmod 775 &#x2F;usr&#x2F;local&#x2F;samba&#x2F;private&#x2F;dns
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo chown named:named &#x2F;usr&#x2F;local&#x2F;samba&#x2F;lib&#x2F;bind9&#x2F;dlz_bind9_9.so
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo chcon -t named_conf_t &#x2F;usr&#x2F;local&#x2F;samba&#x2F;private&#x2F;dns.keytab
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo chcon -t named_conf_t &#x2F;usr&#x2F;local&#x2F;samba&#x2F;private&#x2F;named.conf.update
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo chcon -t named_var_run_t &#x2F;usr&#x2F;local&#x2F;samba&#x2F;private&#x2F;dns
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo chcon -t named_var_run_t &#x2F;usr&#x2F;local&#x2F;samba&#x2F;lib&#x2F;bind9&#x2F;dlz_bind9_9.so
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo semanage fcontext -a -t named_conf_t &#x2F;usr&#x2F;local&#x2F;samba&#x2F;private&#x2F;dns.keytab
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo semanage fcontext -a -t named_conf_t &#x2F;usr&#x2F;local&#x2F;samba&#x2F;private&#x2F;named.conf
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo semanage fcontext -a -t named_conf_t &#x2F;usr&#x2F;local&#x2F;samba&#x2F;private&#x2F;named.conf.update
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo semanage fcontext -a -t named_var_run_t &#x2F;usr&#x2F;local&#x2F;samba&#x2F;private&#x2F;dns
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo semanage fcontext -a -t named_var_run_t &#x2F;usr&#x2F;local&#x2F;samba&#x2F;lib&#x2F;bind9&#x2F;dlz_bind9_9.so
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now we need to run SELinux in permissive mode and add the policy.&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo setenforce 0
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo systemctl restart named
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sleep 60
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo systemctl stop named
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;cd ~
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo grep named &#x2F;var&#x2F;log&#x2F;audit&#x2F;audit.log | audit2allow -M named &amp;gt; named.te
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo semodule -i named.pp
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo setenforce 1
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo systemctl start named
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;init-files&quot;&gt;Init files&lt;&#x2F;h2&gt;
&lt;p&gt;Samba does not ship with an init file so we will have to create one and enable it to start at boot.&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo cat &amp;lt;&amp;lt; EOF &amp;gt; &#x2F;etc&#x2F;init.d&#x2F;samba
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;#!&#x2F;bin&#x2F;bash
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;#
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# samba4        This shell script takes care of starting and stopping
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;#               samba4 daemons.
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;#
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# chkconfig: - 58 74
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# description: Samba 4.0 will be the next version of the Samba suite
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# and incorporates all the technology found in both the Samba4 alpha
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# series and the stable 3.x series. The primary additional features
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# over Samba 3.6 are support for the Active Directory logon protocols
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# used by Windows 2000 and above.
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;### BEGIN INIT INFO
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# Provides: samba4
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# Required-Start: $network $local_fs $remote_fs
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# Required-Stop: $network $local_fs $remote_fs
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# Should-Start: $syslog $named
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# Should-Stop: $syslog $named
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# Short-Description: start and stop samba4
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# Description: Samba 4.0 will be the next version of the Samba suite
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# and incorporates all the technology found in both the Samba4 alpha
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# series and the stable 3.x series. The primary additional features
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# over Samba 3.6 are support for the Active Directory logon protocols
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# used by Windows 2000 and above.
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;### END INIT INFO
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# Source function library.
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;. &#x2F;etc&#x2F;init.d&#x2F;functions
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# Source networking configuration.
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;. &#x2F;etc&#x2F;sysconfig&#x2F;network
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;prog=samba
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;prog_dir=&#x2F;usr&#x2F;local&#x2F;samba&#x2F;sbin&#x2F;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;lockfile=&#x2F;var&#x2F;lock&#x2F;subsys&#x2F;$prog
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;start() {
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        [ &amp;quot;$NETWORKING&amp;quot; = &amp;quot;no&amp;quot; ] &amp;amp;&amp;amp; exit 1
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;#       [ -x &#x2F;usr&#x2F;sbin&#x2F;ntpd ] || exit 5
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;                # Start daemons.
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;                echo -n $&amp;quot;Starting samba4: &amp;quot;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;                daemon $prog_dir&#x2F;$prog -D
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        RETVAL=$?
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;                echo
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        [ $RETVAL -eq 0 ] &amp;amp;&amp;amp; touch $lockfile
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        return $RETVAL
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;}
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;stop() {
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        [ &amp;quot;$EUID&amp;quot; != &amp;quot;0&amp;quot; ] &amp;amp;&amp;amp; exit 4
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;                echo -n $&amp;quot;Shutting down samba4: &amp;quot;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        killproc $prog_dir&#x2F;$prog
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        RETVAL=$?
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;                echo
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        [ $RETVAL -eq 0 ] &amp;amp;&amp;amp; rm -f $lockfile
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        return $RETVAL
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;}
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# See how we were called.
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;case &amp;quot;$1&amp;quot; in
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;start)
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        start
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        ;;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;stop)
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        stop
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        ;;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;status)
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        status $prog
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        ;;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;restart)
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        stop
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        start
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        ;;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;*)
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        echo $&amp;quot;Usage: $0 {start|stop|status|restart}&amp;quot;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;        exit 2
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;esac
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;EOF
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo chmod +x &#x2F;etc&#x2F;init.d&#x2F;samba
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo chkconfig samba on
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;flipping-the-switch&quot;&gt;Flipping the switch&lt;&#x2F;h2&gt;
&lt;p&gt;You are now ready to either restart the system or start samba. The next steps to fully migrate to a Samba4 AD backend would be to migrate the FSMO roles to this server. Managing this AD instance is done by loading the Remote Server Administration Tools (RSAT) on a windows client.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;sources&quot;&gt;Sources&lt;&#x2F;h2&gt;
&lt;p&gt;Here are the list of sources and references to compile this tutorial:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;https:&#x2F;&#x2F;wiki.samba.org&#x2F;index.php&#x2F;Join_an_additional_Samba_DC_to_an_existing_Active_Directory&lt;&#x2F;li&gt;
&lt;li&gt;https:&#x2F;&#x2F;wiki.samba.org&#x2F;index.php&#x2F;Build_Samba_from_source&lt;&#x2F;li&gt;
&lt;li&gt;https:&#x2F;&#x2F;wiki.samba.org&#x2F;index.php&#x2F;Samba4&#x2F;InitScript&lt;&#x2F;li&gt;
&lt;li&gt;https:&#x2F;&#x2F;wiki.samba.org&#x2F;index.php&#x2F;Configure_BIND_as_backend_for_Samba_AD&lt;&#x2F;li&gt;
&lt;li&gt;https:&#x2F;&#x2F;lists.samba.org&#x2F;archive&#x2F;samba&#x2F;2013-March&#x2F;172397.html (Thanks &lt;strong&gt;Thomas Simmons&lt;&#x2F;strong&gt;)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        </entry><entry xml:lang="en">
        <title>Converting Debian&#x2F;Ubuntu to oVirt</title>
        <published>2015-12-18T15:00:08+00:00</published>
        <updated>2015-12-18T15:00:08+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2015-12-18-converting-debianubuntu-to-ovirt/" type="text/html"/>
        <id>/2015-12-18-converting-debianubuntu-to-ovirt/</id>
        
            <content type="html">&lt;p&gt;oVirt 3.6 will have a better way to import virtual machines. In the mean time, here is the best method for getting an already made ova into oVirt. The example I am using is the open source log analyzer - &lt;a class=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.graylog.org&#x2F;&quot;&gt;graylog&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;A prerequisite is the script located at &lt;a class=&quot;external&quot; href=&quot;http:&#x2F;&#x2F;git.annexia.org&#x2F;git&#x2F;import-to-ovirt.git&quot;&gt;http:&#x2F;&#x2F;git.annexia.org&#x2F;git&#x2F;import-to-ovirt.git&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;git clone http:&#x2F;&#x2F;git.annexia.org&#x2F;git&#x2F;import-to-ovirt.git
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Verify the type of the downloaded file:&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;file graylog.ova
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;graylog.ova: POSIX tar archive
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This is wrapped archive, extract it.&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;tar xf graylog.ova
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Whether converting from Hyper-V or OVA, the following steps will be the same except Hyper-V&#x27;s format will be &lt;code&gt;vpc&lt;&#x2F;code&gt; instead of &lt;code&gt;vmdk&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo qemu-img convert -f vmdk -O qcow2 graylog-disk1.vmdk graylog.qcow2
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This line will import the image into oVirt.&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo import-to-ovirt.pl graylog.qcow2 ovirt-nfs-storage:&#x2F;exports&#x2F;import_export
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The VM can then be imported using the import tab of the storage domain where you uploaded the file.&lt;&#x2F;p&gt;
</content>
        </entry><entry xml:lang="en">
        <title>Converting VMs for oVirt</title>
        <published>2015-12-11T15:00:14+00:00</published>
        <updated>2015-12-11T15:00:14+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2015-12-11-converting-vms-for-ovirt/" type="text/html"/>
        <id>/2015-12-11-converting-vms-for-ovirt/</id>
        
            <content type="html">&lt;p&gt;My existing Hyper-V infrastructure consisted of Windows, a few CentOS, and Debian&#x2F;Ubuntu guests. The best method I found to importing into oVirt was using the &lt;a class=&quot;external&quot; href=&quot;http:&#x2F;&#x2F;oirase.annexia.org&#x2F;virt-p2v&#x2F;&quot;&gt;virt-p2v disc&lt;&#x2F;a&gt;. This required down time of the server (approx 3 hours per 100GB on gigabit backbone) and a dedicated Fedora or Debian server which had &lt;code&gt;virt-v2v&lt;&#x2F;code&gt; installed. I used my Acer C710 Chromebook to serve as the &lt;code&gt;virt-v2v&lt;&#x2F;code&gt; converter. (This is possibly the reason I had slow conversion times.)&lt;&#x2F;p&gt;
&lt;p&gt;Once you boot into &lt;code&gt;virt-p2v&lt;&#x2F;code&gt;, you enter the IP address of an ssh server with &lt;code&gt;virt-v2v&lt;&#x2F;code&gt; installed. Unfortunately, I had to log in with root credentials as using the sudo method did not work when I tried. In some instances, my virtual machines needed the legacy Hyper-V network adapter to get an IP from DHCP and be able to ping the conversion server. It would have been helpful if &lt;code&gt;virt-v2v&lt;&#x2F;code&gt; mentioned this rather than giving a general username&#x2F;password is invalid error.&lt;&#x2F;p&gt;
&lt;p&gt;After successfully testing the server and logging in, the next step is to enter the target properties. These are what you will name the image, how many virtual CPUs to allocate, and the desired RAM. Next the output options have to be set. Since I was using oVirt, I selected the &lt;em&gt;Output to (-o)&lt;&#x2F;em&gt; as rhev. I then had to enter the &lt;em&gt;Output storage (-os)&lt;&#x2F;em&gt; which is required when converting for oVirt&#x2F;rhev. Since these settings are relative to the &lt;code&gt;virt-v2v&lt;&#x2F;code&gt; server, I could have mounted the nfs import domain (defaults in getting started guide - &lt;em&gt;nfs-server:&#x2F;exports&#x2F;import_export&lt;&#x2F;em&gt; ) as &#x2F;var&#x2F;tmp on the &lt;code&gt;virt-v2v&lt;&#x2F;code&gt; converter; however, I decided to enter the nfs server and path instead as this value. Next, you select the discs to convert as well as any network interfaces and removable media. I found that you only need to select the harddrives - everything else can be configured in oVirt.&lt;&#x2F;p&gt;
&lt;p&gt;Once you click start conversion, &lt;code&gt;virt-p2v&lt;&#x2F;code&gt; boots into the virtual machine and forwards data to your &lt;code&gt;virt-v2v&lt;&#x2F;code&gt; server. The &lt;code&gt;virt-v2v&lt;&#x2F;code&gt; process removes devices and adds the special ones needed to prevent a BSOD when you boot your Windows server for the first time on oVirt. Something similarly happens on CentOS based VMs.&lt;&#x2F;p&gt;
&lt;p&gt;Once that is done you need to go into the storage tab of the cluster (in my case, Default) and select the import storage domain. This will then open up the lower third of the web interface with another tab that is labeled &lt;em&gt;import&lt;&#x2F;em&gt;. This will list all VM guests that have successfully been converted by &lt;code&gt;virt-p2v&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
</content>
        </entry><entry xml:lang="en">
        <title>Planning the Deployment of oVirt</title>
        <published>2015-12-04T15:00:46+00:00</published>
        <updated>2015-12-04T15:00:46+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2015-12-04-planning-the-deployment-of-ovirt/" type="text/html"/>
        <id>/2015-12-04-planning-the-deployment-of-ovirt/</id>
        
            <content type="html">&lt;p&gt;After I played with oVirt I needed to do several items:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;Migrate the oVirt engine to a new host&lt;&#x2F;li&gt;
&lt;li&gt;Migrate the storage from a single NFS share to GlusterFS&lt;&#x2F;li&gt;
&lt;li&gt;Move my VMs from Hyper-V to oVirt&lt;&#x2F;li&gt;
&lt;li&gt;Test my setup&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;h2 id=&quot;migrate-the-ovirt-engine-to-a-new-host&quot;&gt;Migrate the oVirt Engine to a new host&lt;&#x2F;h2&gt;
&lt;p&gt;This task was to prepare me for the disaster recovery scenario - what if my server room blew up - how would I recover my virtualization backbone? It might not be that important (considering I back up my VMs and can restore them anywhere), but when disaster strikes, tasks need to be simple because concentration will be difficult. As of version 3.5, oVirt had a good back up and restore operation:&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;#backup example
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;&#x2F;usr&#x2F;share&#x2F;ovirt-engine&#x2F;bin&#x2F;engine-backup.sh --mode=backup --scope=all --file=&#x2F;root&#x2F;engine_backup --log=&#x2F;root&#x2F;backup_log
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;#restore example
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;&#x2F;usr&#x2F;share&#x2F;ovirt-engine&#x2F;bin&#x2F;engine-backup.sh --mode=restore --scope=all --file=&#x2F;root&#x2F;engine_backup --log=restore_lg
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;engine-setup
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;All I had to do was run the backup script, copy the file, restore it, and run &lt;code&gt;engine-setup&lt;&#x2F;code&gt;. To further harden my installation, I placed the backup line in my daily &lt;code&gt;crontab&lt;&#x2F;code&gt; an hour earlier than my scheduled &lt;code&gt;duplicity&lt;&#x2F;code&gt; run.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;migrate-the-storage-from-a-single-nfs-share-to-glusterfs&quot;&gt;Migrate the storage from a single NFS share to GlusterFS&lt;&#x2F;h2&gt;
&lt;p&gt;This next step was a bit under-sighted on my part. In my test lab, I had 4 VMs running on 1 NFS server. The NFS server I chose in the lab environment began to choke around 30 VMs and eventually crashed when I hit the 35 mark. It was not a limitation on oVirt or NFS, but on my hardware. &lt;code&gt;GlusterFS&lt;&#x2F;code&gt; was extremely simple to set up and their documentation is easy to follow.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;move-my-vms-from-hyper-v-to-ovirt&quot;&gt;Move my VMs from Hyper-V to oVirt&lt;&#x2F;h2&gt;
&lt;p&gt;I will discuss this in more detail in a following post. It was mostly running &lt;code&gt;virt-p2v&lt;&#x2F;code&gt; on Windows and CentOS and &lt;code&gt;import-to-ovirt.pl&lt;&#x2F;code&gt; on Debian and Ubuntu VMs.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;test-my-setup&quot;&gt;Test my setup&lt;&#x2F;h2&gt;
&lt;p&gt;During the transition, I had the opportune time to experience what it was like when my single point of failure (the one NFS server) crashed. It was also painful when DNS and DHCP were on servers on the failed storage server (oVirt didn&#x27;t like that). Through this process, I have formulated several key steps to prevent a failure like that from happening again.&lt;&#x2F;p&gt;
</content>
        </entry><entry xml:lang="en">
        <title>Switching from Hyper-V to oVirt</title>
        <published>2015-11-27T15:00:31+00:00</published>
        <updated>2015-11-27T15:00:31+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2015-11-27-switching-from-hyper-v-to-ovirt/" type="text/html"/>
        <id>/2015-11-27-switching-from-hyper-v-to-ovirt/</id>
        
            <content type="html">&lt;p&gt;For quite some time I have heard that Hyper-V was a low player when it came to virtualization. It came with Windows and was the hypervisor of choice, but it had its limitations. In my environment, we had local storage and no clustering of hosts and consequently no high availability or fail over. This brought the first pain point - we need high availability.&lt;&#x2F;p&gt;
&lt;p&gt;On one of my hosts, the broadcom Ethernet driver kept triggering flow control and would not resume causing all of the VM Guests to go offline. This triggered the second pain point - I need high availability yesterday.&lt;&#x2F;p&gt;
&lt;blockquote&gt;
&lt;p&gt;What matters most in a hypervisor environment is the tools you use to manage it.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;I took this principle as a guide when searching for a hypervisor environment. I first looked at Hyper-V and the new licensing costs it would accrue. Next I looked at the popular VMWare ESXi, but I heard the neat features were at a premium price and all I needed was high availability. I looked at Open Source versions like KVM, Xen, and OpenStack (which appeared to be too big for my 40 VM environment). Then I found RHEV&#x27;s community version - oVirt. It had all the bells and whistles I needed - Linux hosts and high availability.&lt;&#x2F;p&gt;
&lt;p&gt;oVirt&#x27;s install documents were surprisingly simple as I quickly found 3 servers to set up: an engine server, a file server, and a VM Host. Once set up, I tinkered with it, and to my delight - everything worked right out of the box (on old hardware too!) My next step was to install a few VMs and test the high availability features. It was evident that oVirt was the solution to my pain points.&lt;&#x2F;p&gt;
</content>
        </entry><entry xml:lang="en">
        <title>Paying for Open Source</title>
        <published>2015-11-13T14:59:38+00:00</published>
        <updated>2015-11-13T14:59:38+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2015-11-13-paying-for-open-source/" type="text/html"/>
        <id>/2015-11-13-paying-for-open-source/</id>
        
            <content type="html">&lt;p&gt;While Open Source software is free to download, use, and depending on the license, free to distribute, it is not free to creator. The Open Source creators have to pay for hosting, branding (domain, etc.), coding (in time), and distribution. While some are offloading the costs by hosting the project on Open Source aware distribution channels such as &lt;a class=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&quot;&gt;GitHub&lt;&#x2F;a&gt; or &lt;a class=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;bitbucket.org&#x2F;&quot;&gt;BitBucket&lt;&#x2F;a&gt;, many projects still lack the funds they need.&lt;&#x2F;p&gt;
&lt;p&gt;The general rule is: if you use it, you should pay for it. How you should pay for it is entirely up to you. Below are several ways you can pay for open source software.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;for-corporations&quot;&gt;For Corporations&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;Hire an Open Source Developer to work on the project he contributes to&lt;&#x2F;li&gt;
&lt;li&gt;Estimate how much it would cost annually with proprietary software and donate 10-30% of the amount evenly to various projects&lt;&#x2F;li&gt;
&lt;li&gt;Open Source internally developed software&lt;&#x2F;li&gt;
&lt;li&gt;Provide a publicly accessible mirror to an Open Source project&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;h3 id=&quot;for-individuals&quot;&gt;For Individuals&lt;&#x2F;h3&gt;
&lt;ul&gt;
&lt;li&gt;Donate a fixed amount annually to an Open Source Foundation such as the &lt;a class=&quot;external&quot; href=&quot;http:&#x2F;&#x2F;www.linuxfoundation.org&#x2F;&quot;&gt;Linux Foundation&lt;&#x2F;a&gt; or the &lt;a class=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.documentfoundation.org&#x2F;&quot;&gt;Document Foundation&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Donate a fixed amount to the specific project you use&lt;&#x2F;li&gt;
&lt;li&gt;Submit a patch that fixes a bug&lt;&#x2F;li&gt;
&lt;li&gt;Submit a patch that adds a feature (bonus points if it was previously requested by another user)&lt;&#x2F;li&gt;
&lt;li&gt;Offer support to other users using the program via the channels the creators recognize (mailing lists, forums, etc.)&lt;&#x2F;li&gt;
&lt;li&gt;Create a plugin that enhances the project&lt;&#x2F;li&gt;
&lt;li&gt;Promote the project you use most&lt;&#x2F;li&gt;
&lt;li&gt;Suggest your company switch to the project (using the paid version)&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;Have a suggestion that was not listed? Submit it in the comments below.&lt;&#x2F;p&gt;
</content>
        </entry><entry xml:lang="en">
        <title>USB Key Start</title>
        <published>2015-10-03T21:55:06+00:00</published>
        <updated>2015-10-03T21:55:06+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2015-10-03-usb-key-start/" type="text/html"/>
        <id>/2015-10-03-usb-key-start/</id>
        
            <content type="html">&lt;p&gt;Back in the good &#x27;ole days of floppy drives, I used to install &lt;code&gt;grub&lt;&#x2F;code&gt; onto one. I would use it like a key to my computer and take it out if I did not want anyone using my computer when I was not around. Today, we use LUKS encryption to keep unwanted users out. Once &lt;code&gt;grub&lt;&#x2F;code&gt; became too big to fit on floppy drives (and floppy drives became extinct) I still wanted the physical functionality of removing a part that prevents others from using my desktop&#x2F;laptop. Sure, I could remove the hard drive every time I was done with the computer, but this would become tedious and I want something quick and easy.&lt;&#x2F;p&gt;
&lt;p&gt;I recently stumbled across &lt;a class=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;tokiclover&#x2F;mkinitramfs-ll&quot;&gt;mkinitramfs-ll&lt;&#x2F;a&gt; which allowed passing in a LUKS keyfile in initrd. I attempted to use this for Fedora, but did not get very far. I then discovered &lt;code&gt;dracut&lt;&#x2F;code&gt; (Fedora&#x27;s initrd maker) already includes support for passing in a LUKS keyfile as an argument. At this point, I raced to get one of my legacy 256mb flash drives and made a fully functional &quot;key&quot; to operate my laptop.&lt;&#x2F;p&gt;
&lt;p&gt;The main points to get it working were simple:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;Have a crypted root file system&lt;&#x2F;li&gt;
&lt;li&gt;Generate a keyfile to use&lt;&#x2F;li&gt;
&lt;li&gt;Format a flash drive with a label&lt;&#x2F;li&gt;
&lt;li&gt;Add the keyfile to the crypted filesystem and flash drive&lt;&#x2F;li&gt;
&lt;li&gt;Configure and run &lt;code&gt;dracut&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
&lt;li&gt;Configure and generate &lt;code&gt;grub&lt;&#x2F;code&gt; configs&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
&lt;p&gt;**Generate a keyfile to use:**Keyfiles can be anything. Some use a gpg key, but I found it as easy and beneficial just to run: &lt;code&gt;sudo dd if=&#x2F;dev&#x2F;urandom of=&#x2F;root&#x2F;keyfile bs=1024 count=4&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;p&gt;**Format a flash drive with a label:**As I mentioned before, I already had a worthless flash drive handy. Since this flash drive is essentially the key to my computer, I do not want to risk plugging it into another computer and getting the key stolen or corrupted. It will have to become solely used for the purpose of unlocking my system. Creating the flash drive is the same as any other drive with ext4:&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;mkfs.ext4 -L SECURIKEY &#x2F;dev&#x2F;sdb1
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;Add the keyfile to the crypted filesystem and flash drive.&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo mount &#x2F;dev&#x2F;sdb1 &#x2F;mnt
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo cp &#x2F;root&#x2F;keyfile &#x2F;mnt&#x2F;keyfile
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo cryptsetup -v luksAddKey &#x2F;dev&#x2F;mapper&#x2F;fedora-00 &#x2F;mnt&#x2F;keyfile
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;Configure &lt;code&gt;dracut&lt;&#x2F;code&gt;:&lt;&#x2F;strong&gt; &lt;code&gt;dracut&lt;&#x2F;code&gt; needs to load two modules in order for us to pass in the keyfile. Additionally systemd has an issue with keyfiles at the time of writing this so we will have to omit it. Both of these settings can be permanently set by &lt;code&gt;sudo vim &#x2F;etc&#x2F;dracut.conf.d&#x2F;00-keyfile.conf&lt;&#x2F;code&gt; and inserting the below contents.&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# dracut modules to omit
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;omit_dracutmodules+=&amp;quot;systemd&amp;quot;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# dracut modules to add to the default
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;add_dracutmodules+=&amp;quot;crypt lvm&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;strong&gt;Configuring grub:&lt;&#x2F;strong&gt; Open up &lt;code&gt;&#x2F;etc&#x2F;default&#x2F;grub&lt;&#x2F;code&gt; and append &lt;code&gt;rd.luks.key=&#x2F;keyfile:LABEL=SECURIKEY&lt;&#x2F;code&gt; inside the quotes of &lt;code&gt;GRUB_CMDLINE_LINUX&lt;&#x2F;code&gt;. Mine looks like the following:&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;GRUB_CMDLINE_LINUX=&amp;quot;rd.lvm.lv=fedora&#x2F;00 rd.luks.uuid=luks-fad7c380-bc0c-4680-917e-1e80eb244476 rhgb quiet rd.luks.key=&#x2F;keyfile:LABEL=SECURIKEY&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;code&gt;grub&lt;&#x2F;code&gt; can then be regenerated by running &lt;code&gt;sudo grub2-mkconfig -o &#x2F;boot&#x2F;grub2&#x2F;grub.cfg&lt;&#x2F;code&gt;. After &lt;code&gt;grub&lt;&#x2F;code&gt; has been re-generated, we can then regenerate our initrd by issuing &lt;code&gt;dracut --force&lt;&#x2F;code&gt;. Everything is then all set and ready to go! If the keyfile is not present, you will be prompted to enter your encryption password upon next boot to unlock the root filesystem. I would advise leaving the password as you would be unable to access your files if the flash drive was ever lost or picked up by one of your kids and thrown in the toilet.&lt;&#x2F;p&gt;
</content>
        </entry><entry xml:lang="en">
        <title>My Review of Arch</title>
        <published>2015-09-26T21:49:51+00:00</published>
        <updated>2015-09-26T21:49:51+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2015-09-26-my-review-of-arch/" type="text/html"/>
        <id>/2015-09-26-my-review-of-arch/</id>
        
            <content type="html">&lt;p&gt;After my minimal install of Arch, I was greeted by a terminal console upon booting the kernel. With &lt;a class=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;www.archlinux.org&#x2F;packages&#x2F;?sort=&amp;amp;arch=i686&amp;amp;repo=Community&amp;amp;repo=Core&amp;amp;repo=Extra&amp;amp;repo=Multilib&amp;amp;q=&amp;amp;maintainer=&amp;amp;flagged=&quot;&gt;5,013 packages in the 32 bit stable repositories&lt;&#x2F;a&gt; (compare that to &lt;a class=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;packages.debian.org&#x2F;stable&#x2F;allpackages?format=txt.gz&quot;&gt;Debian Stable&#x27;s 56,865&lt;&#x2F;a&gt;), I was not getting very far by relying on the built-in package manager &lt;code&gt;pacman&lt;&#x2F;code&gt;. &lt;a class=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;aur.archlinux.org&#x2F;packages&#x2F;?O=0&amp;amp;SeB=nd&amp;amp;K=&amp;amp;outdated=off&amp;amp;SB=n&amp;amp;SO=a&amp;amp;PP=50&amp;amp;do_Search=Go&quot;&gt;The package count increased another 27,023&lt;&#x2F;a&gt; once I began using the Arch Users Repository (AUR) scripts.&lt;&#x2F;p&gt;
&lt;p&gt;After installing a few packages, I realized Arch&#x27;s greatest weaknesses: customizability and project collaboration. Arch is like a snowflake - no two systems are exactly alike. From a SysAdmin&#x27;s viewpoint, I can&#x27;t determine what state the operating system is just by looking at it. In certain circumstances where time is of the most urgent matter, one cannot spend time comparing program versions with unknown and known bugs. I envision managing two or more devices would be quite painful in the long run.&lt;&#x2F;p&gt;
&lt;p&gt;Project collaboration is still in the early stages. With two great AUR package managers (&lt;code&gt;yaourt&lt;&#x2F;code&gt; and &lt;code&gt;cower&lt;&#x2F;code&gt;) and the
realization that neither have been pushed to upstream, I have an eerie feeling that &lt;a class=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;xkcd.com&#x2F;927&#x2F;&quot;&gt;xkcd&#x27;s standards statement&lt;&#x2F;a&gt; is at play in the Arch environment.&lt;&#x2F;p&gt;
&lt;p&gt;**For those that do not know how collaboration works, here is a quick overview:**I use project A. Project A is lacking feature B. I fork project A, write feature B, and continue using project A with feature B. If people other than myself can benefit from feature B, I push my changes to upstream. If my changes are not accepted in mainstream, I have two choices: keep feature B to myself or write feature B to match upstream&#x27;s policy.&lt;&#x2F;p&gt;
&lt;p&gt;**This is how not to collaborate:**Project A is missing feature B. I fork project A, call it project V, write feature B, C, and D with a wrapper for project A. If somebody wants feature E in project A, tell them to use project C which is a fork&#x2F;clone of project V.&lt;&#x2F;p&gt;
&lt;p&gt;Contrary to public thinking, Arch is not a GNU&#x2F;Linux distribution geared towards intermediate to advanced users. It is a primitive distribution that only intermediate-level and above understand. We understand the basics of how to compile a program and how to find the one line command to run that is nested in 5 sub-links on the wiki. We overlook the high level of expert documentation that isn&#x27;t spelled out clearly, gives a recommended setting to new users, or in some cases doesn&#x27;t actually tell you how to do what you are seeking to do.&lt;&#x2F;p&gt;
&lt;p&gt;I claim Arch is still primitive because when I was installing packages, I felt like a caveman digging up &lt;code&gt;xf86-input-mouse&lt;&#x2F;code&gt; after I installed &lt;code&gt;gdm&lt;&#x2F;code&gt; and GNOME 3. (A clever person might think that would be at least a requirement of one of the packages that installs rather than an optional one - Oh, wait - GUI is never used by anybody on a desktop.) It might be that I was spoiled by reading &lt;a class=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;wiki.gentoo.org&#x2F;wiki&#x2F;Handbook:Main_Page&quot;&gt;Gentoo&#x27;s Handbook&lt;&#x2F;a&gt; back when I was a noob and trying out an advanced distribution, or it could be that I have used distributions that have worked out all of these kinks for too long, but making GNU&#x2F;Linux users dig like cavemen to find appropriate packages is harmful towards our primary objective: dominating the desktop OS marketplace.&lt;&#x2F;p&gt;
&lt;p&gt;Even with these prominent issues, Arch will probably stay installed on my Acer C710 for awhile - at least until Fedora 23 becomes stable.&lt;&#x2F;p&gt;
</content>
        </entry><entry xml:lang="en">
        <title>Jumping on the Arch Bandwagon</title>
        <published>2015-09-19T21:46:47+00:00</published>
        <updated>2015-09-19T21:46:47+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2015-09-19-jumping-on-the-arch-bandwagon/" type="text/html"/>
        <id>/2015-09-19-jumping-on-the-arch-bandwagon/</id>
        
            <content type="html">&lt;p&gt;Well, after avoiding it for a few years, I have decided to install the Arch GNU&#x2F;Linux distribution on my Acer C710. At first glance, it was nice to just install the necessary packages and have a working system within 20 minutes. The downside to having everything up and running in 20 minutes is that I did not install the base packages that come with most distributions - such as a GUI terminal program (i.e. &lt;code&gt;gnome-terminal&lt;&#x2F;code&gt;). That was OK since I still had my favorite tty - 3. I am going to miss the delta packages (DRPMS) from Fedora as I particularly enjoy saving bandwidth.&lt;&#x2F;p&gt;
&lt;p&gt;Installing Arch was pretty simple compared to Gentoo or Funtoo, but not as simple as Fedora or Ubuntu. In Ubuntu, you load a LiveDVD, click the install icon on the desktop and follow the prompts. In Arch, you are presented with a terminal and are not given much instruction. The basic steps are to partition your drive, create a filesystem, mount your root partition as &lt;code&gt;&#x2F;mnt&lt;&#x2F;code&gt;, run the package initializer, and chroot into the environment. In other words, it is as simple as:&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;fdisk &#x2F;dev&#x2F;sda
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;mkfs.ext4 &#x2F;dev&#x2F;sda2
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;mount &#x2F;dev&#x2F;sda2 &#x2F;mnt
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;pacstrap &#x2F;mnt base
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;genfstab -p &#x2F;mnt &amp;gt;&amp;gt; &#x2F;mnt&#x2F;etc&#x2F;fstab
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;arch-chroot &#x2F;mnt
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;echo wipplertop &amp;gt; &#x2F;etc&#x2F;hostname
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;ln -sf &#x2F;usr&#x2F;share&#x2F;zoneinfo&#x2F;America&#x2F;Los_Angeles &#x2F;etc&#x2F;localtime
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sed -i &amp;#39;s&#x2F;^#en_US.UTF-8$&#x2F;en_US.UTF-8&#x2F;g&amp;#39; &#x2F;etc&#x2F;locale.gen
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;locale-gen
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;echo LANG=en_US.UTF-8 &amp;gt; &#x2F;etc&#x2F;locale.conf
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;mkinitcpio -p linux
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;passwd
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;useradd -m andrew
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;passwd andrew
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;pacman -S grub os-prober
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;grub-install --recheck &#x2F;dev&#x2F;sda
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;grub-mkconfig -o &#x2F;boot&#x2F;grub&#x2F;grub.cfg
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;exit
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;reboot
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
</content>
        </entry><entry xml:lang="en">
        <title>Expect with expect</title>
        <published>2015-08-30T22:41:50+00:00</published>
        <updated>2015-08-30T22:41:50+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2015-08-30-expect-with-expect/" type="text/html"/>
        <id>/2015-08-30-expect-with-expect/</id>
        
            <content type="html">&lt;p&gt;Wouldn&#x27;t it be nice to program a script that expects a certain line of text then sends a predetermined string? How about copy your ssh id to 40 different RPi units without typing the command for every one? Expect is that sort of program we all have been dreaming about. Just look at this script:&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;#!&#x2F;usr&#x2F;bin&#x2F;expect -f
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;set timeout 3
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;set serv [lindex $argv 0];
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;spawn ssh-copy-id pi@$serv
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sleep 4
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;expect &amp;quot;Are you sure you want to continue connecting (yes&#x2F;no)?&amp;quot;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;send &amp;quot;yes\r&amp;quot;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;expect &amp;quot;pi@{$serv}&amp;#39;s password: &amp;quot;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;send &amp;quot;p@ssw0rd\r&amp;quot;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;interact
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;When this block of code is saved as &lt;code&gt;copy_pi.sh&lt;&#x2F;code&gt; and invoked as &lt;code&gt;.&#x2F;copy_pi.sh 192.168.1.42&lt;&#x2F;code&gt;, it will attemp to connect as the pi user, copy the current public key, say yes to the prompt, send the password (provided it is escaped properly), and drop you into the process you spawned.&lt;&#x2F;p&gt;
&lt;p&gt;Now, let&#x27;s look at the script in more detail as to what expect has to offer.&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;#!&#x2F;usr&#x2F;bin&#x2F;expect -f
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This line has to be the absolute path of expect with the &lt;code&gt;-f&lt;&#x2F;code&gt; switch. This is to tell the program that it is being passed a file with a list of commands. On Debian&#x2F;Fedora, this path is where &lt;code&gt;expect&lt;&#x2F;code&gt; is located. On other systems, you will need to run &lt;code&gt;which expect&lt;&#x2F;code&gt; to find the absolute location.&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;set timeout 3
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;set serv [lindex $argv 0];
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The first line tells &lt;code&gt;expect&lt;&#x2F;code&gt; to wait up to 3 seconds for a new line before it times out. The second line is grabbing the variable being passed into this script. Normally, one would think arg 0 would be the name of the program (i.e. &lt;code&gt;copy_pi.sh&lt;&#x2F;code&gt;); however, &lt;code&gt;expect&lt;&#x2F;code&gt; captures the variables into &lt;code&gt;$argv&lt;&#x2F;code&gt; (&lt;code&gt;$argc&lt;&#x2F;code&gt; is the length of the variables).You can also specify a range of variables into one: &lt;code&gt;set range [lrange $argv 0 2];&lt;&#x2F;code&gt;&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;spawn ssh-copy-id pi@$serv
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sleep 4
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This is we are initializing the process of copying our ssh key to &lt;code&gt;$serv&lt;&#x2F;code&gt;.
This is the part we would normally be typing ourselves. &lt;code&gt;sleep 4&lt;&#x2F;code&gt; tells expect to wait 4 seconds before continuing.&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;expect &amp;quot;Are you sure you want to continue connecting (yes&#x2F;no)?&amp;quot;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;send &amp;quot;yes\r&amp;quot;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;expect &amp;quot;pi@{$serv}&amp;#39;s password: &amp;quot;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;send &amp;quot;p@ssw0rd\r&amp;quot;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;interact
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The &lt;code&gt;expect&lt;&#x2F;code&gt; line could either be regex or what will be exactly shown. Since I know exactly what will appear in the process, I have chosen to go that route. The &lt;code&gt;send&lt;&#x2F;code&gt; command is transmitting the text into the spawned program. Special characters such as &amp;amp; need to be escaped with a backslash. The &lt;code&gt;\r&lt;&#x2F;code&gt; simulates a carriage return (enter key). Since the &lt;code&gt;ssh-copy-id&lt;&#x2F;code&gt; is completed by the time &lt;code&gt;interact&lt;&#x2F;code&gt; is called, you will not be in the remote pi&#x27;s shell. I have sometimes found it necessary to include &lt;code&gt;interact&lt;&#x2F;code&gt; so that the password is actually sent.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;expect&lt;&#x2F;code&gt; is a great tool that uses TCL syntax. &lt;code&gt;expect&lt;&#x2F;code&gt; has prooved useful to me many times over - especially when I had to re-key my puppet deployment after Heartbleed.&lt;&#x2F;p&gt;
</content>
        </entry><entry xml:lang="en">
        <title>The Arrow Law</title>
        <published>2015-08-16T22:02:52+00:00</published>
        <updated>2015-08-16T22:02:52+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2015-08-16-the-arrow-law/" type="text/html"/>
        <id>/2015-08-16-the-arrow-law/</id>
        
            <content type="html">&lt;p&gt;When I first started out with Linux, I was having trouble understanding the basic commands such as &lt;code&gt;ln&lt;&#x2F;code&gt;, andrew&lt;code&gt;mv&lt;&#x2F;code&gt;, &lt;code&gt;scp&lt;&#x2F;code&gt;, &lt;code&gt;rsync&lt;&#x2F;code&gt;, etc. What got me with those commands was the SOURCE and DEST options until I figured out the arrow law.&lt;&#x2F;p&gt;
&lt;p&gt;A typical &lt;code&gt;rsync&lt;&#x2F;code&gt; command looks like this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;rsync -av &#x2F;home&#x2F;andrew&#x2F;file1.txt &#x2F;opt&#x2F;andrew&#x2F;file2.txt
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Where as a basic tar command looks like this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;tar -cJf tarfile.xz &#x2F;home&#x2F;andrew&#x2F;file1.txt
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;In the &lt;code&gt;rsync&lt;&#x2F;code&gt; example, the SOURCE came first. In the &lt;code&gt;tar&lt;&#x2F;code&gt; example, the DEST came first. Did I really have to learn every command to know which order my commands were supposed to be in?&lt;&#x2F;p&gt;
&lt;p&gt;There are a few quirks, but most commands follow the arrow law:&lt;code&gt;-&amp;gt;&lt;&#x2F;code&gt; . SOURCE should come first - then DEST.&lt;&#x2F;p&gt;
&lt;p&gt;To place the &lt;code&gt;tar&lt;&#x2F;code&gt; command in the arrow law way, we would write the command like the example below. Tar allows the use of multiple source locations in the form of files or folders. Each source is then compress and place in the file.&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;tar -cJ &#x2F;home&#x2F;andrew&#x2F;file1.txt &#x2F;opt &#x2F;folder -f files.xz
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;At a glance, one should easily recognize that the &lt;code&gt;-f&lt;&#x2F;code&gt; indicates the DEST&#x2F;SOURCE file to be worked on by the &lt;code&gt;tar&lt;&#x2F;code&gt; command. Thus by typing the extraction command as the below is following the arrow law.&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;tar -xvJf files.xz
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The command that really confused me the most was the &lt;code&gt;ln&lt;&#x2F;code&gt;. By using the arrow law, it was easy to figure this one out. (note: in the below example &lt;code&gt;-s&lt;&#x2F;code&gt; is the option for making a symbolic link - not to indicate the source.)&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;ln -s &#x2F;opt &#x2F;home&#x2F;andrew&#x2F;opt
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;In human readable terms, the above command means the following: take &lt;code&gt;&#x2F;opt&lt;&#x2F;code&gt; and make it accessible by going to &lt;code&gt;&#x2F;home&#x2F;andrew&#x2F;opt&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
</content>
        </entry><entry xml:lang="en">
        <title>Setting the I&#x2F;O scheduler for a single disk on Fedora</title>
        <published>2015-07-26T22:35:41+00:00</published>
        <updated>2015-07-26T22:35:41+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2015-07-26-setting-the-io-scheduler-for-a-single-disk-on-fedora/" type="text/html"/>
        <id>/2015-07-26-setting-the-io-scheduler-for-a-single-disk-on-fedora/</id>
        
            <content type="html">&lt;p&gt;You can set your IO scheduler on-the-fly by echoing the scheduler you want into &lt;code&gt;&#x2F;sys&#x2F;block&#x2F;{DEVICE-NAME}&#x2F;queue&#x2F;scheduler&lt;&#x2F;code&gt;. This setting, however, does not persist across system reboots. The legacy method is to place this command in &lt;code&gt;&#x2F;etc&#x2F;rc.local&lt;&#x2F;code&gt; or by placing an elevator variable in &lt;code&gt;grub.cfg&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Beginning with Fedora 20, a better way of tuning your system has emerged: &lt;code&gt;tuned&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;code&gt;tuned&lt;&#x2F;code&gt; is a daemon that monitors your system and updates it based upon the variables at that moment. For instance, it will scale back your network interface - reducing power consumption - when it is not in use and will return it to full throttle when you are downloading the latest Fedora ISO. Enabling &lt;code&gt;tuned&lt;&#x2F;code&gt; on Fedora 22 is as simple as:&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo dnf install tuned
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;systenctl enable tuned
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;systemctl start tuned
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;code&gt;tuned&lt;&#x2F;code&gt; comes pre-installed with default profiles (listed by running &lt;code&gt;tuned-adm list&lt;&#x2F;code&gt;). By default the IO scheduler is set for all disks on the system. Since this is not the behavior we intend, nor the result we want, we will have to create our own profile for &lt;code&gt;tuned&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;System profiles are stored in &lt;code&gt;&#x2F;usr&#x2F;lib&#x2F;tuned&lt;&#x2F;code&gt; and custom profiles are stored in &lt;code&gt;&#x2F;etc&#x2F;tuned&lt;&#x2F;code&gt;. Creating a custom profile is as simple as finding the recommended for your system, copying it to a new profile, editing it, and applying it.&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo mkdir &#x2F;etc&#x2F;tuned&#x2F;andrewwippler
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;sudo cp &#x2F;usr&#x2F;lib&#x2F;tuned&#x2F;$(tuned-adm recommend)&#x2F;tuned.conf &#x2F;etc&#x2F;tuned&#x2F;andrewwippler&#x2F;tuned.conf
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;code&gt;tuned.conf&lt;&#x2F;code&gt; has a simple structure:&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;[NAME]
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;type=TYPE
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;devices=DEVICES
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;setting1=value
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;setting2=value
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;...
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;In the event of your &lt;code&gt;NAME&lt;&#x2F;code&gt; being the same as the &lt;code&gt;TYPE&lt;&#x2F;code&gt;, you can omit the type line. For example, a normal disk declaration looks like this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;[disk]
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# Comma separated list of devices, all devices if commented out.
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# devices=sda
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;alpm=medium_power
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now all we have to do is append our declaration to &lt;code&gt;&#x2F;etc&#x2F;tuned&#x2F;andrewwippler&#x2F;tuned.conf&lt;&#x2F;code&gt; for sda&#x27;s elevator switch and enable it.&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;[my_ssd_disk]
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;type=disk
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;devices=sda
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;elevator=noop
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;I can then enable my custom tuned profile by running &lt;code&gt;tuned-adm profile andrewwippler&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
</content>
        </entry><entry xml:lang="en">
        <title>Send Aliases over SSH connections</title>
        <published>2015-07-18T22:12:35+00:00</published>
        <updated>2015-07-18T22:12:35+00:00</updated>
        <author>
            <name>Andrew Wippler</name>
        </author>
        <link rel="alternate" href="/2015-07-18-send-aliases-over-ssh-connections/" type="text/html"/>
        <id>/2015-07-18-send-aliases-over-ssh-connections/</id>
        
            <content type="html">&lt;p&gt;Bash reads aliases from a file only; however, this file does not have to reside on the server you are connecting to. With OpenSSH, we have to ability to send environment variables that the server allows.&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;On Debian&#x2F;Ubuntu systems, the default accept environment variables are:
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# Allow client to pass locale environment variables
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;AcceptEnv LANG LC_*
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;On CentOS&#x2F;Fedora systems, the default accept environment variables are:
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# Accept locale-related environment variables
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;AcceptEnv XMODIFIERS
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If you remote into a mixed environment of servers - whether they be Debian, Ubuntu, or CentOS, you will need to find a common &lt;code&gt;AcceptEnv&lt;&#x2F;code&gt; variable. Since Debian and Ubuntu allow LC_* (everything with the prefix LC_), we are limited to forwarding our aliases over one of CentOS&#x27;s variables. For me, it was easy to decide on a variable to overwrite - &lt;code&gt;LC_PAPER&lt;&#x2F;code&gt;. I hardly print anything and I especially do not print on remote servers.&lt;&#x2F;p&gt;
&lt;p&gt;In order to send your aliases into a remote server, you have to set up your environment first.&lt;&#x2F;p&gt;
&lt;p&gt;In &lt;code&gt;~&#x2F;.ssh&#x2F;config&lt;&#x2F;code&gt;, you need a line that sends the environment variable of your choice. These two lines denote that for every host, we will send the environment variable.&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;Host *
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;     SendEnv LC_PAPER
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Next, we will have to set an alias file we want to transfer. For my test, I create &lt;code&gt;~&#x2F;.bash_aliases_xfer&lt;&#x2F;code&gt; and had the contents of:&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# .bash_aliases_xfer
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;# Source global definitions
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;if [ -f &#x2F;etc&#x2F;bashrc ]; then
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    . &#x2F;etc&#x2F;bashrc
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;fi
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;alias lollypop=&amp;quot;echo lollypop&amp;quot;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;alias lolp=&amp;quot;lollypop&amp;quot;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;#My servers display useful information in the motd.
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;[ ! -z &amp;quot;$TERM&amp;quot; -a -r &#x2F;etc&#x2F;motd ] &amp;amp;&amp;amp; cat &#x2F;etc&#x2F;motd
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Next, we have to craft our ssh command:&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;LC_PAPER=$(cat ~&#x2F;.bash_aliases_xfer; exec 3&amp;lt;&amp;amp;-) \
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;ssh -t user@remote \
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;    &amp;#39;exec bash --rcfile &#x2F;dev&#x2F;fd&#x2F;3 3&amp;lt; &amp;lt;(printf %s &amp;quot;$LC_PAPER&amp;quot;)&amp;#39;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The first line defines the environment variable - an output of our local file and places that information in file descriptor 3. The second line is where we actually connect to the server. The third line is the command executed on the remote server: cleanly print the contents of our environment variable, put that information in file descriptor 3, and reload bash with that file as the only configuration file.&lt;&#x2F;p&gt;
&lt;p&gt;To make the process easier, I have place the following function in my .bashrc. Since the function has $@ variable, I can use it as a replacement to ssh and I can pass any needed ssh switches to my new function.&lt;&#x2F;p&gt;
&lt;pre class=&quot;z-code&quot;&gt;&lt;code&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;function ssha() {
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;LC_BASHRC=$(cat ~&#x2F;.bash_aliases_xfer; exec 3&amp;lt;&amp;amp;-) ssh -t &amp;quot;$@&amp;quot; &amp;#39;exec bash --rcfile &#x2F;dev&#x2F;fd&#x2F;3 3&amp;lt; &amp;lt;(printf %s &amp;quot;$LC_BASHRC&amp;quot;)&amp;#39;;
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;}
&lt;&#x2F;span&gt;&lt;span class=&quot;z-text z-plain&quot;&gt;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;After I reload my bashrc ( &lt;code&gt;source ~&#x2F;.bashrc&lt;&#x2F;code&gt; ), I can then pass my aliases into my new ssh session: &lt;code&gt;ssha user@remote -i ~&#x2F;.ssh&#x2F;remote_id -X&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
</content>
        </entry>
</feed>
