<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2026-08-08T10:02:14+00:00</updated><id>/feed.xml</id><title type="html">yellowfruit</title><author><name>Tomasz Banaszewski</name></author><entry><title type="html">How to back up esxi virtual machine using vertical backup</title><link href="/ldap/2017/09/24/how-to-back-up-esxi-virtual-machine-using-vertical-backup.html" rel="alternate" type="text/html" title="How to back up esxi virtual machine using vertical backup" /><published>2017-09-24T12:33:00+00:00</published><updated>2017-09-24T12:33:00+00:00</updated><id>/ldap/2017/09/24/how-to-back-up-esxi-virtual-machine-using-vertical-backup</id><content type="html" xml:base="/ldap/2017/09/24/how-to-back-up-esxi-virtual-machine-using-vertical-backup.html"><![CDATA[<h1 id="install-vertical-backup-on-esxi-host">Install vertical backup on esxi host:</h1>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">#</span><span class="w"> </span><span class="nb">mkdir</span> /vmfs/volumes/datastore1/verticalbackup
<span class="gp">#</span><span class="w"> </span><span class="nb">cd</span> /vmfs/volumes/datastore1/verticalbackup 
<span class="gp">#</span><span class="w"> </span>wget http://verticalbackup.com/esxi/vertical
<span class="gp">#</span><span class="w"> </span><span class="nb">chmod </span>u+x vertical
<span class="gp">#</span><span class="w"> </span><span class="nb">sha256sum </span>vertical <span class="c"># 7eef0446e503cd011d50d12d49378db692b1b3dc13ba5da83c5a31602a8654e3</span>
</code></pre></div></div>

<h1 id="initialize-vertical-backup">Initialize vertical backup:</h1>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">#</span><span class="w"> </span>vertical init esxi-id /vmfs/volumes/backup
</code></pre></div></div>

<h1 id="backup-vm">Backup vm:</h1>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">#</span><span class="w"> </span>vertical backup vm-ubuntu
<span class="gp">#</span><span class="w"> </span>vertical backup vm-ubuntu <span class="nt">--exclude-disk</span> <span class="k">*</span>storage_1<span class="k">*</span>
</code></pre></div></div>]]></content><author><name>Tomasz Banaszewski</name></author><category term="ldap" /><summary type="html"><![CDATA[Install vertical backup on esxi host:]]></summary></entry><entry><title type="html">How to set up ldap authorization on centos</title><link href="/ldap/2017/09/23/how-to-set-up-ldap-authorization-on-centos.html" rel="alternate" type="text/html" title="How to set up ldap authorization on centos" /><published>2017-09-23T18:56:00+00:00</published><updated>2017-09-23T18:56:00+00:00</updated><id>/ldap/2017/09/23/how-to-set-up-ldap-authorization-on-centos</id><content type="html" xml:base="/ldap/2017/09/23/how-to-set-up-ldap-authorization-on-centos.html"><![CDATA[<p>todo:
https://www.lisenet.com/2016/setup-ldap-authentication-on-centos-7/</p>]]></content><author><name>Tomasz Banaszewski</name></author><category term="ldap" /><summary type="html"><![CDATA[todo: https://www.lisenet.com/2016/setup-ldap-authentication-on-centos-7/]]></summary></entry><entry><title type="html">How to set up ldap authorization on ubuntu</title><link href="/ldap/2017/09/23/how-to-set-up-ldap-authorization-on-ubuntu.html" rel="alternate" type="text/html" title="How to set up ldap authorization on ubuntu" /><published>2017-09-23T14:48:00+00:00</published><updated>2017-09-23T14:48:00+00:00</updated><id>/ldap/2017/09/23/how-to-set-up-ldap-authorization-on-ubuntu</id><content type="html" xml:base="/ldap/2017/09/23/how-to-set-up-ldap-authorization-on-ubuntu.html"><![CDATA[<h1 id="install-openldap-client">Install OpenLDAP client:</h1>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">#</span><span class="w"> </span>apt-get <span class="nb">install </span>ldap-auth-client nscd
</code></pre></div></div>

<h1 id="configuration">Configuration:</h1>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="go">LDAP server Uniform Resource Identifier: ldap://ldap.yellowfruit.lan
Distinguished name of the search base: dc=yellowfruit,dc=lan
LDAP version: 3
</span><span class="gp">Make local root Database admin: &lt;No&gt;</span><span class="w">
</span><span class="gp">Does the LDAP database require login? &lt;No&gt;</span><span class="w">
</span></code></pre></div></div>

<h1 id="force-start_tls">Force start_tls:</h1>

<p>Uncomment line in <code class="language-plaintext highlighter-rouge">/etc/ldap.conf</code> file:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># OpenLDAP SSL mechanism
# start_tls mechanism uses the normal LDAP port, LDAPS typically 636
ssl start_tls
#ssl on
</code></pre></div></div>

<h1 id="setup-nss-using-auth-client-config-with-ldap">Setup nss using auth-client-config with ldap:</h1>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">#</span><span class="w"> </span>auth-client-config <span class="nt">-t</span> nss <span class="nt">-p</span> lac_ldap
</code></pre></div></div>

<h1 id="enable-automatic-home-directory-creation-on-login">Enable automatic home directory creation on login:</h1>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">#</span><span class="w"> </span>pam-auth-update
</code></pre></div></div>

<h1 id="ubuntu-14-and-older-create-config-file-to-create-home-directory-on-login">(ubuntu 14 and older) Create config file to create home directory on login:</h1>

<p>Create directory:</p>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">#</span><span class="w"> </span>nano /usr/share/pam-configs/mkhomedir
</code></pre></div></div>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Name: Create home directory on login
Default: yes
Priority: 0
Session-Type: Additional
Session-Interactive-Only: yes
Session:
required                        pam_mkhomedir.so umask=0022 skel=/etc/skel
</code></pre></div></div>

<h1 id="enable-create-home-directory-on-login">Enable <code class="language-plaintext highlighter-rouge">Create home directory on login...</code>:</h1>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">#</span><span class="w"> </span>pam-auth-update
</code></pre></div></div>

<h1 id="restart-nscd">Restart nscd:</h1>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">#</span><span class="w"> </span>service nscd restart
</code></pre></div></div>

<h1 id="verify">Verify:</h1>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">#</span><span class="w"> </span>getent passwd
</code></pre></div></div>

<p>Source: <a href="https://linoxide.com/linux-how-to/setup-openldap-server-authenticate-client-workstation/">linoxide</a></p>]]></content><author><name>Tomasz Banaszewski</name></author><category term="ldap" /><summary type="html"><![CDATA[Install OpenLDAP client:]]></summary></entry><entry><title type="html">How to create self signed root CA certificate</title><link href="/ssl/certificate/2017/09/16/how-to-create-self-signed-root-ca-certificate.html" rel="alternate" type="text/html" title="How to create self signed root CA certificate" /><published>2017-09-16T21:26:00+00:00</published><updated>2017-09-16T21:26:00+00:00</updated><id>/ssl/certificate/2017/09/16/how-to-create-self-signed-root-ca-certificate</id><content type="html" xml:base="/ssl/certificate/2017/09/16/how-to-create-self-signed-root-ca-certificate.html"><![CDATA[<h1 id="generate-private-key">Generate private key:</h1>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">$</span><span class="w"> </span>openssl genrsa <span class="nt">-out</span> rootCA.key 2048
</code></pre></div></div>

<h1 id="generate-root-ca-certificate">Generate root CA certificate:</h1>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">$</span><span class="w"> </span>openssl req <span class="nt">-x509</span> <span class="nt">-new</span> <span class="nt">-nodes</span> <span class="nt">-key</span> rootCA.key <span class="nt">-sha256</span> <span class="nt">-days</span> 1024 <span class="nt">-out</span> rootCA.pem
</code></pre></div></div>

<h1 id="create-extension-configuration-file">Create extension configuration file</h1>

<p>Certificate must have subjectAltNames field.</p>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">$</span><span class="w"> </span>nano v3.ext
</code></pre></div></div>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>authorityKeyIdentifier=keyid,issuer
basicConstraints=CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment
subjectAltName = @alt_names

[alt_names]
DNS.1 = yellowfruit.lan
</code></pre></div></div>

<h1 id="generate-private-key-1">Generate private key:</h1>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">$</span><span class="w"> </span>openssl genrsa <span class="nt">-out</span> device.key.pem 2048
</code></pre></div></div>

<h1 id="create-csr">Create CSR:</h1>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">$</span><span class="w"> </span>openssl req <span class="nt">-new</span> <span class="nt">-key</span> device.key.pem <span class="nt">-out</span> device.csr
</code></pre></div></div>

<h1 id="generate-certificate-signed-with-root-ca">Generate certificate signed with root CA:</h1>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">$</span><span class="w"> </span>openssl x509 <span class="nt">-req</span> <span class="nt">-in</span> device.csr <span class="nt">-CA</span> rootCA.pem <span class="nt">-CAkey</span> rootCA.key <span class="nt">-CAcreateserial</span> <span class="nt">-out</span> device.crt.pem <span class="nt">-days</span> 3650 <span class="nt">-sha256</span> <span class="nt">-extfile</span> v3.ext
</code></pre></div></div>]]></content><author><name>Tomasz Banaszewski</name></author><category term="ssl" /><category term="certificate" /><summary type="html"><![CDATA[Generate private key:]]></summary></entry><entry><title type="html">Issue with permissions while installing gems on Ubuntu 16.04</title><link href="/jekyll/issue/2017/09/16/issue-with-permissions-while-installing-gems-on-ubuntu-16.html" rel="alternate" type="text/html" title="Issue with permissions while installing gems on Ubuntu 16.04" /><published>2017-09-16T17:48:00+00:00</published><updated>2017-09-16T17:48:00+00:00</updated><id>/jekyll/issue/2017/09/16/issue-with-permissions-while-installing-gems-on-ubuntu-16</id><content type="html" xml:base="/jekyll/issue/2017/09/16/issue-with-permissions-while-installing-gems-on-ubuntu-16.html"><![CDATA[<h1 id="issue">Issue:</h1>

<p>I followed <a href="https://jekyllrb.com/docs/installation/">jakyll installation tutorial</a> starting from ruby installation on Ubuntu 16.04:</p>
<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">#</span><span class="w"> </span>apt <span class="nb">install </span>ruby 
</code></pre></div></div>

<p>But after that it’s not possible to istall gems without root permissions:</p>
<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">$</span><span class="w"> </span>gem <span class="nb">install </span>jekyll
<span class="go">ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /var/lib/gems/2.3.0 directory.
</span></code></pre></div></div>

<h1 id="solution">Solution:</h1>

<p>Remove ruby with the package manager:</p>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">#</span><span class="w"> </span>apt-get remove ruby
</code></pre></div></div>

<p>Install required dependencies:</p>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">#</span><span class="w"> </span>apt-get update
<span class="gp">#</span><span class="w"> </span>apt-get <span class="nb">install </span>git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
</code></pre></div></div>

<p>Install <a href="https://github.com/rbenv/rbenv">rbenv</a>:</p>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">$</span><span class="w"> </span>git clone https://github.com/rbenv/rbenv.git ~/.rbenv
<span class="gp">$</span><span class="w"> </span><span class="nb">echo</span> <span class="s1">'export PATH="$HOME/.rbenv/bin:$PATH"'</span> <span class="o">&gt;&gt;</span> ~/.bashrc
<span class="gp">$</span><span class="w"> </span><span class="nb">echo</span> <span class="s1">'eval "$(rbenv init -)"'</span> <span class="o">&gt;&gt;</span> ~/.bashrc
<span class="gp">$</span><span class="w"> </span><span class="nb">exec</span> <span class="nv">$SHELL</span>
</code></pre></div></div>

<p>Install <a href="https://github.com/rbenv/ruby-build">ruby-build plugin for rbenv</a>:</p>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">$</span><span class="w"> </span>git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
<span class="gp">$</span><span class="w"> </span><span class="nb">echo</span> <span class="s1">'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"'</span> <span class="o">&gt;&gt;</span> ~/.bashrc
<span class="gp">$</span><span class="w"> </span><span class="nb">exec</span> <span class="nv">$SHELL</span>
</code></pre></div></div>

<p>Install latest ruby and set it as default:</p>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">$</span><span class="w"> </span>rbenv <span class="nb">install </span>2.4.2
<span class="gp">$</span><span class="w"> </span>rbenv global 2.4.2
</code></pre></div></div>

<p>Verify installation:</p>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">$</span><span class="w"> </span>ruby <span class="nt">-v</span>
<span class="go">ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]
</span></code></pre></div></div>

<p>Install jakyll with non-root permissions:</p>

<div class="language-console highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="gp">$</span><span class="w"> </span>gem <span class="nb">install </span>jekyll
</code></pre></div></div>]]></content><author><name>Tomasz Banaszewski</name></author><category term="jekyll" /><category term="issue" /><summary type="html"><![CDATA[Issue:]]></summary></entry></feed>