Revert "Revert "and added files""
[bcm963xx.git] / userapps / opensource / net-snmp / README.snmpv3
1 README.snmpv3
2 -------------
3 How to setup SNMPv3, a very brief document for Dave to elaborate and
4 do a better job on since I suck at writing documentation and he
5 doesn't ;-) --Wes:
6
7 Note: SHA authentication and DES encryption support is only available
8 if you have OpenSSL installed.
9
10 Note: encryption support isn't enabled in the binary releases downloadable
11 from the net-snmp web site.
12
13 Note: this description assumes you're using the software compiled from
14 source, and so installed using the default prefix location (/usr/local).
15 If you're working with a vendor-provided system, or have configured
16 things with a different prefix, you'll need to adjust locations accordingly.
17
18 CREATING THE FIRST USER:
19 ------------------------
20   First, you need to create a new snmpv3 user and give them rights to
21   do things:
22
23     net-snmp-config --create-snmpv3-user -a "my_password" myuser
24
25   WARNING: SNMPv3 pass phrases must be at least 8 characters long!
26
27   The above line creates the user "myuser" with a password of
28   "my_password" (and uses MD5 and DES for protection).  (Note that
29   encryption support isn't enabled in the binary releases downloadable
30   from the net-snmp web site.)  net-snmp-config will also add a line
31   to your snmpd.conf file to let that user have read/write access to
32   your agent.  You may want to change this in your snmpd.conf file
33   (see the snmpd.conf manual page).  Run net-snmp-config --help for
34   more information about it.
35
36   Start the agent and test your setup:
37     /usr/local/sbin/snmpd
38        [...wait a few seconds...  It will run in the background and
39         return you to your shell immediately.]
40
41     snmpget -v 3 -u myuser -l authNoPriv -a MD5 -A my_password localhost sysUpTime.0
42        [ this should return information about how long your agent has been up]
43   
44     snmpget -v 3 -u myuser -l authPriv   -a MD5 -A my_password
45                                          -x DES -X my_password localhost sysUpTime.0
46        [ this should return similar information, but encrypts the transmission ]
47
48 CREATING A SECOND USER:
49 -----------------------
50   Start the agent (if you didn't do so above).
51
52   You can create as many users as you like using the above method, but
53   this details another way of doing it while the agent is running by
54   modifying the user database using the snmp protocol itself:
55
56   Now, lets create a second user using the first user (just for fun)
57   for both authentication purposes and as a template (or "cloning
58   source"):
59
60     snmpusm -v 3 -u myuser -l authNoPriv -a MD5 -A my_password localhost create wes myuser
61
62   The above should have created the user "wes" with the same password as
63   the "myuser" user.  So then, you need to change his password using:
64
65     snmpusm -v 3 -u wes -l authNoPriv -a MD5 -A my_password localhost passwd my_password new_passphrase
66
67   See, wasn't that easy?  You can now create users.  Wheeee....
68
69   But, you'll have to add a configuration line that allows them access
70   to do things.  Do this with another "rwuser" line in your
71   /usr/local/share/snmp/snmpd.conf file (you'll need to stop and start 
72   the agent again, or send the agent a SIGHUP signal):
73
74     rwuser wes
75
76   Or, optional use the "rouser" token instead of the "rwuser" token to
77   only grant them read-only access.
78
79   Now, test your new user:
80
81     snmpget -v 3 -u wes -l authNoPriv -a MD5 -A new_passphrase localhost sysUpTime.0
82
83
84 FURTHER STUDIES:
85 ---------------
86
87 Tired of all those command line authentication options?
88 ----------------------------------------
89 put something like this in your $HOME/.snmp/snmp.conf file (make it
90 readable only by you!!!):
91
92   defSecurityName wes
93   defContext ""
94   defAuthType MD5
95   defSecurityLevel authNoPriv
96   defAuthPassphrase new_passphrase
97   defVersion 3
98
99 And this is in place the last of the above example lines boils down to:
100
101   snmpget localhost sysUpTime.0
102
103 Which is about as simple as I can make it for ya ;-)