Package: libsnmp-dev
Version: 5.9+dfsg-3+b1

When running `net-snmp-create-v3-user` I get an error message:

# net-snmp-create-v3-user -A <redacted> -a SHA -x <redacted> -X AES snmp_v3_user
adding the following line to /var/lib/snmp/snmpd.conf:
   createUser snmp_v3_user SHA "<redacted>" AES "<redacted>"
adding the following line to /snmp/snmpd.conf:
   rwuser snmp_v3_user
touch: cannot touch '/snmp/snmpd.conf': No such file or directory
/usr/bin/net-snmp-create-v3-user: 144: cannot create /snmp/snmpd.conf: 
Directory nonexistent

Note the last two lines. The reason is that in line 137 the variable òutfile`is 
set like this:

outfile="${datarootdir}/snmp/snmpd.conf“

but since `datarootdir` isn’t defined anywhere the tool goes right for 
`/snmp/snmpd.conf`.
Looking at an older version it seems that the whole section to set the 
variables is missing, e.g.
this part:

prefix=/usr
exec_prefix=${prefix}
includedir=${prefix}/include
libdir=${prefix}/lib/x86_64-linux-gnu
datarootdir=${prefix}/share

This could probably get condensed into

datarootdir=/usr/share

or the path could be hardcoded into `net-snmp-create-v3-user`

Attachment: signature.asc
Description: Message signed with OpenPGP

Reply via email to