Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
Documentation
enabledFor :: User -> RevertableProperty DebianLike DebianLike Source #
Allows a user to run any command with sudo. If the user has a password, sudo is configured to require it. If not, NOPASSWORD is enabled for the user.
Writes to the file etcsudoers.d/000users rather than the main sudoers file. This file should come before other include files that may eg, allow running more specific commands without a password, since sudo uses the last matching configuration line.
If the main sudoers file contains a conflicting line for the user for ALL commands, the line will be removed.
Also ensures that the main sudoers file includes etcsudoers.d/
sudoersDFile :: FilePath -> [Line] -> RevertableProperty DebianLike Linux Source #
Sets up a file in etcsudoers.d, which etc/sudoers includes, with the specified content.
The FilePath can be relative to that directory.