<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>System Administration on Sandro Cirulli</title>
    <link>https://sandrocirulli.net/tags/system-administration/</link>
    <description>Recent content in System Administration on Sandro Cirulli</description>
    <generator>Hugo</generator>
    <language>en-gb</language>
    <lastBuildDate>Fri, 29 May 2015 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://sandrocirulli.net/tags/system-administration/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>How to zip and unzip from the command line</title>
      <link>https://sandrocirulli.net/how-to-zip-and-unzip-from-the-command-line/</link>
      <pubDate>Fri, 29 May 2015 00:00:00 +0000</pubDate>
      <guid>https://sandrocirulli.net/how-to-zip-and-unzip-from-the-command-line/</guid>
      <description>&lt;figure&gt;&lt;img src=&#34;../../img/use_zip_code.jpg&#34;&#xA;    alt=&#34;Use ZIP code&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;&#xA;          &lt;a href=&#34;https://www.flickr.com/photos/roadsidepictures/1353624300/in/photolist-34BFm1-6Y1h-94YRLR-e3Q3Kv-peywT7-7LasUv-53kKMv-kNEqwM-53YptJ-63rKeW-adNKM8-6pErLi-e4f4Uq-e4f3Gs-e49kWV-akC5VK-67NF7L-kDsf5c-5qgi4p-gZtXEC-fk3LhY-67CUq6-8vVKd4-5DSu9A-pacFZw-adNKUe-kyX5n6-bug2q6-4BmG47-bvU4DU-r3hm-saZPC-5DMHSx-92udQo-bUBTyh-b42CMX-rYoFPT-p8ZK5d-p8ZL1b-e3VF19-nqdbCx-n7Z44x-kDuz3h-67Juc4-6CDaeP-jHf1dF-btMpDM-6Y8bNd-642Rn6-oTxwxg&#34;&gt;Image: Roadsidepictures – CC BY-NC-ND 2.0&lt;/a&gt;&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;There are lots of GUI utilities to zip and unzip files but sometimes you only have access to the command line on a machine.  Linux has different types of data compression  formats (.tar, tar.gz, tar.bz2, etc.) but I find the zip utilities easier to use and more compatible with Windows systems. So how do you zip and unzip files from the command line?&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to install Groovy on Linux system-wide</title>
      <link>https://sandrocirulli.net/how-to-install-groovy-on-linux-system-wide/</link>
      <pubDate>Sun, 24 May 2015 00:00:00 +0000</pubDate>
      <guid>https://sandrocirulli.net/how-to-install-groovy-on-linux-system-wide/</guid>
      <description>&lt;figure&gt;&lt;img src=&#34;../../img/groovy-logo.svg&#34;&#xA;    alt=&#34;Groovy logo&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;&#xA;          &lt;a href=&#34;https://www.apache.org/logos/#groovy&#34;&gt;Image: Groovy Logo, The Apache Software Foundation, Apache License 2.0&lt;/a&gt;&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;A colleague of mine recently asked me to install the &lt;a href=&#34;http://www.groovy-lang.org/&#34;&gt;Groovy programming language&lt;/a&gt; on our Red Hat 6.5 server and to make it accessible to all users. I thought it would be a very straightforward task but a quick search on the Red Hat 6.5 official repositories didn’t return any package for Groovy.&lt;/p&gt;&#xA;&lt;p&gt;The easiest way to install Groovy manually is via &lt;a href=&#34;http://sdkman.io/&#34;&gt;sdkman&lt;/a&gt;. I followed this  procedure to do it:&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to change timezone on a Linux server</title>
      <link>https://sandrocirulli.net/how-to-change-timezone-on-a-linux-server/</link>
      <pubDate>Sun, 17 May 2015 00:00:00 +0000</pubDate>
      <guid>https://sandrocirulli.net/how-to-change-timezone-on-a-linux-server/</guid>
      <description>&lt;figure&gt;&lt;img src=&#34;../../img/entering_a_new_timezone.jpg&#34;&#xA;    alt=&#34;You are entering a different time zone&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;&#xA;          &lt;a href=&#34;https://www.flickr.com/photos/64712052@N00/1411021691/in/photolist-mL8ypK-39FRAc-4rF1Wy-cCA4kd-7r6Ljp-7raEvU-mLTYN7-7UBt5x-4LU4E6-61Z4h-HSG3L-5bvHLY-dCwWpp-4LYdZY-9wcT2U-7GRz4i-8KL9bL-8AGgW2-7iXkAb-4hjnsP-7iTtLk-7iXmcL-4wpJey-7raAR1-cB7D3A-cRAL2G-8KL9Ff-5VR683-7TGug1-4QGAB7-n9aWfo-5HoDni-n999gH-cBQSKW-6dJTch-4vUGSR-9V5bTv-2ZH99H-7r6Ddv-fr7hpw-6Tnde-EPEyc-cB8vQQ-7r6K3z-7raFMb-dXMhUj-7fK6NK-2pxZsn-7raBkY-7r6Hic&#34;&gt;Image: deckhand – CC BY-NC-ND 2.0&lt;/a&gt;&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;Every year in March and in October the clock changes in most countries for energy saving purposes. This has the annoying effect of messing up the current time on your server if the timezone is not set properly. Servers in Europe are often set up to UTC time. For example my web hosting provider explicitly says:&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Note that any times specified are executed in the timezone of the server, and not your local timezone. Accordingly, you may need to make allowance for this when selecting when to run your cron job. Our servers run in the ‘UTC’ timezone because our client base is global, and it remains constant throughout the year with no changes for daylight saving.&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to add a new user with sudo rights</title>
      <link>https://sandrocirulli.net/how-to-add-a-new-user-with-sudo-rights/</link>
      <pubDate>Sat, 16 May 2015 00:00:00 +0000</pubDate>
      <guid>https://sandrocirulli.net/how-to-add-a-new-user-with-sudo-rights/</guid>
      <description>&lt;figure&gt;&lt;img src=&#34;../../img/sudo_make_me_a_sandwich.png&#34;&#xA;    alt=&#34;sudo make me a sandwich&#34;&gt;&lt;figcaption&gt;&#xA;      &lt;p&gt;&#xA;          &lt;a href=&#34;https://xkcd.com/149/&#34;&gt;Image: xkcd – CC BY-NC 2.5&lt;/a&gt;&lt;/p&gt;&#xA;    &lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&#xA;&lt;p&gt;Let’s say you have a new user needing &lt;a href=&#34;http://en.wikipedia.org/wiki/Sudo&#34;&gt;sudo&lt;/a&gt; access to a Linux server. How do you grant him/her this great privilege? First, explain to the new user that sudo rights allow to do pretty much anything on a Linux machine – including screwing everything up! – and that with greater power also comes  greater responsibilities. Then, follow this procedure:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create a new user (e.g. newusername) and add it to group wheel (members of this group have sudo rights):&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo useradd -G wheel newusername&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&#xA;&lt;li&gt;Set up the password for the new user. First, login as root:&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;sudo -i&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;Then set the password for the new user (e.g. newusername):&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;passwd newusername&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;Finally exit from root with:&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;exit&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&#xA;&lt;li&gt;Test the newly created user and password by logging in as user newusername:&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;su - newusername&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&#xA;&lt;li&gt;Test that the newly created user is in group wheel:&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;groups newusername&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;</description>
    </item>
  </channel>
</rss>
