1SNMPUSM(1)                         Net-SNMP                         SNMPUSM(1)
2
3
4

NAME

6       snmpusm - creates and maintains SNMPv3 users on a network entity
7

SYNOPSIS

9       snmpusm [COMMON OPTIONS] [-Cw] AGENT create USER [CLONEFROM-USER]
10       snmpusm [COMMON OPTIONS] AGENT delete USER
11       snmpusm [COMMON OPTIONS] AGENT cloneFrom USER CLONEFROM-USER
12       snmpusm  [COMMON  OPTIONS] [-Ca] [-Cx] AGENT passwd OLD-PASSPHRASE NEW-
13       PASSPHRASE [USER]
14       snmpusm [COMMON OPTIONS] <-Ca  |  -Cx>  -Ck  AGENT  passwd  OLD-KEY-OR-
15       PASSPHRASE NEW-KEY-OR-PASSPHRASE [USER]
16       snmpusm [COMMON OPTIONS] [-Ca] [-Cx] AGENT changekey [USER]
17
18

DESCRIPTION

20       snmpusm  is  an  SNMP application that can be used to do simple mainte‐
21       nance on the users known to an SNMP agent, by manipulating the  agent's
22       User-based Security Module (USM) table.  The user needs write access to
23       the usmUserTable MIB table.  This tool can be used to  create,  delete,
24       clone,  and change the passphrase of users configured on a running SNMP
25       agent.
26
27

OPTIONS

29       Common options for all snmpusm commands:
30
31       -CE ENGINE-ID
32              Set usmUserEngineID to be used as  part  of  the  index  of  the
33              usmUserTable.  Default is to use the contextEngineID (set via -E
34              or probed) as the usmUserEngineID.
35
36       -Cp STRING
37              Set the usmUserPublic value of the (new) user to  the  specified
38              STRING.
39
40       Options for the passwd and changekey commands:
41
42       -Ca    Change the authentication key.
43
44       -Cx    Change the privacy key.
45
46       -Ck    Allows  one to use localized key (must start with 0x) instead of
47              passphrase.  When this option is used, either  the  -Ca  or  -Cx
48              option (but not both) must also be used.
49
50

CREATING USERS

52       An unauthenticated SNMPv3 user can be created using the command
53
54              snmpusm [COMMON OPTIONS] AGENT create USER
55
56       This  constructs  an  (inactive)  entry  in  the  usmUserTable, with no
57       authentication or privacy settings.  In principle, this user should  be
58       useable for 'noAuthNoPriv' requests, but in practise the Net-SNMP agent
59       will not allow such an entry to be made active.  The user can  be  cre‐
60       ated  via  the  createAndWait  operation instead by using the -Ca flag.
61       This will prevent the user from being marked as  active  in  any  agent
62       until explicitly activated later via the activate command.
63
64
65       In order to activate this entry, it is necessary to "clone" an existing
66       user, using the command
67
68              snmpusm [COMMON OPTIONS] AGENT cloneFrom USER CLONEFROM-USER
69
70       The USER entry then inherits the same authentication and  privacy  set‐
71       tings (including pass phrases) as the CLONEFROM user.
72
73
74       These two steps can be combined into one, by using the command
75
76              snmpusm [COMMON OPTIONS] AGENT create USER CLONEFROM-USER
77
78
79       The  two  forms  of  the create sub-command require that the user being
80       created does not already exist.   The  cloneFrom  sub-command  requires
81       that the user being cloned to does already exist.
82
83
84       Cloning  is  the  only  way to specify which authentication and privacy
85       protocols to use for a given user, and it is only possible to  do  this
86       once.  Subsequent attempts to reclone onto the same user will appear to
87       succeed, but will be silently ignored.  This (somewhat unexpected)  be‐
88       haviour  is  mandated  by the SNMPv3 USM specifications (RFC 3414).  To
89       change the authentication and privacy settings for a given user, it  is
90       necessary to delete and recreate the user entry.  This is not necessary
91       for simply changing the pass phrases (see below).  This means that  the
92       agent  must  be initialized with at least one user for each combination
93       of authentication and privacy protocols.  See the snmpd.conf(5)  manual
94       page for details of the createUser configuration directive.
95
96

DELETING USERS

98       A user can be deleted from the usmUserTable using the command
99
100              snmpusm [COMMON OPTIONS] AGENT delete USER
101
102

CHANGING PASS PHRASES

