<?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 Re: First time wizard oneliner in Firewall and Security Management</title>
    <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221407#M42391</link>
    <description>&lt;P&gt;What do you get if you run this command:&lt;/P&gt;
&lt;P&gt;is_default_maintenance_pw=$(dbget grub2pwd:changeme);echo "$is_default_maintenance_pw"&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jul 2024 14:33:08 GMT</pubDate>
    <dc:creator>Bob_Zimmerman</dc:creator>
    <dc:date>2024-07-19T14:33:08Z</dc:date>
    <item>
      <title>First time wizard oneliner</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221373#M42379</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;When i run this oneliner for FTW:&lt;/P&gt;
&lt;LI-CODE lang="ruby"&gt;[Expert@myhost:0]# config_system -s "install_security_gw=true&amp;amp;gateway_daip=false&amp;amp;gateway_cluster_member=true&amp;amp;install_security_management=false&amp;amp;download_info=true&amp;amp;upload_info=true&amp;amp;upload_crash_report=true&amp;amp;ftw_sic_key=Admin123"

Validating configuration file:  /bin/config_system: line 1178: [: -eq: unary operator expected
Done
Configuring OS parameters:      Done
Configuring products:           \&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can see:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Validating configuration file:  /bin/config_system: line 1178: [: -eq: unary operator expected&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What does that mean? How to get rid of it?&lt;/P&gt;
&lt;P&gt;I have checked the&amp;nbsp; /bin/config_system text file:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;# If one of required parameters is uninitialized or NULL/empty,
    # set ERROR_MSG and return 1
	#/usr/libexec/cp_is_initial_passwd &amp;gt;&amp;gt; $FTW_LOG 2&amp;gt;&amp;amp;1
	#is_admin_pw_default=$?
	#if [ $is_admin_pw_default -eq 0 ] &amp;amp;&amp;amp; [ -z "$admin_hash" ]; then 
	#	ERROR_MSG="$MSG1 admin_hash"; 
	#	return 1; 
	#fi
	#########next line is line 1178############
	if [[ $is_maintenance_pw_not_mandatory == $TRUE ]]; then
		#is_maintenance_pw_not_mandatory is a flag for cloud usage. If 'true' then ignore maintenance validation
		log "is_maintenance_pw_not_mandatory flag detetected. Passing validation for maintenance password."
	else
		is_default_maintenance_pw=$(dbget grub2pwd:changeme)
		if [ $is_default_maintenance_pw -eq 1 ] &amp;amp;&amp;amp; [ -z "$maintenance_hash" ]; then
			ERROR_MSG="$MSG1 maintenance_hash"; 
			return 1;
		fi
	fi&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but still don't understand why that message is showing up!&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 13:06:37 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221373#M42379</guid>
      <dc:creator>Moudar</dc:creator>
      <dc:date>2024-07-19T13:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: First time wizard oneliner</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221378#M42381</link>
      <description>&lt;P&gt;Hey bro,&lt;/P&gt;
&lt;P&gt;What exactly are you trying to do?&lt;/P&gt;
&lt;P&gt;Andy&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 10:54:51 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221378#M42381</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2024-07-19T10:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: First time wizard oneliner</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221394#M42384</link>
      <description>&lt;P&gt;Want to have oneliner for FTW, mine is working but I wonder why i get that message:&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;Validating configuration file:  /bin/config_system: line 1178: [: -eq: unary operator expected&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 19 Jul 2024 12:49:17 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221394#M42384</guid>
      <dc:creator>Moudar</dc:creator>
      <dc:date>2024-07-19T12:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: First time wizard oneliner</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221396#M42385</link>
      <description>&lt;P&gt;Let me see if I can test it later, not sure at this point, never tried it.&lt;/P&gt;
&lt;P&gt;Andy&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 13:04:02 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221396#M42385</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2024-07-19T13:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: First time wizard oneliner</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221399#M42386</link>
      <description>&lt;P&gt;I think it is because in R81.20 you'll need to specify the grub2 password as a mandatory part of FTW... As you have not, its erroring.. It might 'work' but maybe thats why.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 13:26:18 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221399#M42386</guid>
      <dc:creator>Peter_Lyndley</dc:creator>
      <dc:date>2024-07-19T13:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: First time wizard oneliner</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221401#M42387</link>
      <description>&lt;P&gt;I found this:&lt;/P&gt;
&lt;P&gt;# Default maintenance password (hash)&lt;BR /&gt;# To generate a hash of maintenance password - in expert mode:&lt;BR /&gt;# grub2-mkpasswd-pbkdf2&lt;/P&gt;
&lt;LI-CODE lang="ruby"&gt;[Expert@myhost:0]# grub2-mkpasswd-pbkdf2
Enter password:
Reenter password:
PBKDF2 hash of your password is grub.pbkdf2.sha512.10000.A5B3E328B7E541CAD88FA32D356033522BF85739B5E3720255A159F4F36AD23D8FCEFFE0ED520D9CB138C1BB9056848DA94C363163862A3F816B3999841F65D8.249EED31E31E829BDEF4A4337B3540B206E2C19037D17C5BCCF32A05EB3B5FE5435382DEC94549746F78052BDF96819CAD03114B5421F2D62276F4D23F94AFC5&lt;/LI-CODE&gt;&lt;LI-CODE lang="python"&gt;config_system -s "install_security_gw=true&amp;amp;gateway_daip=false&amp;amp;gateway_cluster_member=true&amp;amp;install_security_management=false&amp;amp;download_info=true&amp;amp;upload_info=true&amp;amp;upload_crash_report=true&amp;amp;ftw_sic_key=Admin123"&amp;amp;maintenance_hash='grub.pbkdf2.sha512.10000.A5B3E328B7E541CAD88FA32D356033522BF85739B5E3720255A159F4F36AD23D8FCEFFE0ED520D9CB138C1BB9056848DA94C363163862A3F816B3999841F65D8.249EED31E31E829BDEF4A4337B3540B206E2C19037D17C5BCCF32A05EB3B5FE5435382DEC94549746F78052BDF96819CAD03114B5421F2D62276F4D23F94AFC5'
[1] 94213
[Expert@myhost:0]#
Validating configuration file:  /bin/config_system: line 1178: [: -eq: unary operator expected
Done
Configuring OS parameters:      Done&lt;/LI-CODE&gt;
&lt;P&gt;still getting that message!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 13:41:54 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221401#M42387</guid>
      <dc:creator>Moudar</dc:creator>
      <dc:date>2024-07-19T13:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: First time wizard oneliner</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221402#M42388</link>
      <description>&lt;P&gt;What version are you trying to deploy? Where did you get the image?&lt;/P&gt;
&lt;P&gt;I'm pretty sure you actually got the wrong line 1178. In config_system on my R81.20 systems, 1178 is the "if [ $is_default_maintenance_pw -eq 1 ] ..." line. What do you get if you run this command:&lt;/P&gt;
&lt;P&gt;is_default_maintenance_pw=$(dbget grub2pwd:changeme);echo "$is_default_maintenance_pw"&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 13:46:49 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221402#M42388</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2024-07-19T13:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: First time wizard oneliner</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221404#M42389</link>
      <description>&lt;P&gt;This is a LAB machine in Vmware, it is line 1178! check above&lt;/P&gt;
&lt;LI-CODE lang="ruby"&gt; show ver
myhost&amp;gt; show version all
Product version Check Point Gaia R81.20
OS build 631
OS kernel version 3.10.0-1160.15.2cpx86_64
OS edition 64-bit
myhost&amp;gt; cpinfo -y all

This is Check Point CPinfo Build 914000231 for GAIA
[MGMT]
        No hotfixes..
[IDA]
        No hotfixes..
[CPFC]
        No hotfixes..
[FW1]
        HOTFIX_PUBLIC_CLOUD_CA_BUNDLE_AUTOUPDATE
        HOTFIX_GOT_TPCONF_AUTOUPDATE

FW1 build number:
This is Check Point's software version R81.20 - Build 703
kernel: R81.20 - Build 597
[SecurePlatform]
        No hotfixes..
[CPinfo]
        No hotfixes..
[PPACK]
        No hotfixes..
[AutoUpdater]
        No hotfixes..&lt;/LI-CODE&gt;
&lt;P&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 13:51:05 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221404#M42389</guid>
      <dc:creator>Moudar</dc:creator>
      <dc:date>2024-07-19T13:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: First time wizard oneliner</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221406#M42390</link>
      <description>&lt;P&gt;You need to remove the quote here:&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;ftw_sic_key=Admin123"&amp;amp;maintenance_hash&lt;/LI-CODE&gt;
&lt;P&gt;and put it at the end, after the single tick closing the hash. I'm pretty sure that still won't work, because what's actually failing is the '&lt;SPAN&gt;dbget grub2pwd:changeme' command.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 14:31:52 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221406#M42390</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2024-07-19T14:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: First time wizard oneliner</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221407#M42391</link>
      <description>&lt;P&gt;What do you get if you run this command:&lt;/P&gt;
&lt;P&gt;is_default_maintenance_pw=$(dbget grub2pwd:changeme);echo "$is_default_maintenance_pw"&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 14:33:08 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221407#M42391</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2024-07-19T14:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: First time wizard oneliner</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221416#M42394</link>
      <description>&lt;P&gt;I get nothing:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[Expert@myhost:0]# is_default_maintenance_pw=$(dbget grub2pwd:changeme);echo "$is_default_maintenance_pw"

[Expert@myhost:0]#&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 19 Jul 2024 15:22:31 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221416#M42394</guid>
      <dc:creator>Moudar</dc:creator>
      <dc:date>2024-07-19T15:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: First time wizard oneliner</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221417#M42395</link>
      <description>&lt;P&gt;Okay. That's the problem. To work around it, try setting the variable&amp;nbsp;is_maintenance_pw_not_mandatory to the string "true" before running your config_system command:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;is_maintenance_pw_not_mandatory="true"
config_system ...&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 19 Jul 2024 16:06:03 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221417#M42395</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2024-07-19T16:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: First time wizard oneliner</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221418#M42396</link>
      <description>&lt;P&gt;now it is working, would you explain what does that command do?&lt;/P&gt;
&lt;LI-CODE lang="ruby"&gt;[Expert@myhost:0]# is_maintenance_pw_not_mandatory="true" config_system -s "install_security_gw=true&amp;amp;gateway_daip=false&amp;amp;gateway_cluster_member=true&amp;amp;install_security_management=false&amp;amp;download_info=true&amp;amp;upload_info=true&amp;amp;upload_crash_report=true&amp;amp;ftw_sic_key=Admin123"

Validating configuration file:  Done
Configuring OS parameters:      Done
Configuring products:           Done
Verifying installation...

First time configuration was completed!

Reboot is required in order to complete the installation, please perform it manually&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 19 Jul 2024 16:18:24 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221418#M42396</guid>
      <dc:creator>Moudar</dc:creator>
      <dc:date>2024-07-19T16:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: First time wizard oneliner</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221419#M42397</link>
      <description>&lt;P&gt;The conditional which failed was this one:&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;[ $is_default_maintenance_pw -eq 1 ]&lt;/LI-CODE&gt;
&lt;P&gt;It has nothing on the left, which can't be compared to an integer at all, so the comparison fails with "[: -eq: unary operator expected". (Note to Check Point: integer comparisons are fundamentally unsafe in bash. You need to test that the variable exists and contains an integer first, or wrap both sides in quotes and do a string comparison.) That comparison is only attempted in the 'else' branch of this comparison, though:&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;if [[ $is_maintenance_pw_not_mandatory == $TRUE ]]&lt;/LI-CODE&gt;
&lt;P&gt;The variable 'is_maintenance_pw_not_mandatory' is never actually set in the script, so it expects the value to come from outside. As a result, we can just manipulate this comparison to not take the failing branch. Presto: no failure.&lt;/P&gt;
&lt;P&gt;Note that this just bypasses the check for whether config_system should require you to specify a maintenance mode password. It still accepts the&amp;nbsp;maintenance_hash value and sets the hash if the value is present. Otherwise, it leaves the password at the default value, which appears to be 'changeme'.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2024 17:28:55 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/221419#M42397</guid>
      <dc:creator>Bob_Zimmerman</dc:creator>
      <dc:date>2024-07-19T17:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: First time wizard oneliner</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/270354#M53489</link>
      <description>&lt;P&gt;at least for manager this trick did not work for me.&lt;/P&gt;&lt;P&gt;I always had to add this maintenance_hash='grub.....' (&lt;SPAN&gt;grub2-mkpasswd-pbkdf2 password)&lt;BR /&gt;&lt;/SPAN&gt;R82 and R82.10&lt;BR /&gt;&lt;BR /&gt;also with the web first-time-config wizard the maintenance password is needed.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Feb 2026 13:39:52 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/First-time-wizard-oneliner/m-p/270354#M53489</guid>
      <dc:creator>aheilmaier2</dc:creator>
      <dc:date>2026-02-11T13:39:52Z</dc:date>
    </item>
  </channel>
</rss>

