Description: Fix paths for net-snmp-create-v3-user
 Use the pidof program instead of ps and grep
 Fix the path for configuration file
Author: Craig Small <csmall@debian.org>
Origin: Debian
Bug-Debian: https://bugs.debian.org/997895
Reviewed-by: Craig Small <csmall@dropbear.xyz>
Last-Update: 2026-05-27
--- a/net-snmp-create-v3-user.in
+++ b/net-snmp-create-v3-user.in
@@ -3,7 +3,7 @@
 # this shell script is designed to add new SNMPv3 users
 # to Net-SNMP config file.
 
-if @PSCMD@ | @EGREP@ ' snmpd *$' > /dev/null 2>&1 ; then
+if /bin/pidof -q snmpd > /dev/null 2>&1 ; then
     echo "Apparently at least one snmpd daemon is already running."
     echo "You must stop them in order to use this command."
     exit 1
@@ -138,7 +138,7 @@
 datarootdir=@datarootdir@
 # To suppress shellcheck complaints about $prefix and $datarootdir.
 : "$prefix" "$datarootdir"
-outfile="@datadir@/snmp/snmpd.conf"
+outfile="@SNMPCONFPATH@/snmpd.conf"
 line="$token $user"
 echo "adding the following line to $outfile:"
 echo "   $line"
--- a/man/net-snmp-create-v3-user.1.def
+++ b/man/net-snmp-create-v3-user.1.def
@@ -1,4 +1,4 @@
-.TH net-snmp-create-v3-user 1 "09 Aug 2024" VVERSIONINFO "Net-SNMP"
+.TH net-snmp-create-v3-user 1 "27 May 2026" VVERSIONINFO "Net-SNMP"
 .SH NAME
 net-snmp-create-v3-user \- create a SNMPv3 user in net-snmp configuration file
 .SH SYNOPSIS
@@ -8,7 +8,7 @@
 .SH DESCRIPTION
 .PP
 The \fInet-snmp-create-v3-user\fP shell script is designed to create a
-new user in the net-snmp configuration file (/var/net-snmp/snmpd.conf by default).
+new user in the net-snmp configuration file \fI/var/lib/snmp/snmpd.conf\fR.
 
 .SH OPTIONS
 .TP
