I was reading through the sudoers policy manual. Under 'User specification' section, I saw
Date_Spec as part of the
Option_Spec, in turn an optional part of the
User_Spec ::= User_List Host_List '=' Cmnd_Spec_List \ (':' Host_List '=' Cmnd_Spec_List)* Cmnd_Spec_List ::= Cmnd_Spec | Cmnd_Spec ',' Cmnd_Spec_List Cmnd_Spec ::= Runas_Spec? Option_Spec* Tag_Spec* Cmnd Runas_Spec ::= '(' Runas_List? (':' Runas_List)? ')' Option_Spec ::= (Date_Spec | Timeout_Spec) Date_Spec ::= ('NOTBEFORE=timestamp' | 'NOTAFTER=timestamp') Timeout_Spec ::= 'TIMEOUT=timeout'
What does this do? From my reading, it looks like something I can use to restrict the time span within which a user can run a command. Is that correct? If so, what are the possible use cases for such a feature?
man 5 sudoers