A shutdown-lock is enabled during a save configuration operation to prevent other users from reloading or
shutting down the system while the configuration is being saved.
Config mode locking mechanisms such as shared-lock, exclusive-lock and shutdown-lock mitigate the
possibility of conflicting commands, file corruption and reboot issues.
Requesting an Exclusive-Lock
To avoid complications resulting from the failure of an administrator holding an exclusive lock to exit
config mode, it is a best practice to configure all administrator accounts with CLI session absolute timeouts
and/or idle timeouts. For additional information on setting these timeouts, see the
Using the CLI for Initial
Configuration
section of the
Getting Started
chapter in this guide.
Important
You can request an exclusive-lock on config mode by executing the Exec mode
configure lock
command.
[local]
host_name
#
configure [ <url> ] lock [ force | warn ]
If you specify a URL, the exclusive lock is associated with the pre-loaded configuration file. If you do not
specify a URL, the exclusive lock is granted for the running configuration. For additional information see
Effect of Config Lock on URL Scripts, on page 53
.
The
force
option forces all other administrators to exit out of configuration mode, including anyone currently
holding the exclusive-lock.
The
warn
option warns all other administrators to exit out of configuration mode. This administrator will be
taking the exclusive-lock soon. You may want to use this option before actually forcing administrators out of
configuration mode,
If there are no other administrators in config mode, entering
configure lock
immediately grants you an
exclusive-lock.
[local]
host_name
#
configure lock
Info: No one else can access config mode while you have the exclusive lock
[local]
host_name
#
When the exclusive lock is granted, no other administrators are allowed to enter into config mode or load a
config file. Any other administrators attempting to enter into config mode or load a config file will see the
following message:
Failure: User <username> has the exclusive lock
- please enter 'show administrators' for more information
If another administrator attempts to enter config mode with the exclusive-lock when it is already enabled, the
following message appears:
Failure: Another administrator is still in configuration mode
- please enter 'show administrators' for more information
If you do not obtain an exclusive lock initially, you can use
configure lock force
.
If
configure lock force
is successful, all users who have been forced to exit to Exec mode will see a warning
message indicating that they were forced to exit from config mode:
[local]
host_name
(config)#
Warning: Administrator <username> has forced you to exit from configuration mode
[local]
host_name
#
ASR 5500 System Administration Guide, StarOS Release 21.5
52
Config Mode Lock Mechanisms
Requesting an Exclusive-Lock