Description

An error stating " Missing mandatory statement: 'class' " is observed while trying to configure a new user. 

Symptoms

{master:0}[edit system login user USER1]

root# commit

[edit system login]

  'user USER1’

    Missing mandatory statement: 'class'

error: configuration check-out failed: (missing mandatory statements)

 

Solution

The error message "Missing mandatory statement: 'class'" is observed while trying to create a new user.  All users who can log in to a device running Junos OS must be in a login class. Junos OS includes predefined login classes, which are listed below.
 

                Login class              Permission flag set
   Operator   clear, network, reset, trace, and view
   read-only   view
   superuser or super-user   all
   unauthorized   None



After assigning login class to the user, the commit is successful. 
 

[edit system login user USER1]

root# set class super-user
root# commit


 

Modification History

2024-08-13 : Article Created