<?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: Delete user admin UserScript in Spark Firewall (SMB)</title>
    <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Delete-user-admin-UserScript/m-p/123348#M5379</link>
    <description>&lt;P&gt;Regardless of using SMB or not, one should never use the expert mode commands to manage users.&lt;BR /&gt;This needs to be done via clish only using the appropriate syntax.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Jul 2021 15:22:07 GMT</pubDate>
    <dc:creator>PhoneBoy</dc:creator>
    <dc:date>2021-07-08T15:22:07Z</dc:date>
    <item>
      <title>Delete user admin UserScript</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Delete-user-admin-UserScript/m-p/123279#M5372</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I am try to delete extra admins in userScripts.&lt;/P&gt;&lt;P&gt;echo "Check Users" &amp;gt; /tmp/check_admins&lt;BR /&gt;for USER in $(cat /etc/passwd | grep -E '/bin/bash|/bin/clish' | awk -F: '{ print $1 }')&lt;BR /&gt;do&lt;BR /&gt;echo $USER &amp;gt;&amp;gt; /tmp/check_admins&lt;BR /&gt;if [ "$USER" = "admin" ]&amp;nbsp;&lt;BR /&gt;then&lt;BR /&gt;echo 'OK' &amp;gt;&amp;gt; /tmp/check_admins&lt;BR /&gt;else&lt;BR /&gt;# /bin/clish -c "delete administrator username $USER" &amp;gt;&amp;gt; /tmp/check_admins&lt;BR /&gt;deluser $USER&lt;BR /&gt;echo "User $USER was deleted" &amp;gt;&amp;gt; /tmp/check_admins&lt;BR /&gt;fi&lt;BR /&gt;done&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I use the command deluser, then the admin is removed from the passwd, but remains in the web and clish interface&lt;/P&gt;&lt;P&gt;If I use the clish command, the admin is not deleted and I get an error: "Unexpected error: attempt to index global 'cgilua' (a nil value)".&lt;/P&gt;&lt;P&gt;If I run this script manually, I get an error: "Could not set administrator: Invalid action: User is logged in". Although the script is run by a different user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I delete extra admins?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 09:00:43 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Delete-user-admin-UserScript/m-p/123279#M5372</guid>
      <dc:creator>Basyuk</dc:creator>
      <dc:date>2021-07-08T09:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Delete user admin UserScript</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Delete-user-admin-UserScript/m-p/123282#M5373</link>
      <description>&lt;P&gt;Run "save config" at the end&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 09:17:01 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Delete-user-admin-UserScript/m-p/123282#M5373</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2021-07-08T09:17:01Z</dc:date>
    </item>
    <item>
      <title>Re: Delete user admin UserScript</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Delete-user-admin-UserScript/m-p/123284#M5374</link>
      <description>&lt;P&gt;SMB devices do not have a 'save config' command. We use Checkpoint 1430, 1530 devices.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 09:20:39 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Delete-user-admin-UserScript/m-p/123284#M5374</guid>
      <dc:creator>Basyuk</dc:creator>
      <dc:date>2021-07-08T09:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Delete user admin UserScript</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Delete-user-admin-UserScript/m-p/123285#M5375</link>
      <description>&lt;P&gt;You never specified that in the original post. &lt;BR /&gt;&lt;BR /&gt;This changes the whole thing. Gaia embedded uses different set of shells and commands. You are using regular Gaia bash commands, which may lead to corrupted admin database on SMB. Soft-reset, if the user is still there, you may need to hard reset do default and reconfigure.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 09:31:07 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Delete-user-admin-UserScript/m-p/123285#M5375</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2021-07-08T09:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Delete user admin UserScript</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Delete-user-admin-UserScript/m-p/123286#M5376</link>
      <description>&lt;P&gt;Clish command not working in /pfrm2.0/etc/UserScript?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 09:34:07 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Delete-user-admin-UserScript/m-p/123286#M5376</guid>
      <dc:creator>Basyuk</dc:creator>
      <dc:date>2021-07-08T09:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Delete user admin UserScript</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Delete-user-admin-UserScript/m-p/123287#M5377</link>
      <description>&lt;P&gt;Once again. Native clish commands do. But calling them from bash shell is a different matter.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 09:36:58 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Delete-user-admin-UserScript/m-p/123287#M5377</guid>
      <dc:creator>_Val_</dc:creator>
      <dc:date>2021-07-08T09:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: Delete user admin UserScript</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Delete-user-admin-UserScript/m-p/123288#M5378</link>
      <description>&lt;P&gt;Can't solve my problem with this script?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 09:38:33 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Delete-user-admin-UserScript/m-p/123288#M5378</guid>
      <dc:creator>Basyuk</dc:creator>
      <dc:date>2021-07-08T09:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Delete user admin UserScript</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Delete-user-admin-UserScript/m-p/123348#M5379</link>
      <description>&lt;P&gt;Regardless of using SMB or not, one should never use the expert mode commands to manage users.&lt;BR /&gt;This needs to be done via clish only using the appropriate syntax.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 15:22:07 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/Delete-user-admin-UserScript/m-p/123348#M5379</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2021-07-08T15:22:07Z</dc:date>
    </item>
  </channel>
</rss>

