Hi all, I am just starting with the project willing to do a custom snmp agent.

To do it my first step was to be able to build the default one and then start 
"playing" with other stuff but first I wanted to be sure that the default stuff 
was working.

Let me explain what I did and then which is the problem I have

I am working on an Ubuntu 20.04 64bit

1. The first thing I tried is to install the default stuff from Ubuntu, so I 
did an $ sudo apt install snmpd 
Then I edited the  /etc/snmp/snmpd.conf file to open the agent at 161 , by 
adding agentaddress udp:161,udp6:[::1]:161
 I restarted the snmpd daemon using $ sudo systemctl restart snmpd 
And there I have the 161 port open and I can snmpwalk from localhost and from 
other computers in the lan.  So this approach is working
I also played adding users with permissions and I walked the default mib using 
snmp v1, v2c and v3 perfectly.

2. Now let me show what didn't worked
2.a)  I removed the snmpd file by doing $ sudo apt uninstall snmpd to have a 
clean system
2.b) I downloaded net-snmp-5.9.1 code 
2.c) I executed $ ./configure --with-systemd    (I did it also without this 
parameter but was worst I think)
2.d) I then did a $make && sudo make install
2.e) I think I did a $ sudo systemctl unmask snmpd  ( I do not recall exactly 
because I did this too many times without sucess)
2.f) Typying $ snmpd --version shows 

NET-SNMP version:  5.9.1
Web:               http://www.net-snmp.org/
Email:             net-snmp-cod...@lists.sourceforge.net

2.g) Doing a $ sudo systemctl status snmpd 

● snmpd.service - LSB: SNMP agents
     Loaded: loaded (/etc/init.d/snmpd; generated)
     Active: active (exited) since Wed 2021-12-22 20:26:45 -03; 35min ago
       Docs: man:systemd-sysv-generator(8)
    Process: 1496658 ExecStart=/etc/init.d/snmpd start (code=exited, 
status=0/SUCCESS)

dic 22 20:26:45 pc-devlinux systemd[1]: Starting LSB: SNMP agents...
dic 22 20:26:45 pc-devlinux systemd[1]: Started LSB: SNMP agents.

With a green dot in the left.  But no 161 port open

2.g) Doing a $ sudo systemctl stop snmpd or $ sudo systemctl restart snmpd do 
not solved the problem


So here are my questions:
So the thing is that I am confused.  
3) Shouldn't it read  it should read the file which is at /etc/snmp/snmpd.conf  
?
I did not touched the /var/lib/snmp/snmpd.conf  which has a lot of text saying 
do not change this file 
I also tried to execute the file as /usr/local/sbin/snmpd -c 
/etc/snmp/snmpd.conf  but without luck

4) Is there something too obvious I am missing?  It's been to many hours with 
this and may be someone can bring some light to me

Thanks in advance







_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to