• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

CentOS / RHEL 6 : Install and Configure SNMPv3

by admin

Steps to configure SNMPv3

1. Install the required packages

Install the 2 required packages namely,
1. net-snmp-utils
2. net-snmp-devel

# yum install net-snmp net-snmp-utils net-snmp-devel

net-snmp-utils is required to use the utility snmpwalk.

2. Configure SNMP version 3 user

We need to turn off the agent when running net-snmp-create-v3-user command.

# service snmpd stop

There are 3 ways you can create the user.
1. command line
2. Interactive
3. Manually

1. Command line
The syntax of –create-snmp3-user is as below :

--create-snmpv3-user [-ro] [-A authpass] [-X privpass]
                         [-a MD5|SHA] [-x DES|AES] [username]

Default authentication method is MD5 and default encryption is DES if not explicitly specified.

# net-snmp-config --create-snmpv3-user -a MD5 -A geek123 geekuser

2. Interactive
You can also use interactive mode to enter username and password as follows :

# net-snmp-create-v3-user

Enter a SNMPv3 user name to create:
geekuser
Enter authentication pass-phrase:
geek123
Enter encryption pass-phrase:
[press return to reuse the authentication pass-phrase]

adding the following line to /var/lib/net-snmp/snmpd.conf:
createUser geekuser MD5 "geek123" DES
adding the following line to /etc/snmp/snmpd.conf:
rwuser geekuser

3. Manual
To manually add the user – add below line to the file /var/lib/net-snmp/snmpd.conf :

createUser geekuser MD5 "geek123" DES

and add below lines to the file /etc/snmp/snmpd.conf

rwuser geekuser

The sample username is geekuser and pass-phrase is geek123.

3. Start the service

Use chkconfig command to configure the SNMP services to start on each reboot :

# chkconfig snmpd on

Start the snmpd service :

# service snmpd start

4. Test the setup using snmpwalk command

# snmpwalk -v3 -u geekuser -l authNoPriv -a MD5 -A geek123 localhost

Here,

-v3 - specifies version
-u - specifies username
-l - specifies security level
-a - specifies Authentication Protocol
-A - specifies Pass-phrase
CentOS / RHEL : How to determine which SNMP version is being used

Filed Under: Linux

Some more articles you might also be interested in …

  1. groupmod Command Examples in Linux
  2. genid Command Examples in Linux
  3. fc-cache: Scan font directories to build font cache files
  4. dkms: command not found
  5. fprintd-list: command not found
  6. locate Command Examples in Linux
  7. fallocate Command Examples in Linux
  8. fc-list: List available fonts installed on the system
  9. mkfs.exfat Command Examples in Linux
  10. uprecords Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright