- creates and modifies SNMP configuration files
snmpconf -g basic_setup
snmpconf [options] [file_to_create]
The snmpconf utility is a simple script that walks you through setting up a configuration file, step-by-step. It works by asking you a series of questions. It creates the configuration file based on your responses.
In its default mode of operation, snmpconf prompts you with menus showing sections of the various configuration files it knows about. When you selects a section, a submenu is shown listing the descriptions of the tokens that can be created in that section. When a description is selected, you are prompted with questions that determine the specification of the selected token.
When you quit snmpconf, any configuration files that have been edited are saved to the local directory. snmpconf supplies comments in the configuration files for each change.
A particularly useful option is the -g switch, which walks you through a specific set of configuration questions. For an example, invoke:
# snmpconf -g basic_setup
This command walks you through an initial setup of the snmpd daemon.
The following options are supported:
Force overwriting existing files in the current directory without prompting the user.
When finished, install the files in the location where the global system commands expect to find them.
When finished, install the files into the user's home directory's .snmp subdirectory. Applications will search for configuration files in this location.
When finished, install the files into the directory directory.
Do not issue queries. Read in the various known configuration files and write them back out again. This has the effect of "auto-commenting" the configuration files for you.
Read in either all or none of the found configuration files. Normally, snmpconf prompts you for which files you wish to read in.
Read in a specific list of configuration files.
Groups of configuration entries can be created that can be used to walk a user through a series of questions to create an initial configuration file. There are no menus to navigate, just a list of questions. The command:
# snmpconf -g basic_setup
provides a good example.
List all the known groups.
snmpconf uses a directory of configuration information to learn about the files and questions that it should be asking. This option tells the utility to use a different location for configuring itself.
Run slightly more quietly than the default. Because this is an interactive program, this option is not recommended. It removes information from the output that might be helpful to you.
Turn on copious debugging output.
Add more (beyond -d) debugging output in the form of Perl variable dumps.
Example 1 Adding Comments to snmpd.conf
The following command reads in an snmpd.conf file and adds comments describing what each token does.
# snmpconf -R /etc/sma/snmp/snmpd.conf -a -f snmpd.conf
A usage syntax error. A usage message displays.
See attributes(5) for descriptions of the following attributes: