<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic User realname, load configuration and other joys of Gaia in General Topics</title>
    <link>https://community.checkpoint.com/t5/General-Topics/User-realname-load-configuration-and-other-joys-of-Gaia/m-p/122139#M22638</link>
    <description>&lt;P&gt;I've been migrating a few gateways with local users configured, and found the following true for clish in R80.40 (unrelated to&amp;nbsp;&lt;SPAN&gt;sk110222):&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;the realname field for a local user, when entered interactively or loaded via a configuration file, must be wrapped in quotes&lt;/LI&gt;&lt;LI&gt;the output of the realname field for a local user, when exported from clish, is not wrapped in quotes.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;This is problematic, as we can see below:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;[Expert@fw-01:0]# clish&lt;BR /&gt;fw-01&amp;gt; set user test realname "test user"&lt;BR /&gt;fw-01&amp;gt; save config&lt;BR /&gt;fw-01&amp;gt; save configuration fw-01.conf&lt;BR /&gt;fw-01&amp;gt; quit&lt;BR /&gt;[Expert@fw-01:0]# clish -c "show configuration" | grep "test realname"&lt;BR /&gt;set user test realname test user&lt;BR /&gt;[Expert@fw-01:0]# grep "test realname" fw-01.conf&lt;BR /&gt;set user test realname test user&lt;BR /&gt;[Expert@fw-01:0]# clish&lt;BR /&gt;fw-01&amp;gt; set user test realname test user&lt;BR /&gt;CLINFR0329 Invalid command:'set user test realname test user'.&lt;BR /&gt;fw-01&amp;gt; quit&lt;BR /&gt;[Expert@fw-01:0]#&lt;/P&gt;&lt;P&gt;This also means the config file will not load from clish either, without &lt;EM&gt;set clienv on-failure continue&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I wrote some crude regex to fix this and restore the quotes around usernames, so the configs can be easily ported between Gaia machines with the full username:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;[Expert@fw-01:0]# cat fw-01.conf | sed 's/realname \([a-zA-Z0-9_ ]*\)/realname "\1"/g' &amp;gt; fw-01_fixed.conf&lt;BR /&gt;[Expert@fw-01:0]# grep "test realname" fw-01_fixed.conf&lt;BR /&gt;set user test realname "test user "&lt;/P&gt;&lt;P&gt;Forget about the space, we can live with that &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I also found the following regarding clish config files:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;the file encoding must be ANSI, at least on kernel 2.6 / R80.30 as UTF-8 did not work&lt;/LI&gt;&lt;LI&gt;EOL must be Unix (LF), Windows (CR/LF) is not supported&lt;OL&gt;&lt;LI&gt;dos2unix is helpful here&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I'm considering the realname issue a bug and will log a TAC case. Note this does not affect the config db (flat file or SQLite):&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;[Expert@fw-01:0]# grep "test:realname" /config/db/initial&lt;BR /&gt;passwd:test:realname test\ user&lt;BR /&gt;[Expert@fw-01:0]# dbget passwd:test:realname&lt;BR /&gt;test user&lt;BR /&gt;[Expert@fw-01:0]#&lt;/P&gt;&lt;P&gt;I hope this is helpful for others.&lt;/P&gt;</description>
    <pubDate>Fri, 25 Jun 2021 02:35:28 GMT</pubDate>
    <dc:creator>cosmos</dc:creator>
    <dc:date>2021-06-25T02:35:28Z</dc:date>
    <item>
      <title>User realname, load configuration and other joys of Gaia</title>
      <link>https://community.checkpoint.com/t5/General-Topics/User-realname-load-configuration-and-other-joys-of-Gaia/m-p/122139#M22638</link>
      <description>&lt;P&gt;I've been migrating a few gateways with local users configured, and found the following true for clish in R80.40 (unrelated to&amp;nbsp;&lt;SPAN&gt;sk110222):&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;the realname field for a local user, when entered interactively or loaded via a configuration file, must be wrapped in quotes&lt;/LI&gt;&lt;LI&gt;the output of the realname field for a local user, when exported from clish, is not wrapped in quotes.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;This is problematic, as we can see below:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;[Expert@fw-01:0]# clish&lt;BR /&gt;fw-01&amp;gt; set user test realname "test user"&lt;BR /&gt;fw-01&amp;gt; save config&lt;BR /&gt;fw-01&amp;gt; save configuration fw-01.conf&lt;BR /&gt;fw-01&amp;gt; quit&lt;BR /&gt;[Expert@fw-01:0]# clish -c "show configuration" | grep "test realname"&lt;BR /&gt;set user test realname test user&lt;BR /&gt;[Expert@fw-01:0]# grep "test realname" fw-01.conf&lt;BR /&gt;set user test realname test user&lt;BR /&gt;[Expert@fw-01:0]# clish&lt;BR /&gt;fw-01&amp;gt; set user test realname test user&lt;BR /&gt;CLINFR0329 Invalid command:'set user test realname test user'.&lt;BR /&gt;fw-01&amp;gt; quit&lt;BR /&gt;[Expert@fw-01:0]#&lt;/P&gt;&lt;P&gt;This also means the config file will not load from clish either, without &lt;EM&gt;set clienv on-failure continue&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I wrote some crude regex to fix this and restore the quotes around usernames, so the configs can be easily ported between Gaia machines with the full username:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;[Expert@fw-01:0]# cat fw-01.conf | sed 's/realname \([a-zA-Z0-9_ ]*\)/realname "\1"/g' &amp;gt; fw-01_fixed.conf&lt;BR /&gt;[Expert@fw-01:0]# grep "test realname" fw-01_fixed.conf&lt;BR /&gt;set user test realname "test user "&lt;/P&gt;&lt;P&gt;Forget about the space, we can live with that &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I also found the following regarding clish config files:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;the file encoding must be ANSI, at least on kernel 2.6 / R80.30 as UTF-8 did not work&lt;/LI&gt;&lt;LI&gt;EOL must be Unix (LF), Windows (CR/LF) is not supported&lt;OL&gt;&lt;LI&gt;dos2unix is helpful here&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I'm considering the realname issue a bug and will log a TAC case. Note this does not affect the config db (flat file or SQLite):&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;[Expert@fw-01:0]# grep "test:realname" /config/db/initial&lt;BR /&gt;passwd:test:realname test\ user&lt;BR /&gt;[Expert@fw-01:0]# dbget passwd:test:realname&lt;BR /&gt;test user&lt;BR /&gt;[Expert@fw-01:0]#&lt;/P&gt;&lt;P&gt;I hope this is helpful for others.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2021 02:35:28 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/User-realname-load-configuration-and-other-joys-of-Gaia/m-p/122139#M22638</guid>
      <dc:creator>cosmos</dc:creator>
      <dc:date>2021-06-25T02:35:28Z</dc:date>
    </item>
    <item>
      <title>Re: User realname, load configuration and other joys of Gaia</title>
      <link>https://community.checkpoint.com/t5/General-Topics/User-realname-load-configuration-and-other-joys-of-Gaia/m-p/122308#M22664</link>
      <description>&lt;P&gt;Agree the best thing to do here is log a TAC case so we can make sure to fix this issue.&lt;BR /&gt;I know in the past importing the output of show configuration has had...mixed results.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Jun 2021 22:04:28 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/User-realname-load-configuration-and-other-joys-of-Gaia/m-p/122308#M22664</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2021-06-27T22:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: User realname, load configuration and other joys of Gaia</title>
      <link>https://community.checkpoint.com/t5/General-Topics/User-realname-load-configuration-and-other-joys-of-Gaia/m-p/122313#M22665</link>
      <description>&lt;P&gt;Interesting...personally, I copied show configuration few times in the past and it always worked, but its like backup/restore, has to be done on same type of appliance, otherwise it would not work. I recall Fortinet had a process at some point where you could make some modifications to backup file from one model and then re-import it into a different one and it would work, but there were lots of customers facing issues and it was not officially supported by them anyway, so they removed it from support site.&lt;/P&gt;
&lt;P&gt;But again, goes without saying really, its totally logical to follow this on same firewall model.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 01:17:28 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/General-Topics/User-realname-load-configuration-and-other-joys-of-Gaia/m-p/122313#M22665</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2021-06-28T01:17:28Z</dc:date>
    </item>
  </channel>
</rss>