104       User  profiles contain private keys that are never transmitted over the
105       wire in clear text (regardless of whether the  administration  requests
106       are encrypted or not).  To change the secret key for a user, it is nec‐
107       essary to specify the user's old passphrase as well  as  the  new  one.
108       This uses the command
109
110              snmpusm [COMMON OPTIONS] [-Ca] [-Cx] AGENT passwd OLD-PASSPHRASE
111              NEW-PASSPHRASE [USER]
112
113
114       After cloning a new user  entry  from  the  appropriate  template,  you
115       should immediately change the new user's passphrase.
116
117
118       If  USER  is  not specified, this command will change the passphrase of
119       the (SNMPv3) user issuing the command.  If the -Ca or -Cx  options  are
120       specified,  then  only  the authentication or privacy keys are changed.
121       If these options are not specified, then both  the  authentication  and
122       privacy keys are changed.
123
124
125              snmpusm [COMMON OPTIONS] [-Ca] [-Cx] AGENT changekey [USER]
126
127
128       This command changes the key in a perfect-forward-secrecy compliant way
129       through a diffie-helman exchange.  The remote agent  must  support  the
130       SNMP-USM-DH-OBJECTS-MIB  for  this command to work.  The resulting keys
131       are printed to the console and may be then set in future command  invo‐
132       cations   using  the  --defAuthLocalizedKey  and  --defPrivLocalizedKey
133       options or in your snmp.conf file  using  the  defAuthLocalizedKey  and
134       defPrivLocalizedKey keywords.
135
136
137       Note  that  since  these  keys are randomly generated based on a diffie
138       helman exchange, they are no longer derived from a  more  easily  typed
139       password.  They are, however, much more secure.
140
141
142       To  change from a localized key back to a password, the following vari‐
143       ant of the passwd sub-command is used:
144
145
146              snmpusm [COMMON OPTIONS] <-Ca | -Cx> -Ck AGENT  passwd  OLD-KEY-
147              OR-PASSPHRASE NEW-KEY-OR-PASSPHRASE [USER]
148
149
150       Either  the  -Ca  or the -Cx option must be specified.  The OLD-KEY-OR-
151       PASSPHRASE and/or  NEW-KEY-OR-PASSPHRASE  arguments  can  either  be  a
152       passphrase  or  a localized key starting with "0x", e.g. as printed out
153       by the changekey sub-command.
154
155
156       Note that snmpusm REQUIRES  an argument specifying the agent  to  query
157       as described in the .I snmpcmd(1) manual page.
158

EXAMPLES

160       Let's  assume for our examples that the following VACM and USM configu‐
161       rations lines were in the snmpd.conf file for a Net-SNMP agent.   These
162       lines  set  up  a default user called "initial" with the authentication
163       passphrase "setup_passphrase" so that we can perform the initial  setup
164       of an agent:
165
166              # VACM configuration entries
167              rwuser initial
168              # lets add the new user we'll create too:
169              rwuser wes
170              # USM configuration entries
171              createUser initial MD5 setup_passphrase DES
172
173       Note:  the  "initial"  user's  setup should be removed after creating a
174       real user that you grant administrative privileges to  (like  the  user
175       "wes" we'll be creating in this example.
176
177       Note: passphrases must be 8 characters minimum in length.
178
179   Create a new user
180       snmpusm  -v3  -u initial -n "" -l authNoPriv -a MD5 -A setup_passphrase
181       localhost create wes initial
182
183              Creates a new user, here named "wes" using the user "initial" to
184              do  it.   "wes"  is  cloned from "initial" in the process, so he
185              inherits that user's passphrase ("setup_passphrase").
186
187   Change the user's passphrase
188       snmpusm -v 3 -u wes -n "" -l  authNoPriv  -a  MD5  -A  setup_passphrase
189       localhost passwd setup_passphrase new_passphrase
190
191              After  creating  the  user "wes" with the same passphrase as the
192              "initial" user, we need to change his passphrase for  him.   The
193              above  command  changes  it  from  "setup_passphrase", which was
194              inherited from the initial user, to "new_passphrase".
195
196   Test the new user
197       snmpget -v 3 -u wes -n "" -l authNoPriv -a MD5 -A new_passphrase local‐
198       host sysUpTime.0
199
200              If  the above commands were successful, this command should have
201              properly performed an authenticated SNMPv3 GET  request  to  the
202              agent.
203
204       Now, go remove the vacm "group" snmpd.conf entry for the "initial" user
205       and you have a valid user 'wes' that you can use  for  future  transac‐
206       tions instead of initial.
207
208

WARNING

210       Manipulating the usmUserTable using this command can only be done using
211       SNMPv3.  This command will not work with the community-based  versions,
212       even if they have write access to the table.
213
214

SEE ALSO

216       snmpd.conf(5), snmp.conf(5), RFC 3414
217
218
219
220V5.8                              11 Dec 2009                       SNMPUSM(1)
Impressum