To change the administrator username and password on SonicWall over Graphical User Interface (GUI) is How can I change the administrator password?.
The requirement is to change the username and/or password of the admin (superuser) over the command-line interface. This article assumes:
If you would like to enable web-management (HTTP or HTTPS access of SonicWall over browser) from CLI: How can I configure web-management using CLI?
One of the popular programs to use to access the SonicWall SSH shell is PuTTY. It is either SSH over a terminal application or Console port connection with the following properties and then use a terminal application.
NOTE: On Factory default settings, the default username is admin and the password is password
The commands are the same for Gen7and Gen6 SonicWall firewalls.
Using username 'admin'.Password: admin@C0EAE45----> configconfig(C0EAE45----)# admin(config-administration)# admin name NewAdmin(config-administration)# admin password old-password "password" new-password "Pa$$word123" confirm-password "Pa$$word123"% Processing request...% Status returned processing command: admin password old-password "password" new-password "Pa$$word123" confirm-password "Pa$$word123"% Changes made.(config-administration)# commit% Applying changes...% Status returned processing command: commit% Changes made.
With the above commands, the admin name is changed to NewAdmin and the password is changed to Pa$$word123
CAUTION: The changes are applied immediately, so please be sure to note down the new values.