'from https://www.microsoft.com/en-us/download/102157 '
'to continue using Windows Administrative Templates.\n')
-class cmd_add_sudoers(Command):
+class cmd_add_sudoers(GPOCommand):
"""Adds a Samba Sudoers Group Policy to the sysvol
This command adds a sudo rule to the sysvol for applying to winbind clients.
get_string(entry.data).strip():
self.outf.write('%s\n' % entry.data)
-class cmd_remove_sudoers(Command):
+class cmd_remove_sudoers(GPOCommand):
"""Removes a Samba Sudoers Group Policy from the sysvol
This command removes a sudo rule from the sysvol from applying to winbind clients.
subcommands["list"] = cmd_list_sudoers()
subcommands["remove"] = cmd_remove_sudoers()
-class cmd_set_security(Command):
+class cmd_set_security(GPOCommand):
"""Set Samba Security Group Policy to the sysvol
This command sets a security setting to the sysvol for applying to winbind
val = lp.get(entry.valuename)
self.outf.write('%s = %s\n' % (entry.valuename, val))
-class cmd_set_smb_conf(Command):
+class cmd_set_smb_conf(GPOCommand):
"""Sets a Samba smb.conf Group Policy to the sysvol
This command sets an smb.conf setting to the sysvol for applying to winbind
target = file_properties.find('target')
self.outf.write('ln -s %s %s\n' % (source.text, target.text))
-class cmd_add_symlink(Command):
+class cmd_add_symlink(GPOCommand):
"""Adds a VGP Symbolic Link Group Policy to the sysvol
This command adds a symlink setting to the sysvol that will be applied to winbind clients.
"not have sufficient privileges")
raise
-class cmd_remove_symlink(Command):
+class cmd_remove_symlink(GPOCommand):
"""Removes a VGP Symbolic Link Group Policy from the sysvol
This command removes a symlink setting from the sysvol from appling to winbind clients.
(stat_from_mode(mode), user, group, target, source)
self.outf.write('%s\n' % p)
-class cmd_add_files(Command):
+class cmd_add_files(GPOCommand):
"""Add VGP Files Group Policy to the sysvol
This command adds files which will be copied from the sysvol and applied to winbind clients.
"not have sufficient privileges")
raise
-class cmd_remove_files(Command):
+class cmd_remove_files(GPOCommand):
"""Remove VGP Files Group Policy from the sysvol
This command removes files which would be copied from the sysvol and applied to winbind clients.
self.outf.write('%s %s\n' % (kv.find('key').text,
kv.find('value').text))
-class cmd_set_openssh(Command):
+class cmd_set_openssh(GPOCommand):
"""Sets a VGP OpenSSH Group Policy to the sysvol
This command sets an openssh setting to the sysvol for applying to winbind
self.outf.write('@reboot %s %s %s\n' % (run_as, script_path,
parameters))
-class cmd_add_startup(Command):
+class cmd_add_startup(GPOCommand):
"""Adds VGP Startup Script Group Policy to the sysvol
This command adds a startup script policy to the sysvol.
"not have sufficient privileges")
raise
-class cmd_remove_startup(Command):
+class cmd_remove_startup(GPOCommand):
"""Removes VGP Startup Script Group Policy from the sysvol
This command removes a startup script policy from the sysvol.
text = data.find('text')
self.outf.write(text.text)
-class cmd_set_motd(Command):
+class cmd_set_motd(GPOCommand):
"""Sets a VGP MOTD Group Policy to the sysvol
This command sets the Message of the Day to the sysvol for applying to winbind
text = data.find('text')
self.outf.write(text.text)
-class cmd_set_issue(Command):
+class cmd_set_issue(GPOCommand):
"""Sets a VGP Issue Group Policy to the sysvol
This command sets the Prelogin Message to the sysvol for applying to winbind
domain = adobject.find('domain')
self.outf.write('-:%s\\%s:ALL\n' % (domain.text, name.text))
-class cmd_add_access(Command):
+class cmd_add_access(GPOCommand):
"""Adds a VGP Host Access Group Policy to the sysvol
This command adds a host access setting to the sysvol for applying to winbind
"not have sufficient privileges")
raise
-class cmd_remove_access(Command):
+class cmd_remove_access(GPOCommand):
"""Remove a VGP Host Access Group Policy from the sysvol
This command removes a host access setting from the sysvol for applying to