<?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 Remote Access CLI based script - how to extract system user and place it in a script? in SASE and Remote Access</title>
    <link>https://community.checkpoint.com/t5/SASE-and-Remote-Access/Remote-Access-CLI-based-script-how-to-extract-system-user-and/m-p/245132#M2127</link>
    <description>&lt;P&gt;Hello everyone!&lt;BR /&gt;Hoping you are doing well and having a great day.&lt;/P&gt;&lt;P&gt;I am developing a .bat script for the recreation of VPN site for VPN clients of one of our customers.&lt;/P&gt;&lt;P&gt;I am basing it on commands from the Remote Access documentation in the CLI section:&lt;BR /&gt;&lt;A href="https://sc1.checkpoint.com/documents/RemoteAccessClients_forWindows_AdminGuide/Content/Topics-RA-VPN-for-Win/CLI-Commands.htm?TocPath=Remote%20Access%20Clients%20Command%20Line%7CCLI%20Commands%7C_____0" target="_blank" rel="noopener"&gt;https://sc1.checkpoint.com/documents/RemoteAccessClients_forWindows_AdminGuide/Content/Topics-RA-VPN-for-Win/CLI-Commands.htm?TocPath=Remote%20Access%20Clients%20Command%20Line%7CCLI%20Commands%7C_____0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;For now, I have the following for my script:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;@echo off&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;cd C:\Program Files (x86)\CheckPoint\Endpoint Connect\&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;trac.exe ver&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;trac.exe disconnect&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;trac.exe delete -s vpn.company.com&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;trac.exe create -s vpn.company.com -di vpn.company.com -a username-password -lo Standard&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The script does the following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;@echo off to ensure that the script commands are not displayed in the cmd console.&lt;/LI&gt;&lt;LI&gt;Change to the directory where trac.exe is located.&lt;/LI&gt;&lt;LI&gt;Show client version&lt;/LI&gt;&lt;LI&gt;Disconnect client&lt;/LI&gt;&lt;LI&gt;Delete current VPN site&lt;/LI&gt;&lt;LI&gt;Recreate current VPN site with username and password as authentication method&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The specific requirement of our customer is that, the domain username of the PC is extracted and defined in a variable in order to be able to execute the following command and that the username is the domain user:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;trac.exe userpass -s &amp;lt;sitename&amp;gt; -u &amp;lt;username&amp;gt; -p &amp;lt;password&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I see that if I run the following in CMD, I can see my domain username based on a Windows system environment variable:&lt;BR /&gt;&lt;STRONG&gt;echo %USERNAME%&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Then, I also see that if I run the following, I can save %USERNAME% in a variable called USER:&lt;BR /&gt;&lt;STRONG&gt;set USER=%USERNAME%&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;However, when I try to use this variable in the command trac.exe:&lt;BR /&gt;&lt;STRONG&gt;trac.exe userpass -s vpn.company.com -u %USER%&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;I see the following error:&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="trac.exe.png" style="width: 997px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/30070i18F7EA8E8F5FF3DA/image-size/large?v=v2&amp;amp;px=999" role="button" title="trac.exe.png" alt="trac.exe.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;I would like to know if there is a way to extract this domain username from a PC to configure it by “default” once I run my script to recreate the VPN site.&lt;BR /&gt;And that once the VPN client is reconfigured, the user can see his domain user so that he can just enter his passwords and then proceed with the VPN authentication/authorization using an LDAP with Identity Awareness. (This last one is already configured, I just want to see if the domain user can be configured so that the user just comes in and enters his password).&lt;/P&gt;&lt;P&gt;I know this is maybe something more related to .bat scripting but I hope you can help me.&lt;BR /&gt;&lt;BR /&gt;Greetings!!&lt;/P&gt;</description>
    <pubDate>Sat, 29 Mar 2025 02:09:17 GMT</pubDate>
    <dc:creator>israelsc</dc:creator>
    <dc:date>2025-03-29T02:09:17Z</dc:date>
    <item>
      <title>Remote Access CLI based script - how to extract system user and place it in a script?</title>
      <link>https://community.checkpoint.com/t5/SASE-and-Remote-Access/Remote-Access-CLI-based-script-how-to-extract-system-user-and/m-p/245132#M2127</link>
      <description>&lt;P&gt;Hello everyone!&lt;BR /&gt;Hoping you are doing well and having a great day.&lt;/P&gt;&lt;P&gt;I am developing a .bat script for the recreation of VPN site for VPN clients of one of our customers.&lt;/P&gt;&lt;P&gt;I am basing it on commands from the Remote Access documentation in the CLI section:&lt;BR /&gt;&lt;A href="https://sc1.checkpoint.com/documents/RemoteAccessClients_forWindows_AdminGuide/Content/Topics-RA-VPN-for-Win/CLI-Commands.htm?TocPath=Remote%20Access%20Clients%20Command%20Line%7CCLI%20Commands%7C_____0" target="_blank" rel="noopener"&gt;https://sc1.checkpoint.com/documents/RemoteAccessClients_forWindows_AdminGuide/Content/Topics-RA-VPN-for-Win/CLI-Commands.htm?TocPath=Remote%20Access%20Clients%20Command%20Line%7CCLI%20Commands%7C_____0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;For now, I have the following for my script:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;@echo off&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;cd C:\Program Files (x86)\CheckPoint\Endpoint Connect\&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;trac.exe ver&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;trac.exe disconnect&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;trac.exe delete -s vpn.company.com&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;trac.exe create -s vpn.company.com -di vpn.company.com -a username-password -lo Standard&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The script does the following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;@echo off to ensure that the script commands are not displayed in the cmd console.&lt;/LI&gt;&lt;LI&gt;Change to the directory where trac.exe is located.&lt;/LI&gt;&lt;LI&gt;Show client version&lt;/LI&gt;&lt;LI&gt;Disconnect client&lt;/LI&gt;&lt;LI&gt;Delete current VPN site&lt;/LI&gt;&lt;LI&gt;Recreate current VPN site with username and password as authentication method&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The specific requirement of our customer is that, the domain username of the PC is extracted and defined in a variable in order to be able to execute the following command and that the username is the domain user:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;trac.exe userpass -s &amp;lt;sitename&amp;gt; -u &amp;lt;username&amp;gt; -p &amp;lt;password&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I see that if I run the following in CMD, I can see my domain username based on a Windows system environment variable:&lt;BR /&gt;&lt;STRONG&gt;echo %USERNAME%&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Then, I also see that if I run the following, I can save %USERNAME% in a variable called USER:&lt;BR /&gt;&lt;STRONG&gt;set USER=%USERNAME%&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;However, when I try to use this variable in the command trac.exe:&lt;BR /&gt;&lt;STRONG&gt;trac.exe userpass -s vpn.company.com -u %USER%&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;I see the following error:&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="trac.exe.png" style="width: 997px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/30070i18F7EA8E8F5FF3DA/image-size/large?v=v2&amp;amp;px=999" role="button" title="trac.exe.png" alt="trac.exe.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;I would like to know if there is a way to extract this domain username from a PC to configure it by “default” once I run my script to recreate the VPN site.&lt;BR /&gt;And that once the VPN client is reconfigured, the user can see his domain user so that he can just enter his passwords and then proceed with the VPN authentication/authorization using an LDAP with Identity Awareness. (This last one is already configured, I just want to see if the domain user can be configured so that the user just comes in and enters his password).&lt;/P&gt;&lt;P&gt;I know this is maybe something more related to .bat scripting but I hope you can help me.&lt;BR /&gt;&lt;BR /&gt;Greetings!!&lt;/P&gt;</description>
      <pubDate>Sat, 29 Mar 2025 02:09:17 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/SASE-and-Remote-Access/Remote-Access-CLI-based-script-how-to-extract-system-user-and/m-p/245132#M2127</guid>
      <dc:creator>israelsc</dc:creator>
      <dc:date>2025-03-29T02:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: Remote Access CLI based script - how to extract system user and place it in a script?</title>
      <link>https://community.checkpoint.com/t5/SASE-and-Remote-Access/Remote-Access-CLI-based-script-how-to-extract-system-user-and/m-p/245200#M2128</link>
      <description>&lt;P&gt;Command only works on ATM EPS clients as explained in the trac help ! So this is only possible with the unattended client version, but not the one installed here that has a GUI for the user...&lt;/P&gt;</description>
      <pubDate>Mon, 31 Mar 2025 09:26:24 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/SASE-and-Remote-Access/Remote-Access-CLI-based-script-how-to-extract-system-user-and/m-p/245200#M2128</guid>
      <dc:creator>G_W_Albrecht</dc:creator>
      <dc:date>2025-03-31T09:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Remote Access CLI based script - how to extract system user and place it in a script?</title>
      <link>https://community.checkpoint.com/t5/SASE-and-Remote-Access/Remote-Access-CLI-based-script-how-to-extract-system-user-and/m-p/245256#M2129</link>
      <description>&lt;P&gt;If you replace %username% with an actual username, does it work?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Mar 2025 15:20:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/SASE-and-Remote-Access/Remote-Access-CLI-based-script-how-to-extract-system-user-and/m-p/245256#M2129</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2025-03-31T15:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Remote Access CLI based script - how to extract system user and place it in a script?</title>
      <link>https://community.checkpoint.com/t5/SASE-and-Remote-Access/Remote-Access-CLI-based-script-how-to-extract-system-user-and/m-p/245276#M2130</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/21294"&gt;@G_W_Albrecht&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/7"&gt;@PhoneBoy&lt;/a&gt;&amp;nbsp;thanks for your comments and help!&lt;BR /&gt;&lt;BR /&gt;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/21294"&gt;@G_W_Albrecht&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;That's right, I saw that it works for ATM, but I don't know if this as such is a limitation for us to execute or not, these commands in a VPN client that does have a GUI such as Check Point Mobile Remote Access VPN client or Check Point Endpoint Security VPN client&lt;BR /&gt;&lt;BR /&gt;&lt;a href="https://community.checkpoint.com/t5/user/viewprofilepage/user-id/7"&gt;@PhoneBoy&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;I made a couple of attempts, here are the results:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;1st attempt: set username only, the result shows that the arguments are invalid.&lt;/P&gt;&lt;P&gt;2nd attempt: set only the username and leave the password field empty, the result shows that there is a missing password.&lt;/P&gt;&lt;P&gt;3rd attempt: set username, set password, the result shows that this feature is disabled.&lt;BR /&gt;And this last one is ok, maybe the Security Gateway is not configured for this.&lt;BR /&gt;&lt;BR /&gt;However the 1st and 2nd attempt make me think that if you must make a username and password configured so that the executable parameters are complete and can run successfully.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="new attemps.png" style="width: 999px;"&gt;&lt;img src="https://community.checkpoint.com/t5/image/serverpage/image-id/30085i9BAA9E3F1632A7FC/image-size/large?v=v2&amp;amp;px=999" role="button" title="new attemps.png" alt="new attemps.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Is there any way to achieve this requirement?&lt;BR /&gt;Or is it something that is out of scope of what trac.exe can do?&lt;BR /&gt;&lt;BR /&gt;Greetings!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Mar 2025 17:56:46 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/SASE-and-Remote-Access/Remote-Access-CLI-based-script-how-to-extract-system-user-and/m-p/245276#M2130</guid>
      <dc:creator>israelsc</dc:creator>
      <dc:date>2025-03-31T17:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: Remote Access CLI based script - how to extract system user and place it in a script?</title>
      <link>https://community.checkpoint.com/t5/SASE-and-Remote-Access/Remote-Access-CLI-based-script-how-to-extract-system-user-and/m-p/245324#M2131</link>
      <description>&lt;P&gt;ATM is a seperate version without GUI, the CLI command will only work in that version but does not work with either Check Point Mobile Remote Access VPN client or Check Point Endpoint Security VPN client !&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN data-olk-copy-source="MailCompose"&gt;userpass -s &amp;lt;sitename&amp;gt; -u &amp;lt;username&amp;gt; -p &amp;lt;password&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; save username and password (for ATM only)&lt;BR /&gt;certpass -s &amp;lt;sitename&amp;gt; -f &amp;lt;certificate filename&amp;gt; -p &amp;lt;password&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; save certificate and password (for ATM only)&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Apr 2025 12:20:16 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/SASE-and-Remote-Access/Remote-Access-CLI-based-script-how-to-extract-system-user-and/m-p/245324#M2131</guid>
      <dc:creator>G_W_Albrecht</dc:creator>
      <dc:date>2025-04-01T12:20:16Z</dc:date>
    </item>
  </channel>
</rss>

