Home >

LunaSH Command Reference Guide > LunaSH Commands > sysconf > sysconf config factoryreset

sysconf config factoryreset

Reset the appliance to the settings applied at the factory. This is the same action as running the sysconf config restore command on the 'factoryInit_local_host..." file. You can specify any individual service's configuration, or just reset all of them to the initial factory settings with the '-all' option. This reset is for the configurations of the indicated services and does not affect the HSM.

This command affects appliance settings external to the HSM. To reset the HSM, use hsm factoryReset (which can be run from a local serial console only).

CAUTION!  

This command (sysconf config factoryreset) sets the appliance configuration back to the state at manufacturing, which might be several release versions earlier than the current state, and which did not include any upgrades that you might have applied on top of the original factory configuration. This command is often used in conjunction with hsm factoryreset.

For example, if you enabled and configured STC since receiving your Network HSM appliance from Gemalto, then, not only is the feature disabled, but the STCD section is removed from the Chrystoki.conf or Crystoki.ini file, and STC will no longer work after factoryReset.

When factoryReset is run, SNMP service stops.

What to do

To preserve desired settings and capabilities, we recommend that you perform sysconf config backup on your system whenever you upgrade or update or reconfigure, so as to have a backup with all desired configurations in place, and then use sysconf config restore if needed, reserving sysconf config factoryreset for only those occasions when you want the appliance set all the way back to original factory specification.

Note:  Use this command along with the hsm factoryreset command, if you want internal HSM settings returned to factory default values.

Note:  Use this command from a locally-connected serial terminal, as this command removes network settings and you will need to re-establish IP before you can resume network connection.  

Note:  To reset the configuration for the NTLS service, you must first stop this service (service stop ntls).

Syntax

sysconf config factoryReset -service <service> [-force]

Parameter Shortcut      Description         
-force     -fo Force the action without prompting.
-service  -s

Specifies the service name.

Valid values: network, ssh, NTLS, syslog, ntp, snmp, users, system,webserver, all

Example

lunash:> [local_host] lunash:>sysconf config list

Configuration backup files in file system:

Size    |  File Name                                     |  Description
---------------------------------------------------------------------------
8075    |  factoryInit_local_host_Config.tar.gz          |  Initial Factory Settings

Command Result : 0 (Success)
[local_host] lunash:>sysconf config factoryReset -service all

This command restores the initial factory configuration of service: all.
The HSM and Partition configurations are NOT included.

This command restores the previous configurations from the backup file: factoryInit_local_host_Config.tar.gz

WARNING !!  This command restores the configuration backup file: factoryInit_local_host_Config.tar.gz.
It first creates a backup of the current configuration before restoring: factoryInit_local_host_Config.tar.gz.
If you are sure that you wish to proceed, then type 'proceed', otherwise type 'quit'.

> proceed
Proceeding...

Created configuration backup file: local_host_Config_20150925_1110.tar.gz

Restore the ntls configuration: Succeeded.

Restore the network configuration: Succeeded.

Restore the syslog configuration: Succeeded.

Force option used. Proceed prompt bypassed.
All key and certificates files were deleted.
You must restart NTP for the changes to take effect.
Check NTP status after restarting it to make sure that the client is able to start and sync with the server.

Restore the ntp configuration: Succeeded.

Restore the snmp configuration: Succeeded.

Restore the ssh configuration: Succeeded.

Restore the users configuration: Succeeded.

Restore the system configuration: Succeeded.

You must either reboot the appliance or restart the service(s) for the changes to take effect.
Please check the new configurations BEFORE rebooting or restarting the services.
You can restore the previous configurations if the new settings are not acceptable.


Command Result : 0 (Success

 

Note:  Sometimes individual items can show in the output as having failed to reset, but the overall command succeeds. This is not an error.

It occurs simply because some of the configuration items might already be at factory default settings and had never been configured. For example, not everybody configures NTP or SNMP. Therefore, no file of configuration settings for the particular service was ever created, and there was nothing for the sysconf config factoryReset command to do in those cases. This sometimes happens in integration laboratory environments.