Sample script to log all users out of a target device attached to a serial port

Sample script to log all users out of a target device attached to a serial port

Please note this is only an example and should be tested before using in production.  The script may require customization to use the appropriate commands to log out of the specific targets involved. Usage instructions for this sample script:
  1. Unzip log_all_out.py.zip
  2. Copy the script to Nodegrid: scp log_all_out.py admin@10.20.30.40:/etc/scripts/access/log_all_out.py
  3. Log into the CLI as admin (or equivalent configuration permissions)
  4. Access the root shell: shell sudo su -
  5. Set execution permission: chmod +x /etc/scripts/access/log_all_out.py
  6. Return to the admin CLI: exit
  7. Enable the script via Session Stop Script setting (i.e. port 1): set /settings/devices/ttyS1/management/ on_session_stop=log_all_out.py
    1. Repeat enabling script on additional ports as appropriate
  8. Save the changes: commit

    • Related Articles

    • Rename an attached serial port

      Rename an attached serial port via Web Interface Prior to 5.10.x, to rename an attached serial port, you need to go to Managed Devices :: Devices, tick the serial port that you want to rename and click on "Rename": Then change the name and "Save": ...
    • Returns host name to default after device disconnected

      Introduction: Often Nodegrid users set the serial port to detect hostname of the connected device to help identify the device in the access page. When the target device is removed the host name remained on the access page. This page helps the user to ...
    • Accessing the target device

      Introduction: The Nodegrid Manager has the flexibility to allow multiple ways of accessing the target device console connection that is managed by the Nodegrid. Whether it is for Automation purposes or simply the convenience, having different access ...
    • How to copy and paste to Target devices that use "Launch URL via HTML5" Internal Browser

      Overview Apache Guacamole is a clientless remote desktop gateway that uses HTML5 to access systems via a web browser. For users relying on password managers, copying and pasting complex passwords into a Guacamole session is a practical solution to ...
    • How to build the set-up for Virtual Serial Ports communicating to an end device, via the Nodegrid OS (RFC2217)

      Abstract: In the industry, some legacy applications impose to use serial ports (COM) to interface with the industrial automates. In this article, we will study a set-up in which a desktop emulates a virtual serial COM, and conveys the connection via ...