Test_sudoers | |
Augeas Tests | |
test_user | |
Sudoers.spec | Spec users can be aliases |
Sudoers.spec | Ticket #337: allow period in user names |
Sudoers.spec | Ticket #370: allow underscore in group names |
Sudoers.spec | Ticket #376: allow uppercase characters in user names |
Sudoers.spec | allow + in user-/groupnames |
test test_user get "root @pbuilder +secre-taries @my\ admin\ group EXAMPLE\\\\cslack MY\ EX-AMPLE\ 9\\\\cslack\ group " = { "user" = "root" } { "user" = "@pbuilder" } { "user" = "+secre-taries" } { "user" = "@my\\ admin\\ group" } { "user" = "EXAMPLE\\\\cslack" } { "user" = "MY\\ EX-AMPLE\\ 9\\\\cslack\\ group" } let conf = " Host_Alias LOCALNET = 192.168.0.0/24, localhost # User alias specification User_Alias EXAMPLE_ADMINS = cslack, EXAMPLE\\\\cslack,\ EXAMPLE\\\\jmalstrom # Cmnd alias specification Cmnd_Alias \ DEBIAN_TOOLS \ = \ /usr/bin/apt-get,\ /usr/bin/auto-get, \ /usr/bin/dpkg, /usr/bin/dselect, /usr/sbin/dpkg-reconfigure \ : PBUILDER = /usr/sbin/pbuilder Cmnd_Alias ICAL = /bin/cat /home/rpinson/.kde/share/apps/korganizer/std.ics Defaults@LOCALNET !lecture, \ \t\t tty_tickets,!fqdn, !!env_reset Defaults !visiblepw Defaults:buildd env_keep+=\"APT_CONFIG DEBIAN_FRONTEND SHELL\" Defaults!PBUILDER env_keep+=\"HOME ARCH DIST DISTRIBUTION PDEBUILD_PBUILDER\" # User privilege specification root ALL=(ALL) ALL root ALL=(: ALL) ALL root ALL=(ALL :ALL) ALL # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL, NOPASSWD : NOSETENV: \ DEBIAN_TOOLS %pbuilder LOCALNET = NOPASSWD: PBUILDER www-data +biglab=(rpinson)NOEXEC: ICAL \ : \ localhost = NOPASSWD: /usr/bin/
test test_user get "root @pbuilder +secre-taries @my\ admin\ group EXAMPLE\\\\cslack MY\ EX-AMPLE\ 9\\\\cslack\ group " = { "user" = "root" } { "user" = "@pbuilder" } { "user" = "+secre-taries" } { "user" = "@my\\ admin\\ group" } { "user" = "EXAMPLE\\\\cslack" } { "user" = "MY\\ EX-AMPLE\\ 9\\\\cslack\\ group" } let conf = " Host_Alias LOCALNET = 192.168.0.0/24, localhost # User alias specification User_Alias EXAMPLE_ADMINS = cslack, EXAMPLE\\\\cslack,\ EXAMPLE\\\\jmalstrom # Cmnd alias specification Cmnd_Alias \ DEBIAN_TOOLS \ = \ /usr/bin/apt-get,\ /usr/bin/auto-get, \ /usr/bin/dpkg, /usr/bin/dselect, /usr/sbin/dpkg-reconfigure \ : PBUILDER = /usr/sbin/pbuilder Cmnd_Alias ICAL = /bin/cat /home/rpinson/.kde/share/apps/korganizer/std.ics Defaults@LOCALNET !lecture, \ \t\t tty_tickets,!fqdn, !!env_reset Defaults !visiblepw Defaults:buildd env_keep+=\"APT_CONFIG DEBIAN_FRONTEND SHELL\" Defaults!PBUILDER env_keep+=\"HOME ARCH DIST DISTRIBUTION PDEBUILD_PBUILDER\" # User privilege specification root ALL=(ALL) ALL root ALL=(: ALL) ALL root ALL=(ALL :ALL) ALL # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL, NOPASSWD : NOSETENV: \ DEBIAN_TOOLS %pbuilder LOCALNET = NOPASSWD: PBUILDER www-data +biglab=(rpinson)NOEXEC: ICAL \ : \ localhost = NOPASSWD: /usr/bin/
Spec users can be aliases
test Sudoers.spec get "APACHE_ADMIN ALL= ALL\n" = { "spec" { "user" = "APACHE_ADMIN" } { "host_group" { "host" = "ALL" } { "command" = "ALL" } } }