<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Redhat on shocksolution.com</title><link>https://shocksolution.com/tags/redhat/</link><description>Recent content in Redhat on shocksolution.com</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 12 Nov 2019 02:58:34 +0000</lastBuildDate><atom:link href="https://shocksolution.com/tags/redhat/index.xml" rel="self" type="application/rss+xml"/><item><title>Nginx default user changed in RedHat/CentOS package nginx-1.16.1-1.el7</title><link>https://shocksolution.com/posts/nginx-default-user-changed-in-redhat-centoos-package/</link><pubDate>Tue, 12 Nov 2019 02:58:34 +0000</pubDate><guid>https://shocksolution.com/posts/nginx-default-user-changed-in-redhat-centoos-package/</guid><description>&lt;p&gt;The &lt;a href="https://centos.pkgs.org/7/epel-x86_64/nginx-1.16.1-1.el7.x86_64.rpm.html"&gt;latest Nginx rpm (nginx-1.16.1-1.el7) from EPEL&lt;/a&gt; for CentOS/Redhat is a &lt;a href="https://bugzilla.redhat.com/show_bug.cgi?id=1750857"&gt;fairly major update, from version 1.12 to 1.16, and includes some very important fixes to address multiple CVE&lt;/a&gt;s. There is another small but critical change in the latest RPM that isn&amp;rsquo;t mentioned in the bug report. RedHat had configured nginx to run as user &amp;ldquo;apache&amp;rdquo; in past releases, but in the EPEL release on 19 October 2019, the configuration was changed to run as user &amp;ldquo;nginx&amp;rdquo;. If you ran &amp;ldquo;yum upgrade&amp;rdquo; recently (which you really need to do on a regular basis) on any system with nginx installed, you probably have a system that is affected.&lt;/p&gt;</description></item><item><title>mount.cifs error 13 after update (CentOS/RedHat Linux 7.6)</title><link>https://shocksolution.com/posts/mount-cifs-error-13-after-update-centos-redhat-linux-7-6/</link><pubDate>Wed, 23 Oct 2019 16:23:48 +0000</pubDate><guid>https://shocksolution.com/posts/mount-cifs-error-13-after-update-centos-redhat-linux-7-6/</guid><description>&lt;figure class="ma0 w-75"&gt;&lt;img src="https://shocksolution.com/images/hidde-van-esch-m4N7onAg1oE-unsplash.jpg"&#10;&#9;&#9;&#9;alt="PERMISSION DENIED"&gt;&lt;figcaption&gt;&#10;&#9;&#9;&#9;&lt;p&gt;PERMISSION DENIED&lt;/p&gt;&#10;&#9;&#9;&lt;/figcaption&gt;&#10;&lt;/figure&gt;&#10;&#10;&lt;p&gt;PERMISSION DENIED (Photo by &lt;a href="https://unsplash.com/@holoz?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Hidde van Esch&lt;/a&gt; on &lt;a href="https://unsplash.com/s/photos/denied?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;)&lt;/p&gt;&#10;&lt;p&gt;If you recently updated your RedHat or CentOS 7.6 system, you may suddenly start getting &amp;ldquo;Permission Denied&amp;rdquo; errors when attempting to mount SMB shares via CIFS. Typical error messages in syslog look like this:&lt;/p&gt;&#10;&lt;div class="code-block"&gt;&#10; &lt;button class="code-copy" type="button" hidden aria-label="Copy code to clipboard"&gt;&#10; &lt;span class="code-copy-label" aria-hidden="true"&gt;Copy&lt;/span&gt;&#10; &lt;/button&gt;&#10; &lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;kernel: Status code returned 0xc000006d STATUS_LOGON_FAILURE&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;kernel: CIFS VFS: Send error in SessSetup = -13&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;kernel: CIFS VFS: cifs_mount failed w/return code = -13&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10; &lt;/div&gt;&lt;h2 id="configuration-that-triggered-the-problem"&gt;Configuration that triggered the problem&lt;/h2&gt;&#10;&lt;p&gt;&lt;em&gt;Synology NAS with latest operating system shares a volume via SMB&lt;/em&gt;CentOS 7 Linux server mounts SMB share using a local username and password (NOT domain credentials)&lt;em&gt;cifs-utils version 6.2 installed in May of 2019 (this by itself worked fine)&lt;em&gt;libsmbclient just updated to 4.9.1-6&lt;/em&gt;libmount just updated to 2.23.2-61&lt;/em&gt;CIFS mount options: vers=3.0,credentials=/root/credentials.txt,sec=ntlmsspi* File /root/credentials.txt contained a username and password that are LOCAL to the SMB server&lt;/p&gt;</description></item><item><title>Updating to Wordpress 5 on a Linux Host: Requesting FTP Credentials</title><link>https://shocksolution.com/posts/updating-wordpress-5-linux-host-ftp-credentials/</link><pubDate>Mon, 14 Jan 2019 17:10:43 +0000</pubDate><guid>https://shocksolution.com/posts/updating-wordpress-5-linux-host-ftp-credentials/</guid><description>&lt;p&gt;Wordpress 5 didn&amp;rsquo;t install automatically on sites hosted on my CentOS 7 Wordpress hosting server. That&amp;rsquo;s by design, because I&amp;rsquo;m selfish and I&amp;rsquo;d rather wait for a few bug-fix releases before making a major upgrade. When I chose to upgrade manually on a test site, Wordpress asked for my FTP credentials:&lt;/p&gt;&#10;&lt;figure class="ma0 w-75"&gt;&lt;img src="https://shocksolution.com/images/Wordpress-permission-problem-300x178.png"&#10;&#9;&#9;&#9;alt="Connection Information"&gt;&lt;figcaption&gt;&#10;&#9;&#9;&#9;&lt;p&gt;Connection Information: FTP credentials&lt;/p&gt;&#10;&#9;&#9;&lt;/figcaption&gt;&#10;&lt;/figure&gt;&#10;&#10;&lt;p&gt;If you&amp;rsquo;re hosting Wordpress on your own server, it &lt;strong&gt;does not need FTP credentials&lt;/strong&gt;. This page is a symptom of a permissions issue with the underlying server.  The web server (typically Apache) is unable to write the updated files to the Wordpress directory. From a security standpoint, this is actually a good thing. You generally don&amp;rsquo;t want to allow a public-facing service to make changes on your server. This problem occurs in other situations, such as configuring the WordFence plugin, so I&amp;rsquo;ve written a page devoted to &lt;a href="https://shocksolution.com/troubleshooting-wordpress-permissions-errors-on-linux-hosts/"&gt;troubleshooting Wordpress permissions on Linux hosts&lt;/a&gt;. That page describes how to fix the permissions issue without compromising the general security of your Wordpress host.&lt;/p&gt;</description></item><item><title>New Relic APM on Fedora/CentOS/RedHat with SELinux Enforcing: Solved</title><link>https://shocksolution.com/posts/new-relic-apm-on-fedora-centos-redhat-with-selinux-enforcing-solved/</link><pubDate>Thu, 14 Jun 2018 03:27:28 +0000</pubDate><guid>https://shocksolution.com/posts/new-relic-apm-on-fedora-centos-redhat-with-selinux-enforcing-solved/</guid><description>&lt;p&gt;I found the solution for getting the New Relic APM Agent to run on a CentOS 7 system with SELinux Enforcing. The only SELinux modification you have to make is to change the context of the log file directory &lt;strong&gt;/var/log/newrelic&lt;/strong&gt;. You can temporarily make these changes with the chcon command: [code lang=&amp;ldquo;bash&amp;rdquo;] chcon -R -t httpd_log_t /var/log/newrelic/ [/code] Kill any running instances of newrelic-daemon. If you&amp;rsquo;re using New Relic&amp;rsquo;s recommended default setup, make sure that the file /etc/newrelic/newrelic.cfg does &lt;strong&gt;not&lt;/strong&gt; exist. Verify that all required values in /etc/php.d/newrelic.ini are correct (especially the license key and the application name). Finally, restart httpd: [code lang=&amp;ldquo;bash&amp;rdquo;] systemctl restart httpd [/code] If that works, you should see output in both /var/log/newrelic/newrelic-daemon.log and /var/log/newrelic/php_agent.log. Now, make this file context change persistent, and verify the result: [code lang=&amp;ldquo;bash&amp;rdquo;] semanage fcontext &amp;ndash;add &amp;ndash;type httpd_log_t &amp;ldquo;/var/log/newrelic(/.*)?&amp;rdquo; restorecon -RF /var/log/newrelic/ ls -laZ /var/log/newrelic/ [/code] When you restart Apache, it spawns the newrelic-daemon processes, which communicate with APM via the socket file /tmp/.newrelic.sock. You really don&amp;rsquo;t want to run the newrelic-daemon processes via systemd if you can avoid it. The resulting process tree should look like this:&lt;/p&gt;</description></item><item><title>Configure CentOS/RedHat VMs with Kickstart files on Virtualbox</title><link>https://shocksolution.com/posts/configure-centos-redhat-vms-with-kickstart-files-on-virtualbox/</link><pubDate>Sat, 05 May 2018 18:54:50 +0000</pubDate><guid>https://shocksolution.com/posts/configure-centos-redhat-vms-with-kickstart-files-on-virtualbox/</guid><description>&lt;p&gt;&lt;a href="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/chap-kickstart-installations"&gt;Kickstart&lt;/a&gt; is a type of file that&amp;rsquo;s used to automatically install RedHat or CentOS Linux on a physical or virtual server. If you are managing more than a few servers, it&amp;rsquo;s a good idea to configure the servers via kickstart files instead of logging in and configuring each one manually. However, some unfortunate choices were made when defining the &lt;a href="https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/installation_guide/sect-kickstart-syntax"&gt;Kickstart file format&lt;/a&gt;, and it&amp;rsquo;s not the easiest thing to use. When creating a new Kickstart or making major changes, it&amp;rsquo;s good to have way to quickly iterate and test your changes. Iterating on a Kickstart file is slow and inconvenient in an enterprise environment in which a freshly booted server obtains an image and Kickstarter file via PXEboot. To speed up Kickstart testing and debugging, I&amp;rsquo;ve developed a simple way to use Kickstart files with CentOS/RedHat guest virtual machines that run in VirtualBox on my Mac. This process should also work with Windows or Linux hosts. When the RedHat installer is booting, it looks for a file called ks.cfg on a volume with label OEMDRV. First, we will create this volume as a small virtual disk image. On a Mac, you can create this image with Disk Utility as shown below. Note that the Name needs to be OEMDRV (though you can make the filename anything you want). &lt;figure class="ma0 w-75"&gt;&lt;img src="https://shocksolution.com/images/create-oemdrv-disk-image-osx-disk-utility.png"&#10;&#9;&#9;&#9;alt="Create OEMDRV disk image OSX Disk Utility"&gt;&lt;figcaption&gt;&#10;&#9;&#9;&#9;&lt;p&gt;Create OEMDRV disk image OSX Disk Utility&lt;/p&gt;</description></item></channel></rss>