Skip to main content

Renaming an internal target

Made a mistake, don't like the name anymore? No worries, this article explains how you can rename an internal target

Written by Naomi Purvis

⚠️ Warning

Renaming an internal target results in a new target being created.

  • You cannot relink a target with the same name, as this will present an 'Authentication Error' when relinking.

  • It is currently not possible to merge the previous target's history into a new target

Current Name

The linked name is the identifier your internal agent enrolled with. It takes the form PREFIX_DeviceName , and the DeviceName is the target's address in Intruder. Renaming the Hostname does not change this linked name, so a renamed device keeps showing under its original target until you unlink and relink it.

You can read the linked name on the device itself with the ms_name preference. Run the command for your operating system, as an administrator, from the Nessus Agent folder:

macOS

sudo /Library/NessusAgent/run/sbin/nessuscli fix --secure --get ms_name

Linux

sudo /opt/nessus_agent/sbin/nessuscli fix --secure --get ms_name

Windows

Command Prompt (run as Administrator - the command needs elevation)

"C:\Program Files\Tenable\Nessus Agent\nessuscli.exe" fix --secure --get ms_name

PowerShell (run as Administrator - note the leading & call operator)

& "C:\Program Files\Tenable\Nessus Agent\nessuscli.exe" fix --secure --get ms_name

The command returns the full linked name, for example:

b35as4d8-f9a4-4822-be83-2d998fb18baf_User-MacBook-Pro

The part before the first underscore is your account prefix. The part after it is the device name the agent is linked under.

Renaming

To rename a target, you will need to unlink the agent and then relink it with the correct target name.

Unlink Command

MacOS

sudo /Library/NessusAgent/run/sbin/nessuscli agent unlink

Linux

sudo /opt/nessus_agent/sbin/nessuscli agent unlink

Windows

"C:\Program Files\Tenable\Nessus Agent\nessuscli.exe" agent unlink


​

Relink

MacOS

/Library/NessusAgent/run/sbin/nessuscli agent link --host="cloud.tenable.com" --port="443" --key=[KEY] --name=[Prefix_DeviceName]

Windows

"C:\Program Files\Tenable\Nessus Agent\nessuscli" agent link --host="cloud.tenable.com" --port="443" --key=[KEY] --name=[Prefix_DeviceName]

Linux

/opt/nessus_agent/sbin/nessuscli agent link --host="cloud.tenable.com" --port="443" --key=[KEY] --name=[Prefix_DeviceName]

Once you've done that, it should take a couple of minutes for the internal system to show up.


UUID Errors

It's not very common, but sometimes these things happen.

[error] [agent] Link fail: [409] Agent with uuid agentUuid=<> attempt to link, but another agent in container containerUuid=<> with different token already exists.

This message ☝️ can pop up if the agent hasn't unlinked properly. To resolve this issue, you will need to replace the value in the /etc/tenable_tag file with a valid UUIDv4 value or delete the file. The value stored in the file specified below matches that of a linked device:

  • Linux : /etc/tenable_tag

  • Windows: HKLM/Software/Tenable/TAG

  • macOS: /private/etc/tenable_tag

To begin,

  1. Delete the tag file using the OS-specific instructions below

    macOS

    1. SSH into the target as root (using sudo will work as well)

    2. Run the following command:

    rm /private/etc/tenable_tag

    Windows

    1. Open regedit

    2. Delete the following registry entry:

    HKEY_LOCAL_MACHINE/Software/Tenable/TAG

    Linux

    1. SSH into the target as root (Using sudo will work as well)

    2. Run the following command:

    rm /etc/tenable_tag

  2. Relink the machine using a new, unique name.


Best Practices

  • Always use unique internal target names when linking agents to the Intruder platform.

  • Remove existing target entries before relinking, and ensure that you only use a new unique name and not reuse a previously added target name.

  • Regularly monitor agent statuses to proactively address any potential unlinking or configuration issues.

Did this answer your question?