LinuxCommandLibrary

nmcli-agent

runs nmcli as an agent daemon that responds to NetworkManager's

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 both secret and polkit agent
$ nmcli agent all
copy

SYNOPSIS

nmcli agent command

DESCRIPTION

nmcli agent runs nmcli as an agent daemon that responds to NetworkManager's requests for secrets (passwords, keys) or polkit authorization requests. This is useful in environments without a desktop secret agent or polkit agent.
As a secret agent, nmcli can provide Wi-Fi passwords, VPN credentials, and other secrets when NetworkManager needs them to establish connections. It prompts the user in the terminal for required credentials.
As a polkit agent, nmcli handles authorization prompts for privileged NetworkManager operations, allowing command-line authentication without a graphical polkit agent.

PARAMETERS

secret, s

Run as a NetworkManager secret agent to provide passwords/credentials
polkit, p
Run as a polkit agent to handle authorization requests
all, a
Run as both secret and polkit agent

CAVEATS

The agent runs in the foreground and must remain running to handle requests. Only one secret agent or polkit agent of each type can be registered at a time. Primarily useful for headless systems or terminal-only environments.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community