16Use undo command accounting to restore the default.Syntaxcommand accountingundo command accountingDefaultCommand accounting is disabled, and the accounting server does not record executed commands.ViewsUser line view, user line class viewPredefined user rolesnetwork-adminUsage guidelinesWhen command accounting is enabled but command authorization is not, every executed commandis recorded on the HWTACACS server.When both command accounting and command authorization are enabled, only authorizedcommands that are executed are recorded on the HWTACACS server.Invalid commands issued by users are not recorded.If the command accounting command is configured in user line class view, command accounting isenabled on all user lines in the class. You cannot configure the undo command accountingcommand in the view of a user line in the class.Examples# Enable command accounting for user line VTY 0. system-view[Sysname] line vty 0[Sysname-line-vty0] command accountingRelated commands• accounting command (Security Command Reference)• command authorizationcommand authorizationUse command authorization to enable command authorization.Use undo command authorization to restore the default.Syntaxcommand authorizationundo command authorizationDefaultCommand authorization is disabled. Logged-in users can execute commands without authorization.ViewsUser line view, user line class viewPredefined user rolesnetwork-admin