Generate /etc/sudoers.d/pacs instead of (whole) /etc/sudoers

(configuration).
This commit is contained in:
Michael Hierweck 2014-08-28 12:19:08 +02:00
parent d61f6bf9e5
commit 1f3c4ca0f0
3 changed files with 9 additions and 28 deletions

View File

@ -126,7 +126,7 @@ public class PacProcessorFactory implements EntityProcessorFactory {
}
private Processor createSudouersProc(Hive hive) throws ProcessorException {
return new VelocityProcessor("/de/hsadmin/mods/pac/sudoers.vm", hive, "/etc/sudoers", true);
return new VelocityProcessor("/de/hsadmin/mods/pac/sudoers-pacs.vm", hive, "/etc/sudoers.d/pacs", true);
}
private Processor createProftpdConfProc(Hive hive) throws ProcessorException {

View File

@ -0,0 +1,8 @@
#
# This file is managed by HSAdmin.
# Do not edit manually. Changes will be overwritten.
#
#foreach( $pac in ${hive.pacs} )
${pac.name} ALL = (%${pac.name}) NOPASSWD: ALL
#end

View File

@ -1,27 +0,0 @@
#
# This file is managed by HSAdmin.
# Do not edit manually. Changes will be overwritten.
#
# Host alias specification
# User alias specification
# Cmnd alias specification
# Override built in defaults
Defaults ignore_dot # "." bzw. "" im PATH ignorieren
Defaults always_set_home # HOME entsprechend des Zielusers aendern
Defaults env_reset # Environmentvariablen filtern
Defaults listpw=all # siehe sudoers(5)
# User privilege specification
root ALL=(ALL) ALL
%adm ALL=NOPASSWD: ALL
####################################################
#foreach( $pac in ${hive.pacs} )
${pac.name} ALL = (%${pac.name}) NOPASSWD: ALL
#end