=head1 NAME

ngcp-snmpd-adduser - add an SNMPv3 user to the system

=head1 SYNOPSIS

B<ngcp-snmpd-adduser> [I<option>...] I<username>

=head1 DESCRIPTION

This program adds an SNMPv3 user directly into snmpd,
without needing an initial user as a template or an administrator user
to add it via the SNMP protocol,
and so that it can be tracked by the B<ngcp-config> framework and the
changes replicated over the NGCP system.

The program will error out if the user already exists,
but the B<--replace> option can be used to replace an existing user.

This program does not support insecure SNMPv3 user settings,
such as unauthenticated or unencrypted connections,
or weak algorithms such as B<MD5>, B<SHA-1>, B<DES>, and similar.
If any of these are required for interoperability reasons,
then SNMPv2 or SNMPv1 can be used instead.

The program needs to stop and start the B<snmpd> server during its operation.
It will prompt for a password,
which has to be at least eight characters long.
And will then add the username and password into the B<ngcp-config> framework,
rebuild the templates and synchronize the user database in B<snmpd>,
and push the changes to all other nodes.

=head1 OPTIONS

=over 4

=item B<-a>, B<--auth> I<auth-algo>

Specify the authentication algorithm to use for this user.

The default is B<SHA-512>.

The supported algorithms are: B<SHA-512>, B<SHA-384>, B<SHA-256>, B<SHA-224>.

=item B<-p>, B<--priv> I<priv-algo>

Specify the encryption algorithm to use for this user.

The default is B<AES-256>.

The supported algorithms are: B<AES-256>, B<AES-192>, B<AES-128>.

=item B<-r>, B<--replace>

Specify whether to replace an existing user with the new one.

This can be useful to change the user password,
or change the user authentication or encryption algorithms.

=item B<--help>

Display a help text and exit.

=back

=head1 SEE ALSO

L<ngcp-snmpd-deluser(8)>, L<snmpd.conf(5)>.

=head1 BUGS AND LIMITATIONS

Please report problems you notice to the Sipwise
Development Team <support@sipwise.com>.

=head1 AUTHORS

Guillem Jover <gjover@sipwise.com>

=head1 LICENSE

Copyright (C) 2024 Sipwise GmbH, Austria

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
