LinuxCommandLibrary

nmcli-agent

Provide secrets to NetworkManager

TLDR

Register nmcli as a secret agent and listen for secret requests

$ nmcli agent secret
copy

Register nmcli as a polkit agent and listen for authorization requests
$ nmcli agent polkit
copy

Register nmcli as a secret agent and a polkit agent
$ nmcli agent all
copy

SYNOPSIS

`nmcli-agent`

DESCRIPTION

The `nmcli-agent` command is a helper application designed to facilitate the activation of network connections managed by NetworkManager. It's primarily used in environments where specific authentication or configuration is required before a connection can be fully established. It interacts with NetworkManager to handle connection requests, potentially prompting the user for credentials or executing custom scripts based on the connection profile. This allows for more complex connection setups than can be directly handled by NetworkManager's core functionalities. The agent typically runs in the background and responds to requests from NetworkManager when a connection needs assistance. Its key responsibility is to ensure a smooth and secure connection process by managing aspects like user authentication and custom script execution related to network connectivity. It's typically used in conjunction with other NetworkManager utilities, and is an integral part of automating the process of complex authentication flows.
Note: The functionality of `nmcli-agent` is now largely integrated directly into NetworkManager, so its direct usage is rare.

CAVEATS

Direct execution of `nmcli-agent` is rarely needed. NetworkManager handles its invocation internally. It often lacks a command-line interface in the traditional sense because it's designed as a background process. Its use is largely superseded by more integrated NetworkManager functionalities.

INTERNAL OPERATION

The agent monitors NetworkManager's state and responds to requests for connection activation. It might prompt the user for credentials (e.g., passwords, certificates) or trigger custom scripts to complete the connection process. The actual behavior depends on the connection profile and the configured authentication mechanisms.

TROUBLESHOOTING

If network connections are failing and `nmcli-agent` is suspected, check the system logs (e.g., `/var/log/syslog`, `/var/log/daemon.log`) for relevant error messages. Ensure that NetworkManager is properly configured and that the connection profiles are correct. NetworkManager provides own debugging tools which are usually more convenient.

HISTORY

The `nmcli-agent` command was initially developed to address authentication and connection establishment scenarios that were not easily handled by the core NetworkManager functionality. Over time, much of its functionality has been absorbed into NetworkManager itself, reducing the need for a separate agent process. Its role was primarily to handle authentication challenges and connection setups specific to certain network configurations or user environments. Now, the functionality is provided as internal part of NetworkManager.

SEE ALSO

Copied to clipboard