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

<channel>
	<title>How-to &#8211; TechGourmet</title>
	<atom:link href="https://techgourmet.net/category/how-to/feed/" rel="self" type="application/rss+xml" />
	<link>https://techgourmet.net</link>
	<description>Identity &#38; Access Management, Security Operations, Hybrid Cloud and AI automation.</description>
	<lastBuildDate>Mon, 17 Oct 2016 11:11:34 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://techgourmet.net/wp-content/uploads/2015/12/cropped-Techgourmet-Logo-2016-32x32.png</url>
	<title>How-to &#8211; TechGourmet</title>
	<link>https://techgourmet.net</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Oops….the WordPress update broke my contactforms</title>
		<link>https://techgourmet.net/oops-the-wordpress-update-broke-my-contactforms/?pk_campaign=feed&#038;pk_kwd=oops-the-wordpress-update-broke-my-contactforms</link>
		
		<dc:creator><![CDATA[Roy van der Linden]]></dc:creator>
		<pubDate>Wed, 24 Aug 2016 11:46:29 +0000</pubDate>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[broken]]></category>
		<category><![CDATA[contact form]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wp_mail]]></category>
		<guid isPermaLink="false">https://techgourmet.net/?p=51153</guid>

					<description><![CDATA[One of the things i often have to implement on WordPress websites is contact-forms with a mail function. Most of the time, I implement Contactform 7 because it is easy to comprehend for my customers and the function validation to get the emails sent to...<img src="https://apps.techgourmet.net/webeye/piwik.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Ftechgourmet.net%2Foops-the-wordpress-update-broke-my-contactforms%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Doops-the-wordpress-update-broke-my-contactforms&amp;action_name=Oops%E2%80%A6.the+WordPress+update+broke+my+contactforms&amp;urlref=https%3A%2F%2Ftechgourmet.net%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></description>
										<content:encoded><![CDATA[<p>One of the things i often have to implement on WordPress websites is contact-forms with a mail function.<br />
Most of the time, I implement Contactform 7 because it is easy to comprehend for my customers and the function validation to get the emails sent to my customers’ email addresses, works fairly well.</p>
<p>Recently WordPress released version 4.6 and it had one Nasty surprise for me…… contact-forms suddenly didn&#8217;t work anymore.<br />
Because this happened when I was handing over a website to a customer, I was wondering whether i had made a typo&#8230;</p>
<p>I hadn’t.</p>
<p>The wp_mail() function, which is being used by almost everything that wants to send emails from a WordPress website, according to the change log has been changed.</p>
<blockquote><p>In 4.6 (see r38058) we changed how we apply the from email and name, we now use PHPMailers own setFrom()function call.</p></blockquote>
<p>Sadly it has proven to be buggy. The good news is that it has been solved and a correct working function will be released with 4.6.1.</p>
<p>Until you can implement the 4.6.1. release in production, here’s the quickfix that solves your problem for now, however with a downside; you won’t be able to send attachements.</p>
<h3>For Contactform 7:</h3>
<p>I changed the wp_mail() function to mail() and removed $attachments. This is working for my setup with contact-form-7 4.5 and wordpress 4.6. Obviously without attachments.</p>
<p>see /wp-content/plugins/contact-form-7/includes/mail.php (Line 85)</p>
<p>old:</p>
<pre> return wp_mail( $recipient, $subject, $body, $headers, $attachments );</pre>
<p>new:</p>
<pre>return mail( $recipient, $subject, $body, $headers );</pre>
<p>Change it back once you have implemented 4.6.1. and verified that it works as expected.</p>
<p>Hope this helps</p>
<p>R.</p>
<img decoding="async" src="https://apps.techgourmet.net/webeye/piwik.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Ftechgourmet.net%2Foops-the-wordpress-update-broke-my-contactforms%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Doops-the-wordpress-update-broke-my-contactforms&amp;action_name=Oops%E2%80%A6.the+WordPress+update+broke+my+contactforms&amp;urlref=https%3A%2F%2Ftechgourmet.net%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How-to enable Multi Factor Authentication for Linux using Google Authenticator (part 2)</title>
		<link>https://techgourmet.net/how-to-enable-multi-factor-authentication-for-linux-using-google-authenticator-part-2/?pk_campaign=feed&#038;pk_kwd=how-to-enable-multi-factor-authentication-for-linux-using-google-authenticator-part-2</link>
		
		<dc:creator><![CDATA[Roy van der Linden]]></dc:creator>
		<pubDate>Mon, 04 Jul 2016 07:30:09 +0000</pubDate>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Amazon Web Services]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://techgourmet.net/?p=51034</guid>

					<description><![CDATA[More than once a month, I get asked if there is a way to implement Multi Factor Authentication on cloud based Linux VM’s without having to buy tokens and implement proprietary services. There are a couple of Open Source MFA solutions available and for the...<img src="https://apps.techgourmet.net/webeye/piwik.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Ftechgourmet.net%2Fhow-to-enable-multi-factor-authentication-for-linux-using-google-authenticator-part-2%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Dhow-to-enable-multi-factor-authentication-for-linux-using-google-authenticator-part-2&amp;action_name=How-to+enable+Multi+Factor+Authentication+for+Linux+using+Google+Authenticator+%28part+2%29&amp;urlref=https%3A%2F%2Ftechgourmet.net%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></description>
										<content:encoded><![CDATA[<p>More than once a month, I get asked if there is a way to implement Multi Factor Authentication on cloud based Linux VM’s without having to buy tokens and implement proprietary services.</p>
<p>There are a couple of Open Source MFA solutions available and for the ease of installation and use I choose to use Google Authenticator.</p>
<p>In <a href="https://techgourmet.net/enable-multi-factor-authentication-google-authenticator-part-1/">part 1 of this tutorial</a> we installed google authenticator on a Redhat/Centos based or Debian/Ubuntu based linux VM. In this second part of the tutorial we are going to link your softtoken to the authenticator service on the linux vm. As a optional bonus I will show how you can prevent having 1 softtoken per VM for every installation in your Cloud environment.</p>
<h4>STEP 3: Create the Google Authenticator connection for your account.</h4>
<p>You can activate the google-authenticator for the root user or any other user. Switch to the user who should use the two-factor authentication and type in:</p>
<pre>google-authenticator</pre>
<p>You will be prompted to answer a few questions; answer the first two questions with yes (y):</p>
<pre>Do you want authentication tokens to be time-based (y/n) y</pre>
<p><img fetchpriority="high" decoding="async" class="aligncenter wp-image-51037 size-large" src="https://techgourmet.net/wp-content/uploads/2016/07/google-authenticator-setup-1024x602.png" alt="google-authenticator-setup" width="1024" height="602" srcset="https://techgourmet.net/wp-content/uploads/2016/07/google-authenticator-setup-1024x602.png 1024w, https://techgourmet.net/wp-content/uploads/2016/07/google-authenticator-setup-300x176.png 300w, https://techgourmet.net/wp-content/uploads/2016/07/google-authenticator-setup-768x451.png 768w, https://techgourmet.net/wp-content/uploads/2016/07/google-authenticator-setup-700x411.png 700w, https://techgourmet.net/wp-content/uploads/2016/07/google-authenticator-setup.png 1305w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<pre>Do you want me to update your "/home/USERNAME/.google_authenticator" file (y/n) y</pre>
<p>You can answer the next questions according to your needs.</p>
<p>You can use the Google Authenticator app to scan the qr-code, or add the account using the secret key and the verification code. Do not forget to print out the emergency scratch codes and store them in a safe place!</p>
<h4>STEP 4: Create the Google Authenticator connection for your account.</h4>
<p>To use the module you have to edit the pam, and sshd config files.</p>
<pre>vi /etc/pam.d/sshd</pre>
<p>Add the following line on top of the file:</p>
<pre>auth required pam_google_authenticator.so</pre>
<p>One more file to edit:</p>
<pre>vi /etc/ssh/sshd_config</pre>
<p>Find and change the following line:</p>
<pre>ChallengeResponseAuthentication yes</pre>
<h4>STEP 5: Restart your SSH service and test the configuration.</h4>
<p>Now switch back to root and restart the SSH server. If you added the two-factor authentication for the root user you can skip the next step.</p>
<pre>su root</pre>
<p>Finally restart the SSH server.</p>
<pre>/etc/init.d/ssh restart</pre>
<p>That&#8217;s it! You should now have a SSH server with an two-factor authentication! Test this by opening up a new ssh session to the server, and verify that you can get in before closing out your current ssh session.</p>
<h4>Coming soon</h4>
<p>In the last part of this Tutorial, we will show you how to deploy Google Authenticator configuration for your user(s) and how to prevent having to use a differend authenticator for every server you want to access.</p>
<p>&nbsp;</p>
<img decoding="async" src="https://apps.techgourmet.net/webeye/piwik.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Ftechgourmet.net%2Fhow-to-enable-multi-factor-authentication-for-linux-using-google-authenticator-part-2%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Dhow-to-enable-multi-factor-authentication-for-linux-using-google-authenticator-part-2&amp;action_name=How-to+enable+Multi+Factor+Authentication+for+Linux+using+Google+Authenticator+%28part+2%29&amp;urlref=https%3A%2F%2Ftechgourmet.net%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Install Docker on various Linux Distributions</title>
		<link>https://techgourmet.net/install-docker/?pk_campaign=feed&#038;pk_kwd=install-docker</link>
		
		<dc:creator><![CDATA[Roy van der Linden]]></dc:creator>
		<pubDate>Sun, 12 Jun 2016 11:23:16 +0000</pubDate>
				<category><![CDATA[Container]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Docker]]></category>
		<category><![CDATA[How-to]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[Amazon Web Services]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[DEVOPS]]></category>
		<category><![CDATA[Google Cloud Environment]]></category>
		<category><![CDATA[Microsoft Azure]]></category>
		<guid isPermaLink="false">https://techgourmet.net/?p=50921</guid>

					<description><![CDATA[Docker is one of the easiest ways to build, ship and run your applications across various environments. Using container virtualization, it enables you to run applications in Amazon&#8217;s AWS, Google Cloud Platform, Azure, VMWare vCloud or whatever other cloud platform your company might use. As...<img src="https://apps.techgourmet.net/webeye/piwik.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Ftechgourmet.net%2Finstall-docker%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Dinstall-docker&amp;action_name=Install+Docker+on+various+Linux+Distributions&amp;urlref=https%3A%2F%2Ftechgourmet.net%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></description>
										<content:encoded><![CDATA[<p>Docker is one of the easiest ways to build, ship and run your applications across various environments. Using container virtualization, it enables you to run applications in Amazon&#8217;s AWS, Google Cloud Platform, Azure, VMWare vCloud or whatever other cloud platform your company might use. As a developer, you can also run it on your standard Windows or Apple desktop/laptop. Perfect for DEVOPS, perfect for Hybrid and multi supplier cloud environments because Docker containers can be run as easily on any cloud platform you might use.<span id="more-50921"></span>  This how-to will explain how a Docker environment in which you can create application environments, ship them to the Docker registry and/or Run them and includes the optional installation of Docker compose.</p>
<h2>How Does Docker Work?</h2>
<p>Before we start with the installation it&#8217;s good to know a little bit about how Docker works. Docker has a client-server architecture. Docker Daemon or server is responsible for all the actions that are related to containers. The daemon receives the commands from the Docker client though cli or REST API’s. Docker client can be on the same host as daemon or it can be present on any other host. Images are the basic building blocks of Docker. Containers are built from images. Images can be configured with applications and used as a template for creating containers. Images are organized in a layered manner. Every change in an image is added as layer on top of it.</p>
<p><img loading="lazy" decoding="async" class="wp-image-50924 aligncenter" src="https://techgourmet.net/wp-content/uploads/2016/06/image-300x170.png" alt="image" width="649" height="368" srcset="https://techgourmet.net/wp-content/uploads/2016/06/image-300x170.png 300w, https://techgourmet.net/wp-content/uploads/2016/06/image-768x435.png 768w, https://techgourmet.net/wp-content/uploads/2016/06/image-700x396.png 700w, https://techgourmet.net/wp-content/uploads/2016/06/image.png 871w" sizes="auto, (max-width: 649px) 100vw, 649px" /></p>
<p>Docker registry is a repository for Docker images. Using Docker registry, you can build and share images with your team. A registry can be public or private. Docker Inc provides a hosted registry service called Docker Hub. It allows you to upload and download images from a central location. If your repository is public, all your images can be accessed by other Docker hub users. You can also create a private registry in Docker Hub. Docker hub acts like git, where you can build your images locally in your laptop, commit it and then can be pushed to the Docker hub.</p>
<p>Docker containers are created from images. It is a writable layer of the image. You can package your applications in a container, commit it and make it a golden image to build more containers from it. Two or more containers can be linked together to form tiered application architecture. Containers can be started, stopped, committed and terminated.</p>
<p>The best feature of Docker is collaboration. Docker images can be pushed to a repository and can be pulled down to any other host to run containers from that image. Moreover Docker hub has thousands of images created by users and you can pull those images down to your hosts based on your application requirements.</p>
<h2>Installation of Docker</h2>
<p>As said, Docker can be installed on several types of environments. ranging from Linux, via Apple&#8217;s OSX to Microsofts Azure and Windows 10. A ready environment can be obtained from Amazon AWS, Google Cloud Platform, Microsoft Azure, and a number of independent cloud providers like Digital Ocean and Rackspace. This tutorial will show how to install Docker and optionally Docker Compose on Debian and Redhat Enterprise based Linux Distributions.</p>
<p>&nbsp;</p>
<h3><span style="color: #ae2221;">Step 1: Add the repository</span></h3>
<p>&nbsp;</p>
<h4>Debian based:</h4>
<pre># docker requires apt-transport-https
sudo apt-get install apt-transport-https -y
# get the docker key for the docker registry
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
# add the repository
sudo echo "deb https://apt.dockerproject.org/repo debian-jessie main" | \
sudo tee /etc/apt/sources.list.d/docker.list</pre>
<h4>RHEL based:</h4>
<pre><code class="hljs ruby">$ sudo tee /etc/yum.repos.d/docker.repo &lt;&lt;-<span class="hljs-string">'EOF'</span>
[dockerrepo]
name=Docker Repository
baseurl=<span class="hljs-symbol">https:</span>/<span class="hljs-regexp">/yum.dockerproject.org/repo</span><span class="hljs-regexp">/main/centos</span><span class="hljs-regexp">/$releasever/</span>
enabled=<span class="hljs-number">1</span>
gpgcheck=<span class="hljs-number">1</span>
gpgkey=<span class="hljs-symbol">https:</span>/<span class="hljs-regexp">/yum.dockerproject.org/gpg</span>
EOF</code></pre>
<p>&nbsp;</p>
<h3><span style="color: #ae2221;">STEP 2: Install the service on your Linux machine.</span></h3>
<p>&nbsp;</p>
<h4>Debian based:</h4>
<pre># Install the Docker engine
sudo apt-get update &amp;&amp; sudo apt-get -y install docker-engine
# Start the docker service
sudo service docker start</pre>
<h4>RHEL based:</h4>
<pre>#Install the Docker engine
sudo yum install docker-engine
# Start the docker service
<code class="hljs sql">sudo service docker <span class="hljs-keyword">start</span></code></pre>
<p>&nbsp;</p>
<h3><span style="color: #ae2221;">STEP 3: Create a Docker group to prevent use of the root user.</span></h3>
<h4>Debian based:</h4>
<pre>#The group docker should be created during installation, but can be done like this
sudo groupadd docker
#add the users that manage the docker containers to the group
sudo adduser $USER docker</pre>
<p>&nbsp;</p>
<h4>RHEL based:</h4>
<pre>#The group docker should be created during installation, but can be done like this
sudo groupadd docker
#add the users that manage the docker containers to the group
sudo usermod -aG docker your_username</pre>
<p>&nbsp;</p>
<h3><span style="color: #ae2221;">STEP 4: Install Docker compose (optional, only in DEV environments</span></h3>
<p>Docker Compose applications are easy to share with your teams. You just need to define your application with Docker Compose once and use that same configuration to run the application on other machines to save your time.</p>
<h4>Debian based:</h4>
<p>To install Docker compose, we need to install the python-pip package as a prerequisite before installing the docker-compose.</p>
<pre>sudo apt-get install python-pip</pre>
<p>After that, you are ready to install docker-compose by running the below command in your command line terminal.</p>
<pre>#Install Docker Compose
sudo pip install docker-compose</pre>
<h4>RHEL based:</h4>
<p>On RedHat based systems, you will need to install epel-release and php-pip</p>
<pre>sudo yum install -y epel-release python-pip</pre>
<p>After that, you are ready to install docker-compose by running the below command in your command line terminal.</p>
<pre>#Install Docker Compose
sudo pip install docker-compose</pre>
<p>To run docker-compose successfully you will need to upgrade the php packages.</p>
<pre>sudo yum upgrade python*</pre>
<p>Now you have successfully installed docker-compose, docopt, requests, texttable and few other packages, and are able to compose docker contained applications. You are also able to run docker containers from a non-privileged account.<br />
Hope this helps</p>
<hr />
<figure><img decoding="async" class="" src="https://40.media.tumblr.com/5f75eb3275e3fc014fa8023c99852409/tumblr_inline_o1yuuqPN861qfg5p4_540.png" alt="" />Your Data, Your Responsibility, Our Business</figure>
<p>&nbsp;</p>
<img loading="lazy" decoding="async" src="https://apps.techgourmet.net/webeye/piwik.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Ftechgourmet.net%2Finstall-docker%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Dinstall-docker&amp;action_name=Install+Docker+on+various+Linux+Distributions&amp;urlref=https%3A%2F%2Ftechgourmet.net%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How-to enable Multi Factor Authentication for Linux using Google Authenticator (part 1)</title>
		<link>https://techgourmet.net/enable-multi-factor-authentication-google-authenticator-part-1/?pk_campaign=feed&#038;pk_kwd=enable-multi-factor-authentication-google-authenticator-part-1</link>
		
		<dc:creator><![CDATA[Roy van der Linden]]></dc:creator>
		<pubDate>Sat, 11 Jun 2016 09:10:49 +0000</pubDate>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Google Authenticator]]></category>
		<category><![CDATA[MFA]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://techgourmet.net/?p=50915</guid>

					<description><![CDATA[More than once a month, I get asked if there is a way to implement Multi Factor Authentication on cloud based Linux VM&#8217;s without having to buy tokens and implement proprietary services. There are a couple of Open Source MFA solutions available and for the...<img src="https://apps.techgourmet.net/webeye/piwik.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Ftechgourmet.net%2Fenable-multi-factor-authentication-google-authenticator-part-1%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Denable-multi-factor-authentication-google-authenticator-part-1&amp;action_name=How-to+enable+Multi+Factor+Authentication+for+Linux+using+Google+Authenticator+%28part+1%29&amp;urlref=https%3A%2F%2Ftechgourmet.net%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></description>
										<content:encoded><![CDATA[<p>More than once a month, I get asked if there is a way to implement Multi Factor Authentication on cloud based Linux VM&#8217;s without having to buy tokens and implement proprietary services.</p>
<p>There are a couple of Open Source MFA solutions available and for the ease of installation and use I choose to use Google Authenticator.</p>
<p>This tutorial contains configuration instructions for both Debian and Redhat based Linux distributions and are written for the current versions.</p>
<h3>What is Google Authenticator and how does it work?</h3>
<p>Google Authenticator is an alternative to SMS for 2Step verification, installing an app on Android / IOS  where the codes will be sent. It supports both the <a href="http://en.wikipedia.org/wiki/HMAC-based_One-time_Password_Algorithm" target="_blank" rel="noopener">HOTP</a> and <a href="http://en.wikipedia.org/wiki/Time-based_One-time_Password_Algorithm" target="_blank" rel="noopener">TOTP</a> algorithms for generating one-time passwords.</p>
<p>With HOTP, the server and client share a secret value and a counter, which are used to compute a one time password independently on both sides. Whenever a password is generated and used, the counter is incremented on both sides, allowing the server and client to remain in sync.</p>
<p>TOTP essentially uses the same algorithm as HOTP with one major difference. The counter used in TOTP is replaced by the current time. The client and server remain in sync as long as the system times remain the same. This can be done by using the <a href="http://en.wikipedia.org/wiki/Network_Time_Protocol" target="_blank" rel="noopener">Network Time protocol</a>.</p>
<p>The secret key (as well as the counter in the case of HOTP) has to be communicated to both the server and the client at some point in time. In the case of Google Authenticator, this is done in the form of a QRCode encoded URI. See: <a href="https://code.google.com/p/google-authenticator/wiki/KeyUriFormat" target="_blank" rel="noopener">KeyUriFormat</a> for more information.</p>
<h3>How do I install Google Authenticator?</h3>
<p>The installation contains of 5 steps:</p>
<h4>STEP 1: Install the Client on a mobile device.</h4>
<p>First the Google Authenticator app has to be installed on a mobile device:<br />
Android: Get the latest version <a href="https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2&amp;hl=en" target="_blank" rel="noopener">here</a>, directly from Google Play.<br />
IOS: Get the latest version <a href="https://itunes.apple.com/en/app/google-authenticator/id388497605?mt=8" target="_blank" rel="noopener">here</a>, directly from the App Store.<br />
Windows: There is no GA app, but a compatible app can be obtained <a href="https://www.microsoft.com/en-us/store/apps/authenticator/9wzdncrfj3rj" target="_blank" rel="noopener">here</a>, from the Microsoft App store</p>
<h4>STEP 2: Install the service on your Linux machine.</h4>
<h4>Debian based:</h4>
<p>You will install all dependencies like NTP automatically using the -y switch</p>
<pre>sudo apt-get -y install libpam-google-authenticator</pre>
<p>&nbsp;</p>
<h4>RHEL based:</h4>
<p>First we need to install the development tools so we have a compiler, and the libraries we need. To do that we’ll use yum to install the “Development Tools” group</p>
<pre>sudo yum -y groupinstall "Development Tools"</pre>
<p>Now we need to install the pam development package</p>
<pre>sudo yum -y install pam-devel</pre>
<p>We setup and enable ntp so we can make sure our time is correct. Since we will be using a time based sync.</p>
<pre>sudo yum -y install ntp
sudo systemctl start ntpd
sudo systemctl enable ntpd</pre>
<p>Now we can download the google authenticator pam module from code.google.com, we will download it to /opt.</p>
<pre>cd /opt
wget https://google-authenticator.googlecode.com/files/libpam-google-authenticator-1.0-source.tar.bz2</pre>
<p>Unzip, untar, compile the module, and install it.</p>
<pre>bunzip2 libpam-google-authenticator-1.0-source.tar.bz2
tar -xvf libpam-google-authenticator-1.0-source.tar
rm -f libpam-google-authenticator-1.0-source.tar
cd libpam-google-authenticator-1.0
make</pre>
<p>When the compilation is successfully completed, Google Authenticator can be installed. (note: this has to be done by a privileged user)</p>
<pre>sudo make install</pre>
<p>Now you have installed Google Authenticator</p>
<p>In the next part of this Tutorial, We will show you how to setup the Google Authenticator and how you can prevent having to use a different authenticator for every server you want to access.</p>
<p><a href="https://techgourmet.net/enable-multi-factor-authentication-google-authenticator-part-2">https://techgourmet.net/enable-multi-factor-authentication-google-authenticator-part-2</a></p>
<img loading="lazy" decoding="async" src="https://apps.techgourmet.net/webeye/piwik.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Ftechgourmet.net%2Fenable-multi-factor-authentication-google-authenticator-part-1%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Denable-multi-factor-authentication-google-authenticator-part-1&amp;action_name=How-to+enable+Multi+Factor+Authentication+for+Linux+using+Google+Authenticator+%28part+1%29&amp;urlref=https%3A%2F%2Ftechgourmet.net%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Howto use 2TB+ hardisks in linux servers</title>
		<link>https://techgourmet.net/howto-use-2tb-hardisks-in-linux-servers/?pk_campaign=feed&#038;pk_kwd=howto-use-2tb-hardisks-in-linux-servers</link>
		
		<dc:creator><![CDATA[Roy van der Linden]]></dc:creator>
		<pubDate>Wed, 01 Jun 2016 12:46:27 +0000</pubDate>
				<category><![CDATA[How-to]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Diskspace]]></category>
		<category><![CDATA[partitioning]]></category>
		<guid isPermaLink="false">https://techgourmet.net/?p=50931</guid>

					<description><![CDATA[Storage is becoming cheaper as technology advances. Therefore I started using 3TB and 4TB data disks in the hybrid cloud solutions we provide to our SMB (Small and Medium Business) customers. Being accustomed using fdisk to partition the disks, I ran into the problem only being...<img src="https://apps.techgourmet.net/webeye/piwik.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Ftechgourmet.net%2Fhowto-use-2tb-hardisks-in-linux-servers%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Dhowto-use-2tb-hardisks-in-linux-servers&amp;action_name=Howto+use+2TB%2B+hardisks+in+linux+servers&amp;urlref=https%3A%2F%2Ftechgourmet.net%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></description>
										<content:encoded><![CDATA[<div>Storage is becoming cheaper as technology advances. Therefore I started using 3TB and 4TB data disks in the hybrid cloud solutions we provide to our SMB (Small and Medium Business) customers. Being accustomed using fdisk to partition the disks, I ran into the problem only being able to create partitions totalling up to 2TB. This totally defies the use of implementing large harddisks.</div>
<div></div>
<div>Lets dive into the root cause of the issue.</div>
<p><span id="more-50931"></span></p>
<h3></h3>
<h3>Why am I only able to create partitions up to a total of 2TB on bigger harddisks?</h3>
<p>The answer is simple. I was using ‘fdisk’. Fdisk is an old tool which uses a 32-bit ms-dos partition table. Subsequently, the Master Boot Record (MBR), in which the partition begin and end-points are stored is 32 bit, and thereby it can’t handle anything above 2 TeraBytes.</p>
<h3>So how do we avoid using fdisk and create partitions larger 2TB in linux</h3>
<p>To fully use your 2+TB harddrive, you have to use a partition table that supports it. We now know that the MS-DOS partition table (MBR) does not, so what should you use instead? GPT.</p>
<p>GPT supports up to 9.4 ZB (ZetaByte). That’s 9895604649984 GB (GigaByte)!. It’s pretty safe to say, that you will not hit this limit in the near future.</p>
<h4>Requirements</h4>
<p>First make sure that you have a backup of all your data thats on the harddrive, somewhere else. Because what you have to do WILL wipe the drive clean, and delete everything on it!</p>
<p>You need a program called “parted”. It’s the easiest way to create the partition table and create a partition of the desired size. It might be installed already on your Linux system. If not then you have to install it using your favorite package manager.<br />
In debian that would be:</p>
<pre>apt-get install parted
</pre>
<p>In RedHat EL/CentOS that would be:</p>
<pre>yum install parted
</pre>
<h4>Identify your harddrive</h4>
<p>You have to find out what your harddrives name is.<br />
In Linux, every harddrive get’s a name. This can be “sda”, “hda” or something similar depending on what kind of interface they are connected to.</p>
<p>Find your drive names using the following tools:<br />
lsblk<br />
fdisk</p>
<p>Run the command:</p>
<pre>lsblk

</pre>
<p>And you should see something like the following:</p>
<p>You see how there is a “sda” and a “sdb” ?</p>
<p>If you notice the nice treeview lsblk makes, you will see that below “sda” there is “sda1″ and “sda2″. These are partitions on disk “sda”<br />
sdb has a partition too, because I already formatted my harddrive to 4TB, but before I formatted it with a GPT partition table, “sdb1″ only had 1.8TB under the column “SIZE” which is the same problem you have.</p>
<p>Now we need to find the maximum size of your harddrive. You can do this by using the program “fdisk” with the following syntax:</p>
<pre>fdisk -l /dev/&lt;your harddrive name here&gt;
</pre>
<p>In my example it would be:</p>
<pre>fdisk -l /dev/sdb
</pre>
<p>You will get an output that looks something similar to this, it’s the top line marked with the number of GB we are interested in:</p>
<pre>Disk /dev/sdb: 4000.8 GB, 4000787030016 bytes
255 heads, 63 sectors/track, 486401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000
Disk /dev/sdb doesn't contain a valid partition table

</pre>
<p>The “4000.8 GB” is the size of your harddrive, and this will be the max size of any partition. note this number, you will need it later.</p>
<h4>Creating the partition table</h4>
<p>Run the program you installed earlier in this guide called “parted” by running the following command:</p>
<pre>parted /dev/&lt;your harddrive name here&gt;
</pre>
<p>In my case, the example would be:</p>
<pre>parted /dev/sdb
</pre>
<p>The output will look like this:</p>
<pre>GNU Parted 2.3
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)

</pre>
<h4>Create the GPT partition table</h4>
<p>Type in the following and hit enter to create a GPT partition table:</p>
<pre>mklabel gpt
</pre>
<p>The output will look like this, after you types “yes” and pressed enter to the warning stating that this will delete all files on the harddrive:</p>
<pre>Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? yes
(parted)

</pre>
<h4>Set the unit to GB</h4>
<p>Now set the unit to GB to make it easy to specify the partition size later on. Type the following and hit enter. This will not give any output:</p>
<pre>unit GB
</pre>
<h4>Create the partition</h4>
<p>To create the partitoion, you simply type the following syntax and press enter:</p>
<pre>mkpart primary &lt;from GB&gt; &lt;to GB&gt;

</pre>
<p>In my example with the 4TB (4000GB) harddrive, this would be:</p>
<pre>mkpart primary 0.0GB 4000.8GB

</pre>
<p>The above command will not give you any output.</p>
<h4>View the partition table</h4>
<p>To view the partition table and partition you just created, type the following and press enter:</p>
<pre>print
</pre>
<p>Sample output:</p>
<pre>Model: ATA WDC WD40EFRX-68W (scsi)
Disk /dev/sdb: 4001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      0.00GB  4001GB  4001GB  ext4         primary

</pre>
<p>You see the partition and the size you just created.</p>
<p>Now type the following and hit enter to save and quit parted:</p>
<pre>quit
</pre>
<h3>Create the filesystem</h3>
<p>There are many filesystems to choose from. I prefer ext4 and that is what I will use in this guide. For general purpose, ext4 should be just fine. If you need to use the harddrive for something special, then please read up on what filesystem would be best for you and use that instead.</p>
<p>If you run the “lsblk” command again like earlier in this guide, you should now have a “1″ partition like I did in my example: “sdb1″</p>
<p>Creating a ext4 filesystem takes some time. my 4TB disk took ~40 minutes to format.</p>
<p>Create the ext4 filesystem using the following command:</p>
<pre>mkfs.ext4 /dev/&lt;your drivename and partition number here&gt;
</pre>
<p>In my example it would be:</p>
<pre>mkfs.ext4 /dev/sdb1
</pre>
<p>Wait for it to finish creating all the inodes, the finished output should look something like this:</p>
<pre>mkfs.ext4 /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
183148544 inodes, 732566272 blocks
36628313 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
22357 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000, 214990848, 512000000, 550731776, 644972544
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

</pre>
<h3>Add the partition to fstab and mounting it</h3>
<p>Adding the partition to fstab will make it auto remount upon reboot of the computer/server.</p>
<p>But first create the folder where you want the partition to be mounted. In my example I will use /store:</p>
<pre>mkdir /disk/partition
</pre>
<p>open the file /etc/fstab in your favorite text editor and add the following line at the bottom:</p>
<pre>/dev/&lt;your drivename and partition number&gt;               /partition                  &lt;your filesystem&gt;    defaults        0 0

</pre>
<p>In my example it would be:</p>
<pre>/dev/sdb1              /disk/partition                  ext4    defaults        0 0

</pre>
<h4>Mount the partition</h4>
<p>Mounting the partition is now as easy as typing the following command:</p>
<pre>mount /disk/partition
</pre>
<p>Because you added the mount point to fstab, this will automatically happen upon reboot and only has to be done this one time.</p>
<p>Hope this helps</p>
<img loading="lazy" decoding="async" src="https://apps.techgourmet.net/webeye/piwik.php?idsite=1&amp;rec=1&amp;url=https%3A%2F%2Ftechgourmet.net%2Fhowto-use-2tb-hardisks-in-linux-servers%2F%3Fpk_campaign%3Dfeed%26pk_kwd%3Dhowto-use-2tb-hardisks-in-linux-servers&amp;action_name=Howto+use+2TB%2B+hardisks+in+linux+servers&amp;urlref=https%3A%2F%2Ftechgourmet.net%2Ffeed%2F" style="border:0;width:0;height:0" width="0" height="0" alt="" />]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
