Skip to main content

sudoers_user_scoped_line

Function sudoers_user_scoped_line 

Source
pub fn sudoers_user_scoped_line(
    username: &str,
    choice: SudoTimestampChoice,
) -> String
Expand description

What: Build a user-scoped Defaults line alternative for the instructions pane.

Inputs:

  • username: Target login name (typically $USER).
  • choice: Selected cache duration.

Output:

  • Two lines: marker comment plus Defaults:username timestamp_timeout=….

Details:

  • Safer than a global Defaults on shared systems; requires correct username spelling.