From b999d48941e86111589b38c1909d38a44319d0f0 Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Wed, 17 Sep 2014 14:42:55 -0500 Subject: [PATCH] Add tests from the old svn tree We're losing the svn history (which we could probably keep if we tried hard enough) but don't consider that worthwhile. Note these tests are destructive, so run them only in a throwaway environment like a chroot, container, or vm. The tests/run.all script should be the one which launches all the tests. Signed-off-by: Serge Hallyn --- tests/README | 21 + tests/bug332198-test.exp | 61 + tests/bug334803-test.exp | 83 ++ tests/chage/01/data/chage1 | 7 + tests/chage/01/data/chage2 | 7 + tests/chage/01/data/chage3 | 7 + tests/chage/01/data/chage4 | 7 + tests/chage/01/data/chage5 | 7 + tests/chage/01/data/chage6 | 7 + tests/chage/01/data/chage7 | 7 + tests/chage/01/data/chage7b | 7 + tests/chage/01/data/chage8 | 1 + tests/chage/01/data/group | 42 + tests/chage/01/data/gshadow | 42 + tests/chage/01/data/passwd | 26 + tests/chage/01/data/shadow | 26 + tests/chage/01/data/usage | 16 + tests/chage/01/run | 206 +++ tests/chage/01/run1.exp | 31 + tests/chage/01/run2.exp | 31 + tests/chage/02/data/group | 42 + tests/chage/02/data/gshadow | 42 + tests/chage/02/data/passwd | 20 + tests/chage/02/data/shadow | 20 + tests/chage/02/run | 50 + tests/chage/02/run.exp | 83 ++ tests/chage/03_chsh_usage/chage.test | 48 + tests/chage/03_chsh_usage/config.txt | 0 tests/chage/03_chsh_usage/config/etc/group | 42 + tests/chage/03_chsh_usage/config/etc/gshadow | 42 + tests/chage/03_chsh_usage/config/etc/passwd | 26 + tests/chage/03_chsh_usage/config/etc/shadow | 26 + tests/chage/03_chsh_usage/data/usage.out | 16 + .../04_chsh_usage_invalid_option/chage.test | 54 + .../04_chsh_usage_invalid_option/config.txt | 0 .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 26 + .../config/etc/shadow | 26 + .../data/usage.out | 17 + tests/chage/05_chsh_usage_2_users/chage.test | 54 + tests/chage/05_chsh_usage_2_users/config.txt | 0 .../05_chsh_usage_2_users/config/etc/group | 42 + .../05_chsh_usage_2_users/config/etc/gshadow | 42 + .../05_chsh_usage_2_users/config/etc/passwd | 26 + .../05_chsh_usage_2_users/config/etc/shadow | 26 + .../05_chsh_usage_2_users/data/usage.out | 16 + tests/chage/06_chsh_usage_no_users/chage.test | 54 + tests/chage/06_chsh_usage_no_users/config.txt | 0 .../06_chsh_usage_no_users/config/etc/group | 42 + .../06_chsh_usage_no_users/config/etc/gshadow | 42 + .../06_chsh_usage_no_users/config/etc/passwd | 26 + .../06_chsh_usage_no_users/config/etc/shadow | 26 + .../06_chsh_usage_no_users/data/usage.out | 16 + .../07_chsh_usage-l_exclusive/chage.test | 57 + .../07_chsh_usage-l_exclusive/config.txt | 0 .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 26 + .../config/etc/shadow | 26 + .../07_chsh_usage-l_exclusive/data/usage.out | 17 + .../08_chsh_usage_invalid_date/chage.test | 59 + .../08_chsh_usage_invalid_date/config.txt | 0 .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 26 + .../config/etc/shadow | 26 + .../08_chsh_usage_invalid_date/data/usage.out | 17 + .../chage.test | 59 + .../config.txt | 0 .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 26 + .../config/etc/shadow | 26 + .../data/usage.out | 17 + tests/chage/10_chsh-l/chage.test | 51 + tests/chage/10_chsh-l/config.txt | 0 tests/chage/10_chsh-l/config/etc/group | 42 + tests/chage/10_chsh-l/config/etc/gshadow | 42 + tests/chage/10_chsh-l/config/etc/passwd | 32 + tests/chage/10_chsh-l/config/etc/shadow | 30 + tests/chage/10_chsh-l/data/myuser1 | 7 + tests/chage/10_chsh-l/data/myuser10 | 7 + tests/chage/10_chsh-l/data/myuser11 | 7 + tests/chage/10_chsh-l/data/myuser2 | 7 + tests/chage/10_chsh-l/data/myuser3 | 7 + tests/chage/10_chsh-l/data/myuser4 | 7 + tests/chage/10_chsh-l/data/myuser5 | 7 + tests/chage/10_chsh-l/data/myuser6 | 7 + tests/chage/10_chsh-l/data/myuser7 | 7 + tests/chage/10_chsh-l/data/myuser8 | 7 + tests/chage/10_chsh-l/data/myuser9 | 7 + .../11_chsh_usage_invalid_user/chage.test | 54 + .../11_chsh_usage_invalid_user/config.txt | 0 .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 26 + .../config/etc/shadow | 26 + .../11_chsh_usage_invalid_user/data/usage.out | 1 + .../12_chsh_usage-l_invalid_user2/chage.test | 54 + .../12_chsh_usage-l_invalid_user2/config.txt | 0 .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 26 + .../config/etc/shadow | 26 + .../data/usage.out | 1 + tests/chage/13_chsh_locked_passwd/chage.test | 59 + tests/chage/13_chsh_locked_passwd/config.txt | 0 .../13_chsh_locked_passwd/config/etc/group | 42 + .../13_chsh_locked_passwd/config/etc/gshadow | 42 + .../13_chsh_locked_passwd/config/etc/passwd | 26 + .../13_chsh_locked_passwd/config/etc/shadow | 26 + .../13_chsh_locked_passwd/data/usage.out | 2 + tests/chage/14_chsh_locked_shadow/chage.test | 59 + tests/chage/14_chsh_locked_shadow/config.txt | 0 .../14_chsh_locked_shadow/config/etc/group | 42 + .../14_chsh_locked_shadow/config/etc/gshadow | 42 + .../14_chsh_locked_shadow/config/etc/passwd | 26 + .../14_chsh_locked_shadow/config/etc/shadow | 26 + .../14_chsh_locked_shadow/data/usage.out | 2 + .../15_chage-I_no_shadow_entry/chage.test | 39 + .../15_chage-I_no_shadow_entry/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../15_chage-I_no_shadow_entry/data/passwd | 20 + .../15_chage-I_no_shadow_entry/data/shadow | 20 + .../16_chage-m_no_shadow_entry/chage.test | 39 + .../16_chage-m_no_shadow_entry/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../16_chage-m_no_shadow_entry/data/passwd | 20 + .../16_chage-m_no_shadow_entry/data/shadow | 20 + .../17_chage-M_no_shadow_entry/chage.test | 39 + .../17_chage-M_no_shadow_entry/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../17_chage-M_no_shadow_entry/data/passwd | 20 + .../17_chage-M_no_shadow_entry/data/shadow | 20 + .../18_chage-d_no_shadow_entry/chage.test | 39 + .../18_chage-d_no_shadow_entry/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../18_chage-d_no_shadow_entry/data/passwd | 20 + .../18_chage-d_no_shadow_entry/data/shadow | 20 + .../19_chage-W_no_shadow_entry/chage.test | 39 + .../19_chage-W_no_shadow_entry/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../19_chage-W_no_shadow_entry/data/passwd | 20 + .../19_chage-W_no_shadow_entry/data/shadow | 20 + .../20_chage-E_no_shadow_entry/chage.test | 39 + .../20_chage-E_no_shadow_entry/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../20_chage-E_no_shadow_entry/data/passwd | 20 + .../20_chage-E_no_shadow_entry/data/shadow | 20 + .../chage/21_chage_no_shadow_file/chage.test | 58 + .../chage/21_chage_no_shadow_file/config.txt | 0 .../21_chage_no_shadow_file/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../21_chage_no_shadow_file/config/etc/passwd | 26 + .../21_chage_no_shadow_file/config/etc/shadow | 26 + .../21_chage_no_shadow_file/data/usage.out | 1 + tests/chage/22_chage_myuser-l/chage.test | 51 + tests/chage/22_chage_myuser-l/config.txt | 0 .../chage/22_chage_myuser-l/config/etc/group | 42 + .../22_chage_myuser-l/config/etc/gshadow | 42 + .../chage/22_chage_myuser-l/config/etc/passwd | 32 + .../chage/22_chage_myuser-l/config/etc/shadow | 30 + tests/chage/22_chage_myuser-l/data/myuser1 | 7 + tests/chage/23_chage_myuser-I/chage.test | 54 + tests/chage/23_chage_myuser-I/config.txt | 0 .../chage/23_chage_myuser-I/config/etc/group | 42 + .../23_chage_myuser-I/config/etc/gshadow | 42 + .../chage/23_chage_myuser-I/config/etc/passwd | 26 + .../chage/23_chage_myuser-I/config/etc/shadow | 26 + tests/chage/23_chage_myuser-I/data/usage.out | 1 + .../chage/24_chage_myuser-l_other/chage.test | 54 + .../chage/24_chage_myuser-l_other/config.txt | 0 .../24_chage_myuser-l_other/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../24_chage_myuser-l_other/config/etc/passwd | 26 + .../24_chage_myuser-l_other/config/etc/shadow | 26 + .../24_chage_myuser-l_other/data/usage.out | 1 + tests/chage/25_chage_interractive/chage.test | 39 + tests/chage/25_chage_interractive/config.txt | 1 + .../25_chage_interractive/config/etc/group | 42 + .../25_chage_interractive/config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../25_chage_interractive/config/etc/passwd | 26 + .../25_chage_interractive/config/etc/shadow | 26 + tests/chage/25_chage_interractive/data/shadow | 26 + tests/chage/25_chage_interractive/run.exp | 31 + .../26_chage_interractive_date_0/chage.test | 39 + .../26_chage_interractive_date_0/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 26 + .../config/etc/shadow | 26 + .../26_chage_interractive_date_0/data/shadow | 26 + .../26_chage_interractive_date_0/run.exp | 31 + .../27_chage_interractive_date_-1/chage.test | 39 + .../27_chage_interractive_date_-1/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 26 + .../config/etc/shadow | 26 + .../27_chage_interractive_date_-1/data/shadow | 26 + .../27_chage_interractive_date_-1/run.exp | 31 + .../chage.test | 39 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 26 + .../config/etc/shadow | 26 + .../data/shadow | 26 + .../28_chage_interractive_date_EPOCH/run.exp | 31 + .../chage.test | 39 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 26 + .../config/etc/shadow | 26 + .../run.exp | 26 + .../chage.test | 39 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 26 + .../config/etc/shadow | 26 + .../run.exp | 32 + .../chage.test | 39 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 26 + .../config/etc/shadow | 26 + .../run.exp | 26 + .../chage.test | 39 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 26 + .../config/etc/shadow | 26 + .../run.exp | 26 + .../chage.test | 39 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 26 + .../config/etc/shadow | 26 + .../33_chage_interractive-W_invalid1/run.exp | 32 + .../chage.test | 39 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 26 + .../config/etc/shadow | 26 + .../34_chage_interractive-W_invalid2/run.exp | 32 + .../35_chage_interractive-W-1/chage.test | 39 + .../35_chage_interractive-W-1/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 26 + .../config/etc/shadow | 26 + .../35_chage_interractive-W-1/data/shadow | 26 + tests/chage/35_chage_interractive-W-1/run.exp | 31 + .../chage.test | 39 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 26 + .../config/etc/shadow | 26 + .../36_chage_interractive-I_invalid1/run.exp | 32 + .../chage.test | 39 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 26 + .../config/etc/shadow | 26 + .../37_chage_interractive-I_invalid2/run.exp | 32 + .../38_chage_interractive-I-1/chage.test | 39 + .../38_chage_interractive-I-1/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 26 + .../config/etc/shadow | 26 + .../38_chage_interractive-I-1/data/shadow | 26 + tests/chage/38_chage_interractive-I-1/run.exp | 31 + .../39_chage_interractive-d-1/chage.test | 39 + .../39_chage_interractive-d-1/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 26 + .../config/etc/shadow | 26 + .../39_chage_interractive-d-1/data/shadow | 26 + tests/chage/39_chage_interractive-d-1/run.exp | 31 + tests/chroot/chage/01_chage--root/chage.test | 52 + tests/chroot/chage/01_chage--root/config.txt | 10 + .../01_chage--root/config/etc/default/useradd | 36 + .../chage/01_chage--root/config/etc/group | 41 + .../chage/01_chage--root/config/etc/gshadow | 41 + .../chage/01_chage--root/config/etc/passwd | 19 + .../chage/01_chage--root/config/etc/shadow | 19 + .../01_chage--root/config_chroot/etc/group | 42 + .../01_chage--root/config_chroot/etc/gshadow | 42 + .../config_chroot/etc/login.defs | 335 +++++ .../01_chage--root/config_chroot/etc/passwd | 21 + .../01_chage--root/config_chroot/etc/shadow | 20 + tests/chroot/chage/01_chage--root/data/shadow | 20 + .../01_chgpasswd--root/chgpasswd.test | 50 + .../chgpasswd/01_chgpasswd--root/config.txt | 10 + .../config/etc/default/useradd | 36 + .../01_chgpasswd--root/config/etc/group | 41 + .../01_chgpasswd--root/config/etc/gshadow | 41 + .../01_chgpasswd--root/config/etc/passwd | 19 + .../01_chgpasswd--root/config/etc/shadow | 19 + .../config_chroot/etc/group | 42 + .../config_chroot/etc/gshadow | 42 + .../config_chroot/etc/login.defs | 335 +++++ .../config_chroot/etc/passwd | 21 + .../config_chroot/etc/shadow | 20 + .../chgpasswd/01_chgpasswd--root/data/gshadow | 42 + .../01_chpasswd--root_nopam/chpasswd.test | 50 + .../01_chpasswd--root_nopam/config.txt | 10 + .../config/etc/default/useradd | 36 + .../01_chpasswd--root_nopam/config/etc/group | 41 + .../config/etc/gshadow | 41 + .../01_chpasswd--root_nopam/config/etc/passwd | 19 + .../01_chpasswd--root_nopam/config/etc/shadow | 19 + .../config_chroot/etc/group | 42 + .../config_chroot/etc/gshadow | 42 + .../config_chroot/etc/login.defs | 335 +++++ .../config_chroot/etc/passwd | 21 + .../config_chroot/etc/shadow | 20 + .../01_chpasswd--root_nopam/data/shadow | 20 + .../02_chpasswd--root_pam/chpasswd.test | 50 + .../chpasswd/02_chpasswd--root_pam/config.txt | 10 + .../config/etc/default/useradd | 36 + .../02_chpasswd--root_pam/config/etc/group | 41 + .../02_chpasswd--root_pam/config/etc/gshadow | 41 + .../02_chpasswd--root_pam/config/etc/passwd | 19 + .../02_chpasswd--root_pam/config/etc/shadow | 19 + .../config_chroot/etc/group | 42 + .../config_chroot/etc/gshadow | 42 + .../config_chroot/etc/login.defs | 335 +++++ .../config_chroot/etc/pam.d/chpasswd | 5 + .../config_chroot/etc/pam.d/common-password | 33 + .../config_chroot/etc/passwd | 21 + .../config_chroot/etc/shadow | 20 + .../02_chpasswd--root_pam/data/shadow | 20 + tests/chroot/chsh/01_chsh--root/chsh.test | 52 + tests/chroot/chsh/01_chsh--root/config.txt | 10 + .../01_chsh--root/config/etc/default/useradd | 36 + .../chsh/01_chsh--root/config/etc/group | 41 + .../chsh/01_chsh--root/config/etc/gshadow | 41 + .../chsh/01_chsh--root/config/etc/passwd | 19 + .../chsh/01_chsh--root/config/etc/shadow | 19 + .../chsh/01_chsh--root/config_chroot.list | 1 + .../01_chsh--root/config_chroot/etc/group | 42 + .../01_chsh--root/config_chroot/etc/gshadow | 42 + .../config_chroot/etc/login.defs | 335 +++++ .../config_chroot/etc/pam.d/chsh | 20 + .../config_chroot/etc/pam.d/common-account | 25 + .../config_chroot/etc/pam.d/common-auth | 25 + .../config_chroot/etc/pam.d/common-session | 25 + .../01_chsh--root/config_chroot/etc/passwd | 21 + .../01_chsh--root/config_chroot/etc/shadow | 20 + .../01_chsh--root/config_chroot/etc/shells | 3 + tests/chroot/chsh/01_chsh--root/data/passwd | 21 + .../gpasswd/01_gpasswd--root/config.txt | 10 + .../config/etc/default/useradd | 36 + .../gpasswd/01_gpasswd--root/config/etc/group | 41 + .../01_gpasswd--root/config/etc/gshadow | 41 + .../01_gpasswd--root/config/etc/passwd | 19 + .../01_gpasswd--root/config/etc/shadow | 19 + .../01_gpasswd--root/config_chroot/etc/group | 42 + .../config_chroot/etc/gshadow | 42 + .../config_chroot/etc/login.defs | 335 +++++ .../01_gpasswd--root/config_chroot/etc/passwd | 21 + .../01_gpasswd--root/config_chroot/etc/shadow | 20 + .../gpasswd/01_gpasswd--root/data/group | 42 + .../gpasswd/01_gpasswd--root/data/gshadow | 42 + .../gpasswd/01_gpasswd--root/gpasswd.test | 52 + .../groupadd/01_groupadd--root/config.txt | 10 + .../config/etc/default/useradd | 36 + .../01_groupadd--root/config/etc/group | 41 + .../01_groupadd--root/config/etc/gshadow | 41 + .../01_groupadd--root/config/etc/passwd | 19 + .../01_groupadd--root/config/etc/shadow | 19 + .../01_groupadd--root/config_chroot/etc/group | 42 + .../config_chroot/etc/gshadow | 42 + .../config_chroot/etc/login.defs | 335 +++++ .../config_chroot/etc/passwd | 21 + .../config_chroot/etc/shadow | 20 + .../groupadd/01_groupadd--root/data/group | 43 + .../groupadd/01_groupadd--root/data/gshadow | 43 + .../groupadd/01_groupadd--root/groupadd.test | 52 + .../groupdel/01_groupdel--root/config.txt | 10 + .../config/etc/default/useradd | 36 + .../01_groupdel--root/config/etc/group | 41 + .../01_groupdel--root/config/etc/gshadow | 41 + .../01_groupdel--root/config/etc/passwd | 19 + .../01_groupdel--root/config/etc/shadow | 19 + .../01_groupdel--root/config_chroot/etc/group | 42 + .../config_chroot/etc/gshadow | 42 + .../config_chroot/etc/login.defs | 335 +++++ .../config_chroot/etc/passwd | 21 + .../config_chroot/etc/shadow | 20 + .../groupdel/01_groupdel--root/data/group | 41 + .../groupdel/01_groupdel--root/data/gshadow | 41 + .../groupdel/01_groupdel--root/groupdel.test | 52 + .../groupmod/01_groupmod--root/config.txt | 10 + .../config/etc/default/useradd | 36 + .../01_groupmod--root/config/etc/group | 41 + .../01_groupmod--root/config/etc/gshadow | 41 + .../01_groupmod--root/config/etc/passwd | 19 + .../01_groupmod--root/config/etc/shadow | 19 + .../01_groupmod--root/config_chroot/etc/group | 42 + .../config_chroot/etc/gshadow | 42 + .../config_chroot/etc/login.defs | 335 +++++ .../config_chroot/etc/passwd | 21 + .../config_chroot/etc/shadow | 20 + .../groupmod/01_groupmod--root/data/group | 42 + .../groupmod/01_groupmod--root/data/gshadow | 42 + .../groupmod/01_groupmod--root/groupmod.test | 52 + tests/chroot/grpck/01_grpck--root/config.txt | 10 + .../01_grpck--root/config/etc/default/useradd | 36 + .../grpck/01_grpck--root/config/etc/group | 41 + .../grpck/01_grpck--root/config/etc/gshadow | 41 + .../grpck/01_grpck--root/config/etc/passwd | 19 + .../grpck/01_grpck--root/config/etc/shadow | 19 + .../01_grpck--root/config_chroot/etc/group | 42 + .../01_grpck--root/config_chroot/etc/gshadow | 42 + .../config_chroot/etc/login.defs | 335 +++++ .../01_grpck--root/config_chroot/etc/passwd | 21 + .../01_grpck--root/config_chroot/etc/shadow | 20 + tests/chroot/grpck/01_grpck--root/data/group | 42 + .../chroot/grpck/01_grpck--root/data/gshadow | 42 + tests/chroot/grpck/01_grpck--root/grpck.test | 50 + .../grpconv/01_grpconv--root/config.txt | 10 + .../config/etc/default/useradd | 36 + .../grpconv/01_grpconv--root/config/etc/group | 41 + .../01_grpconv--root/config/etc/gshadow | 41 + .../01_grpconv--root/config/etc/passwd | 19 + .../01_grpconv--root/config/etc/shadow | 19 + .../01_grpconv--root/config_chroot/etc/group | 42 + .../config_chroot/etc/login.defs | 335 +++++ .../01_grpconv--root/config_chroot/etc/passwd | 21 + .../01_grpconv--root/config_chroot/etc/shadow | 20 + .../grpconv/01_grpconv--root/data/group | 42 + .../grpconv/01_grpconv--root/data/gshadow | 42 + .../grpconv/01_grpconv--root/grpconv.test | 50 + .../grpunconv/01_grpunconv--root/config.txt | 10 + .../config/etc/default/useradd | 36 + .../01_grpunconv--root/config/etc/group | 41 + .../01_grpunconv--root/config/etc/gshadow | 41 + .../01_grpunconv--root/config/etc/passwd | 19 + .../01_grpunconv--root/config/etc/shadow | 19 + .../config_chroot/etc/group | 42 + .../config_chroot/etc/gshadow | 42 + .../config_chroot/etc/login.defs | 335 +++++ .../config_chroot/etc/passwd | 21 + .../config_chroot/etc/shadow | 20 + .../grpunconv/01_grpunconv--root/data/group | 42 + .../01_grpunconv--root/grpunconv.test | 52 + .../lastlog/01_lastlog--root/config.txt | 10 + .../config/etc/default/useradd | 36 + .../lastlog/01_lastlog--root/config/etc/group | 41 + .../01_lastlog--root/config/etc/gshadow | 41 + .../01_lastlog--root/config/etc/passwd | 19 + .../01_lastlog--root/config/etc/shadow | 19 + .../01_lastlog--root/config_chroot/etc/group | 42 + .../config_chroot/etc/gshadow | 42 + .../config_chroot/etc/login.defs | 335 +++++ .../01_lastlog--root/config_chroot/etc/passwd | 21 + .../01_lastlog--root/config_chroot/etc/shadow | 20 + .../lastlog/01_lastlog--root/data/group | 42 + .../lastlog/01_lastlog--root/data/gshadow | 42 + .../01_lastlog--root/data/lastlog.list | 2 + .../lastlog/01_lastlog--root/lastlog.test | 47 + .../chroot/login/01_login_sublogin/config.txt | 3 + .../login/01_login_sublogin/config/etc/group | 42 + .../01_login_sublogin/config/etc/gshadow | 42 + .../01_login_sublogin/config/etc/login.defs | 315 +++++ .../login/01_login_sublogin/config/etc/passwd | 21 + .../login/01_login_sublogin/config/etc/shadow | 20 + .../01_login_sublogin/config_chroot.list | 3 + .../01_login_sublogin/config_chroot/etc/group | 42 + .../config_chroot/etc/gshadow | 42 + .../config_chroot/etc/login.defs | 315 +++++ .../config_chroot/etc/pam.d/common-account | 25 + .../config_chroot/etc/pam.d/common-auth | 25 + .../config_chroot/etc/pam.d/common-password | 33 + .../config_chroot/etc/pam.d/common-session | 25 + .../etc/pam.d/common-session-noninteractive | 25 + .../config_chroot/etc/pam.d/login | 107 ++ .../config_chroot/etc/pam.d/other | 16 + .../config_chroot/etc/passwd | 21 + .../config_chroot/etc/securetty | 390 ++++++ .../config_chroot/etc/security/limits.conf | 0 .../config_chroot/etc/shadow | 20 + .../chroot/login/01_login_sublogin/login.exp | 25 + .../chroot/login/01_login_sublogin/login.test | 33 + tests/chroot/pwck/01_pwck--root/config.txt | 10 + .../01_pwck--root/config/etc/default/useradd | 36 + .../pwck/01_pwck--root/config/etc/group | 41 + .../pwck/01_pwck--root/config/etc/gshadow | 41 + .../pwck/01_pwck--root/config/etc/passwd | 19 + .../pwck/01_pwck--root/config/etc/shadow | 19 + .../01_pwck--root/config_chroot/etc/group | 42 + .../01_pwck--root/config_chroot/etc/gshadow | 42 + .../config_chroot/etc/login.defs | 335 +++++ .../01_pwck--root/config_chroot/etc/passwd | 23 + .../01_pwck--root/config_chroot/etc/shadow | 20 + tests/chroot/pwck/01_pwck--root/data/pwck.out | 59 + tests/chroot/pwck/01_pwck--root/pwck.test | 67 + .../chroot/pwconv/01_pwconv--root/config.txt | 10 + .../config/etc/default/useradd | 36 + .../pwconv/01_pwconv--root/config/etc/group | 41 + .../pwconv/01_pwconv--root/config/etc/gshadow | 41 + .../pwconv/01_pwconv--root/config/etc/passwd | 19 + .../pwconv/01_pwconv--root/config/etc/shadow | 19 + .../01_pwconv--root/config_chroot/etc/group | 42 + .../01_pwconv--root/config_chroot/etc/gshadow | 42 + .../config_chroot/etc/login.defs | 335 +++++ .../01_pwconv--root/config_chroot/etc/passwd | 21 + .../chroot/pwconv/01_pwconv--root/data/passwd | 21 + .../chroot/pwconv/01_pwconv--root/data/shadow | 21 + .../chroot/pwconv/01_pwconv--root/pwconv.test | 50 + .../pwunconv/01_pwunconv--root/config.txt | 10 + .../config/etc/default/useradd | 36 + .../01_pwunconv--root/config/etc/group | 41 + .../01_pwunconv--root/config/etc/gshadow | 41 + .../01_pwunconv--root/config/etc/passwd | 19 + .../01_pwunconv--root/config/etc/shadow | 19 + .../01_pwunconv--root/config_chroot/etc/group | 42 + .../config_chroot/etc/gshadow | 42 + .../config_chroot/etc/login.defs | 335 +++++ .../config_chroot/etc/passwd | 21 + .../config_chroot/etc/shadow | 20 + .../pwunconv/01_pwunconv--root/data/passwd | 21 + .../pwunconv/01_pwunconv--root/pwunconv.test | 52 + .../useradd/01_useradd--root/config.txt | 10 + .../config/etc/default/useradd | 36 + .../useradd/01_useradd--root/config/etc/group | 41 + .../01_useradd--root/config/etc/gshadow | 41 + .../01_useradd--root/config/etc/passwd | 19 + .../01_useradd--root/config/etc/shadow | 19 + .../01_useradd--root/config_chroot/etc/group | 42 + .../config_chroot/etc/gshadow | 42 + .../config_chroot/etc/login.defs | 335 +++++ .../01_useradd--root/config_chroot/etc/passwd | 21 + .../01_useradd--root/config_chroot/etc/shadow | 20 + .../useradd/01_useradd--root/data/group | 43 + .../useradd/01_useradd--root/data/gshadow | 43 + .../useradd/01_useradd--root/data/passwd | 22 + .../useradd/01_useradd--root/data/shadow | 21 + .../useradd/01_useradd--root/useradd.test | 52 + .../02_useradd--root_login.defs/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../config_chroot/etc/group | 42 + .../config_chroot/etc/gshadow | 42 + .../config_chroot/etc/login.defs | 335 +++++ .../config_chroot/etc/passwd | 21 + .../config_chroot/etc/shadow | 20 + .../02_useradd--root_login.defs/data/group | 43 + .../02_useradd--root_login.defs/data/gshadow | 43 + .../02_useradd--root_login.defs/data/passwd | 22 + .../02_useradd--root_login.defs/data/shadow | 21 + .../02_useradd--root_login.defs/useradd.test | 52 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../config_chroot/etc/default/useradd | 36 + .../config_chroot/etc/group | 42 + .../config_chroot/etc/gshadow | 42 + .../config_chroot/etc/login.defs | 335 +++++ .../config_chroot/etc/passwd | 21 + .../config_chroot/etc/shadow | 20 + .../data/group | 43 + .../data/gshadow | 43 + .../data/passwd | 22 + .../data/shadow | 21 + .../useradd.test | 52 + .../04_useradd--root_useradd-D/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../config_chroot/etc/default/useradd | 36 + .../config_chroot/etc/group | 42 + .../config_chroot/etc/gshadow | 42 + .../config_chroot/etc/login.defs | 335 +++++ .../config_chroot/etc/passwd | 21 + .../config_chroot/etc/shadow | 20 + .../data/useradd.out | 7 + .../04_useradd--root_useradd-D/useradd.test | 61 + .../05_useradd--root_useradd-D-e-g/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../config_chroot/etc/default/useradd | 36 + .../config_chroot/etc/group | 42 + .../config_chroot/etc/gshadow | 42 + .../config_chroot/etc/login.defs | 335 +++++ .../config_chroot/etc/passwd | 21 + .../config_chroot/etc/shadow | 20 + .../data/useradd.default | 38 + .../useradd.test | 56 + .../userdel/01_userdel--root/config.txt | 10 + .../config/etc/default/useradd | 36 + .../userdel/01_userdel--root/config/etc/group | 41 + .../01_userdel--root/config/etc/gshadow | 41 + .../01_userdel--root/config/etc/passwd | 19 + .../01_userdel--root/config/etc/shadow | 19 + .../01_userdel--root/config_chroot/etc/group | 42 + .../config_chroot/etc/gshadow | 42 + .../config_chroot/etc/login.defs | 335 +++++ .../01_userdel--root/config_chroot/etc/passwd | 21 + .../01_userdel--root/config_chroot/etc/shadow | 20 + .../userdel/01_userdel--root/data/group | 41 + .../userdel/01_userdel--root/data/gshadow | 41 + .../userdel/01_userdel--root/data/passwd | 20 + .../userdel/01_userdel--root/data/shadow | 19 + .../userdel/01_userdel--root/userdel.test | 52 + .../usermod/01_usermod--root/config.txt | 10 + .../config/etc/default/useradd | 36 + .../usermod/01_usermod--root/config/etc/group | 41 + .../01_usermod--root/config/etc/gshadow | 41 + .../01_usermod--root/config/etc/passwd | 19 + .../01_usermod--root/config/etc/shadow | 19 + .../01_usermod--root/config_chroot/etc/group | 42 + .../config_chroot/etc/gshadow | 42 + .../config_chroot/etc/login.defs | 335 +++++ .../01_usermod--root/config_chroot/etc/passwd | 21 + .../01_usermod--root/config_chroot/etc/shadow | 20 + .../usermod/01_usermod--root/data/passwd | 21 + .../usermod/01_usermod--root/usermod.test | 52 + tests/chsh/01/data/chsh1 | 1 + tests/chsh/01/data/chsh2 | 1 + tests/chsh/01/data/group | 42 + tests/chsh/01/data/gshadow | 42 + tests/chsh/01/data/passwd | 21 + tests/chsh/01/data/shadow | 21 + tests/chsh/01/data/shells | 16 + tests/chsh/01/run | 143 ++ tests/chsh/01/run.exp | 38 + tests/chsh/02_chsh_usage/chsh.test | 48 + tests/chsh/02_chsh_usage/config.txt | 0 tests/chsh/02_chsh_usage/config/etc/group | 0 tests/chsh/02_chsh_usage/config/etc/gshadow | 0 tests/chsh/02_chsh_usage/config/etc/passwd | 0 tests/chsh/02_chsh_usage/config/etc/shadow | 0 tests/chsh/02_chsh_usage/data/usage.out | 7 + .../03_chsh_usage_invalid_option/chsh.test | 54 + .../03_chsh_usage_invalid_option/config.txt | 0 .../config/etc/group | 0 .../config/etc/gshadow | 0 .../config/etc/passwd | 0 .../config/etc/shadow | 0 .../data/usage.out | 8 + tests/chsh/04_chsh_usage_2_users/chsh.test | 54 + tests/chsh/04_chsh_usage_2_users/config.txt | 0 .../04_chsh_usage_2_users/config/etc/group | 0 .../04_chsh_usage_2_users/config/etc/gshadow | 0 .../04_chsh_usage_2_users/config/etc/passwd | 0 .../04_chsh_usage_2_users/config/etc/shadow | 0 .../chsh/04_chsh_usage_2_users/data/usage.out | 7 + .../05_chsh_myuser_restricted_shell/chsh.test | 41 + .../config.txt | 0 .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../config/etc/shells | 15 + .../05_chsh_myuser_restricted_shell/run.exp | 34 + .../chsh.test | 41 + .../config.txt | 0 .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../config/etc/shells | 16 + .../data/passwd | 21 + .../run.exp | 40 + .../chsh/07_chsh_usage_invalid_user/chsh.test | 54 + .../07_chsh_usage_invalid_user/config.txt | 0 .../config/etc/group | 0 .../config/etc/gshadow | 0 .../config/etc/passwd | 0 .../config/etc/shadow | 0 .../07_chsh_usage_invalid_user/data/usage.out | 1 + .../chsh.test | 41 + .../config.txt | 0 .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../config/etc/shells | 15 + .../data/passwd | 21 + .../run.exp | 41 + .../09_chsh_myuser_to_missing_shell/chsh.test | 42 + .../config.txt | 0 .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../config/etc/shells | 15 + .../data/passwd | 21 + .../09_chsh_myuser_to_missing_shell/run.exp | 41 + .../chsh.test | 46 + .../config.txt | 0 .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../config/etc/shells | 15 + .../data/passwd | 21 + .../run.exp | 41 + tests/chsh/11_chsh_auth_failure/chsh.test | 41 + tests/chsh/11_chsh_auth_failure/config.txt | 0 .../11_chsh_auth_failure/config/etc/group | 42 + .../11_chsh_auth_failure/config/etc/gshadow | 42 + .../11_chsh_auth_failure/config/etc/passwd | 21 + .../11_chsh_auth_failure/config/etc/shadow | 21 + .../11_chsh_auth_failure/config/etc/shells | 15 + tests/chsh/11_chsh_auth_failure/data/passwd | 21 + tests/chsh/11_chsh_auth_failure/run.exp | 36 + .../12_chsh_warning_missing_shell/chsh.test | 48 + .../12_chsh_warning_missing_shell/config.txt | 0 .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/chsh | 20 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../config/etc/shells | 16 + .../data/chsh.err | 1 + .../12_chsh_warning_missing_shell/data/passwd | 21 + .../13_chsh_warning_non_executable/chsh.test | 52 + .../13_chsh_warning_non_executable/config.txt | 0 .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/chsh | 20 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../config/etc/shells | 16 + .../data/chsh.err | 1 + .../data/passwd | 21 + tests/chsh/14_chsh_locked_passwd/chsh.test | 59 + tests/chsh/14_chsh_locked_passwd/config.txt | 0 .../14_chsh_locked_passwd/config/etc/group | 42 + .../14_chsh_locked_passwd/config/etc/gshadow | 42 + .../14_chsh_locked_passwd/config/etc/passwd | 26 + .../14_chsh_locked_passwd/config/etc/shadow | 26 + .../chsh/14_chsh_locked_passwd/data/chsh.err | 2 + tests/chsh/15_chsh_PAM_error/chsh.test | 58 + tests/chsh/15_chsh_PAM_error/config.txt | 0 tests/chsh/15_chsh_PAM_error/config/etc/group | 42 + .../chsh/15_chsh_PAM_error/config/etc/gshadow | 42 + .../15_chsh_PAM_error/config/etc/pam.d/chsh | 1 + .../15_chsh_PAM_error/config/etc/pam.d/other | 1 + .../chsh/15_chsh_PAM_error/config/etc/passwd | 26 + .../chsh/15_chsh_PAM_error/config/etc/shadow | 26 + tests/chsh/15_chsh_PAM_error/data/chsh.err | 1 + tests/cktools/01/data/group | 41 + tests/cktools/01/data/gshadow | 41 + tests/cktools/01/data/passwd | 19 + tests/cktools/01/data/run2.err | 0 tests/cktools/01/data/run2.out | 13 + tests/cktools/01/data/shadow | 19 + tests/cktools/01/run1 | 54 + tests/cktools/01/run2 | 62 + tests/cktools/02_pwck_sort/config.txt | 5 + tests/cktools/02_pwck_sort/config/etc/group | 42 + tests/cktools/02_pwck_sort/config/etc/gshadow | 42 + tests/cktools/02_pwck_sort/config/etc/passwd | 20 + tests/cktools/02_pwck_sort/config/etc/shadow | 20 + tests/cktools/02_pwck_sort/data/passwd | 20 + tests/cktools/02_pwck_sort/data/shadow | 20 + tests/cktools/02_pwck_sort/pwck.test | 39 + tests/cktools/03_grpck_sort/config.txt | 5 + tests/cktools/03_grpck_sort/config/etc/group | 42 + .../cktools/03_grpck_sort/config/etc/gshadow | 42 + tests/cktools/03_grpck_sort/config/etc/passwd | 20 + tests/cktools/03_grpck_sort/config/etc/shadow | 20 + tests/cktools/03_grpck_sort/data/group | 42 + tests/cktools/03_grpck_sort/data/gshadow | 42 + tests/cktools/03_grpck_sort/grpck.test | 39 + .../config.txt | 5 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/passwd | 20 + .../data/shadow | 19 + .../pwck.test | 39 + .../config.txt | 5 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 41 + .../grpck.test | 39 + .../06_pwck_sort_NIS_server/config.txt | 5 + .../06_pwck_sort_NIS_server/config/etc/group | 43 + .../config/etc/gshadow | 43 + .../06_pwck_sort_NIS_server/config/etc/passwd | 24 + .../06_pwck_sort_NIS_server/config/etc/shadow | 21 + .../06_pwck_sort_NIS_server/data/passwd | 24 + .../06_pwck_sort_NIS_server/data/shadow | 21 + .../cktools/06_pwck_sort_NIS_server/pwck.test | 39 + .../07_pwck_sort_NIS_client/config.txt | 5 + .../07_pwck_sort_NIS_client/config/etc/group | 45 + .../config/etc/gshadow | 43 + .../07_pwck_sort_NIS_client/config/etc/passwd | 22 + .../07_pwck_sort_NIS_client/config/etc/shadow | 22 + .../07_pwck_sort_NIS_client/data/passwd | 22 + .../07_pwck_sort_NIS_client/data/shadow | 22 + .../cktools/07_pwck_sort_NIS_client/pwck.test | 39 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 41 + .../data/gshadow | 41 + .../grpck.exp | 23 + .../grpck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/gshadow | 41 + .../grpck.exp | 23 + .../grpck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../grpck.exp | 23 + .../grpck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/gshadow | 42 + .../grpck.exp | 23 + .../grpck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/gshadow | 41 + .../grpck.exp | 23 + .../grpck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../grpck.exp | 23 + .../grpck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 41 + .../data/gshadow | 41 + .../grpck.exp | 23 + .../grpck.test | 45 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../data/shadow | 20 + .../grpck.exp | 23 + .../grpck.test | 45 + .../12_grpck_unknown_user_group/config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../12_grpck_unknown_user_group/data/group | 42 + .../12_grpck_unknown_user_group/grpck.exp | 20 + .../12_grpck_unknown_user_group/grpck.test | 37 + .../13_grpck_unknown_user_gshadow/config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/gshadow | 42 + .../13_grpck_unknown_user_gshadow/grpck.exp | 21 + .../13_grpck_unknown_user_gshadow/grpck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/gshadow | 42 + .../grpck.exp | 31 + .../grpck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../grpck.exp | 23 + .../grpck.test | 37 + .../16_grpck_duplicate_entry_group/config.txt | 2 + .../config/etc/group | 43 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../16_grpck_duplicate_entry_group/data/group | 42 + .../16_grpck_duplicate_entry_group/grpck.exp | 20 + .../16_grpck_duplicate_entry_group/grpck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/gshadow | 42 + .../grpck.exp | 20 + .../grpck.test | 37 + .../config.txt | 2 + .../config/etc/group | 43 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../grpck.exp | 24 + .../grpck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../grpck.exp | 23 + .../grpck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/gshadow | 42 + .../grpck.exp | 23 + .../grpck.test | 37 + .../21_grpck_invalid_group_name/config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../21_grpck_invalid_group_name/grpck.exp | 17 + .../21_grpck_invalid_group_name/grpck.test | 37 + .../22_grpck_invalid_group_ID_-1/config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../22_grpck_invalid_group_ID_-1/data/group | 41 + .../22_grpck_invalid_group_ID_-1/data/gshadow | 41 + .../22_grpck_invalid_group_ID_-1/grpck.exp | 23 + .../22_grpck_invalid_group_ID_-1/grpck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../grpck.exp | 18 + .../grpck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 41 + .../data/gshadow | 41 + .../grpck.exp | 23 + .../grpck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../grpck.exp | 23 + .../grpck.test | 37 + .../grpck/26_grpck_no_gshadow_file/config.txt | 5 + .../26_grpck_no_gshadow_file/config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../26_grpck_no_gshadow_file/data/grpck.out | 3 + .../grpck/26_grpck_no_gshadow_file/grpck.test | 58 + .../27_grpck_sort_no_gshadow_file/config.txt | 5 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../27_grpck_sort_no_gshadow_file/data/group | 42 + .../27_grpck_sort_no_gshadow_file/grpck.test | 43 + tests/cktools/grpck/28_grpck_usage/config.txt | 10 + .../28_grpck_usage/config/etc/default/useradd | 36 + .../grpck/28_grpck_usage/config/etc/group | 41 + .../grpck/28_grpck_usage/config/etc/gshadow | 41 + .../grpck/28_grpck_usage/config/etc/passwd | 19 + .../grpck/28_grpck_usage/config/etc/shadow | 19 + .../grpck/28_grpck_usage/data/usage.out | 9 + tests/cktools/grpck/28_grpck_usage/grpck.test | 47 + .../grpck/29_grpck_sort_readonly/config.txt | 10 + .../config/etc/default/useradd | 36 + .../29_grpck_sort_readonly/config/etc/group | 41 + .../29_grpck_sort_readonly/config/etc/gshadow | 41 + .../29_grpck_sort_readonly/config/etc/passwd | 19 + .../29_grpck_sort_readonly/config/etc/shadow | 19 + .../29_grpck_sort_readonly/data/usage.out | 1 + .../grpck/29_grpck_sort_readonly/grpck.test | 54 + .../cktools/grpck/30_grpck_3_files/config.txt | 10 + .../config/etc/default/useradd | 36 + .../grpck/30_grpck_3_files/config/etc/group | 41 + .../grpck/30_grpck_3_files/config/etc/gshadow | 41 + .../grpck/30_grpck_3_files/config/etc/passwd | 19 + .../grpck/30_grpck_3_files/config/etc/shadow | 19 + .../grpck/30_grpck_3_files/data/usage.out | 9 + .../cktools/grpck/30_grpck_3_files/grpck.test | 54 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 41 + .../grpck.exp | 20 + .../grpck.test | 44 + .../grpck/32_grpck_sort_nis/config.txt | 5 + .../grpck/32_grpck_sort_nis/config/etc/group | 45 + .../32_grpck_sort_nis/config/etc/gshadow | 42 + .../grpck/32_grpck_sort_nis/config/etc/passwd | 20 + .../grpck/32_grpck_sort_nis/config/etc/shadow | 20 + .../grpck/32_grpck_sort_nis/data/group | 45 + .../grpck/32_grpck_sort_nis/data/gshadow | 42 + .../grpck/32_grpck_sort_nis/grpck.test | 39 + .../grpck/33_grpck_locked_group/config.txt | 0 .../config/etc/default/useradd | 36 + .../33_grpck_locked_group/config/etc/group | 42 + .../33_grpck_locked_group/config/etc/gshadow | 42 + .../33_grpck_locked_group/config/etc/passwd | 20 + .../33_grpck_locked_group/config/etc/shadow | 20 + .../33_grpck_locked_group/data/grpck.err | 2 + .../grpck/33_grpck_locked_group/grpck.test | 60 + .../grpck/34_grpck_locked_gshadow/config.txt | 0 .../config/etc/default/useradd | 36 + .../34_grpck_locked_gshadow/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../34_grpck_locked_gshadow/config/etc/passwd | 20 + .../34_grpck_locked_gshadow/config/etc/shadow | 20 + .../34_grpck_locked_gshadow/data/grpck.err | 2 + .../grpck/34_grpck_locked_gshadow/grpck.test | 60 + .../config.txt | 2 + .../config/etc/group | 45 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 44 + .../grpck.exp | 20 + .../grpck.test | 37 + .../config.txt | 5 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/grpck.out | 2 + .../grpck.test | 54 + .../grpck/37_grpck_invalid_option/config.txt | 10 + .../37_grpck_invalid_option/config/etc/group | 41 + .../config/etc/gshadow | 41 + .../37_grpck_invalid_option/config/etc/passwd | 19 + .../37_grpck_invalid_option/config/etc/shadow | 19 + .../37_grpck_invalid_option/data/usage.out | 10 + .../grpck/37_grpck_invalid_option/grpck.test | 54 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 11 + .../config/etc/shadow | 11 + .../data/passwd | 10 + .../data/shadow | 10 + .../pwck.exp | 23 + .../pwck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 11 + .../config/etc/shadow | 11 + .../data/shadow | 10 + .../pwck.exp | 22 + .../pwck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 11 + .../config/etc/shadow | 11 + .../pwck.exp | 23 + .../pwck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 11 + .../config/etc/shadow | 11 + .../data/shadow | 11 + .../07_pwck_missing_field_shadow_add/pwck.exp | 23 + .../pwck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 11 + .../config/etc/shadow | 11 + .../data/shadow | 10 + .../pwck.exp | 23 + .../pwck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 11 + .../config/etc/shadow | 11 + .../pwck.exp | 23 + .../pwck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 11 + .../config/etc/shadow | 11 + .../data/passwd | 10 + .../data/shadow | 10 + .../pwck.exp | 23 + .../pwck.test | 45 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 11 + .../config/etc/shadow | 11 + .../data/passwd | 11 + .../data/shadow | 11 + .../pwck.exp | 23 + .../pwck.test | 45 + .../12_pwck_unknown_user_group_ID/config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 11 + .../config/etc/shadow | 11 + .../12_pwck_unknown_user_group_ID/pwck.exp | 18 + .../12_pwck_unknown_user_group_ID/pwck.test | 37 + .../13_pwck_duplicate_entry_passwd/config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 12 + .../config/etc/shadow | 11 + .../data/passwd | 11 + .../13_pwck_duplicate_entry_passwd/pwck.exp | 20 + .../13_pwck_duplicate_entry_passwd/pwck.test | 37 + .../14_pwck_duplicate_entry_shadow/config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 11 + .../config/etc/shadow | 12 + .../data/shadow | 11 + .../14_pwck_duplicate_entry_shadow/pwck.exp | 20 + .../14_pwck_duplicate_entry_shadow/pwck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 12 + .../config/etc/shadow | 11 + .../pwck.exp | 23 + .../pwck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 11 + .../config/etc/shadow | 12 + .../pwck.exp | 23 + .../pwck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 12 + .../config/etc/shadow | 11 + .../data/passwd | 11 + .../pwck.exp | 23 + .../pwck.test | 37 + .../pwck/18_pwck_invalid_user_name/config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 11 + .../config/etc/shadow | 11 + .../pwck/18_pwck_invalid_user_name/pwck.exp | 18 + .../pwck/18_pwck_invalid_user_name/pwck.test | 37 + .../19_pwck_invalid_user_ID_-1/config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 11 + .../config/etc/shadow | 11 + .../19_pwck_invalid_user_ID_-1/data/passwd | 10 + .../19_pwck_invalid_user_ID_-1/data/shadow | 10 + .../pwck/19_pwck_invalid_user_ID_-1/pwck.exp | 23 + .../pwck/19_pwck_invalid_user_ID_-1/pwck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 11 + .../config/etc/shadow | 11 + .../pwck.exp | 18 + .../pwck.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 11 + .../config/etc/shadow | 11 + .../data/passwd | 10 + .../data/shadow | 10 + .../pwck.exp | 23 + .../pwck.test | 37 + tests/cktools/pwck/22_pwck_usage/config.txt | 10 + .../pwck/22_pwck_usage/config/etc/group | 41 + .../pwck/22_pwck_usage/config/etc/gshadow | 41 + .../pwck/22_pwck_usage/config/etc/passwd | 19 + .../pwck/22_pwck_usage/config/etc/shadow | 19 + .../cktools/pwck/22_pwck_usage/data/usage.out | 10 + tests/cktools/pwck/22_pwck_usage/pwck.test | 47 + .../pwck/23_pwck_locked_passwd/config.txt | 0 .../23_pwck_locked_passwd/config/etc/group | 42 + .../23_pwck_locked_passwd/config/etc/gshadow | 42 + .../23_pwck_locked_passwd/config/etc/passwd | 20 + .../23_pwck_locked_passwd/config/etc/shadow | 20 + .../pwck/23_pwck_locked_passwd/data/pwck.err | 2 + .../pwck/23_pwck_locked_passwd/pwck.test | 60 + .../pwck/24_pwck_locked_shadow/config.txt | 0 .../24_pwck_locked_shadow/config/etc/group | 42 + .../24_pwck_locked_shadow/config/etc/gshadow | 42 + .../24_pwck_locked_shadow/config/etc/passwd | 20 + .../24_pwck_locked_shadow/config/etc/shadow | 20 + .../pwck/24_pwck_locked_shadow/data/pwck.err | 2 + .../pwck/24_pwck_locked_shadow/pwck.test | 60 + .../25_pwck_usage_invalid_option/config.txt | 0 .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/pwck.err | 11 + .../25_pwck_usage_invalid_option/pwck.test | 56 + .../cktools/pwck/26_pwck_usage-s-r/config.txt | 0 .../pwck/26_pwck_usage-s-r/config/etc/group | 42 + .../pwck/26_pwck_usage-s-r/config/etc/gshadow | 42 + .../pwck/26_pwck_usage-s-r/config/etc/passwd | 20 + .../pwck/26_pwck_usage-s-r/config/etc/shadow | 20 + .../pwck/26_pwck_usage-s-r/data/pwck.err | 1 + .../cktools/pwck/26_pwck_usage-s-r/pwck.test | 56 + .../pwck/27_pwck_usage_3_files/config.txt | 0 .../27_pwck_usage_3_files/config/etc/group | 42 + .../27_pwck_usage_3_files/config/etc/gshadow | 42 + .../27_pwck_usage_3_files/config/etc/passwd | 20 + .../27_pwck_usage_3_files/config/etc/shadow | 20 + .../pwck/27_pwck_usage_3_files/data/pwck.err | 10 + .../pwck/27_pwck_usage_3_files/pwck.test | 56 + .../pwck/28_pwck_no_shadow_file/config.txt | 10 + .../28_pwck_no_shadow_file/config/etc/group | 42 + .../28_pwck_no_shadow_file/config/etc/gshadow | 42 + .../28_pwck_no_shadow_file/config/etc/passwd | 23 + .../28_pwck_no_shadow_file/config/etc/shadow | 20 + .../pwck/28_pwck_no_shadow_file/data/pwck.out | 7 + .../pwck/28_pwck_no_shadow_file/pwck.test | 58 + .../config.txt | 10 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/pwck.out | 2 + .../pwck.test | 54 + .../pwck/30_pwck_NIS_entries/config.txt | 10 + .../pwck/30_pwck_NIS_entries/config/etc/group | 42 + .../30_pwck_NIS_entries/config/etc/gshadow | 42 + .../30_pwck_NIS_entries/config/etc/passwd | 23 + .../30_pwck_NIS_entries/config/etc/shadow | 23 + .../pwck/30_pwck_NIS_entries/data/pwck.out | 10 + .../pwck/30_pwck_NIS_entries/pwck.test | 54 + .../config.txt | 10 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/pwck.out | 2 + .../pwck.test | 54 + tests/cktools/pwck/32_pwck_quiet/config.txt | 10 + .../pwck/32_pwck_quiet/config/etc/group | 41 + .../pwck/32_pwck_quiet/config/etc/gshadow | 41 + .../pwck/32_pwck_quiet/config/etc/passwd | 22 + .../pwck/32_pwck_quiet/config/etc/shadow | 19 + .../cktools/pwck/32_pwck_quiet/data/pwck.out | 9 + tests/cktools/pwck/32_pwck_quiet/pwck.test | 54 + tests/common/compare_file.pl | 116 ++ tests/common/config.sh | 121 ++ tests/common/config_chroot-i386.list | 25 + tests/common/config_chroot-powerpc.list | 25 + tests/common/fopen_failure.c | 46 + tests/common/log.sh | 46 + tests/common/open_RDONLY_failure.c | 51 + tests/common/open_RDWR_failure.c | 51 + tests/common/rename_failure.c | 50 + tests/common/rmdir_failure.c | 51 + tests/common/time_0.c | 16 + tests/common/time_past.c | 52 + tests/common/unlink_failure.c | 51 + tests/convtools/01/data/1/group | 42 + tests/convtools/01/data/1/passwd | 21 + tests/convtools/01/data/2/group | 42 + tests/convtools/01/data/2/gshadow | 42 + tests/convtools/01/data/2/passwd | 21 + tests/convtools/01/data/2/shadow | 21 + tests/convtools/01/run | 117 ++ .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/gshadow | 42 + .../grpconv.test | 39 + .../03_grpconv_copy_passwd/config.txt | 2 + .../03_grpconv_copy_passwd/config/etc/group | 42 + .../03_grpconv_copy_passwd/config/etc/gshadow | 41 + .../03_grpconv_copy_passwd/config/etc/passwd | 19 + .../03_grpconv_copy_passwd/config/etc/shadow | 19 + .../03_grpconv_copy_passwd/data/group | 42 + .../03_grpconv_copy_passwd/data/gshadow | 42 + .../03_grpconv_copy_passwd/grpconv.test | 39 + .../04_grpconv_no_password/config.txt | 2 + .../04_grpconv_no_password/config/etc/group | 42 + .../04_grpconv_no_password/config/etc/gshadow | 41 + .../04_grpconv_no_password/config/etc/passwd | 19 + .../04_grpconv_no_password/config/etc/shadow | 19 + .../04_grpconv_no_password/data/group | 42 + .../04_grpconv_no_password/data/gshadow | 42 + .../04_grpconv_no_password/grpconv.test | 39 + .../config.txt | 3 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../data/gshadow | 42 + .../grpconv.test | 39 + .../06_grpconv_error_group_locked/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/grpconv.err | 2 + .../grpconv.test | 63 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/grpconv.err | 2 + .../grpconv.test | 62 + .../08_grpunconv_no_gshadow_file/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../grpunconv.test | 43 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/grpunconv.err | 2 + .../grpunconv.test | 62 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/grpunconv.err | 2 + .../grpunconv.test | 62 + .../11_pwconv_error_passwd_locked/config.txt | 5 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/pwconv.err | 2 + .../11_pwconv_error_passwd_locked/pwconv.test | 62 + .../12_pwconv_error_shadow_locked/config.txt | 5 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/pwconv.err | 2 + .../12_pwconv_error_shadow_locked/pwconv.test | 62 + .../config.txt | 5 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/pwunconv.err | 2 + .../pwunconv.test | 62 + .../config.txt | 5 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/pwunconv.err | 2 + .../pwunconv.test | 62 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 20 + .../config/etc/shadow | 21 + .../data/shadow | 20 + .../pwconv.test | 39 + .../16_pwconv_copy_passwd/config.txt | 1 + .../16_pwconv_copy_passwd/config/etc/group | 42 + .../16_pwconv_copy_passwd/config/etc/gshadow | 41 + .../16_pwconv_copy_passwd/config/etc/passwd | 20 + .../16_pwconv_copy_passwd/config/etc/shadow | 20 + .../16_pwconv_copy_passwd/data/passwd | 20 + .../16_pwconv_copy_passwd/data/shadow | 20 + .../16_pwconv_copy_passwd/pwconv.test | 39 + .../17_pwunconv_no_shadow_file/config.txt | 6 + .../config/etc/group | 42 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../17_pwunconv_no_shadow_file/pwunconv.test | 43 + .../18_pwunconv_user_not_in_shadow/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/passwd | 20 + .../pwunconv.test | 39 + tests/convtools/19_pwconv_NIS/config.txt | 1 + .../convtools/19_pwconv_NIS/config/etc/group | 42 + .../19_pwconv_NIS/config/etc/gshadow | 41 + .../convtools/19_pwconv_NIS/config/etc/passwd | 22 + .../convtools/19_pwconv_NIS/config/etc/shadow | 20 + tests/convtools/19_pwconv_NIS/data/passwd | 22 + tests/convtools/19_pwconv_NIS/data/shadow | 20 + tests/convtools/19_pwconv_NIS/pwconv.test | 43 + .../20_pwunconv_usage_option/config.txt | 10 + .../20_pwunconv_usage_option/config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../20_pwunconv_usage_option/data/usage.out | 7 + .../20_pwunconv_usage_option/pwunconv.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/passwd | 20 + .../pwunconv.test | 39 + .../22_grpunconv_usage_option/config.txt | 10 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../22_grpunconv_usage_option/data/usage.out | 7 + .../22_grpunconv_usage_option/grpunconv.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../grpunconv.test | 39 + .../24_grpunconv_no_gshadow_entry/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../24_grpunconv_no_gshadow_entry/data/group | 42 + .../grpunconv.test | 39 + .../25_pwconv_usage_option/config.txt | 0 .../25_pwconv_usage_option/config/etc/group | 0 .../25_pwconv_usage_option/config/etc/gshadow | 0 .../25_pwconv_usage_option/config/etc/passwd | 0 .../25_pwconv_usage_option/config/etc/shadow | 0 .../25_pwconv_usage_option/data/usage.out | 7 + .../25_pwconv_usage_option/pwconv.test | 54 + .../26_grpconv_usage_option/config.txt | 0 .../26_grpconv_usage_option/config/etc/group | 0 .../config/etc/gshadow | 0 .../26_grpconv_usage_option/config/etc/passwd | 0 .../26_grpconv_usage_option/config/etc/shadow | 0 .../26_grpconv_usage_option/data/usage.out | 7 + .../26_grpconv_usage_option/grpconv.test | 54 + tests/convtools/27_pwunconv_usage/config.txt | 10 + .../27_pwunconv_usage/config/etc/group | 41 + .../27_pwunconv_usage/config/etc/gshadow | 41 + .../27_pwunconv_usage/config/etc/passwd | 19 + .../27_pwunconv_usage/config/etc/shadow | 19 + .../27_pwunconv_usage/data/usage.out | 6 + .../convtools/27_pwunconv_usage/pwunconv.test | 48 + .../28_pwunconv_usage_extra_arg/config.txt | 10 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 6 + .../28_pwunconv_usage_extra_arg/pwunconv.test | 54 + tests/convtools/29_grpconv_usage/config.txt | 0 .../29_grpconv_usage/config/etc/group | 0 .../29_grpconv_usage/config/etc/gshadow | 0 .../29_grpconv_usage/config/etc/passwd | 0 .../29_grpconv_usage/config/etc/shadow | 0 .../convtools/29_grpconv_usage/data/usage.out | 6 + tests/convtools/29_grpconv_usage/grpconv.test | 48 + .../30_grpconv_usage_extra_arg/config.txt | 0 .../config/etc/group | 0 .../config/etc/gshadow | 0 .../config/etc/passwd | 0 .../config/etc/shadow | 0 .../30_grpconv_usage_extra_arg/data/usage.out | 6 + .../30_grpconv_usage_extra_arg/grpconv.test | 54 + tests/convtools/31_pwconv_usage/config.txt | 0 .../31_pwconv_usage/config/etc/group | 0 .../31_pwconv_usage/config/etc/gshadow | 0 .../31_pwconv_usage/config/etc/passwd | 0 .../31_pwconv_usage/config/etc/shadow | 0 .../convtools/31_pwconv_usage/data/usage.out | 6 + tests/convtools/31_pwconv_usage/pwconv.test | 48 + .../32_pwconv_usage_extra_arg/config.txt | 0 .../config/etc/group | 0 .../config/etc/gshadow | 0 .../config/etc/passwd | 0 .../config/etc/shadow | 0 .../32_pwconv_usage_extra_arg/data/usage.out | 6 + .../32_pwconv_usage_extra_arg/pwconv.test | 54 + tests/convtools/33_grpunconv_usage/config.txt | 10 + .../33_grpunconv_usage/config/etc/group | 41 + .../33_grpunconv_usage/config/etc/gshadow | 41 + .../33_grpunconv_usage/config/etc/passwd | 19 + .../33_grpunconv_usage/config/etc/shadow | 19 + .../33_grpunconv_usage/data/usage.out | 6 + .../33_grpunconv_usage/grpunconv.test | 48 + .../34_grpunconv_usage_extra_arg/config.txt | 10 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 6 + .../grpunconv.test | 54 + tests/coverage.sh | 11 + tests/cptools/01/data/group | 41 + tests/cptools/01/data/group.new | 42 + tests/cptools/01/data/gshadow | 41 + tests/cptools/01/data/gshadow.new | 42 + tests/cptools/01/data/passwd | 19 + tests/cptools/01/data/passwd.new | 20 + tests/cptools/01/data/shadow | 19 + tests/cptools/01/data/shadow.new | 20 + tests/cptools/01/run1 | 57 + tests/cptools/01/run2 | 57 + tests/cptools/01/run3 | 57 + tests/cptools/01/run4 | 57 + tests/cptools/02_cppw_usage/config.txt | 0 tests/cptools/02_cppw_usage/config/etc/group | 0 .../cptools/02_cppw_usage/config/etc/gshadow | 0 tests/cptools/02_cppw_usage/config/etc/passwd | 0 tests/cptools/02_cppw_usage/config/etc/shadow | 0 tests/cptools/02_cppw_usage/cppw.test | 48 + tests/cptools/02_cppw_usage/data/usage.out | 3 + .../03_cppw_usage_invalid_option/config.txt | 0 .../config/etc/group | 0 .../config/etc/gshadow | 0 .../config/etc/passwd | 0 .../config/etc/shadow | 0 .../03_cppw_usage_invalid_option/cppw.test | 54 + .../data/usage.out | 4 + .../04_cppw_no_file_argument/config.txt | 0 .../04_cppw_no_file_argument/config/etc/group | 0 .../config/etc/gshadow | 0 .../config/etc/passwd | 0 .../config/etc/shadow | 0 .../04_cppw_no_file_argument/cppw.test | 54 + .../04_cppw_no_file_argument/data/usage.out | 2 + tests/cptools/05_cppw_2_files/config.txt | 0 .../cptools/05_cppw_2_files/config/etc/group | 42 + .../05_cppw_2_files/config/etc/gshadow | 42 + .../cptools/05_cppw_2_files/config/etc/passwd | 21 + .../cptools/05_cppw_2_files/config/etc/shadow | 21 + tests/cptools/05_cppw_2_files/cppw.test | 54 + tests/cptools/05_cppw_2_files/data/passwd | 17 + tests/cptools/05_cppw_2_files/data/usage.out | 2 + tests/cptools/06_cppw_no_file/config.txt | 0 .../cptools/06_cppw_no_file/config/etc/group | 0 .../06_cppw_no_file/config/etc/gshadow | 0 .../cptools/06_cppw_no_file/config/etc/passwd | 0 .../cptools/06_cppw_no_file/config/etc/shadow | 0 tests/cptools/06_cppw_no_file/cppw.test | 54 + tests/cptools/06_cppw_no_file/data/usage.out | 2 + .../cptools/07_cppw_locked_passwd/config.txt | 0 .../07_cppw_locked_passwd/config/etc/group | 0 .../07_cppw_locked_passwd/config/etc/gshadow | 0 .../07_cppw_locked_passwd/config/etc/passwd | 0 .../07_cppw_locked_passwd/config/etc/shadow | 0 tests/cptools/07_cppw_locked_passwd/cppw.test | 60 + .../cptools/07_cppw_locked_passwd/data/passwd | 0 .../07_cppw_locked_passwd/data/usage.out | 3 + tests/cptools/08_cppw-p/config.txt | 0 tests/cptools/08_cppw-p/config/etc/group | 0 tests/cptools/08_cppw-p/config/etc/gshadow | 0 tests/cptools/08_cppw-p/config/etc/passwd | 0 tests/cptools/08_cppw-p/config/etc/shadow | 0 tests/cptools/08_cppw-p/cppw.test | 39 + tests/cptools/08_cppw-p/data/passwd | 0 tests/cptools/09_cppw-g/config.txt | 0 tests/cptools/09_cppw-g/config/etc/group | 42 + tests/cptools/09_cppw-g/config/etc/gshadow | 42 + tests/cptools/09_cppw-g/config/etc/passwd | 20 + tests/cptools/09_cppw-g/config/etc/shadow | 20 + tests/cptools/09_cppw-g/cppw.test | 39 + tests/cptools/09_cppw-g/data/group | 39 + tests/cptools/10_cppw-g-s/config.txt | 0 tests/cptools/10_cppw-g-s/config/etc/group | 42 + tests/cptools/10_cppw-g-s/config/etc/gshadow | 42 + tests/cptools/10_cppw-g-s/config/etc/passwd | 20 + tests/cptools/10_cppw-g-s/config/etc/shadow | 20 + tests/cptools/10_cppw-g-s/cppw.test | 39 + tests/cptools/10_cppw-g-s/data/gshadow | 39 + tests/cptools/11_cppw-p-s/config.txt | 0 tests/cptools/11_cppw-p-s/config/etc/group | 42 + tests/cptools/11_cppw-p-s/config/etc/gshadow | 42 + tests/cptools/11_cppw-p-s/config/etc/passwd | 20 + tests/cptools/11_cppw-p-s/config/etc/shadow | 20 + tests/cptools/11_cppw-p-s/cppw.test | 39 + tests/cptools/11_cppw-p-s/data/shadow | 16 + .../12_cppw-s_no_shadow_file/config.txt | 0 .../12_cppw-s_no_shadow_file/config/etc/group | 0 .../config/etc/gshadow | 0 .../config/etc/passwd | 0 .../config/etc/shadow | 0 .../12_cppw-s_no_shadow_file/cppw.test | 58 + .../12_cppw-s_no_shadow_file/data/cppw.err | 2 + .../12_cppw-s_no_shadow_file/data/shadow | 0 .../01_chpasswd.test | 39 + .../01_chpasswd/group | 41 + .../01_chpasswd/gshadow | 41 + .../01_chpasswd/passwd | 19 + .../01_chpasswd/shadow | 19 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 318 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + tests/crypt/login.defs_DES/01_chpasswd.test | 39 + tests/crypt/login.defs_DES/01_chpasswd/group | 41 + .../crypt/login.defs_DES/01_chpasswd/gshadow | 41 + tests/crypt/login.defs_DES/01_chpasswd/passwd | 19 + tests/crypt/login.defs_DES/01_chpasswd/shadow | 19 + .../02_chpasswd--crypt-method-MD5.test | 39 + .../02_chpasswd--crypt-method-MD5/group | 41 + .../02_chpasswd--crypt-method-MD5/gshadow | 41 + .../02_chpasswd--crypt-method-MD5/passwd | 19 + .../02_chpasswd--crypt-method-MD5/passwd.new | 19 + .../02_chpasswd--crypt-method-MD5/shadow | 19 + .../03_chpasswd--crypt-method-DES.test | 39 + .../03_chpasswd--crypt-method-DES/group | 41 + .../03_chpasswd--crypt-method-DES/gshadow | 41 + .../03_chpasswd--crypt-method-DES/passwd | 19 + .../03_chpasswd--crypt-method-DES/shadow | 19 + .../04_chpasswd--crypt-method-NONE.test | 39 + .../04_chpasswd--crypt-method-NONE/group | 41 + .../04_chpasswd--crypt-method-NONE/gshadow | 41 + .../04_chpasswd--crypt-method-NONE/passwd | 19 + .../04_chpasswd--crypt-method-NONE/shadow | 19 + tests/crypt/login.defs_DES/05_chpasswd-e.test | 39 + .../crypt/login.defs_DES/05_chpasswd-e/group | 41 + .../login.defs_DES/05_chpasswd-e/gshadow | 41 + .../crypt/login.defs_DES/05_chpasswd-e/passwd | 19 + .../crypt/login.defs_DES/05_chpasswd-e/shadow | 19 + tests/crypt/login.defs_DES/06_chpasswd-m.test | 39 + .../crypt/login.defs_DES/06_chpasswd-m/group | 41 + .../login.defs_DES/06_chpasswd-m/gshadow | 41 + .../crypt/login.defs_DES/06_chpasswd-m/passwd | 19 + .../crypt/login.defs_DES/06_chpasswd-m/shadow | 19 + tests/crypt/login.defs_DES/07_chgpasswd.test | 39 + tests/crypt/login.defs_DES/07_chgpasswd/group | 41 + .../crypt/login.defs_DES/07_chgpasswd/gshadow | 41 + .../crypt/login.defs_DES/07_chgpasswd/passwd | 19 + .../crypt/login.defs_DES/07_chgpasswd/shadow | 19 + .../08_chgpasswd--crypt-method-MD5.test | 39 + .../08_chgpasswd--crypt-method-MD5/group | 41 + .../08_chgpasswd--crypt-method-MD5/gshadow | 41 + .../08_chgpasswd--crypt-method-MD5/passwd | 19 + .../08_chgpasswd--crypt-method-MD5/shadow | 19 + .../09_chgpasswd--crypt-method-DES.test | 39 + .../09_chgpasswd--crypt-method-DES/group | 41 + .../09_chgpasswd--crypt-method-DES/gshadow | 41 + .../09_chgpasswd--crypt-method-DES/passwd | 19 + .../09_chgpasswd--crypt-method-DES/shadow | 19 + .../10_chgpasswd--crypt-method-NONE.test | 39 + .../10_chgpasswd--crypt-method-NONE/group | 41 + .../10_chgpasswd--crypt-method-NONE/gshadow | 41 + .../10_chgpasswd--crypt-method-NONE/passwd | 19 + .../10_chgpasswd--crypt-method-NONE/shadow | 19 + .../crypt/login.defs_DES/11_chgpasswd-e.test | 39 + .../crypt/login.defs_DES/11_chgpasswd-e/group | 41 + .../login.defs_DES/11_chgpasswd-e/gshadow | 41 + .../login.defs_DES/11_chgpasswd-e/passwd | 19 + .../login.defs_DES/11_chgpasswd-e/shadow | 19 + .../crypt/login.defs_DES/12_chgpasswd-m.test | 39 + .../crypt/login.defs_DES/12_chgpasswd-m/group | 41 + .../login.defs_DES/12_chgpasswd-m/gshadow | 41 + .../login.defs_DES/12_chgpasswd-m/passwd | 19 + .../login.defs_DES/12_chgpasswd-m/shadow | 19 + tests/crypt/login.defs_DES/config/etc/group | 41 + tests/crypt/login.defs_DES/config/etc/gshadow | 41 + .../login.defs_DES/config/etc/login.defs | 318 +++++ tests/crypt/login.defs_DES/config/etc/passwd | 19 + tests/crypt/login.defs_DES/config/etc/shadow | 19 + tests/crypt/login.defs_MD5/01_chpasswd.test | 39 + tests/crypt/login.defs_MD5/01_chpasswd/group | 41 + .../crypt/login.defs_MD5/01_chpasswd/gshadow | 41 + tests/crypt/login.defs_MD5/01_chpasswd/passwd | 19 + tests/crypt/login.defs_MD5/01_chpasswd/shadow | 19 + tests/crypt/login.defs_MD5/02_chgpasswd.test | 39 + tests/crypt/login.defs_MD5/02_chgpasswd/group | 41 + .../crypt/login.defs_MD5/02_chgpasswd/gshadow | 41 + .../crypt/login.defs_MD5/02_chgpasswd/passwd | 19 + .../crypt/login.defs_MD5/02_chgpasswd/shadow | 19 + tests/crypt/login.defs_MD5/config/etc/group | 41 + tests/crypt/login.defs_MD5/config/etc/gshadow | 41 + .../login.defs_MD5/config/etc/login.defs | 318 +++++ tests/crypt/login.defs_MD5/config/etc/passwd | 19 + tests/crypt/login.defs_MD5/config/etc/shadow | 19 + .../01_chpasswd.test | 39 + .../01_chpasswd/shadow | 19 + .../02_chgpasswd.test | 39 + .../02_chgpasswd/gshadow | 41 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 318 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../01_chpasswd.test | 45 + .../01_chpasswd/shadow | 19 + .../02_chgpasswd.test | 45 + .../02_chgpasswd/gshadow | 41 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 318 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../01_chpasswd.test | 64 + .../01_chpasswd/shadow | 19 + .../02_chgpasswd.test | 64 + .../02_chgpasswd/gshadow | 41 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 318 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../01_chpasswd.test | 45 + .../01_chpasswd/shadow | 19 + .../02_chgpasswd.test | 45 + .../02_chgpasswd/gshadow | 41 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 318 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../crypt/login.defs_SHA256/01_chpasswd.test | 39 + .../login.defs_SHA256/01_chpasswd/shadow | 19 + .../crypt/login.defs_SHA256/02_chgpasswd.test | 39 + .../login.defs_SHA256/02_chgpasswd/gshadow | 41 + .../crypt/login.defs_SHA256/config/etc/group | 41 + .../login.defs_SHA256/config/etc/gshadow | 41 + .../login.defs_SHA256/config/etc/login.defs | 318 +++++ .../crypt/login.defs_SHA256/config/etc/passwd | 19 + .../crypt/login.defs_SHA256/config/etc/shadow | 19 + .../crypt/login.defs_SHA512/01_chpasswd.test | 39 + .../login.defs_SHA512/01_chpasswd/shadow | 19 + .../crypt/login.defs_SHA512/02_chgpasswd.test | 39 + .../login.defs_SHA512/02_chgpasswd/gshadow | 41 + .../crypt/login.defs_SHA512/config/etc/group | 41 + .../login.defs_SHA512/config/etc/gshadow | 41 + .../login.defs_SHA512/config/etc/login.defs | 318 +++++ .../crypt/login.defs_SHA512/config/etc/passwd | 19 + .../crypt/login.defs_SHA512/config/etc/shadow | 19 + tests/crypt/login.defs_none/01_chpasswd.test | 39 + .../crypt/login.defs_none/01_chpasswd/shadow | 19 + tests/crypt/login.defs_none/02_chgpasswd.test | 39 + .../login.defs_none/02_chgpasswd/gshadow | 41 + tests/crypt/login.defs_none/config/etc/group | 41 + .../crypt/login.defs_none/config/etc/gshadow | 41 + .../login.defs_none/config/etc/login.defs | 318 +++++ tests/crypt/login.defs_none/config/etc/passwd | 19 + tests/crypt/login.defs_none/config/etc/shadow | 19 + tests/debian/01/data/login_files | 282 ++++ tests/debian/01/data/passwd_files | 388 ++++++ tests/debian/01/run | 33 + tests/debian/02/run | 28 + .../01_expiry_-c_no_expiry/config/etc/group | 42 + .../01_expiry_-c_no_expiry/config/etc/gshadow | 42 + .../01_expiry_-c_no_expiry/config/etc/passwd | 20 + .../01_expiry_-c_no_expiry/config/etc/shadow | 20 + .../expiry/01_expiry_-c_no_expiry/expiry.exp | 17 + .../expiry/01_expiry_-c_no_expiry/expiry.test | 37 + .../02_expiry_-c_expired/config/etc/group | 42 + .../02_expiry_-c_expired/config/etc/gshadow | 42 + .../02_expiry_-c_expired/config/etc/passwd | 20 + .../02_expiry_-c_expired/config/etc/shadow | 20 + tests/expiry/02_expiry_-c_expired/expiry.exp | 17 + tests/expiry/02_expiry_-c_expired/expiry.test | 37 + .../03_expiry_-f_expired/config/etc/group | 42 + .../03_expiry_-f_expired/config/etc/gshadow | 42 + .../config/etc/pam.d/common-password | 33 + .../03_expiry_-f_expired/config/etc/passwd | 20 + .../03_expiry_-f_expired/config/etc/shadow | 20 + tests/expiry/03_expiry_-f_expired/data/shadow | 20 + tests/expiry/03_expiry_-f_expired/expiry.exp | 23 + tests/expiry/03_expiry_-f_expired/expiry.test | 37 + .../04_expiry_no_options/config/etc/group | 42 + .../04_expiry_no_options/config/etc/gshadow | 42 + .../04_expiry_no_options/config/etc/passwd | 20 + .../04_expiry_no_options/config/etc/shadow | 20 + .../04_expiry_no_options/data/usage.out | 8 + tests/expiry/04_expiry_no_options/expiry.test | 54 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../05_expiry_-c_no_shadow_file/expiry.exp | 17 + .../05_expiry_-c_no_shadow_file/expiry.test | 41 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../06_expiry_-c_no_shadow_entry/expiry.exp | 17 + .../06_expiry_-c_no_shadow_entry/expiry.test | 37 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../07_expiry_-c_expired_account/expiry.exp | 17 + .../07_expiry_-c_expired_account/expiry.test | 37 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../08_expiry_-c_expired_max+inact/expiry.exp | 17 + .../expiry.test | 37 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../expiry.exp | 17 + .../expiry.test | 37 + .../10_expiry_bad_option/config/etc/group | 42 + .../10_expiry_bad_option/config/etc/gshadow | 42 + .../10_expiry_bad_option/config/etc/passwd | 20 + .../10_expiry_bad_option/config/etc/shadow | 20 + .../10_expiry_bad_option/data/usage.out | 9 + tests/expiry/10_expiry_bad_option/expiry.test | 53 + tests/expiry/11_expiry_usage/config/etc/group | 42 + .../expiry/11_expiry_usage/config/etc/gshadow | 42 + .../expiry/11_expiry_usage/config/etc/passwd | 20 + .../expiry/11_expiry_usage/config/etc/shadow | 20 + tests/expiry/11_expiry_usage/data/usage.out | 8 + tests/expiry/11_expiry_usage/expiry.test | 47 + .../12_expiry_extra_arg/config/etc/group | 42 + .../12_expiry_extra_arg/config/etc/gshadow | 42 + .../12_expiry_extra_arg/config/etc/passwd | 20 + .../12_expiry_extra_arg/config/etc/shadow | 20 + .../expiry/12_expiry_extra_arg/data/usage.out | 9 + tests/expiry/12_expiry_extra_arg/expiry.test | 53 + .../13_expiry_usage-c-f/config/etc/group | 42 + .../13_expiry_usage-c-f/config/etc/gshadow | 42 + .../13_expiry_usage-c-f/config/etc/passwd | 20 + .../13_expiry_usage-c-f/config/etc/shadow | 20 + .../expiry/13_expiry_usage-c-f/data/usage.out | 9 + tests/expiry/13_expiry_usage-c-f/expiry.test | 53 + .../01_chage_openRW_passwd_failure/chage.test | 62 + .../01_chage_openRW_passwd_failure/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/chage.err | 2 + .../02_chage_openRO_passwd_failure/chage.test | 62 + .../02_chage_openRO_passwd_failure/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/chage.err | 2 + .../03_chage_openRW_shadow_failure/chage.test | 62 + .../03_chage_openRW_shadow_failure/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/chage.err | 2 + .../04_chage_openRO_shadow_failure/chage.test | 62 + .../04_chage_openRO_shadow_failure/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/chage.err | 2 + .../05_chage_rename_shadow_failure/chage.test | 62 + .../05_chage_rename_shadow_failure/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/chage.err | 2 + .../06_chage_rename_passwd_failure/chage.test | 62 + .../06_chage_rename_passwd_failure/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/chage.err | 2 + .../data/shadow | 20 + .../chgpasswd.test | 55 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/chgpasswd.err | 2 + .../chgpasswd.test | 55 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/chgpasswd.err | 2 + .../chgpasswd.test | 55 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/chgpasswd.err | 2 + .../data/gshadow | 41 + .../chgpasswd.test | 55 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/chgpasswd.err | 2 + .../chpasswd.test | 55 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/chpasswd.err | 2 + .../chpasswd.test | 55 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/chpasswd.err | 2 + .../chpasswd.test | 55 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/chpasswd.err | 2 + .../data/shadow | 19 + .../chpasswd.test | 55 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/chpasswd.err | 2 + .../05_chpasswd-e_time_0/chpasswd.test | 40 + .../05_chpasswd-e_time_0/config.txt | 2 + .../05_chpasswd-e_time_0/config/etc/group | 42 + .../05_chpasswd-e_time_0/config/etc/gshadow | 42 + .../05_chpasswd-e_time_0/config/etc/passwd | 20 + .../05_chpasswd-e_time_0/config/etc/shadow | 20 + .../05_chpasswd-e_time_0/data/shadow | 20 + .../01_chsh_open_passwd_failure/chsh.test | 54 + .../01_chsh_open_passwd_failure/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../01_chsh_open_passwd_failure/data/chsh.err | 2 + .../02_chsh_rename_passwd_failure/chsh.test | 54 + .../02_chsh_rename_passwd_failure/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/chsh.err | 2 + .../02_chsh_rename_passwd_failure/data/shadow | 20 + .../01_cppw_open_passwd_in_failure/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../01_cppw_open_passwd_in_failure/cppw.test | 54 + .../data/cppw.err | 3 + .../data/passwd | 17 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../cppw.test | 54 + .../data/cppw.err | 3 + .../data/passwd | 17 + .../03_cppw_rename_passwd_failure/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../03_cppw_rename_passwd_failure/cppw.test | 54 + .../data/cppw.err | 3 + .../03_cppw_rename_passwd_failure/data/passwd | 17 + .../01_gpasswd_group_open_failure/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/gpasswd.err | 2 + .../gpasswd.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/gpasswd.err | 2 + .../gpasswd.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/gpasswd.err | 2 + .../gpasswd.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/gpasswd.err | 2 + .../gpasswd.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/gpasswd.err | 2 + .../gpasswd.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/gpasswd.err | 2 + .../gpasswd.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/gpasswd.err | 2 + .../gpasswd.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/gpasswd.err | 2 + .../gpasswd.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/gpasswd.err | 2 + .../gpasswd.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/gpasswd.err | 2 + .../gpasswd.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/gpasswd.err | 2 + .../data/group | 42 + .../gpasswd.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../data/groupadd.err | 2 + .../groupadd.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupadd.err | 2 + .../groupadd.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupadd.err | 2 + .../groupadd.test | 54 + .../04_groupadd_group_open_failure/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupadd.err | 2 + .../groupadd.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 41 + .../data/groupdel.err | 2 + .../groupdel.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupdel.err | 2 + .../groupdel.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupdel.err | 2 + .../groupdel.test | 54 + .../04_groupdel_group_open_failure/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupdel.err | 2 + .../groupdel.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupmems.err | 2 + .../groupmems.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupmems.err | 2 + .../groupmems.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../data/groupmod.err | 2 + .../groupmod.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/groupmod.err | 2 + .../groupmod.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupmod.err | 2 + .../groupmod.test | 54 + .../04_groupmod_group_open_failure/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupmod.err | 2 + .../groupmod.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupmod.err | 2 + .../groupmod.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../groupmod.test | 39 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/groupmod.err | 2 + .../groupmod.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../groupmod.test | 39 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../groupmod.test | 39 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/grpck.err | 2 + .../grpck.test | 54 + .../02_grpck_group_open_failure/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/grpck.err | 2 + .../02_grpck_group_open_failure/grpck.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/grpck.err | 2 + .../grpck.test | 54 + .../04_grpck_gshadow_open_failure/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../04_grpck_gshadow_open_failure/data/group | 42 + .../data/grpck.err | 2 + .../data/gshadow | 42 + .../04_grpck_gshadow_open_failure/grpck.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/grpck.err | 2 + .../grpck.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/grpck.err | 2 + .../grpck.test | 54 + .../01_grpconv_open_group_failure/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/grpconv.err | 2 + .../grpconv.test | 58 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/grpconv.err | 2 + .../grpconv.test | 58 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/grpconv.err | 2 + .../data/gshadow | 42 + .../grpconv.test | 58 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/grpconv.err | 2 + .../grpconv.test | 58 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/grpunconv.err | 2 + .../grpunconv.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/grpunconv.err | 2 + .../grpunconv.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/grpunconv.err | 2 + .../grpunconv.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/grpunconv.err | 2 + .../grpunconv.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/newusers.err | 2 + .../data/newusers.list | 1 + .../newusers.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/newusers.err | 2 + .../data/newusers.list | 1 + .../newusers.test | 54 + .../03_newusers_open_group_failure/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/newusers.err | 2 + .../data/newusers.list | 1 + .../newusers.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/newusers.err | 2 + .../data/newusers.list | 1 + .../newusers.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/newusers.err | 2 + .../data/newusers.list | 1 + .../newusers.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/newusers.err | 2 + .../data/newusers.list | 1 + .../data/passwd | 20 + .../newusers.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/newusers.err | 2 + .../data/newusers.list | 1 + .../data/passwd | 20 + .../data/shadow | 20 + .../newusers.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 43 + .../data/newusers.err | 2 + .../data/newusers.list | 1 + .../data/passwd | 20 + .../data/shadow | 20 + .../newusers.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 20 + .../data/group | 43 + .../data/gshadow | 43 + .../data/newusers.err | 4 + .../data/newusers.list | 1 + .../data/passwd | 20 + .../newusers.test | 54 + .../newusers/10_newusers_time_0/config.txt | 2 + .../config/etc/default/useradd | 36 + .../10_newusers_time_0/config/etc/group | 41 + .../10_newusers_time_0/config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../10_newusers_time_0/config/etc/passwd | 19 + .../10_newusers_time_0/config/etc/shadow | 19 + .../newusers/10_newusers_time_0/data/group | 42 + .../newusers/10_newusers_time_0/data/gshadow | 42 + .../10_newusers_time_0/data/newusers.list | 1 + .../newusers/10_newusers_time_0/data/passwd | 20 + .../newusers/10_newusers_time_0/data/shadow | 20 + .../newusers/10_newusers_time_0/newusers.test | 39 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/pwck.err | 2 + .../pwck.test | 54 + .../02_pwck_passwd_open_failure/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../02_pwck_passwd_open_failure/data/pwck.err | 2 + .../02_pwck_passwd_open_failure/pwck.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/pwck.err | 2 + .../pwck.test | 54 + .../04_pwck_shadow_open_failure/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../04_pwck_shadow_open_failure/data/passwd | 19 + .../04_pwck_shadow_open_failure/data/pwck.err | 2 + .../04_pwck_shadow_open_failure/pwck.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/pwck.err | 2 + .../pwck.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/passwd | 20 + .../data/pwck.err | 2 + .../pwck.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/passwd | 20 + .../data/pwck.err | 2 + .../pwck.test | 59 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/passwd | 20 + .../data/passwd.out | 20 + .../data/pwck.err | 2 + .../data/shadow | 20 + .../pwck.test | 59 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 12 + .../config/etc/shadow | 11 + .../data/shadow | 12 + .../pwck.exp | 20 + .../pwck.test | 37 + .../01_pwconv_open_passwd_failure/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/pwconv.err | 2 + .../01_pwconv_open_passwd_failure/pwconv.test | 58 + .../02_pwconv_open_shadow_failure/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/pwconv.err | 2 + .../02_pwconv_open_shadow_failure/pwconv.test | 58 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/pwconv.err | 2 + .../data/shadow | 20 + .../pwconv.test | 58 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/pwconv.err | 2 + .../pwconv.test | 58 + .../pwconv/05_pwconv_time_0/config.txt | 2 + .../pwconv/05_pwconv_time_0/config/etc/group | 42 + .../05_pwconv_time_0/config/etc/gshadow | 42 + .../pwconv/05_pwconv_time_0/config/etc/passwd | 20 + .../pwconv/05_pwconv_time_0/config/etc/shadow | 20 + .../pwconv/05_pwconv_time_0/data/passwd | 20 + .../pwconv/05_pwconv_time_0/data/shadow | 20 + .../pwconv/05_pwconv_time_0/pwconv.test | 43 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/pwunconv.err | 2 + .../pwunconv.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/pwunconv.err | 2 + .../pwunconv.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/pwunconv.err | 2 + .../pwunconv.test | 54 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/passwd | 20 + .../data/pwunconv.err | 2 + .../pwunconv.test | 54 + .../01_useradd_open_passwd_failure/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/useradd.err | 2 + .../useradd.test | 54 + .../02_useradd_open_shadow_failure/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/useradd.err | 2 + .../useradd.test | 54 + .../03_useradd_open_group_failure/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/useradd.err | 2 + .../useradd.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/useradd.err | 2 + .../useradd.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/useradd.err | 2 + .../useradd.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/passwd | 20 + .../data/useradd.err | 2 + .../useradd.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/passwd | 20 + .../data/shadow | 20 + .../data/useradd.err | 2 + .../useradd.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../data/passwd | 20 + .../data/shadow | 20 + .../data/useradd.err | 2 + .../useradd.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/useradd.err | 2 + .../useradd.test | 55 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/useradd.err | 2 + .../useradd.test | 54 + .../useradd/11_useradd_time_0/config.txt | 2 + .../config/etc/default/useradd | 36 + .../11_useradd_time_0/config/etc/group | 41 + .../11_useradd_time_0/config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../11_useradd_time_0/config/etc/passwd | 19 + .../11_useradd_time_0/config/etc/shadow | 19 + .../useradd/11_useradd_time_0/data/group | 42 + .../useradd/11_useradd_time_0/data/gshadow | 42 + .../11_useradd_time_0/data/newusers.list | 1 + .../useradd/11_useradd_time_0/data/passwd | 20 + .../useradd/11_useradd_time_0/data/shadow | 20 + .../useradd/11_useradd_time_0/useradd.test | 39 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 41 + .../data/passwd | 19 + .../data/shadow | 19 + .../data/userdel.err | 2 + .../userdel.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/passwd | 19 + .../data/shadow | 19 + .../data/userdel.err | 2 + .../userdel.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/passwd | 19 + .../data/userdel.err | 2 + .../userdel.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/userdel.err | 2 + .../userdel.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../config/var/mail/foo | 0 .../data/group | 41 + .../data/gshadow | 41 + .../data/passwd | 19 + .../data/shadow | 19 + .../data/userdel.err | 3 + .../userdel.test | 58 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 41 + .../data/gshadow | 41 + .../data/passwd | 19 + .../data/shadow | 19 + .../data/userdel.err | 3 + .../userdel.test | 64 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 41 + .../data/gshadow | 41 + .../data/passwd | 19 + .../data/shadow | 19 + .../data/userdel.err | 3 + .../userdel.test | 64 + .../08_userdel_open_passwd_failure/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/userdel.err | 2 + .../userdel.test | 54 + .../09_userdel_open_shadow_failure/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/userdel.err | 2 + .../userdel.test | 54 + .../10_userdel_open_group_failure/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/userdel.err | 2 + .../userdel.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/userdel.err | 2 + .../userdel.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/passwd | 20 + .../data/shadow | 20 + .../data/usermod.err | 2 + .../usermod.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/usermod.err | 2 + .../usermod.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/passwd | 20 + .../data/shadow | 20 + .../data/usermod.err | 2 + .../usermod.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/passwd | 20 + .../data/shadow | 20 + .../usermod.test | 39 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/passwd | 20 + .../data/usermod.err | 2 + .../usermod.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/usermod.err | 2 + .../usermod.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/usermod.err | 2 + .../usermod.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/usermod.err | 2 + .../usermod.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/usermod.err | 2 + .../usermod.test | 54 + .../usermod/10_usermod_-p_time_0/config.txt | 2 + .../config/etc/default/useradd | 36 + .../10_usermod_-p_time_0/config/etc/group | 42 + .../10_usermod_-p_time_0/config/etc/gshadow | 42 + .../10_usermod_-p_time_0/config/etc/passwd | 20 + .../10_usermod_-p_time_0/config/etc/shadow | 20 + .../usermod/10_usermod_-p_time_0/data/passwd | 20 + .../usermod/10_usermod_-p_time_0/data/shadow | 20 + .../usermod/10_usermod_-p_time_0/usermod.test | 39 + .../config.txt | 2 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/shadow | 20 + .../usermod.test | 39 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/usermod.err | 2 + .../usermod.test | 50 + .../01_chgpasswd_invalid_group/chgpasswd.test | 56 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 318 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/chgpasswd.err | 2 + .../chgpasswd.test | 40 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 318 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../02_chgpasswd_multiple_groups/data/gshadow | 41 + .../chgpasswd.test | 44 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 318 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../03_chgpasswd_no_gshadow_file/data/group | 41 + .../chgpasswd.test | 40 + .../config/etc/group | 41 + .../config/etc/gshadow | 40 + .../config/etc/login.defs | 318 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../04_chgpasswd_no_gshadow_entry/data/group | 41 + .../data/gshadow | 41 + .../chgpasswd.test | 55 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 318 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/chgpasswd.err | 2 + .../06_chgpasswd_usage/chgpasswd.test | 48 + .../chgpasswd/06_chgpasswd_usage/config.txt | 10 + .../config/etc/default/useradd | 36 + .../06_chgpasswd_usage/config/etc/group | 41 + .../06_chgpasswd_usage/config/etc/gshadow | 41 + .../06_chgpasswd_usage/config/etc/passwd | 19 + .../06_chgpasswd_usage/config/etc/shadow | 19 + .../06_chgpasswd_usage/data/usage.out | 12 + .../chgpasswd.test | 54 + .../07_chgpasswd_usage_bad_option/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 13 + .../chgpasswd.test | 54 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 13 + .../chgpasswd.test | 54 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 13 + .../chgpasswd.test | 54 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 13 + .../chgpasswd.test | 54 + .../11_chgpasswd_usage-s_without-c/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 13 + .../chgpasswd.test | 54 + .../12_chgpasswd_usage-s_invalid/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 13 + .../chgpasswd.test | 54 + .../13_chgpasswd_usage-c_invalid/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 13 + .../chgpasswd.test | 40 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/gshadow | 41 + .../15_chgpasswd_password_md5/chgpasswd.test | 40 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../15_chgpasswd_password_md5/data/gshadow | 41 + .../16_chgpasswd_password_NONE/chgpasswd.test | 40 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../16_chgpasswd_password_NONE/data/gshadow | 41 + .../17_chgpasswd_password_MD5/chgpasswd.test | 40 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../17_chgpasswd_password_MD5/data/gshadow | 41 + .../18_chgpasswd_password_DES/chgpasswd.test | 40 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../18_chgpasswd_password_DES/data/gshadow | 41 + .../chgpasswd.test | 40 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../19_chgpasswd_password_SHA256/data/gshadow | 41 + .../chgpasswd.test | 41 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/gshadow | 41 + .../chgpasswd.test | 41 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/gshadow | 41 + .../chgpasswd.test | 40 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../22_chgpasswd_password_SHA512/data/gshadow | 41 + .../chgpasswd.test | 41 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/gshadow | 41 + .../chgpasswd.test | 41 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/gshadow | 41 + .../chgpasswd.test | 44 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../25_chgpasswd-e_no_gshadow_file/data/group | 41 + .../chgpasswd.test | 44 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 41 + .../chgpasswd.test | 40 + .../config/etc/group | 41 + .../config/etc/gshadow | 40 + .../config/etc/passwd | 19 + .../config/etc/shadow | 18 + .../data/group | 41 + .../data/gshadow | 41 + .../30_chgpasswd_locked_group/chgpasswd.test | 61 + .../30_chgpasswd_locked_group/config.txt | 0 .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/chgpasswd.err | 2 + .../chgpasswd.test | 61 + .../31_chgpasswd_locked_gshadow/config.txt | 0 .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/chgpasswd.err | 2 + .../32_chgpasswd_invalid_group/chgpasswd.test | 56 + .../32_chgpasswd_invalid_group/config.txt | 0 .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/chgpasswd.err | 2 + .../01_gpasswd_change_member_list/config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../01_gpasswd_change_member_list/data/group | 42 + .../data/gshadow | 42 + .../gpasswd.test | 39 + .../02_gpasswd_change_member_list/config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../02_gpasswd_change_member_list/data/group | 42 + .../data/gshadow | 42 + .../gpasswd.test | 39 + .../03_gpasswd_change_member_list/config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../03_gpasswd_change_member_list/data/group | 42 + .../data/gshadow | 42 + .../gpasswd.test | 39 + .../04_gpasswd_change_member_list/config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../04_gpasswd_change_member_list/data/group | 42 + .../data/gshadow | 42 + .../gpasswd.test | 39 + .../05_gpasswd_change_member_list/config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../05_gpasswd_change_member_list/data/group | 42 + .../data/gshadow | 42 + .../gpasswd.test | 39 + .../06_gpasswd_change_member_list/config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../06_gpasswd_change_member_list/data/group | 42 + .../data/gshadow | 42 + .../gpasswd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../gpasswd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../gpasswd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../gpasswd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../gpasswd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../gpasswd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../gpasswd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../gpasswd.test | 42 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../gpasswd.test | 42 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../gpasswd.test | 42 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../gpasswd.test | 42 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../gpasswd.test | 43 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../gpasswd.test | 42 + .../19_gpasswd_change_passwd-root/config.txt | 3 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/gshadow | 42 + .../19_gpasswd_change_passwd-root/gpasswd.exp | 70 + .../gpasswd.test | 42 + .../config.txt | 3 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/gshadow | 42 + .../gpasswd.exp | 70 + .../gpasswd.test | 42 + .../config.txt | 3 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../gpasswd.exp | 70 + .../gpasswd.test | 45 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/gshadow | 42 + .../gpasswd.exp | 70 + .../gpasswd.test | 42 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../gpasswd.exp | 60 + .../gpasswd.test | 42 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../gpasswd.exp | 59 + .../gpasswd.test | 45 + .../25_gpasswd_remove_password/config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../25_gpasswd_remove_password/data/group | 42 + .../25_gpasswd_remove_password/data/gshadow | 42 + .../25_gpasswd_remove_password/gpasswd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../gpasswd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../gpasswd.test | 42 + .../28_gpasswd_lock_password/config.txt | 5 + .../config/etc/default/useradd | 36 + .../28_gpasswd_lock_password/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../28_gpasswd_lock_password/data/group | 42 + .../28_gpasswd_lock_password/data/gshadow | 42 + .../28_gpasswd_lock_password/gpasswd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../gpasswd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../gpasswd.test | 42 + .../31_gpasswd_add_user_to_group/config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../31_gpasswd_add_user_to_group/data/group | 42 + .../31_gpasswd_add_user_to_group/data/gshadow | 42 + .../31_gpasswd_add_user_to_group/gpasswd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../gpasswd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../gpasswd.test | 42 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../gpasswd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../gpasswd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../gpasswd.test | 40 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../gpasswd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../gpasswd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../gpasswd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../gpasswd.test | 42 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../gpasswd.test | 42 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../gpasswd.test | 42 + .../43_gpasswd_-r_locked_group/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/gpasswd.err | 2 + .../43_gpasswd_-r_locked_group/gpasswd.test | 60 + .../44_gpasswd_-r_locked_gshadow/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/gpasswd.err | 2 + .../44_gpasswd_-r_locked_gshadow/gpasswd.test | 60 + .../45_gpasswd_-r_unknown_group/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/gpasswd.err | 1 + .../45_gpasswd_-r_unknown_group/gpasswd.test | 54 + .../46_gpasswd_-a_unknown_user/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/gpasswd.err | 1 + .../46_gpasswd_-a_unknown_user/gpasswd.test | 54 + .../47_gpasswd_-M_unknown_user/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/gpasswd.err | 1 + .../47_gpasswd_-M_unknown_user/gpasswd.test | 54 + .../48_gpasswd_change_admin_list/config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../48_gpasswd_change_admin_list/data/gshadow | 42 + .../48_gpasswd_change_admin_list/gpasswd.test | 39 + .../49_gpasswd_change_admin_list/config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../49_gpasswd_change_admin_list/data/gshadow | 42 + .../49_gpasswd_change_admin_list/gpasswd.test | 39 + .../50_gpasswd_change_admin_list/config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../50_gpasswd_change_admin_list/data/gshadow | 42 + .../50_gpasswd_change_admin_list/gpasswd.test | 39 + .../51_gpasswd_change_admin_list/config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../51_gpasswd_change_admin_list/data/gshadow | 42 + .../51_gpasswd_change_admin_list/gpasswd.test | 39 + .../52_gpasswd_change_admin_list/config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../52_gpasswd_change_admin_list/data/gshadow | 42 + .../52_gpasswd_change_admin_list/gpasswd.test | 39 + .../53_gpasswd_change_admin_list/config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../53_gpasswd_change_admin_list/data/gshadow | 42 + .../53_gpasswd_change_admin_list/gpasswd.test | 39 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/gshadow | 42 + .../gpasswd.test | 39 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/gpasswd.err | 1 + .../gpasswd.test | 57 + .../56_gpasswd_add_user_to_group/config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../56_gpasswd_add_user_to_group/gpasswd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/gpasswd.err | 1 + .../gpasswd.test | 54 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../gpasswd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/gshadow | 42 + .../gpasswd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../gpasswd.test | 39 + .../gpasswd/61_gpasswd_usage/config.txt | 10 + .../gpasswd/61_gpasswd_usage/config/etc/group | 41 + .../61_gpasswd_usage/config/etc/gshadow | 41 + .../61_gpasswd_usage/config/etc/passwd | 19 + .../61_gpasswd_usage/config/etc/shadow | 19 + .../gpasswd/61_gpasswd_usage/data/usage.out | 13 + .../gpasswd/61_gpasswd_usage/gpasswd.test | 49 + .../62_gpasswd_-A_unknown_user/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/gpasswd.err | 1 + .../62_gpasswd_-A_unknown_user/gpasswd.test | 54 + .../63_gpasswd_usage_bad_option/config.txt | 10 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 14 + .../63_gpasswd_usage_bad_option/gpasswd.test | 54 + .../gpasswd/64_gpasswd_usage-a-d/config.txt | 10 + .../64_gpasswd_usage-a-d/config/etc/group | 41 + .../64_gpasswd_usage-a-d/config/etc/gshadow | 41 + .../64_gpasswd_usage-a-d/config/etc/passwd | 19 + .../64_gpasswd_usage-a-d/config/etc/shadow | 19 + .../64_gpasswd_usage-a-d/data/usage.out | 13 + .../gpasswd/64_gpasswd_usage-a-d/gpasswd.test | 54 + .../65_gpasswd_usage_no_groups/config.txt | 10 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../65_gpasswd_usage_no_groups/data/usage.out | 13 + .../65_gpasswd_usage_no_groups/gpasswd.test | 54 + .../66_gpasswd_usage_2_groups/config.txt | 10 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../66_gpasswd_usage_2_groups/data/usage.out | 13 + .../66_gpasswd_usage_2_groups/gpasswd.test | 54 + .../gpasswd/67_gpasswd-A_myuser/config.txt | 1 + .../67_gpasswd-A_myuser/config/etc/group | 42 + .../67_gpasswd-A_myuser/config/etc/gshadow | 42 + .../67_gpasswd-A_myuser/config/etc/passwd | 21 + .../67_gpasswd-A_myuser/config/etc/shadow | 21 + .../gpasswd/67_gpasswd-A_myuser/gpasswd.exp | 59 + .../gpasswd/67_gpasswd-A_myuser/gpasswd.test | 42 + .../gpasswd/68_gpasswd-M_myuser/config.txt | 1 + .../68_gpasswd-M_myuser/config/etc/group | 42 + .../68_gpasswd-M_myuser/config/etc/gshadow | 42 + .../68_gpasswd-M_myuser/config/etc/passwd | 21 + .../68_gpasswd-M_myuser/config/etc/shadow | 21 + .../gpasswd/68_gpasswd-M_myuser/gpasswd.exp | 60 + .../gpasswd/68_gpasswd-M_myuser/gpasswd.test | 42 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/gshadow | 42 + .../gpasswd.exp | 87 ++ .../gpasswd.test | 42 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 335 +++++ .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/gshadow | 42 + .../gpasswd.exp | 96 ++ .../gpasswd.test | 42 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 335 +++++ .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../gpasswd.exp | 96 ++ .../gpasswd.test | 42 + .../gpasswd/72_gpasswd-M-A/config.txt | 5 + .../gpasswd/72_gpasswd-M-A/config/etc/group | 42 + .../gpasswd/72_gpasswd-M-A/config/etc/gshadow | 42 + .../gpasswd/72_gpasswd-M-A/config/etc/passwd | 20 + .../gpasswd/72_gpasswd-M-A/config/etc/shadow | 20 + .../gpasswd/72_gpasswd-M-A/data/group | 42 + .../gpasswd/72_gpasswd-M-A/data/gshadow | 42 + .../gpasswd/72_gpasswd-M-A/gpasswd.test | 39 + .../groupadd/01_groupadd_add_group/config.txt | 5 + .../config/etc/default/useradd | 36 + .../01_groupadd_add_group/config/etc/group | 41 + .../01_groupadd_add_group/config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../01_groupadd_add_group/config/etc/passwd | 19 + .../01_groupadd_add_group/config/etc/shadow | 19 + .../groupadd/01_groupadd_add_group/data/group | 42 + .../01_groupadd_add_group/data/gshadow | 42 + .../01_groupadd_add_group/groupadd.test | 39 + .../02_groupadd_add_group_GID_MIN/config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../02_groupadd_add_group_GID_MIN/data/group | 42 + .../data/gshadow | 42 + .../groupadd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../data/gshadow | 42 + .../groupadd.test | 39 + .../04_groupadd_set_password/config.txt | 5 + .../config/etc/default/useradd | 36 + .../04_groupadd_set_password/config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../04_groupadd_set_password/data/group | 42 + .../04_groupadd_set_password/data/gshadow | 42 + .../04_groupadd_set_password/groupadd.test | 39 + .../groupadd/05_groupadd_set_GID/config.txt | 5 + .../config/etc/default/useradd | 36 + .../05_groupadd_set_GID/config/etc/group | 41 + .../05_groupadd_set_GID/config/etc/gshadow | 41 + .../05_groupadd_set_GID/config/etc/login.defs | 315 +++++ .../05_groupadd_set_GID/config/etc/passwd | 19 + .../05_groupadd_set_GID/config/etc/shadow | 19 + .../groupadd/05_groupadd_set_GID/data/group | 42 + .../groupadd/05_groupadd_set_GID/data/gshadow | 42 + .../05_groupadd_set_GID/groupadd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../groupadd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 43 + .../data/gshadow | 43 + .../groupadd.test | 39 + .../08_groupadd_locked_group/config.txt | 10 + .../config/etc/default/useradd | 36 + .../08_groupadd_locked_group/config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupadd.err | 2 + .../08_groupadd_locked_group/groupadd.test | 60 + .../09_groupadd_locked_gshadow/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupadd.err | 2 + .../09_groupadd_locked_gshadow/groupadd.test | 60 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 43 + .../data/gshadow | 43 + .../groupadd.test | 39 + .../11_groupadd_invalid_GID/config.txt | 10 + .../config/etc/default/useradd | 36 + .../11_groupadd_invalid_GID/config/etc/group | 41 + .../config/etc/gshadow | 41 + .../11_groupadd_invalid_GID/config/etc/passwd | 19 + .../11_groupadd_invalid_GID/config/etc/shadow | 19 + .../11_groupadd_invalid_GID/data/groupadd.err | 1 + .../11_groupadd_invalid_GID/groupadd.test | 54 + .../12_groupadd_negativ_GID/config.txt | 10 + .../config/etc/default/useradd | 36 + .../12_groupadd_negativ_GID/config/etc/group | 41 + .../config/etc/gshadow | 41 + .../12_groupadd_negativ_GID/config/etc/passwd | 19 + .../12_groupadd_negativ_GID/config/etc/shadow | 19 + .../12_groupadd_negativ_GID/data/groupadd.err | 1 + .../12_groupadd_negativ_GID/groupadd.test | 54 + .../13_groupadd_invalid_name/config.txt | 10 + .../config/etc/default/useradd | 36 + .../13_groupadd_invalid_name/config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupadd.err | 1 + .../13_groupadd_invalid_name/groupadd.test | 54 + .../14_groupadd_invalid_-K_option/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupadd.err | 1 + .../groupadd.test | 54 + .../15_groupadd_invalid_-K_no_=/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupadd.err | 1 + .../15_groupadd_invalid_-K_no_=/groupadd.test | 54 + .../16_groupadd_existing_group/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupadd.err | 1 + .../16_groupadd_existing_group/groupadd.test | 54 + .../17_groupadd_add_systemgroup/config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 316 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../17_groupadd_add_systemgroup/data/group | 42 + .../17_groupadd_add_systemgroup/data/gshadow | 42 + .../17_groupadd_add_systemgroup/groupadd.test | 39 + .../18_groupadd_no_more_GID/config.txt | 10 + .../config/etc/default/useradd | 36 + .../18_groupadd_no_more_GID/config/etc/group | 43 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../18_groupadd_no_more_GID/config/etc/passwd | 19 + .../18_groupadd_no_more_GID/config/etc/shadow | 19 + .../18_groupadd_no_more_GID/data/groupadd.err | 1 + .../18_groupadd_no_more_GID/groupadd.test | 54 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 317 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupadd.err | 1 + .../groupadd.test | 54 + .../20_groupadd_add_existing_GID/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupadd.err | 1 + .../groupadd.test | 54 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupadd.err | 1 + .../groupadd.test | 54 + .../groupadd/22_groupadd_usage/config.txt | 10 + .../config/etc/default/useradd | 36 + .../22_groupadd_usage/config/etc/group | 41 + .../22_groupadd_usage/config/etc/gshadow | 41 + .../22_groupadd_usage/config/etc/passwd | 19 + .../22_groupadd_usage/config/etc/shadow | 19 + .../groupadd/22_groupadd_usage/data/usage.out | 14 + .../groupadd/22_groupadd_usage/groupadd.test | 49 + .../groupadd/23_groupadd_no_groups/config.txt | 10 + .../config/etc/default/useradd | 36 + .../23_groupadd_no_groups/config/etc/group | 41 + .../23_groupadd_no_groups/config/etc/gshadow | 41 + .../23_groupadd_no_groups/config/etc/passwd | 19 + .../23_groupadd_no_groups/config/etc/shadow | 19 + .../23_groupadd_no_groups/data/groupadd.err | 14 + .../23_groupadd_no_groups/groupadd.test | 54 + .../groupadd/24_groupadd_2_groups/config.txt | 10 + .../config/etc/default/useradd | 36 + .../24_groupadd_2_groups/config/etc/group | 41 + .../24_groupadd_2_groups/config/etc/gshadow | 41 + .../24_groupadd_2_groups/config/etc/passwd | 19 + .../24_groupadd_2_groups/config/etc/shadow | 19 + .../24_groupadd_2_groups/data/groupadd.err | 14 + .../24_groupadd_2_groups/groupadd.test | 54 + .../25_groupadd_no_gshadow/config.txt | 5 + .../config/etc/default/useradd | 36 + .../25_groupadd_no_gshadow/config/etc/group | 41 + .../25_groupadd_no_gshadow/config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../25_groupadd_no_gshadow/config/etc/passwd | 19 + .../25_groupadd_no_gshadow/config/etc/shadow | 19 + .../25_groupadd_no_gshadow/data/group | 42 + .../25_groupadd_no_gshadow/groupadd.test | 43 + .../26_groupadd_-o_without_-g/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupadd.err | 14 + .../26_groupadd_-o_without_-g/groupadd.test | 54 + .../27_groupadd_invalid_option/config.txt | 10 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupadd.err | 15 + .../27_groupadd_invalid_option/groupadd.test | 54 + .../01_groupdel_delete_group/config.txt | 5 + .../config/etc/default/useradd | 36 + .../01_groupdel_delete_group/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../01_groupdel_delete_group/data/group | 41 + .../01_groupdel_delete_group/data/gshadow | 41 + .../01_groupdel_delete_group/groupdel.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 41 + .../groupdel.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 41 + .../groupdel.test | 42 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/groupdel.err | 1 + .../groupdel.test | 54 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/groupdel.err | 1 + .../groupdel.test | 54 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupdel.err | 2 + .../groupdel.test | 60 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupdel.err | 2 + .../groupdel.test | 60 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/groupdel.err | 6 + .../groupdel.test | 54 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/groupdel.err | 6 + .../groupdel.test | 54 + .../groupdel/10_groupdel_usage/config.txt | 5 + .../config/etc/default/useradd | 36 + .../10_groupdel_usage/config/etc/group | 42 + .../10_groupdel_usage/config/etc/gshadow | 42 + .../10_groupdel_usage/config/etc/login.defs | 315 +++++ .../10_groupdel_usage/config/etc/passwd | 20 + .../10_groupdel_usage/config/etc/shadow | 20 + .../groupdel/10_groupdel_usage/data/usage.out | 6 + .../groupdel/10_groupdel_usage/groupdel.test | 48 + .../11_groupdel_invalid_option/config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/groupdel.err | 7 + .../11_groupdel_invalid_option/groupdel.test | 54 + .../01_groupmems_root_add_user/config.txt | 2 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../01_groupmems_root_add_user/data/group | 44 + .../01_groupmems_root_add_user/data/gshadow | 44 + .../01_groupmems_root_add_user/groupmems.test | 39 + .../02_groupmems_root_del_user/config.txt | 2 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../02_groupmems_root_del_user/data/group | 44 + .../02_groupmems_root_del_user/data/gshadow | 44 + .../02_groupmems_root_del_user/groupmems.test | 39 + .../config.txt | 2 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 44 + .../data/gshadow | 44 + .../groupmems.test | 39 + .../config.txt | 2 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 44 + .../data/gshadow | 44 + .../groupmems.test | 39 + .../config.txt | 2 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 44 + .../data/gshadow | 44 + .../groupmems.test | 39 + .../config.txt | 2 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 44 + .../data/gshadow | 44 + .../groupmems.test | 39 + .../config.txt | 2 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 44 + .../data/gshadow | 44 + .../groupmems.test | 39 + .../config.txt | 2 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 44 + .../data/gshadow | 44 + .../groupmems.test | 39 + .../09_groupmems_root_purge_user/config.txt | 2 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../09_groupmems_root_purge_user/data/group | 44 + .../09_groupmems_root_purge_user/data/gshadow | 44 + .../groupmems.test | 39 + .../config.txt | 2 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 44 + .../data/gshadow | 44 + .../groupmems.test | 39 + .../config.txt | 2 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 44 + .../data/gshadow | 44 + .../groupmems.test | 39 + .../12_groupmems_user_add_user/config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../12_groupmems_user_add_user/data/group | 44 + .../12_groupmems_user_add_user/data/gshadow | 44 + .../12_groupmems_user_add_user/groupmems.test | 39 + .../run_groupmems.exp | 49 + .../13_groupmems_user_del_user/config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../13_groupmems_user_del_user/data/group | 44 + .../13_groupmems_user_del_user/data/gshadow | 44 + .../13_groupmems_user_del_user/groupmems.test | 39 + .../run_groupmems.exp | 49 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 44 + .../data/gshadow | 44 + .../groupmems.test | 39 + .../run_groupmems.exp | 49 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 44 + .../data/gshadow | 44 + .../groupmems.test | 39 + .../run_groupmems.exp | 49 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 44 + .../data/gshadow | 44 + .../groupmems.test | 39 + .../run_groupmems.exp | 49 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 44 + .../data/gshadow | 44 + .../groupmems.test | 39 + .../run_groupmems.exp | 49 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 44 + .../data/gshadow | 44 + .../groupmems.test | 39 + .../run_groupmems.exp | 49 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 44 + .../data/gshadow | 44 + .../groupmems.test | 39 + .../run_groupmems.exp | 49 + .../20_groupmems_user_purge_user/config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../20_groupmems_user_purge_user/data/group | 44 + .../20_groupmems_user_purge_user/data/gshadow | 44 + .../groupmems.test | 39 + .../run_groupmems.exp | 49 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 44 + .../data/gshadow | 44 + .../groupmems.test | 39 + .../run_groupmems.exp | 49 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 44 + .../data/gshadow | 44 + .../groupmems.test | 39 + .../run_groupmems.exp | 49 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../groupmems.test | 39 + .../run_groupmems.exp | 41 + .../config.txt | 1 + .../config/etc/group | 45 + .../config/etc/gshadow | 45 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../groupmems.test | 39 + .../run_groupmems.exp | 42 + .../config.txt | 1 + .../config/etc/group | 45 + .../config/etc/gshadow | 45 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../groupmems.test | 39 + .../run_groupmems.exp | 42 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../groupmems.test | 39 + .../run_groupmems.exp | 50 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../groupmems.test | 39 + .../run_groupmems.exp | 50 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 44 + .../groupmems.test | 39 + .../run_groupmems.exp | 48 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../groupmems.test | 39 + .../run_groupmems.exp | 42 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 44 + .../data/gshadow | 44 + .../groupmems.test | 39 + .../run_groupmems.exp | 49 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 44 + .../groupmems.test | 42 + .../run_groupmems.exp | 49 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../groupmems.test | 39 + .../run_groupmems.exp | 50 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 44 + .../groupmems.test | 39 + .../run_groupmems.exp | 48 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 44 + .../data/gshadow | 44 + .../groupmems.test | 39 + .../run_groupmems.exp | 48 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 44 + .../data/gshadow | 44 + .../groupmems.test | 39 + .../run_groupmems.exp | 49 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 44 + .../groupmems.test | 42 + .../run_groupmems.exp | 49 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/gshadow | 44 + .../groupmems.test | 39 + .../run_groupmems.exp | 49 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 44 + .../data/gshadow | 44 + .../groupmems.test | 39 + .../run_groupmems.exp | 49 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 44 + .../groupmems.test | 42 + .../run_groupmems.exp | 49 + .../config.txt | 1 + .../config/etc/group | 45 + .../config/etc/gshadow | 45 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../groupmems.test | 39 + .../run_groupmems.exp | 42 + .../config.txt | 1 + .../config/etc/group | 45 + .../config/etc/gshadow | 45 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../groupmems.test | 39 + .../run_groupmems.exp | 42 + .../42_groupmems_user_list_users/config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../groupmems.test | 39 + .../run_groupmems.exp | 42 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../groupmems.test | 39 + .../run_groupmems.exp | 42 + .../config.txt | 1 + .../config/etc/group | 45 + .../config/etc/gshadow | 45 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../groupmems.test | 39 + .../run_groupmems.exp | 42 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../groupmems.test | 45 + .../run_groupmems.exp | 42 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../groupmems.test | 45 + .../run_groupmems.exp | 42 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../groupmems.test | 45 + .../run_groupmems.exp | 50 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../groupmems.test | 45 + .../run_groupmems.exp | 50 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../groupmems.test | 45 + .../run_groupmems.exp | 50 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../groupmems.test | 45 + .../run_groupmems.exp | 50 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../groupmems.test | 45 + .../run_groupmems.exp | 50 + .../config.txt | 1 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../groupmems.test | 45 + .../run_groupmems.exp | 50 + .../groupmems/53_groupmems_usage/config.txt | 10 + .../53_groupmems_usage/config/etc/group | 41 + .../53_groupmems_usage/config/etc/gshadow | 41 + .../53_groupmems_usage/config/etc/passwd | 19 + .../53_groupmems_usage/config/etc/shadow | 19 + .../53_groupmems_usage/data/usage.out | 13 + .../53_groupmems_usage/groupmems.test | 49 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupmems.err | 14 + .../groupmems.test | 54 + .../55_groupmems_usage-a-d/config.txt | 1 + .../55_groupmems_usage-a-d/config/etc/group | 42 + .../55_groupmems_usage-a-d/config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../55_groupmems_usage-a-d/config/etc/passwd | 19 + .../55_groupmems_usage-a-d/config/etc/shadow | 19 + .../55_groupmems_usage-a-d/data/groupmems.err | 13 + .../55_groupmems_usage-a-d/groupmems.test | 54 + .../56_groupmems_usage_extra_arg/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupmems.err | 13 + .../groupmems.test | 54 + .../57_groupmems_authentication/config.txt | 1 + .../config/etc/group | 45 + .../config/etc/gshadow | 45 + .../config/etc/pam.d/common-account | 25 + .../config/etc/pam.d/common-auth | 25 + .../config/etc/pam.d/groupmems | 8 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../57_groupmems_authentication/data/group | 45 + .../57_groupmems_authentication/data/gshadow | 45 + .../groupmems.test | 39 + .../run_groupmems.exp | 43 + .../config.txt | 1 + .../config/etc/group | 45 + .../config/etc/gshadow | 45 + .../config/etc/pam.d/common-account | 25 + .../config/etc/pam.d/common-auth | 25 + .../config/etc/pam.d/groupmems | 8 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../groupmems.test | 39 + .../run_groupmems.exp | 44 + .../config.txt | 1 + .../config/etc/group | 45 + .../config/etc/gshadow | 45 + .../config/etc/pam.d/common-account | 1 + .../config/etc/pam.d/common-auth | 25 + .../config/etc/pam.d/groupmems | 8 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../groupmems.test | 39 + .../run_groupmems.exp | 44 + .../config.txt | 1 + .../config/etc/group | 45 + .../config/etc/gshadow | 45 + .../config/etc/pam.d/groupmems | 1 + .../config/etc/pam.d/other | 1 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../groupmems.test | 43 + .../run_groupmems.exp | 42 + .../01_groupmod_change_gid/config.txt | 1 + .../config/etc/default/useradd | 36 + .../01_groupmod_change_gid/config/etc/group | 42 + .../01_groupmod_change_gid/config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../01_groupmod_change_gid/config/etc/passwd | 19 + .../01_groupmod_change_gid/config/etc/shadow | 19 + .../01_groupmod_change_gid/data/group | 42 + .../01_groupmod_change_gid/groupmod.test | 39 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/passwd | 20 + .../groupmod.test | 39 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../groupmod.test | 39 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../groupmod.test | 42 + .../config.txt | 2 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 43 + .../groupmod.test | 39 + .../06_groupmod_change_group_name/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../06_groupmod_change_group_name/data/group | 42 + .../data/gshadow | 42 + .../groupmod.test | 39 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../groupmod.test | 39 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../groupmod.test | 42 + .../09_groupmod_set_password/config.txt | 1 + .../config/etc/default/useradd | 36 + .../09_groupmod_set_password/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../09_groupmod_set_password/data/gshadow | 42 + .../09_groupmod_set_password/groupmod.test | 39 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/gshadow | 42 + .../groupmod.test | 39 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../groupmod.test | 42 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupmod.err | 1 + .../groupmod.test | 54 + .../config.txt | 2 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupmod.err | 1 + .../groupmod.test | 54 + .../config.txt | 2 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupmod.err | 1 + .../groupmod.test | 54 + .../config.txt | 2 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupmod.err | 1 + .../groupmod.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../groupmod.test | 39 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupmod.err | 2 + .../groupmod.test | 60 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../groupmod.test | 47 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupmod.err | 1 + .../groupmod.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupmod.err | 1 + .../groupmod.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupmod.err | 11 + .../groupmod.test | 60 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../data/gshadow | 42 + .../groupmod.test | 39 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/group | 42 + .../data/gshadow | 42 + .../data/passwd | 20 + .../groupmod.test | 39 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupmod.err | 2 + .../groupmod.test | 60 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupmod.err | 2 + .../groupmod.test | 60 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../data/gshadow | 42 + .../groupmod.test | 47 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupmod.err | 1 + .../groupmod.test | 54 + .../groupmod/28_groupmod_usage/config.txt | 10 + .../config/etc/default/useradd | 36 + .../28_groupmod_usage/config/etc/group | 41 + .../28_groupmod_usage/config/etc/gshadow | 41 + .../28_groupmod_usage/config/etc/passwd | 19 + .../28_groupmod_usage/config/etc/shadow | 19 + .../groupmod/28_groupmod_usage/data/usage.out | 11 + .../groupmod/28_groupmod_usage/groupmod.test | 49 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../data/gshadow | 42 + .../groupmod.test | 39 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../groupmod.test | 39 + .../31_groupmod_-g_same_gid/config.txt | 1 + .../config/etc/default/useradd | 36 + .../31_groupmod_-g_same_gid/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../31_groupmod_-g_same_gid/config/etc/passwd | 19 + .../31_groupmod_-g_same_gid/config/etc/shadow | 19 + .../31_groupmod_-g_same_gid/groupmod.test | 39 + .../32_groupmod_-o_without_-g/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupmod.err | 11 + .../32_groupmod_-o_without_-g/groupmod.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../groupmod.test | 42 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../data/gshadow | 42 + .../groupmod.test | 39 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../groupmod.test | 39 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/gshadow | 42 + .../groupmod.test | 39 + .../37_groupmod_invalid_option/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/groupmod.err | 12 + .../37_groupmod_invalid_option/groupmod.test | 54 + .../faillog/01_faillog_no_faillog/config.txt | 1 + .../01_faillog_no_faillog/config/etc/group | 42 + .../01_faillog_no_faillog/config/etc/gshadow | 42 + .../01_faillog_no_faillog/config/etc/passwd | 20 + .../01_faillog_no_faillog/config/etc/shadow | 20 + .../01_faillog_no_faillog/data/faillog.err | 1 + .../01_faillog_no_faillog/faillog.test | 51 + tests/log/faillog/02_faillog_usage/config.txt | 10 + .../faillog/02_faillog_usage/config/etc/group | 41 + .../02_faillog_usage/config/etc/gshadow | 41 + .../02_faillog_usage/config/etc/passwd | 19 + .../02_faillog_usage/config/etc/shadow | 19 + .../faillog/02_faillog_usage/data/usage.out | 14 + .../log/faillog/02_faillog_usage/faillog.test | 35 + .../log/faillog/03_faillog_format/config.txt | 1 + .../03_faillog_format/config/etc/group | 42 + .../03_faillog_format/config/etc/gshadow | 42 + .../03_faillog_format/config/etc/pam.d/login | 111 ++ .../03_faillog_format/config/etc/passwd | 20 + .../03_faillog_format/config/etc/shadow | 20 + .../03_faillog_format/data/faillog.out | 2 + .../03_faillog_format/data/lastlog.out | 20 + .../faillog/03_faillog_format/faillog.test | 57 + tests/log/faillog/03_faillog_format/login.exp | 17 + .../faillog/04_faillog_mulitple/config.txt | 1 + .../04_faillog_mulitple/config/etc/group | 42 + .../04_faillog_mulitple/config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../04_faillog_mulitple/config/etc/passwd | 22 + .../04_faillog_mulitple/config/etc/shadow | 22 + .../04_faillog_mulitple/data/faillog.list | 5 + .../faillog/04_faillog_mulitple/faillog.test | 52 + .../log/faillog/04_faillog_mulitple/login.exp | 26 + tests/log/faillog/05_faillog-u_ID/config.txt | 1 + .../faillog/05_faillog-u_ID/config/etc/group | 42 + .../05_faillog-u_ID/config/etc/gshadow | 42 + .../faillog/05_faillog-u_ID/config/etc/passwd | 22 + .../faillog/05_faillog-u_ID/config/etc/shadow | 22 + .../faillog/05_faillog-u_ID/data/faillog.list | 3 + .../log/faillog/05_faillog-u_ID/faillog.test | 42 + .../log/faillog/06_faillog-u_name/config.txt | 1 + .../06_faillog-u_name/config/etc/group | 42 + .../06_faillog-u_name/config/etc/gshadow | 42 + .../06_faillog-u_name/config/etc/passwd | 22 + .../06_faillog-u_name/config/etc/shadow | 22 + .../06_faillog-u_name/data/faillog.list | 3 + .../faillog/06_faillog-u_name/faillog.test | 42 + .../07_faillog-u_ID_invalid/config.txt | 1 + .../07_faillog-u_ID_invalid/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../07_faillog-u_ID_invalid/config/etc/passwd | 22 + .../07_faillog-u_ID_invalid/config/etc/shadow | 22 + .../07_faillog-u_ID_invalid/data/faillog.list | 0 .../07_faillog-u_ID_invalid/faillog.test | 41 + .../08_faillog-u_name_invalid/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/faillog.err | 1 + .../08_faillog-u_name_invalid/faillog.test | 45 + .../log/faillog/09_faillog-u_range/config.txt | 1 + .../09_faillog-u_range/config/etc/group | 42 + .../09_faillog-u_range/config/etc/gshadow | 42 + .../09_faillog-u_range/config/etc/pam.d/login | 111 ++ .../09_faillog-u_range/config/etc/passwd | 22 + .../09_faillog-u_range/config/etc/shadow | 22 + .../09_faillog-u_range/data/faillog.list | 4 + .../faillog/09_faillog-u_range/faillog.test | 50 + .../log/faillog/09_faillog-u_range/login.exp | 26 + .../10_faillog-u_open_range/config.txt | 1 + .../10_faillog-u_open_range/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../10_faillog-u_open_range/config/etc/passwd | 22 + .../10_faillog-u_open_range/config/etc/shadow | 22 + .../10_faillog-u_open_range/data/faillog.list | 22 + .../10_faillog-u_open_range/faillog.test | 42 + .../11_faillog-u_range_open/config.txt | 1 + .../11_faillog-u_range_open/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../11_faillog-u_range_open/config/etc/passwd | 22 + .../11_faillog-u_range_open/config/etc/shadow | 22 + .../11_faillog-u_range_open/data/faillog.list | 10 + .../11_faillog-u_range_open/faillog.test | 42 + .../12_faillog-u_range_invalid1/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/faillog.err | 1 + .../12_faillog-u_range_invalid1/faillog.test | 45 + .../13_faillog-u_range_invalid2/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/faillog.err | 1 + .../13_faillog-u_range_invalid2/faillog.test | 45 + .../14_faillog-u_range_invalid3/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/faillog.err | 1 + .../14_faillog-u_range_invalid3/faillog.test | 45 + .../faillog/15_faillog_bad_option/config.txt | 10 + .../15_faillog_bad_option/config/etc/group | 41 + .../15_faillog_bad_option/config/etc/gshadow | 41 + .../15_faillog_bad_option/config/etc/passwd | 19 + .../15_faillog_bad_option/config/etc/shadow | 19 + .../15_faillog_bad_option/data/usage.out | 15 + .../15_faillog_bad_option/faillog.test | 41 + .../faillog/16_faillog_extra_arg/config.txt | 10 + .../16_faillog_extra_arg/config/etc/group | 41 + .../16_faillog_extra_arg/config/etc/gshadow | 41 + .../16_faillog_extra_arg/config/etc/passwd | 19 + .../16_faillog_extra_arg/config/etc/shadow | 19 + .../16_faillog_extra_arg/data/usage.out | 15 + .../faillog/16_faillog_extra_arg/faillog.test | 41 + tests/log/faillog/17_faillog-t/config.txt | 1 + .../log/faillog/17_faillog-t/config/etc/group | 42 + .../faillog/17_faillog-t/config/etc/gshadow | 42 + .../17_faillog-t/config/etc/pam.d/login | 111 ++ .../faillog/17_faillog-t/config/etc/passwd | 22 + .../faillog/17_faillog-t/config/etc/shadow | 22 + .../faillog/17_faillog-t/data/faillog.list | 4 + tests/log/faillog/17_faillog-t/faillog.test | 52 + tests/log/faillog/17_faillog-t/login.exp | 26 + .../faillog/18_faillog-t_invalid/config.txt | 1 + .../18_faillog-t_invalid/config/etc/group | 42 + .../18_faillog-t_invalid/config/etc/gshadow | 42 + .../18_faillog-t_invalid/config/etc/passwd | 22 + .../18_faillog-t_invalid/config/etc/shadow | 22 + .../18_faillog-t_invalid/data/faillog.err | 1 + .../faillog/18_faillog-t_invalid/faillog.test | 45 + .../19_faillog_multiple_same_user/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/faillog.list | 5 + .../faillog.test | 55 + .../19_faillog_multiple_same_user/login.exp | 26 + tests/log/faillog/20_faillog-r-u/config.txt | 1 + .../faillog/20_faillog-r-u/config/etc/group | 42 + .../faillog/20_faillog-r-u/config/etc/gshadow | 42 + .../20_faillog-r-u/config/etc/pam.d/login | 111 ++ .../faillog/20_faillog-r-u/config/etc/passwd | 22 + .../faillog/20_faillog-r-u/config/etc/shadow | 22 + .../faillog/20_faillog-r-u/data/faillog.list | 5 + tests/log/faillog/20_faillog-r-u/faillog.test | 56 + tests/log/faillog/20_faillog-r-u/login.exp | 26 + .../faillog/21_faillog-r-u_range/config.txt | 1 + .../21_faillog-r-u_range/config/etc/group | 42 + .../21_faillog-r-u_range/config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../21_faillog-r-u_range/config/etc/passwd | 22 + .../21_faillog-r-u_range/config/etc/shadow | 22 + .../21_faillog-r-u_range/data/faillog.list | 5 + .../faillog/21_faillog-r-u_range/faillog.test | 56 + .../faillog/21_faillog-r-u_range/login.exp | 26 + .../22_faillog_removed_user/config.txt | 1 + .../22_faillog_removed_user/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../22_faillog_removed_user/config/etc/passwd | 22 + .../22_faillog_removed_user/config/etc/shadow | 22 + .../22_faillog_removed_user/data/faillog.list | 4 + .../22_faillog_removed_user/faillog.test | 57 + .../faillog/22_faillog_removed_user/login.exp | 26 + .../23_faillog-a_removed_user/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/faillog.list | 23 + .../23_faillog-a_removed_user/faillog.test | 57 + .../23_faillog-a_removed_user/login.exp | 26 + .../24_faillog-u_removed_user/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/faillog.list | 0 .../24_faillog-u_removed_user/faillog.test | 57 + .../24_faillog-u_removed_user/login.exp | 26 + .../25_faillog-r-u_removed_user/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/faillog.list | 24 + .../25_faillog-r-u_removed_user/faillog.test | 60 + .../25_faillog-r-u_removed_user/login.exp | 26 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/faillog.list | 24 + .../faillog.test | 60 + .../login.exp | 26 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/faillog.list | 24 + .../faillog.test | 66 + .../login.exp | 26 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/faillog.list | 24 + .../faillog.test | 66 + .../login.exp | 26 + .../config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/faillog.list | 24 + .../faillog.test | 66 + .../login.exp | 26 + tests/log/faillog/30_faillog-r/config.txt | 1 + .../log/faillog/30_faillog-r/config/etc/group | 42 + .../faillog/30_faillog-r/config/etc/gshadow | 42 + .../30_faillog-r/config/etc/pam.d/login | 111 ++ .../faillog/30_faillog-r/config/etc/passwd | 22 + .../faillog/30_faillog-r/config/etc/shadow | 22 + .../faillog/30_faillog-r/data/faillog.list | 5 + tests/log/faillog/30_faillog-r/faillog.test | 56 + tests/log/faillog/30_faillog-r/login.exp | 26 + .../31_faillog-r-u_open_range/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/faillog.list | 5 + .../31_faillog-r-u_open_range/faillog.test | 56 + .../31_faillog-r-u_open_range/login.exp | 26 + tests/log/faillog/32_faillog-l/config.txt | 1 + .../log/faillog/32_faillog-l/config/etc/group | 42 + .../faillog/32_faillog-l/config/etc/gshadow | 42 + .../32_faillog-l/config/etc/pam.d/login | 111 ++ .../faillog/32_faillog-l/config/etc/passwd | 22 + .../faillog/32_faillog-l/config/etc/shadow | 22 + .../faillog/32_faillog-l/data/faillog.list | 5 + tests/log/faillog/32_faillog-l/faillog.test | 63 + tests/log/faillog/32_faillog-l/login.exp | 26 + .../faillog/33_faillog-l-u_user/config.txt | 1 + .../33_faillog-l-u_user/config/etc/group | 42 + .../33_faillog-l-u_user/config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../33_faillog-l-u_user/config/etc/passwd | 22 + .../33_faillog-l-u_user/config/etc/shadow | 22 + .../33_faillog-l-u_user/data/faillog.list | 1 + .../faillog/33_faillog-l-u_user/faillog.test | 60 + .../log/faillog/33_faillog-l-u_user/login.exp | 26 + .../faillog/34_faillog-l-u_range/config.txt | 1 + .../34_faillog-l-u_range/config/etc/group | 42 + .../34_faillog-l-u_range/config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../34_faillog-l-u_range/config/etc/passwd | 22 + .../34_faillog-l-u_range/config/etc/shadow | 22 + .../34_faillog-l-u_range/data/faillog.list | 5 + .../faillog/34_faillog-l-u_range/faillog.test | 63 + .../faillog/34_faillog-l-u_range/login.exp | 26 + .../35_faillog-l-u_open_range/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/faillog.list | 5 + .../35_faillog-l-u_open_range/faillog.test | 63 + .../35_faillog-l-u_open_range/login.exp | 26 + .../36_faillog-l-u_range_open/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/faillog.list | 5 + .../36_faillog-l-u_range_open/faillog.test | 63 + .../36_faillog-l-u_range_open/login.exp | 26 + .../faillog/37_faillog-l-a-u_user/config.txt | 1 + .../37_faillog-l-a-u_user/config/etc/group | 42 + .../37_faillog-l-a-u_user/config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../37_faillog-l-a-u_user/config/etc/passwd | 22 + .../37_faillog-l-a-u_user/config/etc/shadow | 22 + .../37_faillog-l-a-u_user/data/faillog.list | 1 + .../37_faillog-l-a-u_user/faillog.test | 70 + .../faillog/37_faillog-l-a-u_user/login.exp | 26 + .../faillog/38_faillog-l-a-u_range/config.txt | 1 + .../38_faillog-l-a-u_range/config/etc/group | 42 + .../38_faillog-l-a-u_range/config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../38_faillog-l-a-u_range/config/etc/passwd | 22 + .../38_faillog-l-a-u_range/config/etc/shadow | 22 + .../38_faillog-l-a-u_range/data/faillog.list | 5 + .../38_faillog-l-a-u_range/faillog.test | 73 + .../faillog/38_faillog-l-a-u_range/login.exp | 26 + .../39_faillog-l-a-u_open_range/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/faillog.list | 5 + .../39_faillog-l-a-u_open_range/faillog.test | 73 + .../39_faillog-l-a-u_open_range/login.exp | 26 + .../40_faillog-l-a-u_range_open/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/faillog.list | 5 + .../40_faillog-l-a-u_range_open/faillog.test | 73 + .../40_faillog-l-a-u_range_open/login.exp | 26 + .../faillog/41_faillog-l_invalid/config.txt | 1 + .../41_faillog-l_invalid/config/etc/group | 42 + .../41_faillog-l_invalid/config/etc/gshadow | 42 + .../41_faillog-l_invalid/config/etc/passwd | 22 + .../41_faillog-l_invalid/config/etc/shadow | 22 + .../41_faillog-l_invalid/data/faillog.err | 1 + .../faillog/41_faillog-l_invalid/faillog.test | 45 + tests/log/faillog/42_faillog-m/config.txt | 1 + .../log/faillog/42_faillog-m/config/etc/group | 42 + .../faillog/42_faillog-m/config/etc/gshadow | 42 + .../42_faillog-m/config/etc/pam.d/login | 111 ++ .../faillog/42_faillog-m/config/etc/passwd | 22 + .../faillog/42_faillog-m/config/etc/shadow | 22 + .../faillog/42_faillog-m/data/faillog.list | 5 + tests/log/faillog/42_faillog-m/faillog.test | 57 + tests/log/faillog/42_faillog-m/login.exp | 26 + .../faillog/43_faillog-m-u_user/config.txt | 1 + .../43_faillog-m-u_user/config/etc/group | 42 + .../43_faillog-m-u_user/config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../43_faillog-m-u_user/config/etc/passwd | 22 + .../43_faillog-m-u_user/config/etc/shadow | 22 + .../43_faillog-m-u_user/data/faillog.list | 5 + .../faillog/43_faillog-m-u_user/faillog.test | 57 + .../log/faillog/43_faillog-m-u_user/login.exp | 26 + .../faillog/44_faillog-m-u_range/config.txt | 1 + .../44_faillog-m-u_range/config/etc/group | 42 + .../44_faillog-m-u_range/config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../44_faillog-m-u_range/config/etc/passwd | 22 + .../44_faillog-m-u_range/config/etc/shadow | 22 + .../44_faillog-m-u_range/data/faillog.list | 5 + .../faillog/44_faillog-m-u_range/faillog.test | 57 + .../faillog/44_faillog-m-u_range/login.exp | 26 + .../45_faillog-m-u_open_range/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/faillog.list | 5 + .../45_faillog-m-u_open_range/faillog.test | 57 + .../45_faillog-m-u_open_range/login.exp | 26 + .../46_faillog-m-u_range_open/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/faillog.list | 5 + .../46_faillog-m-u_range_open/faillog.test | 57 + .../46_faillog-m-u_range_open/login.exp | 26 + .../faillog/47_faillog-m-a-u_user/config.txt | 1 + .../47_faillog-m-a-u_user/config/etc/group | 42 + .../47_faillog-m-a-u_user/config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../47_faillog-m-a-u_user/config/etc/passwd | 22 + .../47_faillog-m-a-u_user/config/etc/shadow | 22 + .../47_faillog-m-a-u_user/data/faillog.list | 5 + .../47_faillog-m-a-u_user/faillog.test | 67 + .../faillog/47_faillog-m-a-u_user/login.exp | 26 + .../faillog/48_faillog-m-a-u_range/config.txt | 1 + .../48_faillog-m-a-u_range/config/etc/group | 42 + .../48_faillog-m-a-u_range/config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../48_faillog-m-a-u_range/config/etc/passwd | 22 + .../48_faillog-m-a-u_range/config/etc/shadow | 22 + .../48_faillog-m-a-u_range/data/faillog.list | 5 + .../48_faillog-m-a-u_range/faillog.test | 67 + .../faillog/48_faillog-m-a-u_range/login.exp | 26 + .../49_faillog-m-a-u_open_range/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/faillog.list | 5 + .../49_faillog-m-a-u_open_range/faillog.test | 67 + .../49_faillog-m-a-u_open_range/login.exp | 26 + .../50_faillog-m-a-u_range_open/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/faillog.list | 5 + .../50_faillog-m-a-u_range_open/faillog.test | 67 + .../50_faillog-m-a-u_range_open/login.exp | 26 + .../faillog/51_faillog-m_invalid/config.txt | 1 + .../51_faillog-m_invalid/config/etc/group | 42 + .../51_faillog-m_invalid/config/etc/gshadow | 42 + .../51_faillog-m_invalid/config/etc/passwd | 22 + .../51_faillog-m_invalid/config/etc/shadow | 22 + .../51_faillog-m_invalid/data/faillog.err | 1 + .../faillog/51_faillog-m_invalid/faillog.test | 45 + .../52_faillog-t-l_exclusive/config.txt | 10 + .../52_faillog-t-l_exclusive/config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../52_faillog-t-l_exclusive/data/usage.out | 14 + .../52_faillog-t-l_exclusive/faillog.test | 41 + .../53_faillog-t-m_exclusive/config.txt | 10 + .../53_faillog-t-m_exclusive/config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../53_faillog-t-m_exclusive/data/usage.out | 14 + .../53_faillog-t-m_exclusive/faillog.test | 41 + .../54_faillog-t-r_exclusive/config.txt | 10 + .../54_faillog-t-r_exclusive/config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../54_faillog-t-r_exclusive/data/usage.out | 14 + .../54_faillog-t-r_exclusive/faillog.test | 41 + .../faillog/55_faillog_no_changes/config.txt | 1 + .../55_faillog_no_changes/config/etc/group | 42 + .../55_faillog_no_changes/config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../55_faillog_no_changes/config/etc/passwd | 22 + .../55_faillog_no_changes/config/etc/shadow | 22 + .../55_faillog_no_changes/data/faillog.stat | 1 + .../55_faillog_no_changes/faillog.test | 35 + .../faillog/55_faillog_no_changes/login.exp | 26 + .../56_faillog-l-m_empty_file/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/faillog.stat | 1 + .../56_faillog-l-m_empty_file/faillog.test | 35 + .../57_faillog-r_empty_file/config.txt | 1 + .../57_faillog-r_empty_file/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../57_faillog-r_empty_file/config/etc/passwd | 22 + .../57_faillog-r_empty_file/config/etc/shadow | 22 + .../57_faillog-r_empty_file/data/faillog.stat | 1 + .../57_faillog-r_empty_file/faillog.test | 35 + .../58_faillog-l_no_failcount/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/faillog.list | 3 + .../58_faillog-l_no_failcount/faillog.test | 57 + .../58_faillog-l_no_failcount/login.exp | 26 + .../lastlog/01_lastlog_no_lastlog/config.txt | 1 + .../01_lastlog_no_lastlog/config/etc/group | 42 + .../01_lastlog_no_lastlog/config/etc/gshadow | 42 + .../01_lastlog_no_lastlog/config/etc/passwd | 20 + .../01_lastlog_no_lastlog/config/etc/shadow | 20 + .../01_lastlog_no_lastlog/data/lastlog.err | 1 + .../01_lastlog_no_lastlog/lastlog.test | 51 + tests/log/lastlog/02_lastlog_usage/config.txt | 10 + .../lastlog/02_lastlog_usage/config/etc/group | 41 + .../02_lastlog_usage/config/etc/gshadow | 41 + .../02_lastlog_usage/config/etc/passwd | 19 + .../02_lastlog_usage/config/etc/shadow | 19 + .../lastlog/02_lastlog_usage/data/usage.out | 9 + .../log/lastlog/02_lastlog_usage/lastlog.test | 35 + .../log/lastlog/03_lastlog_format/config.txt | 1 + .../03_lastlog_format/config/etc/group | 42 + .../03_lastlog_format/config/etc/gshadow | 42 + .../03_lastlog_format/config/etc/passwd | 20 + .../03_lastlog_format/config/etc/shadow | 20 + .../03_lastlog_format/data/lastlog.out | 20 + .../lastlog/03_lastlog_format/lastlog.test | 60 + tests/log/lastlog/03_lastlog_format/login.exp | 13 + .../lastlog/04_lastlog_mulitple/config.txt | 1 + .../04_lastlog_mulitple/config/etc/group | 42 + .../04_lastlog_mulitple/config/etc/gshadow | 42 + .../04_lastlog_mulitple/config/etc/passwd | 22 + .../04_lastlog_mulitple/config/etc/shadow | 22 + .../04_lastlog_mulitple/data/lastlog.list | 4 + .../lastlog/04_lastlog_mulitple/lastlog.test | 52 + .../log/lastlog/04_lastlog_mulitple/login.exp | 19 + tests/log/lastlog/05_lastlog-u_ID/config.txt | 1 + .../lastlog/05_lastlog-u_ID/config/etc/group | 42 + .../05_lastlog-u_ID/config/etc/gshadow | 42 + .../lastlog/05_lastlog-u_ID/config/etc/passwd | 22 + .../lastlog/05_lastlog-u_ID/config/etc/shadow | 22 + .../lastlog/05_lastlog-u_ID/data/lastlog.list | 2 + .../log/lastlog/05_lastlog-u_ID/lastlog.test | 42 + .../log/lastlog/06_lastlog-u_name/config.txt | 1 + .../06_lastlog-u_name/config/etc/group | 42 + .../06_lastlog-u_name/config/etc/gshadow | 42 + .../06_lastlog-u_name/config/etc/passwd | 22 + .../06_lastlog-u_name/config/etc/shadow | 22 + .../06_lastlog-u_name/data/lastlog.list | 2 + .../lastlog/06_lastlog-u_name/lastlog.test | 42 + .../07_lastlog-u_ID_invalid/config.txt | 1 + .../07_lastlog-u_ID_invalid/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../07_lastlog-u_ID_invalid/config/etc/passwd | 22 + .../07_lastlog-u_ID_invalid/config/etc/shadow | 22 + .../07_lastlog-u_ID_invalid/data/lastlog.list | 0 .../07_lastlog-u_ID_invalid/lastlog.test | 41 + .../08_lastlog-u_name_invalid/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/lastlog.err | 1 + .../08_lastlog-u_name_invalid/lastlog.test | 45 + .../log/lastlog/09_lastlog-u_range/config.txt | 1 + .../09_lastlog-u_range/config/etc/group | 42 + .../09_lastlog-u_range/config/etc/gshadow | 42 + .../09_lastlog-u_range/config/etc/passwd | 22 + .../09_lastlog-u_range/config/etc/shadow | 22 + .../09_lastlog-u_range/data/lastlog.list | 7 + .../lastlog/09_lastlog-u_range/lastlog.test | 42 + .../10_lastlog-u_open_range/config.txt | 1 + .../10_lastlog-u_open_range/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../10_lastlog-u_open_range/config/etc/passwd | 22 + .../10_lastlog-u_open_range/config/etc/shadow | 22 + .../10_lastlog-u_open_range/data/lastlog.list | 21 + .../10_lastlog-u_open_range/lastlog.test | 42 + .../11_lastlog-u_range_open/config.txt | 1 + .../11_lastlog-u_range_open/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../11_lastlog-u_range_open/config/etc/passwd | 22 + .../11_lastlog-u_range_open/config/etc/shadow | 22 + .../11_lastlog-u_range_open/data/lastlog.list | 9 + .../11_lastlog-u_range_open/lastlog.test | 42 + .../12_lastlog-u_range_invalid1/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/lastlog.err | 1 + .../12_lastlog-u_range_invalid1/lastlog.test | 45 + .../13_lastlog-u_range_invalid2/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/lastlog.err | 1 + .../13_lastlog-u_range_invalid2/lastlog.test | 45 + .../14_lastlog-u_range_invalid3/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/lastlog.err | 1 + .../14_lastlog-u_range_invalid3/lastlog.test | 45 + .../lastlog/15_lastlog_bad_option/config.txt | 10 + .../15_lastlog_bad_option/config/etc/group | 41 + .../15_lastlog_bad_option/config/etc/gshadow | 41 + .../15_lastlog_bad_option/config/etc/passwd | 19 + .../15_lastlog_bad_option/config/etc/shadow | 19 + .../15_lastlog_bad_option/data/usage.out | 10 + .../15_lastlog_bad_option/lastlog.test | 41 + .../lastlog/16_lastlog_extra_arg/config.txt | 10 + .../16_lastlog_extra_arg/config/etc/group | 41 + .../16_lastlog_extra_arg/config/etc/gshadow | 41 + .../16_lastlog_extra_arg/config/etc/passwd | 19 + .../16_lastlog_extra_arg/config/etc/shadow | 19 + .../16_lastlog_extra_arg/data/usage.out | 10 + .../lastlog/16_lastlog_extra_arg/lastlog.test | 41 + tests/log/lastlog/17_lastlog-t/config.txt | 1 + .../log/lastlog/17_lastlog-t/config/etc/group | 42 + .../lastlog/17_lastlog-t/config/etc/gshadow | 42 + .../lastlog/17_lastlog-t/config/etc/passwd | 22 + .../lastlog/17_lastlog-t/config/etc/shadow | 22 + .../lastlog/17_lastlog-t/data/lastlog.list | 3 + tests/log/lastlog/17_lastlog-t/lastlog.test | 52 + tests/log/lastlog/17_lastlog-t/login.exp | 19 + tests/log/lastlog/18_lastlog-b/config.txt | 1 + .../log/lastlog/18_lastlog-b/config/etc/group | 42 + .../lastlog/18_lastlog-b/config/etc/gshadow | 42 + .../lastlog/18_lastlog-b/config/etc/passwd | 22 + .../lastlog/18_lastlog-b/config/etc/shadow | 22 + .../lastlog/18_lastlog-b/data/lastlog.list | 21 + tests/log/lastlog/18_lastlog-b/lastlog.test | 52 + tests/log/lastlog/18_lastlog-b/login.exp | 19 + .../lastlog/19_lastlog-t_invalid/config.txt | 1 + .../19_lastlog-t_invalid/config/etc/group | 42 + .../19_lastlog-t_invalid/config/etc/gshadow | 42 + .../19_lastlog-t_invalid/config/etc/passwd | 22 + .../19_lastlog-t_invalid/config/etc/shadow | 22 + .../19_lastlog-t_invalid/data/lastlog.err | 1 + .../lastlog/19_lastlog-t_invalid/lastlog.test | 45 + .../lastlog/20_lastlog-b_invalid/config.txt | 1 + .../20_lastlog-b_invalid/config/etc/group | 42 + .../20_lastlog-b_invalid/config/etc/gshadow | 42 + .../20_lastlog-b_invalid/config/etc/passwd | 22 + .../20_lastlog-b_invalid/config/etc/shadow | 22 + .../20_lastlog-b_invalid/data/lastlog.err | 1 + .../lastlog/20_lastlog-b_invalid/lastlog.test | 45 + tests/login/01_login_prompt/config.txt | 3 + tests/login/01_login_prompt/config/etc/group | 42 + .../login/01_login_prompt/config/etc/gshadow | 42 + .../01_login_prompt/config/etc/login.defs | 315 +++++ tests/login/01_login_prompt/config/etc/passwd | 21 + tests/login/01_login_prompt/config/etc/shadow | 20 + tests/login/01_login_prompt/login.exp | 23 + tests/login/01_login_prompt/login.test | 26 + tests/login/02_login_user/config.txt | 3 + tests/login/02_login_user/config/etc/group | 42 + tests/login/02_login_user/config/etc/gshadow | 42 + .../login/02_login_user/config/etc/login.defs | 315 +++++ tests/login/02_login_user/config/etc/passwd | 21 + tests/login/02_login_user/config/etc/shadow | 20 + tests/login/02_login_user/login.exp | 20 + tests/login/02_login_user/login.test | 26 + tests/login/03_login_check_tty/config.txt | 3 + .../login/03_login_check_tty/config/etc/group | 42 + .../03_login_check_tty/config/etc/gshadow | 42 + .../03_login_check_tty/config/etc/login.defs | 315 +++++ .../03_login_check_tty/config/etc/passwd | 21 + .../03_login_check_tty/config/etc/shadow | 20 + tests/login/03_login_check_tty/login.exp | 22 + tests/login/03_login_check_tty/login.test | 26 + tests/newusers/01_create_user/config.txt | 0 .../newusers/01_create_user/config/etc/group | 41 + .../01_create_user/config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../01_create_user/config/etc/pam.d/newusers | 6 + .../newusers/01_create_user/config/etc/passwd | 19 + .../newusers/01_create_user/config/etc/shadow | 19 + tests/newusers/01_create_user/data/group | 42 + tests/newusers/01_create_user/data/gshadow | 42 + .../01_create_user/data/newusers.list | 1 + tests/newusers/01_create_user/data/passwd | 20 + tests/newusers/01_create_user/data/shadow | 20 + tests/newusers/01_create_user/newusers.test | 37 + tests/newusers/02_update_password/config.txt | 1 + .../02_update_password/config/etc/group | 42 + .../02_update_password/config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../02_update_password/config/etc/passwd | 20 + .../02_update_password/config/etc/shadow | 20 + .../02_update_password/data/newusers.list | 1 + tests/newusers/02_update_password/data/shadow | 20 + .../newusers/02_update_password/newusers.test | 37 + tests/newusers/03_no_update_pid/config.txt | 1 + .../03_no_update_pid/config/etc/group | 42 + .../03_no_update_pid/config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../03_no_update_pid/config/etc/passwd | 20 + .../03_no_update_pid/config/etc/shadow | 20 + .../03_no_update_pid/data/newusers.list | 1 + tests/newusers/03_no_update_pid/data/shadow | 20 + tests/newusers/03_no_update_pid/newusers.test | 37 + tests/newusers/04_no_update_gid/config.txt | 1 + .../04_no_update_gid/config/etc/group | 42 + .../04_no_update_gid/config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../04_no_update_gid/config/etc/passwd | 20 + .../04_no_update_gid/config/etc/shadow | 20 + .../04_no_update_gid/data/newusers.list | 1 + tests/newusers/04_no_update_gid/data/shadow | 20 + tests/newusers/04_no_update_gid/newusers.test | 37 + tests/newusers/05_create_user_pid/config.txt | 0 .../05_create_user_pid/config/etc/group | 41 + .../05_create_user_pid/config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../05_create_user_pid/config/etc/passwd | 19 + .../05_create_user_pid/config/etc/shadow | 19 + tests/newusers/05_create_user_pid/data/group | 42 + .../newusers/05_create_user_pid/data/gshadow | 42 + .../05_create_user_pid/data/newusers.list | 1 + tests/newusers/05_create_user_pid/data/passwd | 20 + tests/newusers/05_create_user_pid/data/shadow | 20 + .../newusers/05_create_user_pid/newusers.test | 37 + tests/newusers/06_create_user_gid/config.txt | 0 .../06_create_user_gid/config/etc/group | 41 + .../06_create_user_gid/config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../06_create_user_gid/config/etc/passwd | 19 + .../06_create_user_gid/config/etc/shadow | 19 + tests/newusers/06_create_user_gid/data/group | 42 + .../newusers/06_create_user_gid/data/gshadow | 42 + .../06_create_user_gid/data/newusers.list | 1 + tests/newusers/06_create_user_gid/data/passwd | 20 + tests/newusers/06_create_user_gid/data/shadow | 20 + .../newusers/06_create_user_gid/newusers.test | 37 + .../07_create_user_pid_gid/config.txt | 0 .../07_create_user_pid_gid/config/etc/group | 41 + .../07_create_user_pid_gid/config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../07_create_user_pid_gid/config/etc/passwd | 19 + .../07_create_user_pid_gid/config/etc/shadow | 19 + .../07_create_user_pid_gid/data/group | 42 + .../07_create_user_pid_gid/data/gshadow | 42 + .../07_create_user_pid_gid/data/newusers.list | 1 + .../07_create_user_pid_gid/data/passwd | 20 + .../07_create_user_pid_gid/data/shadow | 20 + .../07_create_user_pid_gid/newusers.test | 37 + .../08_create_user_pid_other-gid/config.txt | 0 .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../08_create_user_pid_other-gid/data/group | 42 + .../08_create_user_pid_other-gid/data/gshadow | 42 + .../data/newusers.list | 1 + .../08_create_user_pid_other-gid/data/passwd | 20 + .../08_create_user_pid_other-gid/data/shadow | 20 + .../newusers.test | 37 + .../09_create_user_pid-as-user-bar/config.txt | 0 .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../09_create_user_pid-as-user-bar/data/group | 43 + .../data/gshadow | 43 + .../data/newusers.list | 1 + .../data/passwd | 21 + .../data/shadow | 21 + .../newusers.test | 37 + .../config.txt | 0 .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/newusers.list | 1 + .../data/passwd | 21 + .../data/shadow | 21 + .../newusers.test | 37 + tests/newusers/11_update_gecos/config.txt | 1 + .../newusers/11_update_gecos/config/etc/group | 42 + .../11_update_gecos/config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../11_update_gecos/config/etc/pam.d/newusers | 6 + .../11_update_gecos/config/etc/passwd | 20 + .../11_update_gecos/config/etc/shadow | 20 + .../11_update_gecos/data/newusers.list | 1 + tests/newusers/11_update_gecos/data/passwd | 20 + tests/newusers/11_update_gecos/data/shadow | 20 + tests/newusers/11_update_gecos/newusers.test | 37 + tests/newusers/12_update_shell/config.txt | 1 + .../newusers/12_update_shell/config/etc/group | 42 + .../12_update_shell/config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../12_update_shell/config/etc/pam.d/newusers | 6 + .../12_update_shell/config/etc/passwd | 20 + .../12_update_shell/config/etc/shadow | 20 + .../12_update_shell/data/newusers.list | 1 + tests/newusers/12_update_shell/data/passwd | 20 + tests/newusers/12_update_shell/data/shadow | 20 + tests/newusers/12_update_shell/newusers.test | 37 + .../13_create_user_new-home/config.txt | 0 .../13_create_user_new-home/config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../13_create_user_new-home/config/etc/passwd | 19 + .../13_create_user_new-home/config/etc/shadow | 19 + .../13_create_user_new-home/data/group | 42 + .../13_create_user_new-home/data/gshadow | 42 + .../13_create_user_new-home/data/home_ls-a | 2 + .../data/newusers.list | 1 + .../13_create_user_new-home/data/passwd | 20 + .../13_create_user_new-home/data/shadow | 20 + .../13_create_user_new-home/newusers.test | 59 + .../14_create_user_existing-home/config.txt | 0 .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../14_create_user_existing-home/data/group | 42 + .../14_create_user_existing-home/data/gshadow | 42 + .../data/home_ls-a | 2 + .../data/newusers.list | 1 + .../14_create_user_existing-home/data/passwd | 20 + .../14_create_user_existing-home/data/shadow | 20 + .../newusers.test | 61 + tests/newusers/15_update_new-home/config.txt | 1 + .../15_update_new-home/config/etc/group | 42 + .../15_update_new-home/config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../15_update_new-home/config/etc/passwd | 20 + .../15_update_new-home/config/etc/shadow | 20 + .../15_update_new-home/data/home_ls-a | 2 + .../15_update_new-home/data/newusers.list | 1 + tests/newusers/15_update_new-home/data/passwd | 20 + tests/newusers/15_update_new-home/data/shadow | 20 + .../newusers/15_update_new-home/newusers.test | 60 + .../16_update_existing-home/config.txt | 1 + .../16_update_existing-home/config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../16_update_existing-home/config/etc/passwd | 20 + .../16_update_existing-home/config/etc/shadow | 20 + .../16_update_existing-home/data/home_ls-a | 2 + .../data/newusers.list | 1 + .../16_update_existing-home/data/passwd | 20 + .../16_update_existing-home/data/shadow | 20 + .../16_update_existing-home/newusers.test | 60 + .../config.txt | 0 .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 43 + .../data/gshadow | 43 + .../data/newusers.list | 1 + .../data/passwd | 21 + .../data/shadow | 21 + .../newusers.test | 37 + .../config.txt | 0 .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/newusers.list | 1 + .../data/passwd | 21 + .../data/shadow | 21 + .../newusers.test | 37 + .../19_update_keep-old-home/config.txt | 1 + .../19_update_keep-old-home/config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../19_update_keep-old-home/config/etc/passwd | 20 + .../19_update_keep-old-home/config/etc/shadow | 20 + .../19_update_keep-old-home/data/home_ls-a | 2 + .../data/home_ls-a.old | 3 + .../data/newusers.list | 1 + .../19_update_keep-old-home/data/passwd | 20 + .../19_update_keep-old-home/data/shadow | 20 + .../19_update_keep-old-home/newusers.test | 69 + tests/newusers/20_multiple_users/config.txt | 1 + .../20_multiple_users/config/etc/group | 42 + .../20_multiple_users/config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../20_multiple_users/config/etc/passwd | 20 + .../20_multiple_users/config/etc/shadow | 20 + tests/newusers/20_multiple_users/data/group | 58 + tests/newusers/20_multiple_users/data/gshadow | 57 + .../20_multiple_users/data/newusers.list | 17 + tests/newusers/20_multiple_users/data/passwd | 37 + tests/newusers/20_multiple_users/data/shadow | 37 + .../newusers/20_multiple_users/newusers.test | 38 + .../21_create_user_UID_MAX/config.txt | 0 .../21_create_user_UID_MAX/config/etc/group | 41 + .../21_create_user_UID_MAX/config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../21_create_user_UID_MAX/config/etc/passwd | 19 + .../21_create_user_UID_MAX/config/etc/shadow | 19 + .../21_create_user_UID_MAX/data/group | 43 + .../21_create_user_UID_MAX/data/gshadow | 43 + .../21_create_user_UID_MAX/data/newusers.list | 2 + .../21_create_user_UID_MAX/data/passwd | 21 + .../21_create_user_UID_MAX/data/shadow | 21 + .../21_create_user_UID_MAX/newusers.test | 37 + .../22_create_user_GID_MAX/config.txt | 0 .../22_create_user_GID_MAX/config/etc/group | 41 + .../22_create_user_GID_MAX/config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../22_create_user_GID_MAX/config/etc/passwd | 19 + .../22_create_user_GID_MAX/config/etc/shadow | 19 + .../22_create_user_GID_MAX/data/group | 43 + .../22_create_user_GID_MAX/data/gshadow | 43 + .../22_create_user_GID_MAX/data/newusers.list | 2 + .../22_create_user_GID_MAX/data/passwd | 21 + .../22_create_user_GID_MAX/data/shadow | 21 + .../22_create_user_GID_MAX/newusers.test | 37 + .../config.txt | 0 .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/newusers.err | 3 + .../data/newusers.list | 1 + .../newusers.test | 54 + .../config.txt | 0 .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/newusers.err | 3 + .../data/newusers.list | 1 + .../newusers.test | 54 + .../config.txt | 2 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/newusers.err | 3 + .../data/newusers.list | 3 + .../newusers.test | 55 + .../config.txt | 4 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 315 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/newusers.err | 3 + .../data/newusers.list | 3 + .../newusers.test | 55 + .../config.txt | 0 .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/newusers.err | 3 + .../data/newusers.list | 1 + .../newusers.test | 54 + .../config.txt | 0 .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/newusers.err | 3 + .../data/newusers.list | 1 + .../newusers.test | 54 + .../config.txt | 0 .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/newusers.err | 3 + .../data/newusers.list | 1 + .../newusers.test | 54 + .../config.txt | 0 .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../data/gshadow | 42 + .../data/newusers.list | 1 + .../data/passwd | 20 + .../data/shadow | 20 + .../newusers.test | 37 + .../config.txt | 0 .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/newusers.err | 3 + .../data/newusers.list | 1 + .../newusers.test | 54 + .../config.txt | 1 + .../config/etc/group | 41 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/newusers.err | 3 + .../data/newusers.list | 1 + .../newusers.test | 54 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/newusers.list | 1 + .../data/passwd | 20 + .../newusers.test | 37 + .../34_update_password_no_shadow/config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/newusers.list | 1 + .../34_update_password_no_shadow/data/passwd | 20 + .../newusers.test | 38 + tests/newusers/35_read_from_stdin/config.txt | 0 .../35_read_from_stdin/config/etc/group | 41 + .../35_read_from_stdin/config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../35_read_from_stdin/config/etc/passwd | 19 + .../35_read_from_stdin/config/etc/shadow | 19 + tests/newusers/35_read_from_stdin/data/group | 43 + .../newusers/35_read_from_stdin/data/gshadow | 43 + .../35_read_from_stdin/data/newusers.list | 2 + tests/newusers/35_read_from_stdin/data/passwd | 21 + tests/newusers/35_read_from_stdin/data/shadow | 21 + .../newusers/35_read_from_stdin/newusers.test | 37 + .../36_create_user_encrypted/config.txt | 0 .../36_create_user_encrypted/config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../36_create_user_encrypted/data/group | 42 + .../36_create_user_encrypted/data/gshadow | 42 + .../data/newusers.list | 1 + .../36_create_user_encrypted/data/passwd | 20 + .../36_create_user_encrypted/data/shadow | 20 + .../36_create_user_encrypted/newusers.test | 37 + .../37_create_user_encrypt_MD5-PAM/config.txt | 0 .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../37_create_user_encrypt_MD5-PAM/data/group | 42 + .../data/gshadow | 42 + .../data/newusers.list | 1 + .../data/passwd | 20 + .../data/shadow | 20 + .../newusers.test | 37 + .../37_create_user_encrypt_MD5/config.txt | 0 .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../37_create_user_encrypt_MD5/data/group | 42 + .../37_create_user_encrypt_MD5/data/gshadow | 42 + .../data/newusers.list | 1 + .../37_create_user_encrypt_MD5/data/passwd | 20 + .../37_create_user_encrypt_MD5/data/shadow | 20 + .../37_create_user_encrypt_MD5/newusers.test | 37 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/newusers.list | 1 + .../data/passwd | 20 + .../newusers.test | 38 + .../config.txt | 2 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/newusers.list | 1 + .../data/passwd | 20 + .../newusers.test | 37 + .../40_update_password_encrypted/config.txt | 1 + .../config/etc/group | 42 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/newusers.list | 1 + .../40_update_password_encrypted/data/shadow | 20 + .../newusers.test | 37 + .../config.txt | 0 .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../data/gshadow | 42 + .../data/newusers.list | 1 + .../data/passwd | 20 + .../data/shadow | 20 + .../newusers.test | 37 + .../41_create_user_encrypt_SHA256/config.txt | 0 .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../41_create_user_encrypt_SHA256/data/group | 42 + .../data/gshadow | 42 + .../data/newusers.list | 1 + .../41_create_user_encrypt_SHA256/data/passwd | 20 + .../41_create_user_encrypt_SHA256/data/shadow | 20 + .../newusers.test | 37 + .../config.txt | 0 .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../data/gshadow | 42 + .../data/newusers.list | 1 + .../data/passwd | 20 + .../data/shadow | 20 + .../newusers.test | 37 + .../42_create_user_encrypt_SHA512/config.txt | 0 .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../42_create_user_encrypt_SHA512/data/group | 42 + .../data/gshadow | 42 + .../data/newusers.list | 1 + .../42_create_user_encrypt_SHA512/data/passwd | 20 + .../42_create_user_encrypt_SHA512/data/shadow | 20 + .../newusers.test | 37 + .../config.txt | 0 .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../data/gshadow | 42 + .../data/newusers.list | 1 + .../data/passwd | 20 + .../data/shadow | 20 + .../newusers.test | 47 + .../config.txt | 0 .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../data/gshadow | 42 + .../data/newusers.list | 1 + .../data/passwd | 20 + .../data/shadow | 20 + .../newusers.test | 47 + .../config.txt | 0 .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../data/gshadow | 42 + .../data/newusers.list | 1 + .../data/passwd | 20 + .../data/shadow | 20 + .../newusers.test | 47 + .../config.txt | 0 .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../data/gshadow | 42 + .../data/newusers.list | 1 + .../data/passwd | 20 + .../data/shadow | 20 + .../newusers.test | 47 + .../config.txt | 0 .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/newusers.err | 8 + .../data/newusers.list | 1 + .../newusers.test | 54 + .../config.txt | 0 .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../data/gshadow | 42 + .../data/newusers.list | 1 + .../data/passwd | 20 + .../data/shadow | 20 + .../newusers.test | 38 + .../config.txt | 0 .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/newusers.err | 3 + .../data/newusers.list | 1 + .../newusers.test | 54 + .../config.txt | 0 .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/newusers.err | 3 + .../data/newusers.list | 1 + .../newusers.test | 54 + .../49_multiple_system_users/config.txt | 1 + .../49_multiple_system_users/config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../49_multiple_system_users/data/group | 59 + .../49_multiple_system_users/data/gshadow | 59 + .../data/newusers.list | 17 + .../49_multiple_system_users/data/passwd | 38 + .../49_multiple_system_users/data/shadow | 38 + .../49_multiple_system_users/newusers.test | 37 + tests/newusers/50_usage/config.txt | 0 tests/newusers/50_usage/config/etc/group | 42 + tests/newusers/50_usage/config/etc/gshadow | 42 + tests/newusers/50_usage/config/etc/passwd | 26 + tests/newusers/50_usage/config/etc/shadow | 26 + tests/newusers/50_usage/data/usage.out | 7 + tests/newusers/50_usage/newusers.test | 48 + .../51_usage_invalid_option/config.txt | 0 .../51_usage_invalid_option/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../51_usage_invalid_option/config/etc/passwd | 26 + .../51_usage_invalid_option/config/etc/shadow | 26 + .../51_usage_invalid_option/data/usage.out | 8 + .../51_usage_invalid_option/newusers.test | 54 + .../52_usage_2_input_files/config.txt | 0 .../52_usage_2_input_files/config/etc/group | 42 + .../52_usage_2_input_files/config/etc/gshadow | 42 + .../52_usage_2_input_files/config/etc/passwd | 26 + .../52_usage_2_input_files/config/etc/shadow | 26 + .../52_usage_2_input_files/data/usage.out | 7 + .../52_usage_2_input_files/newusers.test | 54 + tests/newusers/53_locked_passwd/config.txt | 0 .../53_locked_passwd/config/etc/group | 42 + .../53_locked_passwd/config/etc/gshadow | 42 + .../53_locked_passwd/config/etc/passwd | 26 + .../53_locked_passwd/config/etc/shadow | 26 + .../53_locked_passwd/data/newusers.list | 1 + .../newusers/53_locked_passwd/data/usage.out | 2 + tests/newusers/53_locked_passwd/newusers.test | 59 + tests/newusers/54_locked_shadow/config.txt | 0 .../54_locked_shadow/config/etc/group | 42 + .../54_locked_shadow/config/etc/gshadow | 42 + .../54_locked_shadow/config/etc/passwd | 26 + .../54_locked_shadow/config/etc/shadow | 26 + .../54_locked_shadow/data/newusers.list | 1 + .../newusers/54_locked_shadow/data/usage.out | 2 + tests/newusers/54_locked_shadow/newusers.test | 59 + tests/newusers/55_locked_group/config.txt | 0 .../newusers/55_locked_group/config/etc/group | 42 + .../55_locked_group/config/etc/gshadow | 42 + .../55_locked_group/config/etc/passwd | 26 + .../55_locked_group/config/etc/shadow | 26 + .../55_locked_group/data/newusers.list | 1 + tests/newusers/55_locked_group/data/usage.out | 2 + tests/newusers/55_locked_group/newusers.test | 59 + tests/newusers/56_locked_gshadow/config.txt | 0 .../56_locked_gshadow/config/etc/group | 42 + .../56_locked_gshadow/config/etc/gshadow | 42 + .../56_locked_gshadow/config/etc/passwd | 26 + .../56_locked_gshadow/config/etc/shadow | 26 + .../56_locked_gshadow/data/newusers.list | 1 + .../newusers/56_locked_gshadow/data/usage.out | 2 + .../newusers/56_locked_gshadow/newusers.test | 59 + .../newusers/57_missing_input_file/config.txt | 0 .../57_missing_input_file/config/etc/group | 42 + .../57_missing_input_file/config/etc/gshadow | 42 + .../57_missing_input_file/config/etc/passwd | 26 + .../57_missing_input_file/config/etc/shadow | 26 + .../57_missing_input_file/data/usage.out | 1 + .../57_missing_input_file/newusers.test | 54 + .../newusers/58_invalid_input_file/config.txt | 0 .../58_invalid_input_file/config/etc/group | 42 + .../58_invalid_input_file/config/etc/gshadow | 42 + .../58_invalid_input_file/config/etc/passwd | 26 + .../58_invalid_input_file/config/etc/shadow | 26 + .../58_invalid_input_file/data/newusers.err | 2 + .../58_invalid_input_file/data/newusers.list | 1 + .../58_invalid_input_file/newusers.test | 54 + tests/newusers/59_no_gshadow_file/config.txt | 2 + .../59_no_gshadow_file/config/etc/group | 41 + .../59_no_gshadow_file/config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../59_no_gshadow_file/config/etc/passwd | 19 + .../59_no_gshadow_file/config/etc/shadow | 19 + tests/newusers/59_no_gshadow_file/data/group | 42 + .../59_no_gshadow_file/data/newusers.list | 1 + tests/newusers/59_no_gshadow_file/data/passwd | 20 + tests/newusers/59_no_gshadow_file/data/shadow | 20 + .../newusers/59_no_gshadow_file/newusers.test | 38 + tests/newusers/60_update_no_gecos/config.txt | 1 + .../60_update_no_gecos/config/etc/group | 42 + .../60_update_no_gecos/config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../60_update_no_gecos/config/etc/passwd | 20 + .../60_update_no_gecos/config/etc/shadow | 20 + .../60_update_no_gecos/data/newusers.list | 1 + tests/newusers/60_update_no_gecos/data/passwd | 20 + tests/newusers/60_update_no_gecos/data/shadow | 20 + .../newusers/60_update_no_gecos/newusers.test | 37 + tests/newusers/61_update_no_shell/config.txt | 1 + .../61_update_no_shell/config/etc/group | 42 + .../61_update_no_shell/config/etc/gshadow | 41 + .../config/etc/pam.d/common-password | 33 + .../config/etc/pam.d/newusers | 6 + .../61_update_no_shell/config/etc/passwd | 20 + .../61_update_no_shell/config/etc/shadow | 20 + .../61_update_no_shell/data/newusers.list | 1 + tests/newusers/61_update_no_shell/data/passwd | 20 + tests/newusers/61_update_no_shell/data/shadow | 20 + .../newusers/61_update_no_shell/newusers.test | 37 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/passwd.out | 1 + .../passwd.test | 48 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/passwd.out | 1 + .../passwd.test | 48 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/passwd.out | 1 + .../passwd.test | 48 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/passwd.out | 1 + .../passwd.test | 52 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/passwd.out | 1 + .../passwd.test | 48 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/passwd.out | 1 + .../data/shadow | 20 + .../passwd.test | 48 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/passwd | 20 + .../data/passwd.out | 1 + .../passwd.test | 48 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/passwd.out | 1 + .../data/shadow | 20 + .../passwd.test | 48 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/passwd.err | 2 + .../passwd.test | 54 + .../passwd/10_passwd_-d_root/config/etc/group | 42 + .../10_passwd_-d_root/config/etc/gshadow | 42 + .../10_passwd_-d_root/config/etc/passwd | 20 + .../10_passwd_-d_root/config/etc/shadow | 20 + .../passwd/10_passwd_-d_root/data/passwd.out | 1 + tests/passwd/10_passwd_-d_root/data/shadow | 20 + tests/passwd/10_passwd_-d_root/passwd.test | 48 + .../11_passwd_--mindays_root/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../11_passwd_--mindays_root/data/passwd.out | 1 + .../11_passwd_--mindays_root/data/shadow | 20 + .../11_passwd_--mindays_root/passwd.test | 48 + .../12_passwd_--maxdays_root/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../12_passwd_--maxdays_root/data/passwd.out | 1 + .../12_passwd_--maxdays_root/data/shadow | 20 + .../12_passwd_--maxdays_root/passwd.test | 48 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../13_passwd_--warndays_root/data/passwd.out | 1 + .../13_passwd_--warndays_root/data/shadow | 20 + .../13_passwd_--warndays_root/passwd.test | 48 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../14_passwd_--inactive_root/data/passwd.out | 1 + .../14_passwd_--inactive_root/data/shadow | 20 + .../14_passwd_--inactive_root/passwd.test | 48 + .../15_passwd_--expire_root/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../15_passwd_--expire_root/config/etc/passwd | 20 + .../15_passwd_--expire_root/config/etc/shadow | 20 + .../15_passwd_--expire_root/data/passwd.out | 1 + .../15_passwd_--expire_root/data/shadow | 20 + .../15_passwd_--expire_root/passwd.test | 48 + .../16_passwd_-S-a_root/config/etc/group | 42 + .../16_passwd_-S-a_root/config/etc/gshadow | 42 + .../16_passwd_-S-a_root/config/etc/passwd | 20 + .../16_passwd_-S-a_root/config/etc/shadow | 20 + .../16_passwd_-S-a_root/data/passwd.out | 20 + tests/passwd/16_passwd_-S-a_root/passwd.test | 47 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/shadow | 20 + .../17_passwd_root_change_password/passwd.exp | 22 + .../passwd.test | 37 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/shadow | 20 + .../passwd.exp | 22 + .../passwd.test | 37 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/shadow | 20 + .../19_passwd_user_change_password/passwd.exp | 31 + .../passwd.test | 37 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/shadow | 20 + .../passwd.exp | 31 + .../passwd.test | 37 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/passwd.err | 1 + .../passwd.test | 53 + tests/passwd/22_passwd_usage/config.txt | 10 + tests/passwd/22_passwd_usage/config/etc/group | 41 + .../passwd/22_passwd_usage/config/etc/gshadow | 41 + .../passwd/22_passwd_usage/config/etc/passwd | 19 + .../passwd/22_passwd_usage/config/etc/shadow | 19 + tests/passwd/22_passwd_usage/data/usage.out | 22 + tests/passwd/22_passwd_usage/passwd.test | 47 + tests/run_all | 1215 +++++++++++++++++ .../01_useradd_split_group/config.txt | 5 + .../config/etc/default/useradd | 36 + .../01_useradd_split_group/config/etc/group | 44 + .../01_useradd_split_group/config/etc/gshadow | 44 + .../config/etc/login.defs | 317 +++++ .../01_useradd_split_group/config/etc/passwd | 21 + .../01_useradd_split_group/config/etc/shadow | 21 + .../01_useradd_split_group/data/group | 46 + .../01_useradd_split_group/data/gshadow | 45 + .../01_useradd_split_group/data/passwd | 22 + .../01_useradd_split_group/data/shadow | 22 + .../01_useradd_split_group/useradd.test | 39 + .../02_useradd_no_split_group/config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/login.defs | 317 +++++ .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../02_useradd_no_split_group/data/group | 45 + .../02_useradd_no_split_group/data/gshadow | 45 + .../02_useradd_no_split_group/data/passwd | 22 + .../02_useradd_no_split_group/data/shadow | 22 + .../02_useradd_no_split_group/useradd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 46 + .../config/etc/gshadow | 45 + .../config/etc/login.defs | 317 +++++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/group | 47 + .../data/gshadow | 46 + .../data/passwd | 23 + .../data/shadow | 23 + .../useradd.test | 39 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 45 + .../config/etc/gshadow | 45 + .../config/etc/login.defs | 317 +++++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/group | 47 + .../data/gshadow | 46 + .../data/passwd | 23 + .../data/shadow | 23 + .../useradd.test | 39 + .../config.txt | 5 + .../config/etc/group | 46 + .../config/etc/gshadow | 45 + .../config/etc/login.defs | 317 +++++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/useradd.err | 2 + .../useradd.test | 54 + .../config.txt | 5 + .../config/etc/group | 46 + .../config/etc/gshadow | 45 + .../config/etc/login.defs | 317 +++++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/useradd.err | 2 + .../useradd.test | 54 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 46 + .../config/etc/gshadow | 45 + .../config/etc/login.defs | 317 +++++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/group | 47 + .../data/gshadow | 46 + .../data/passwd | 23 + .../data/shadow | 23 + .../useradd.test | 39 + .../config.txt | 5 + .../config/etc/group | 46 + .../config/etc/gshadow | 45 + .../config/etc/login.defs | 317 +++++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/useradd.err | 2 + .../useradd.test | 54 + .../config.txt | 5 + .../config/etc/group | 46 + .../config/etc/gshadow | 45 + .../config/etc/login.defs | 317 +++++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/group | 44 + .../data/gshadow | 44 + .../groupdel.test | 39 + .../config.txt | 5 + .../config/etc/group | 46 + .../config/etc/gshadow | 45 + .../config/etc/login.defs | 317 +++++ .../config/etc/passwd | 22 + .../config/etc/shadow | 22 + .../data/groupdel.err | 2 + .../groupdel.test | 54 + tests/su/01/config.txt | 3 + tests/su/01/config/etc/group | 42 + tests/su/01/config/etc/gshadow | 42 + tests/su/01/config/etc/passwd | 21 + tests/su/01/config/etc/shadow | 20 + tests/su/01/run_su.exp | 73 + tests/su/01/su_root.test | 25 + tests/su/01/su_user.test | 25 + tests/su/02/config.txt | 5 + tests/su/02/config/etc/group | 42 + tests/su/02/config/etc/gshadow | 42 + tests/su/02/config/etc/passwd | 21 + tests/su/02/config/etc/profile | 0 tests/su/02/config/etc/shadow | 20 + tests/su/02/env_FOO-options_ | 1 + tests/su/02/env_FOO-options_- | 1 + tests/su/02/env_FOO-options_--login | 1 + tests/su/02/env_FOO-options_--login.exp | 48 + tests/su/02/env_FOO-options_--login_bash | 1 + .../02/env_FOO-options_--preserve-environment | 1 + ...env_FOO-options_--preserve-environment.exp | 48 + ...nv_FOO-options_--preserve-environment_bash | 1 + tests/su/02/env_FOO-options_-.exp | 48 + tests/su/02/env_FOO-options_-_bash | 1 + tests/su/02/env_FOO-options_-l | 1 + tests/su/02/env_FOO-options_-l-m | 1 + tests/su/02/env_FOO-options_-l-m.exp | 48 + tests/su/02/env_FOO-options_-l-m_bash | 1 + tests/su/02/env_FOO-options_-l.exp | 48 + tests/su/02/env_FOO-options_-l_bash | 1 + tests/su/02/env_FOO-options_-m | 1 + tests/su/02/env_FOO-options_-m.exp | 48 + tests/su/02/env_FOO-options_-m_bash | 1 + tests/su/02/env_FOO-options_-p | 1 + tests/su/02/env_FOO-options_-p- | 1 + tests/su/02/env_FOO-options_-p-.exp | 48 + tests/su/02/env_FOO-options_-p-_bash | 1 + tests/su/02/env_FOO-options_-p.exp | 48 + tests/su/02/env_FOO-options_-p_bash | 1 + tests/su/02/env_FOO-options_.exp | 48 + tests/su/02/env_FOO-options__bash | 1 + tests/su/02/env_special-options_ | 1 + tests/su/02/env_special-options_-l | 1 + tests/su/02/env_special-options_-l-p | 1 + tests/su/02/env_special-options_-l-p.exp | 55 + tests/su/02/env_special-options_-l-p_bash | 1 + tests/su/02/env_special-options_-l.exp | 54 + tests/su/02/env_special-options_-l_bash | 1 + tests/su/02/env_special-options_-p | 1 + tests/su/02/env_special-options_-p.exp | 56 + tests/su/02/env_special-options_-p_bash | 1 + tests/su/02/env_special-options_.exp | 55 + tests/su/02/env_special-options__bash | 1 + tests/su/02/env_special_root-options_ | 1 + tests/su/02/env_special_root-options_-l | 1 + tests/su/02/env_special_root-options_-l-p | 1 + tests/su/02/env_special_root-options_-l-p.exp | 57 + .../su/02/env_special_root-options_-l-p_bash | 1 + tests/su/02/env_special_root-options_-l.exp | 54 + tests/su/02/env_special_root-options_-l_bash | 1 + tests/su/02/env_special_root-options_-p | 1 + tests/su/02/env_special_root-options_-p.exp | 56 + tests/su/02/env_special_root-options_-p_bash | 1 + tests/su/02/env_special_root-options_.exp | 55 + tests/su/02/env_special_root-options__bash | 1 + tests/su/02/run_env_test.sh | 38 + tests/su/03/config/etc/group | 42 + tests/su/03/config/etc/gshadow | 42 + tests/su/03/config/etc/passwd | 21 + tests/su/03/config/etc/shadow | 20 + tests/su/03/data/ls.out | 1 + tests/su/03/su_run_command01.test | 43 + tests/su/03/su_run_command02.test | 36 + tests/su/03/su_run_command03.test | 36 + tests/su/03/su_run_command04.test | 36 + tests/su/03/su_run_command05.test | 36 + tests/su/03/su_run_command06.test | 45 + tests/su/03/su_run_command07.test | 45 + tests/su/03/su_run_command08.test | 45 + tests/su/03/su_run_command09.test | 45 + tests/su/03/su_run_command10.test | 45 + tests/su/03/su_run_command11.test | 45 + tests/su/03/su_run_command12.test | 45 + tests/su/03/su_run_command13.test | 50 + tests/su/03/su_run_command14.test | 45 + tests/su/03/su_run_command15.test | 52 + tests/su/03/su_run_command16.test | 45 + tests/su/03/su_run_command17.test | 45 + tests/su/04/config.txt | 3 + tests/su/04/config/etc/group | 42 + tests/su/04/config/etc/gshadow | 42 + tests/su/04/config/etc/login.defs | 315 +++++ tests/su/04/config/etc/passwd | 21 + tests/su/04/config/etc/shadow | 20 + tests/su/04/config/var/log/auth.log | 0 tests/su/04/data/wrong_user.err | 1 + tests/su/04/run_su_failed.exp | 58 + tests/su/04/su_user_wrong_passwd.test | 24 + tests/su/04/su_user_wrong_passwd_syslog.test | 40 + tests/su/04/su_wrong_user.test | 47 + tests/su/05/config.txt | 5 + tests/su/05/config/etc/group | 42 + tests/su/05/config/etc/gshadow | 42 + tests/su/05/config/etc/login.defs | 315 +++++ tests/su/05/config/etc/passwd | 21 + tests/su/05/config/etc/shadow | 20 + tests/su/05/config/var/log/auth.log | 0 tests/su/05/run_su_failed.exp | 58 + tests/su/05/su_user_wrong_passwd_syslog.test | 40 + tests/su/06/config.txt | 3 + tests/su/06/config/etc/group | 42 + tests/su/06/config/etc/gshadow | 42 + tests/su/06/config/etc/login.defs | 315 +++++ tests/su/06/config/etc/passwd | 21 + tests/su/06/config/etc/shadow | 20 + tests/su/06/config/var/log/auth.log | 0 tests/su/06/run_su.exp | 73 + tests/su/06/su_user_syslog.test | 39 + tests/su/07/config.txt | 3 + tests/su/07/config/etc/group | 42 + tests/su/07/config/etc/gshadow | 42 + tests/su/07/config/etc/login.defs | 315 +++++ tests/su/07/config/etc/passwd | 21 + tests/su/07/config/etc/shadow | 20 + tests/su/07/config/var/log/auth.log | 0 tests/su/07/run_su.exp | 73 + tests/su/07/su_user_syslog.test | 44 + tests/su/08/config.txt | 0 tests/su/08/config/etc/group | 42 + tests/su/08/config/etc/gshadow | 42 + tests/su/08/config/etc/login.defs | 315 +++++ tests/su/08/config/etc/passwd | 21 + tests/su/08/config/etc/shadow | 20 + tests/su/08/env_special-options_ | 1 + tests/su/08/env_special-options_.exp | 1 + tests/su/08/env_special_root-options_ | 1 + tests/su/08/env_special_root-options_.exp | 1 + tests/su/09/config.txt | 3 + tests/su/09/config/etc/group | 42 + tests/su/09/config/etc/gshadow | 42 + tests/su/09/config/etc/login.defs | 315 +++++ tests/su/09/config/etc/passwd | 21 + tests/su/09/config/etc/shadow | 20 + tests/su/09/env_special-options_ | 1 + tests/su/09/env_special-options_.exp | 55 + tests/su/09/env_special_root-options_ | 1 + tests/su/09/env_special_root-options_.exp | 55 + tests/su/10_su_sulog_success/config.txt | 3 + tests/su/10_su_sulog_success/config/etc/group | 42 + .../su/10_su_sulog_success/config/etc/gshadow | 42 + .../10_su_sulog_success/config/etc/login.defs | 315 +++++ .../su/10_su_sulog_success/config/etc/passwd | 21 + .../su/10_su_sulog_success/config/etc/shadow | 20 + .../10_su_sulog_success/config/var/log/sulog | 0 tests/su/10_su_sulog_success/data/sulog | 1 + tests/su/10_su_sulog_success/run_su.exp | 73 + tests/su/10_su_sulog_success/su.test | 40 + tests/su/11_su_sulog_failure/config.txt | 3 + tests/su/11_su_sulog_failure/config/etc/group | 42 + .../su/11_su_sulog_failure/config/etc/gshadow | 42 + .../11_su_sulog_failure/config/etc/login.defs | 315 +++++ .../su/11_su_sulog_failure/config/etc/passwd | 21 + .../su/11_su_sulog_failure/config/etc/shadow | 20 + .../11_su_sulog_failure/config/var/log/sulog | 0 tests/su/11_su_sulog_failure/data/sulog | 1 + tests/su/11_su_sulog_failure/run_su.exp | 67 + tests/su/11_su_sulog_failure/su.test | 43 + tests/su/12_su_child_failure/config.txt | 3 + tests/su/12_su_child_failure/config/etc/group | 42 + .../su/12_su_child_failure/config/etc/gshadow | 42 + .../12_su_child_failure/config/etc/login.defs | 315 +++++ .../su/12_su_child_failure/config/etc/passwd | 21 + .../su/12_su_child_failure/config/etc/shadow | 20 + .../12_su_child_failure/config/var/log/sulog | 0 tests/su/12_su_child_failure/su.test | 37 + tests/su/13_su_child_success/config.txt | 3 + tests/su/13_su_child_success/config/etc/group | 42 + .../su/13_su_child_success/config/etc/gshadow | 42 + .../13_su_child_success/config/etc/login.defs | 315 +++++ .../su/13_su_child_success/config/etc/passwd | 21 + .../su/13_su_child_success/config/etc/shadow | 20 + .../13_su_child_success/config/var/log/sulog | 0 tests/su/13_su_child_success/su.test | 31 + tests/usertools/01/01_useradd_add_user.test | 42 + tests/usertools/01/01_useradd_add_user/group | 42 + .../usertools/01/01_useradd_add_user/gshadow | 42 + tests/usertools/01/01_useradd_add_user/passwd | 20 + tests/usertools/01/01_useradd_add_user/shadow | 20 + .../usertools/01/01_userdel_delete_user.test | 45 + .../01/02_useradd_recreate_deleted_user.test | 48 + .../01/02_useradd_recreate_deleted_user/group | 42 + .../02_useradd_recreate_deleted_user/gshadow | 42 + .../02_useradd_recreate_deleted_user/passwd | 20 + .../02_useradd_recreate_deleted_user/shadow | 20 + .../01/03_useradd_additional_options.test | 50 + .../01/03_useradd_additional_options/group | 42 + .../01/03_useradd_additional_options/gshadow | 42 + .../01/03_useradd_additional_options/passwd | 20 + .../01/03_useradd_additional_options/shadow | 20 + ...eradd_add_user_with_existing_UID_fail.test | 60 + .../group | 42 + .../gshadow | 42 + .../passwd | 20 + .../shadow | 20 + .../useradd.err | 1 + ...dd_add_user_with_existing_UID_with_-o.test | 48 + .../group | 43 + .../gshadow | 43 + .../passwd | 21 + .../shadow | 21 + .../01/04_useradd_specified_UID.test | 42 + .../01/04_useradd_specified_UID/group | 42 + .../01/04_useradd_specified_UID/gshadow | 42 + .../01/04_useradd_specified_UID/passwd | 20 + .../01/04_useradd_specified_UID/shadow | 20 + .../01/04_useradd_specified_UID_and_GID.test | 48 + .../01/04_useradd_specified_UID_and_GID/group | 42 + .../04_useradd_specified_UID_and_GID/gshadow | 42 + .../04_useradd_specified_UID_and_GID/passwd | 21 + .../04_useradd_specified_UID_and_GID/shadow | 21 + ...erdel_delete_user_with_non_unique_UID.test | 51 + .../group | 42 + .../gshadow | 42 + .../passwd | 20 + .../shadow | 20 + ...useradd_invalid_numeric_primary_group.test | 58 + .../useradd.err | 1 + ...6_useradd_invalid_named_primary_group.test | 58 + .../useradd.err | 1 + .../07_useradd_numerical_primary_group.test | 42 + .../07_useradd_numerical_primary_group/group | 41 + .../gshadow | 41 + .../07_useradd_numerical_primary_group/passwd | 20 + .../07_useradd_numerical_primary_group/shadow | 20 + .../01/08_useradd_named_primary_group.test | 42 + .../01/08_useradd_named_primary_group/group | 41 + .../01/08_useradd_named_primary_group/gshadow | 41 + .../01/08_useradd_named_primary_group/passwd | 20 + .../01/08_useradd_named_primary_group/shadow | 20 + .../01/09_usermod_change_user_info.test | 45 + .../01/09_usermod_change_user_info/group | 42 + .../01/09_usermod_change_user_info/gshadow | 42 + .../01/09_usermod_change_user_info/passwd | 20 + .../01/09_usermod_change_user_info/shadow | 20 + .../usertools/01/10_usermod_rename_user.test | 48 + .../usertools/01/10_usermod_rename_user/group | 42 + .../01/10_usermod_rename_user/gshadow | 42 + .../01/10_usermod_rename_user/passwd | 20 + .../01/10_usermod_rename_user/shadow | 20 + .../01/10_usermod_rename_user_in_group.test | 48 + .../01/10_usermod_rename_user_in_group/group | 42 + .../10_usermod_rename_user_in_group/gshadow | 42 + .../01/10_usermod_rename_user_in_group/passwd | 20 + .../01/10_usermod_rename_user_in_group/shadow | 20 + .../01/11_usermod_change_password.test | 46 + .../01/11_usermod_change_password/group | 42 + .../01/11_usermod_change_password/gshadow | 42 + .../01/11_usermod_change_password/passwd | 20 + .../01/11_usermod_change_password/shadow | 20 + .../01/11_usermod_lock_password.test | 49 + .../01/11_usermod_lock_password/group | 42 + .../01/11_usermod_lock_password/gshadow | 42 + .../01/11_usermod_lock_password/passwd | 20 + .../01/11_usermod_lock_password/shadow | 20 + .../01/11_usermod_unlock_empty_password.test | 54 + .../01/11_usermod_unlock_empty_password/group | 42 + .../11_usermod_unlock_empty_password/gshadow | 42 + .../11_usermod_unlock_empty_password/passwd | 20 + .../11_usermod_unlock_empty_password/shadow | 20 + .../usermod.err | 2 + .../01/11_usermod_unlock_password.test | 52 + .../01/11_usermod_unlock_password/group | 42 + .../01/11_usermod_unlock_password/gshadow | 42 + .../01/11_usermod_unlock_password/passwd | 20 + .../01/11_usermod_unlock_password/shadow | 20 + .../01/12_usermod_change_gid_name.test | 45 + .../01/12_usermod_change_gid_name/group | 42 + .../01/12_usermod_change_gid_name/gshadow | 42 + .../01/12_usermod_change_gid_name/passwd | 20 + .../01/12_usermod_change_gid_name/shadow | 20 + .../01/12_usermod_change_gid_number.test | 45 + .../01/12_usermod_change_gid_number/group | 42 + .../01/12_usermod_change_gid_number/gshadow | 42 + .../01/12_usermod_change_gid_number/passwd | 20 + .../01/12_usermod_change_gid_number/shadow | 20 + .../usertools/01/13_useradd_negative_UID.test | 52 + .../01/13_useradd_negative_UID/group | 41 + .../01/13_useradd_negative_UID/gshadow | 41 + .../01/13_useradd_negative_UID/passwd | 19 + .../01/13_useradd_negative_UID/shadow | 19 + .../01/14_useradd_out_of_range_UID.test | 52 + .../01/14_useradd_out_of_range_UID/group | 41 + .../01/14_useradd_out_of_range_UID/gshadow | 41 + .../01/14_useradd_out_of_range_UID/passwd | 19 + .../01/14_useradd_out_of_range_UID/shadow | 19 + .../01/15_useradd_specified_large_UID.test | 42 + .../01/15_useradd_specified_large_UID/group | 42 + .../01/15_useradd_specified_large_UID/gshadow | 42 + .../01/15_useradd_specified_large_UID/passwd | 20 + .../01/15_useradd_specified_large_UID/shadow | 20 + ...6_useradd_add_user_to_multiple_groups.test | 42 + .../group | 41 + .../gshadow | 41 + .../passwd | 20 + .../shadow | 20 + .../01/16_useradd_add_user_to_one_group.test | 42 + .../01/16_useradd_add_user_to_one_group/group | 42 + .../16_useradd_add_user_to_one_group/gshadow | 42 + .../16_useradd_add_user_to_one_group/passwd | 20 + .../16_useradd_add_user_to_one_group/shadow | 20 + .../01/17_useradd_create_homedir.test | 46 + .../01/17_useradd_create_homedir/group | 42 + .../01/17_useradd_create_homedir/gshadow | 42 + .../01/17_useradd_create_homedir/passwd | 20 + .../01/17_useradd_create_homedir/shadow | 20 + .../01/18_userdel_remove_homedir.test | 54 + .../01/18_userdel_remove_homedir/group | 42 + .../01/18_userdel_remove_homedir/gshadow | 42 + .../01/18_userdel_remove_homedir/passwd | 20 + .../01/18_userdel_remove_homedir/shadow | 20 + .../01/18_userdel_remove_homedir/userdel.err | 1 + .../01/19_userdel_delete_user_in_group.test | 45 + .../01/20_usermod_change_homedir.test | 58 + .../21_usermod_change_and_move_homedir.test | 67 + tests/usertools/01/22_usermod_new_groups.test | 45 + .../usertools/01/22_usermod_new_groups/group | 42 + .../01/22_usermod_new_groups/gshadow | 42 + .../usertools/01/22_usermod_new_groups/passwd | 20 + .../usertools/01/22_usermod_new_groups/shadow | 20 + tests/usertools/01/23_usermod_add_groups.test | 45 + .../usertools/01/23_usermod_add_groups/group | 42 + .../01/23_usermod_add_groups/gshadow | 42 + .../usertools/01/23_usermod_add_groups/passwd | 20 + .../usertools/01/23_usermod_add_groups/shadow | 20 + ..._usermod_new_groups_remove_old_groups.test | 45 + .../group | 42 + .../gshadow | 42 + .../passwd | 20 + .../shadow | 20 + .../01/25_useradd_specified_large_UID2.test | 42 + .../01/25_useradd_specified_large_UID2/group | 42 + .../25_useradd_specified_large_UID2/gshadow | 42 + .../01/25_useradd_specified_large_UID2/passwd | 20 + .../01/25_useradd_specified_large_UID2/shadow | 20 + tests/usertools/01/26_useradd_UID_-1.test | 52 + tests/usertools/01/26_useradd_UID_-1/group | 41 + tests/usertools/01/26_useradd_UID_-1/gshadow | 41 + tests/usertools/01/26_useradd_UID_-1/passwd | 19 + tests/usertools/01/26_useradd_UID_-1/shadow | 19 + tests/usertools/01/config/etc/default/useradd | 36 + tests/usertools/01/config/etc/group | 41 + tests/usertools/01/config/etc/gshadow | 41 + tests/usertools/01/config/etc/passwd | 19 + tests/usertools/01/config/etc/shadow | 19 + tests/usertools/02/config.txt | 3 + tests/usertools/02/config/etc/default/useradd | 37 + tests/usertools/02/config/etc/group | 42 + tests/usertools/02/config/etc/gshadow | 42 + tests/usertools/02/config/etc/passwd | 21 + tests/usertools/02/config/etc/shadow | 20 + tests/usertools/02/data/useradd-D.out | 7 + .../02/data/useradd-D_default_values.out | 7 + .../02/useradd_change_default_EXPIRE.test | 30 + .../useradd.default | 43 + .../02/useradd_change_default_GROUP.test | 30 + .../useradd.default | 43 + .../02/useradd_change_default_HOME.test | 30 + .../useradd.default | 43 + .../02/useradd_change_default_INACTIVE.test | 30 + .../useradd.default | 43 + .../02/useradd_change_default_SHELL.test | 30 + .../useradd.default | 43 + .../usertools/02/useradd_change_defaults.test | 30 + .../useradd_change_defaults/useradd.default | 43 + .../02/useradd_default_default_values.test | 36 + .../02/useradd_get_default_values.test | 32 + tests/usertools/03/config.txt | 3 + tests/usertools/03/config/etc/default/useradd | 36 + tests/usertools/03/config/etc/group | 42 + tests/usertools/03/config/etc/gshadow | 42 + tests/usertools/03/config/etc/passwd | 21 + tests/usertools/03/config/etc/shadow | 20 + .../usertools/03/useradd_change_defaults.test | 30 + .../useradd_change_defaults/useradd.default | 37 + tests/usertools/04/01_useradd_add_user.test | 45 + tests/usertools/04/01_useradd_add_user/group | 42 + .../usertools/04/01_useradd_add_user/gshadow | 42 + tests/usertools/04/01_useradd_add_user/passwd | 20 + tests/usertools/04/01_useradd_add_user/shadow | 20 + tests/usertools/04/config.txt | 3 + tests/usertools/04/config/etc/default/useradd | 36 + tests/usertools/04/config/etc/group | 41 + tests/usertools/04/config/etc/gshadow | 41 + tests/usertools/04/config/etc/passwd | 19 + tests/usertools/04/config/etc/shadow | 19 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 41 + .../data/gshadow | 41 + .../data/passwd | 19 + .../data/shadow | 19 + .../userdel.test | 39 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 41 + .../data/gshadow | 41 + .../data/passwd | 19 + .../data/shadow | 19 + .../userdel.test | 39 + .../config.txt | 2 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 41 + .../data/gshadow | 41 + .../data/passwd | 19 + .../data/shadow | 19 + .../userdel.test | 39 + .../config.txt | 4 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 41 + .../data/gshadow | 41 + .../data/passwd | 19 + .../data/shadow | 19 + .../userdel.test | 39 + .../09_userdel_del_homedir/config.txt | 1 + .../config/etc/default/useradd | 36 + .../09_userdel_del_homedir/config/etc/group | 42 + .../09_userdel_del_homedir/config/etc/gshadow | 42 + .../09_userdel_del_homedir/config/etc/passwd | 20 + .../09_userdel_del_homedir/config/etc/shadow | 20 + .../09_userdel_del_homedir/data/group | 41 + .../09_userdel_del_homedir/data/gshadow | 41 + .../09_userdel_del_homedir/data/passwd | 19 + .../09_userdel_del_homedir/data/shadow | 19 + .../09_userdel_del_homedir/userdel.test | 53 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 41 + .../data/gshadow | 41 + .../data/passwd | 19 + .../data/shadow | 19 + .../data/userdel.err | 1 + .../userdel.test | 69 + .../11_usermod_move_homedir/config.txt | 1 + .../config/etc/default/useradd | 36 + .../11_usermod_move_homedir/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../11_usermod_move_homedir/config/etc/passwd | 20 + .../11_usermod_move_homedir/config/etc/shadow | 20 + .../11_usermod_move_homedir/data/home_ls-a | 3 + .../11_usermod_move_homedir/data/passwd | 20 + .../11_usermod_move_homedir/usermod.test | 58 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/passwd | 20 + .../data/usermod.err | 1 + .../usermod.test | 63 + .../13_usermod_move_homedir_file/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../13_usermod_move_homedir_file/data/passwd | 20 + .../data/usermod.err | 1 + .../13_usermod_move_homedir_file/usermod.test | 67 + .../config.txt | 5 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/home_ls-a | 7 + .../data/passwd | 20 + .../usermod.test | 68 + .../config.txt | 6 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../usermod.test | 39 + .../config.txt | 6 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../usermod.test | 39 + .../config.txt | 6 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../usermod.test | 39 + .../config.txt | 6 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/usermod.err | 1 + .../usermod.test | 54 + .../config.txt | 6 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/usermod.err | 1 + .../usermod.test | 54 + .../config.txt | 6 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../data/passwd | 20 + .../data/shadow | 20 + .../usermod.test | 39 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../data/passwd | 20 + .../data/shadow | 20 + .../usermod.test | 39 + .../config.txt | 6 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../usermod.test | 39 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/gshadow | 42 + .../data/passwd | 20 + .../data/shadow | 20 + .../usermod.test | 39 + .../24_usermod_locked_passwd/config.txt | 0 .../config/etc/default/useradd | 36 + .../24_usermod_locked_passwd/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../24_usermod_locked_passwd/data/usermod.err | 2 + .../24_usermod_locked_passwd/usermod.test | 60 + .../25_usermod-G_locked_group/config.txt | 0 .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/usermod.err | 2 + .../25_usermod-G_locked_group/usermod.test | 60 + .../26_usermod_locked_shadow/config.txt | 0 .../config/etc/default/useradd | 36 + .../26_usermod_locked_shadow/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../26_usermod_locked_shadow/data/usermod.err | 2 + .../26_usermod_locked_shadow/usermod.test | 60 + .../27_usermod-G_locked_gshadow/config.txt | 0 .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/usermod.err | 2 + .../27_usermod-G_locked_gshadow/usermod.test | 60 + .../28_usermod-c_locked_group/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../28_usermod-c_locked_group/data/passwd | 20 + .../28_usermod-c_locked_group/usermod.test | 45 + .../29_usermod-c_locked_gshadow/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../29_usermod-c_locked_gshadow/data/passwd | 20 + .../29_usermod-c_locked_gshadow/usermod.test | 45 + .../30_usermod-l_locked_group/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/usermod.err | 2 + .../30_usermod-l_locked_group/usermod.test | 60 + .../31_usermod-l_locked_gshadow/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/usermod.err | 2 + .../31_usermod-l_locked_gshadow/usermod.test | 60 + .../usertools/32_usermod-u_new_UID/config.txt | 1 + .../config/etc/default/useradd | 36 + .../32_usermod-u_new_UID/config/etc/group | 42 + .../32_usermod-u_new_UID/config/etc/gshadow | 42 + .../32_usermod-u_new_UID/config/etc/passwd | 20 + .../32_usermod-u_new_UID/config/etc/shadow | 20 + .../32_usermod-u_new_UID/data/passwd | 20 + .../32_usermod-u_new_UID/usermod.test | 39 + .../33_usermod-u_existing_UID/config.txt | 2 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/usermod.err | 1 + .../33_usermod-u_existing_UID/usermod.test | 54 + .../34_usermod-u-o_existing_UID/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../34_usermod-u-o_existing_UID/data/passwd | 21 + .../34_usermod-u-o_existing_UID/usermod.test | 39 + .../35_usermod-u_invalid_UID/config.txt | 1 + .../config/etc/default/useradd | 36 + .../35_usermod-u_invalid_UID/config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../35_usermod-u_invalid_UID/data/usermod.err | 1 + .../35_usermod-u_invalid_UID/usermod.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/home_ls-a | 7 + .../data/passwd | 20 + .../usermod.test | 69 + .../usertools/37_Debian_Bug_470745/config.txt | 2 + .../config/etc/default/useradd | 36 + .../37_Debian_Bug_470745/config/etc/group | 43 + .../37_Debian_Bug_470745/config/etc/gshadow | 43 + .../37_Debian_Bug_470745/config/etc/passwd | 21 + .../37_Debian_Bug_470745/config/etc/shadow | 21 + .../usertools/37_Debian_Bug_470745/data/group | 45 + .../37_Debian_Bug_470745/data/gshadow | 45 + .../37_Debian_Bug_470745/data/passwd | 22 + .../37_Debian_Bug_470745/data/shadow | 22 + .../37_Debian_Bug_470745/data/usermod.err | 2 + .../37_Debian_Bug_470745/usermod.test | 62 + .../38_usermod_invalid_user/config.txt | 1 + .../config/etc/default/useradd | 36 + .../38_usermod_invalid_user/config/etc/group | 43 + .../config/etc/gshadow | 43 + .../38_usermod_invalid_user/config/etc/passwd | 21 + .../38_usermod_invalid_user/config/etc/shadow | 21 + .../38_usermod_invalid_user/data/usermod.err | 1 + .../38_usermod_invalid_user/usermod.test | 54 + .../39_usermod_-c_invalid_comment/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/usermod.err | 1 + .../usermod.test | 54 + .../40_usermod_-d_invalid_homedir/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/usermod.err | 2 + .../usermod.test | 56 + .../41_usermod_-d_invalid_shell/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/usermod.err | 1 + .../41_usermod_-d_invalid_shell/usermod.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/usermod.err | 1 + .../usermod.test | 54 + .../43_usermod_-g_invalid_group_ID/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/usermod.err | 1 + .../usermod.test | 54 + .../44_usermod-l_existing_username/config.txt | 2 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/usermod.err | 1 + .../usermod.test | 54 + .../config.txt | 2 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/usermod.err | 1 + .../usermod.test | 54 + .../config.txt | 2 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/usermod.err | 1 + .../usermod.test | 54 + .../47_usermod-l_no_shadow_file/config.txt | 2 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../47_usermod-l_no_shadow_file/data/group | 42 + .../47_usermod-l_no_shadow_file/data/gshadow | 42 + .../47_usermod-l_no_shadow_file/data/passwd | 20 + .../47_usermod-l_no_shadow_file/usermod.test | 43 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 42 + .../data/passwd | 20 + .../data/shadow | 20 + .../data/userdel.err | 1 + .../userdel.test | 48 + .../49_userdel_delete_users_group/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../49_userdel_delete_users_group/data/group | 42 + .../data/gshadow | 42 + .../49_userdel_delete_users_group/data/passwd | 20 + .../49_userdel_delete_users_group/data/shadow | 20 + .../userdel.test | 39 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 42 + .../data/passwd | 20 + .../data/shadow | 20 + .../userdel.test | 39 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 42 + .../data/passwd | 20 + .../data/shadow | 20 + .../userdel.test | 44 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 42 + .../data/gshadow | 42 + .../data/passwd | 20 + .../userdel.test | 39 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 42 + .../data/gshadow | 42 + .../data/passwd | 20 + .../userdel.test | 43 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/usermod.err | 1 + .../usermod.test | 54 + .../usertools/55_userdel_busy_user/config.txt | 1 + .../config/etc/default/useradd | 36 + .../55_userdel_busy_user/config/etc/group | 42 + .../55_userdel_busy_user/config/etc/gshadow | 42 + .../55_userdel_busy_user/config/etc/passwd | 20 + .../55_userdel_busy_user/config/etc/shadow | 20 + .../55_userdel_busy_user/data/userdel.err | 1 + .../55_userdel_busy_user/userdel.test | 68 + .../56_userdel_locked_passwd/config.txt | 0 .../config/etc/default/useradd | 36 + .../56_userdel_locked_passwd/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../56_userdel_locked_passwd/data/userdel.err | 2 + .../56_userdel_locked_passwd/userdel.test | 60 + .../57_userdel_locked_group/config.txt | 0 .../config/etc/default/useradd | 36 + .../57_userdel_locked_group/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../57_userdel_locked_group/config/etc/passwd | 20 + .../57_userdel_locked_group/config/etc/shadow | 20 + .../57_userdel_locked_group/data/userdel.err | 2 + .../57_userdel_locked_group/userdel.test | 60 + .../58_userdel_locked_shadow/config.txt | 0 .../config/etc/default/useradd | 36 + .../58_userdel_locked_shadow/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../58_userdel_locked_shadow/data/userdel.err | 2 + .../58_userdel_locked_shadow/userdel.test | 60 + .../59_userdel_locked_gshadow/config.txt | 0 .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/userdel.err | 2 + .../59_userdel_locked_gshadow/userdel.test | 60 + .../60_userdel_invalid_user/config.txt | 0 .../config/etc/default/useradd | 36 + .../60_userdel_invalid_user/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../60_userdel_invalid_user/config/etc/passwd | 20 + .../60_userdel_invalid_user/config/etc/shadow | 20 + .../60_userdel_invalid_user/data/userdel.err | 1 + .../60_userdel_invalid_user/userdel.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 41 + .../data/gshadow | 41 + .../data/passwd | 19 + .../data/shadow | 19 + .../data/userdel.err | 1 + .../userdel.test | 70 + .../01_chpasswd_invalid_user/chpasswd.test | 56 + .../01_chpasswd_invalid_user/config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/chpasswd | 6 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/chpasswd.err | 3 + .../01_chpasswd_invalid_user/data/shadow | 19 + .../02_chpasswd_multiple_users/chpasswd.test | 40 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/chpasswd | 6 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../02_chpasswd_multiple_users/data/shadow | 19 + .../03_chpasswd_no_shadow_file/chpasswd.test | 44 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/chpasswd | 6 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../03_chpasswd_no_shadow_file/data/passwd | 19 + .../04_chpasswd_no_shadow_entry/chpasswd.test | 43 + .../config/etc/group | 41 + .../config/etc/gshadow | 40 + .../config/etc/pam.d/chpasswd | 6 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 19 + .../config/etc/shadow | 18 + .../04_chpasswd_no_shadow_entry/data/shadow | 19 + .../chpasswd.test | 55 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/chpasswd | 6 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/chpasswd.err | 1 + .../05_chpasswd_error_no_password/data/shadow | 19 + .../06_chpasswd_usage/chpasswd.test | 48 + .../chpasswd-PAM/06_chpasswd_usage/config.txt | 10 + .../config/etc/default/useradd | 36 + .../06_chpasswd_usage/config/etc/group | 41 + .../06_chpasswd_usage/config/etc/gshadow | 41 + .../06_chpasswd_usage/config/etc/passwd | 19 + .../06_chpasswd_usage/config/etc/shadow | 19 + .../06_chpasswd_usage/data/usage.out | 12 + .../chpasswd.test | 54 + .../07_chpasswd_usage_bad_option/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 13 + .../chpasswd.test | 54 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 13 + .../chpasswd.test | 54 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 13 + .../chpasswd.test | 54 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 13 + .../chpasswd.test | 54 + .../11_chpasswd_usage-s_without-c/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 13 + .../12_chpasswd_usage-s_invalid/chpasswd.test | 54 + .../12_chpasswd_usage-s_invalid/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 13 + .../13_chpasswd_usage-c_invalid/chpasswd.test | 54 + .../13_chpasswd_usage-c_invalid/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 13 + .../chpasswd.test | 40 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/chpasswd | 6 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/shadow | 19 + .../15_chpasswd_password_md5/chpasswd.test | 40 + .../15_chpasswd_password_md5/config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/chpasswd | 6 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../15_chpasswd_password_md5/data/shadow | 19 + .../16_chpasswd_password_NONE/chpasswd.test | 40 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/chpasswd | 6 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../16_chpasswd_password_NONE/data/shadow | 19 + .../17_chpasswd_password_MD5/chpasswd.test | 40 + .../17_chpasswd_password_MD5/config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/chpasswd | 6 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../17_chpasswd_password_MD5/data/shadow | 19 + .../18_chpasswd_password_DES/chpasswd.test | 40 + .../18_chpasswd_password_DES/config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/chpasswd | 6 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../18_chpasswd_password_DES/data/shadow | 19 + .../19_chpasswd_password_SHA256/chpasswd.test | 40 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/chpasswd | 6 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../19_chpasswd_password_SHA256/data/shadow | 19 + .../chpasswd.test | 41 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/chpasswd | 6 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/shadow | 19 + .../chpasswd.test | 41 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/chpasswd | 6 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/shadow | 19 + .../22_chpasswd_password_SHA512/chpasswd.test | 40 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/chpasswd | 6 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../22_chpasswd_password_SHA512/data/shadow | 19 + .../chpasswd.test | 41 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/chpasswd | 6 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/shadow | 19 + .../chpasswd.test | 41 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/chpasswd | 6 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/shadow | 19 + .../chpasswd.test | 44 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/chpasswd | 6 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../25_chpasswd-e_no_shadow_file/data/passwd | 19 + .../chpasswd.test | 59 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/chpasswd | 6 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/chpasswd.err | 6 + .../chpasswd.test | 59 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/chpasswd | 6 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/chpasswd.err | 3 + .../data/passwd | 19 + .../chpasswd.test | 59 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/chpasswd | 6 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/chpasswd.err | 3 + .../data/passwd | 19 + .../chpasswd.test | 43 + .../config/etc/group | 41 + .../config/etc/gshadow | 40 + .../config/etc/pam.d/chpasswd | 6 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 19 + .../config/etc/shadow | 18 + .../29_chpasswd-e_no_shadow_entry/data/passwd | 19 + .../29_chpasswd-e_no_shadow_entry/data/shadow | 19 + .../30_chpasswd_locked_passwd/chpasswd.test | 61 + .../30_chpasswd_locked_passwd/config.txt | 0 .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/chpasswd.err | 2 + .../31_chpasswd_locked_shadow/chpasswd.test | 61 + .../31_chpasswd_locked_shadow/config.txt | 0 .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/chpasswd.err | 2 + .../32_chpasswd_invalid_user/chpasswd.test | 56 + .../32_chpasswd_invalid_user/config.txt | 0 .../config/etc/default/useradd | 36 + .../32_chpasswd_invalid_user/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/chpasswd.err | 3 + .../32_chpasswd_invalid_user/data/shadow | 20 + .../33_chpasswd-e_invalid_user/chpasswd.test | 56 + .../33_chpasswd-e_invalid_user/config.txt | 0 .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/chpasswd.err | 2 + .../chpasswd.test | 40 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/pam.d/chpasswd | 6 + .../config/etc/pam.d/common-password | 33 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/passwd | 19 + .../data/shadow | 19 + .../01_chpasswd_invalid_user/chpasswd.test | 56 + .../01_chpasswd_invalid_user/config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 318 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/chpasswd.err | 2 + .../02_chpasswd_multiple_users/chpasswd.test | 40 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 318 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../02_chpasswd_multiple_users/data/shadow | 19 + .../03_chpasswd_no_shadow_file/chpasswd.test | 44 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 318 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../03_chpasswd_no_shadow_file/data/passwd | 19 + .../04_chpasswd_no_shadow_entry/chpasswd.test | 43 + .../config/etc/group | 41 + .../config/etc/gshadow | 40 + .../config/etc/login.defs | 318 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 18 + .../04_chpasswd_no_shadow_entry/data/passwd | 19 + .../04_chpasswd_no_shadow_entry/data/shadow | 18 + .../chpasswd.test | 55 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/login.defs | 318 +++++ .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/chpasswd.err | 2 + .../useradd/01_useradd_usage/config.txt | 10 + .../config/etc/default/useradd | 36 + .../useradd/01_useradd_usage/config/etc/group | 41 + .../01_useradd_usage/config/etc/gshadow | 41 + .../01_useradd_usage/config/etc/passwd | 19 + .../01_useradd_usage/config/etc/shadow | 19 + .../useradd/01_useradd_usage/data/usage.out | 35 + .../useradd/01_useradd_usage/useradd.test | 48 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 36 + .../useradd.test | 54 + .../03_useradd_usage_no_users/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../03_useradd_usage_no_users/data/usage.out | 35 + .../03_useradd_usage_no_users/useradd.test | 54 + .../04_useradd_usage_2_users/config.txt | 10 + .../config/etc/default/useradd | 36 + .../04_useradd_usage_2_users/config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../04_useradd_usage_2_users/data/usage.out | 35 + .../04_useradd_usage_2_users/useradd.test | 54 + .../05_useradd_usage-b_invalid1/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 1 + .../05_useradd_usage-b_invalid1/useradd.test | 54 + .../06_useradd_usage-b_invalid2/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 2 + .../06_useradd_usage-b_invalid2/useradd.test | 56 + .../07_useradd_usage-b_invalid3/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 1 + .../07_useradd_usage-b_invalid3/useradd.test | 54 + .../08_useradd_usage-c_invalid1/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 1 + .../08_useradd_usage-c_invalid1/useradd.test | 54 + .../09_useradd_usage-c_invalid2/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 2 + .../09_useradd_usage-c_invalid2/useradd.test | 56 + .../10_useradd_usage-d_invalid1/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 1 + .../10_useradd_usage-d_invalid1/useradd.test | 54 + .../11_useradd_usage-d_invalid2/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 2 + .../11_useradd_usage-d_invalid2/useradd.test | 56 + .../12_useradd_usage-d_invalid3/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 1 + .../12_useradd_usage-d_invalid3/useradd.test | 54 + .../13_useradd_usage-e_invalid1/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 1 + .../13_useradd_usage-e_invalid1/useradd.test | 54 + .../14_useradd_usage-e_invalid2/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 1 + .../14_useradd_usage-e_invalid2/useradd.test | 54 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 1 + .../useradd.test | 58 + .../16_useradd_usage-f_invalid1/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 1 + .../16_useradd_usage-f_invalid1/useradd.test | 54 + .../17_useradd_usage-f_invalid2/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 1 + .../17_useradd_usage-f_invalid2/useradd.test | 54 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 1 + .../useradd.test | 58 + .../19_useradd_usage-K_invalid1/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 1 + .../19_useradd_usage-K_invalid1/useradd.test | 54 + .../20_useradd_usage-O_invalid2/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 1 + .../20_useradd_usage-O_invalid2/useradd.test | 54 + .../21_useradd_usage-p_invalid1/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 1 + .../21_useradd_usage-p_invalid1/useradd.test | 54 + .../22_useradd_usage-p_invalid2/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 2 + .../22_useradd_usage-p_invalid2/useradd.test | 56 + .../23_useradd_usage-s_invalid1/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 1 + .../23_useradd_usage-s_invalid1/useradd.test | 54 + .../24_useradd_usage-s_invalid2/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 2 + .../24_useradd_usage-s_invalid2/useradd.test | 56 + .../25_useradd_usage-s_invalid3/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 1 + .../25_useradd_usage-s_invalid3/useradd.test | 54 + .../26_useradd_usage-o_without-u/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 36 + .../26_useradd_usage-o_without-u/useradd.test | 55 + .../27_useradd_usage-k_without-m/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 36 + .../27_useradd_usage-k_without-m/useradd.test | 55 + .../28_useradd_usage-U_with-g/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../28_useradd_usage-U_with-g/data/usage.out | 36 + .../28_useradd_usage-U_with-g/useradd.test | 55 + .../29_useradd_usage-U_with-N/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../29_useradd_usage-U_with-N/data/usage.out | 36 + .../29_useradd_usage-U_with-N/useradd.test | 55 + .../30_useradd_usage-m_with-M/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../30_useradd_usage-m_with-M/data/usage.out | 36 + .../30_useradd_usage-m_with-M/useradd.test | 55 + .../31_useradd_usage_user_with-D/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 35 + .../31_useradd_usage_user_with-D/useradd.test | 54 + .../32_useradd_usage-D_with_other/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 35 + .../useradd.test | 58 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 1 + .../useradd.test | 54 + .../34_useradd_default_GROUP_GID/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../34_useradd_default_GROUP_GID/data/passwd | 20 + .../34_useradd_default_GROUP_GID/data/shadow | 20 + .../34_useradd_default_GROUP_GID/useradd.test | 39 + .../35_useradd_default_GROUP_name/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../35_useradd_default_GROUP_name/data/passwd | 20 + .../35_useradd_default_GROUP_name/data/shadow | 20 + .../useradd.test | 39 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/passwd | 20 + .../data/shadow | 20 + .../data/usage.out | 2 + .../useradd.test | 48 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/passwd | 20 + .../data/shadow | 20 + .../data/usage.out | 2 + .../useradd.test | 48 + .../38_useradd_default_INACTIVE/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../38_useradd_default_INACTIVE/data/passwd | 20 + .../38_useradd_default_INACTIVE/data/shadow | 20 + .../38_useradd_default_INACTIVE/useradd.test | 39 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/passwd | 20 + .../data/shadow | 20 + .../data/usage.out | 2 + .../useradd.test | 48 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/passwd | 20 + .../data/shadow | 20 + .../data/usage.out | 2 + .../useradd.test | 48 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/defaults | 7 + .../useradd.test | 48 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/defaults | 7 + .../useradd.test | 48 + .../config.txt | 10 + .../config/etc/default/useradd | 37 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/useradd | 38 + .../useradd.test | 43 + .../44_useradd_default_no_file/config.txt | 10 + .../config/etc/default/useradd | 37 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../44_useradd_default_no_file/data/useradd | 8 + .../44_useradd_default_no_file/useradd.test | 47 + .../useradd/45_useradd-G_UID_name/config.txt | 10 + .../config/etc/default/useradd | 36 + .../45_useradd-G_UID_name/config/etc/group | 41 + .../45_useradd-G_UID_name/config/etc/gshadow | 41 + .../45_useradd-G_UID_name/config/etc/passwd | 19 + .../45_useradd-G_UID_name/config/etc/shadow | 19 + .../useradd/45_useradd-G_UID_name/data/group | 42 + .../45_useradd-G_UID_name/data/gshadow | 42 + .../useradd/45_useradd-G_UID_name/data/passwd | 20 + .../useradd/45_useradd-G_UID_name/data/shadow | 20 + .../45_useradd-G_UID_name/useradd.test | 39 + .../46_useradd-G_UID_duplicate/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../46_useradd-G_UID_duplicate/data/group | 42 + .../46_useradd-G_UID_duplicate/data/gshadow | 42 + .../46_useradd-G_UID_duplicate/data/passwd | 20 + .../46_useradd-G_UID_duplicate/data/shadow | 20 + .../46_useradd-G_UID_duplicate/useradd.test | 39 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../data/gshadow | 42 + .../data/passwd | 20 + .../data/shadow | 20 + .../useradd.test | 39 + .../48_useradd-G_name_duplicate/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../48_useradd-G_name_duplicate/data/group | 42 + .../48_useradd-G_name_duplicate/data/gshadow | 42 + .../48_useradd-G_name_duplicate/data/passwd | 20 + .../48_useradd-G_name_duplicate/data/shadow | 20 + .../48_useradd-G_name_duplicate/useradd.test | 39 + .../49_useradd-G_invalid_group/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../49_useradd-G_invalid_group/data/usage.out | 1 + .../49_useradd-G_invalid_group/useradd.test | 54 + .../usertools/useradd/50_useradd-r/config.txt | 10 + .../50_useradd-r/config/etc/default/useradd | 36 + .../useradd/50_useradd-r/config/etc/group | 41 + .../useradd/50_useradd-r/config/etc/gshadow | 41 + .../useradd/50_useradd-r/config/etc/passwd | 19 + .../useradd/50_useradd-r/config/etc/shadow | 19 + .../usertools/useradd/50_useradd-r/data/group | 42 + .../useradd/50_useradd-r/data/gshadow | 42 + .../useradd/50_useradd-r/data/passwd | 20 + .../useradd/50_useradd-r/data/shadow | 20 + .../useradd/50_useradd-r/useradd.test | 39 + .../51_useradd_already_exist/config.txt | 10 + .../config/etc/default/useradd | 36 + .../51_useradd_already_exist/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../51_useradd_already_exist/data/usage.out | 1 + .../51_useradd_already_exist/useradd.test | 54 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 1 + .../useradd.test | 54 + .../useradd/53_useradd-G_empty/config.txt | 10 + .../config/etc/default/useradd | 36 + .../53_useradd-G_empty/config/etc/group | 41 + .../53_useradd-G_empty/config/etc/gshadow | 41 + .../53_useradd-G_empty/config/etc/passwd | 19 + .../53_useradd-G_empty/config/etc/shadow | 19 + .../useradd/53_useradd-G_empty/data/group | 42 + .../useradd/53_useradd-G_empty/data/gshadow | 42 + .../useradd/53_useradd-G_empty/data/passwd | 20 + .../useradd/53_useradd-G_empty/data/shadow | 20 + .../useradd/53_useradd-G_empty/useradd.test | 39 + .../54_useradd_no_shadow_file/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../54_useradd_no_shadow_file/data/group | 42 + .../54_useradd_no_shadow_file/data/gshadow | 42 + .../54_useradd_no_shadow_file/data/passwd | 20 + .../54_useradd_no_shadow_file/useradd.test | 43 + .../55_useradd_no_gshadow_file/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../55_useradd_no_gshadow_file/data/group | 42 + .../55_useradd_no_gshadow_file/data/passwd | 20 + .../55_useradd_no_gshadow_file/data/shadow | 20 + .../55_useradd_no_gshadow_file/useradd.test | 43 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../data/gshadow | 43 + .../data/passwd | 20 + .../data/shadow | 20 + .../useradd.test | 39 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 35 + .../useradd.test | 54 + .../useradd/58_useradd-e_empty/config.txt | 10 + .../config/etc/default/useradd | 36 + .../58_useradd-e_empty/config/etc/group | 41 + .../58_useradd-e_empty/config/etc/gshadow | 41 + .../58_useradd-e_empty/config/etc/passwd | 19 + .../58_useradd-e_empty/config/etc/shadow | 19 + .../useradd/58_useradd-e_empty/data/group | 42 + .../useradd/58_useradd-e_empty/data/gshadow | 42 + .../useradd/58_useradd-e_empty/data/passwd | 20 + .../useradd/58_useradd-e_empty/data/shadow | 20 + .../useradd/58_useradd-e_empty/useradd.test | 39 + .../useradd/59_useradd-e-1-f-1/config.txt | 10 + .../config/etc/default/useradd | 36 + .../59_useradd-e-1-f-1/config/etc/group | 41 + .../59_useradd-e-1-f-1/config/etc/gshadow | 41 + .../59_useradd-e-1-f-1/config/etc/passwd | 19 + .../59_useradd-e-1-f-1/config/etc/shadow | 19 + .../useradd/59_useradd-e-1-f-1/data/group | 42 + .../useradd/59_useradd-e-1-f-1/data/gshadow | 42 + .../useradd/59_useradd-e-1-f-1/data/passwd | 20 + .../useradd/59_useradd-e-1-f-1/data/shadow | 20 + .../useradd/59_useradd-e-1-f-1/useradd.test | 39 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/group | 42 + .../data/gshadow | 42 + .../data/passwd | 20 + .../useradd.test | 43 + .../usertools/useradd/61_useradd-K/config.txt | 10 + .../61_useradd-K/config/etc/default/useradd | 36 + .../useradd/61_useradd-K/config/etc/group | 41 + .../useradd/61_useradd-K/config/etc/gshadow | 41 + .../useradd/61_useradd-K/config/etc/passwd | 19 + .../useradd/61_useradd-K/config/etc/shadow | 19 + .../usertools/useradd/61_useradd-K/data/group | 42 + .../useradd/61_useradd-K/data/gshadow | 42 + .../useradd/61_useradd-K/data/passwd | 20 + .../useradd/61_useradd-K/data/shadow | 20 + .../useradd/61_useradd-K/useradd.test | 39 + .../usertools/useradd/62_useradd-p/config.txt | 10 + .../62_useradd-p/config/etc/default/useradd | 36 + .../useradd/62_useradd-p/config/etc/group | 41 + .../useradd/62_useradd-p/config/etc/gshadow | 41 + .../useradd/62_useradd-p/config/etc/passwd | 19 + .../useradd/62_useradd-p/config/etc/shadow | 19 + .../usertools/useradd/62_useradd-p/data/group | 42 + .../useradd/62_useradd-p/data/gshadow | 42 + .../useradd/62_useradd-p/data/passwd | 20 + .../useradd/62_useradd-p/data/shadow | 20 + .../useradd/62_useradd-p/useradd.test | 39 + .../usertools/useradd/63_useradd-s/config.txt | 10 + .../63_useradd-s/config/etc/default/useradd | 36 + .../useradd/63_useradd-s/config/etc/group | 41 + .../useradd/63_useradd-s/config/etc/gshadow | 41 + .../useradd/63_useradd-s/config/etc/passwd | 19 + .../useradd/63_useradd-s/config/etc/shadow | 19 + .../usertools/useradd/63_useradd-s/data/group | 42 + .../useradd/63_useradd-s/data/gshadow | 42 + .../useradd/63_useradd-s/data/passwd | 20 + .../useradd/63_useradd-s/data/shadow | 20 + .../useradd/63_useradd-s/useradd.test | 39 + .../64_useradd_locked_passwd/config.txt | 0 .../config/etc/default/useradd | 36 + .../64_useradd_locked_passwd/config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../64_useradd_locked_passwd/data/useradd.err | 2 + .../64_useradd_locked_passwd/useradd.test | 60 + .../65_useradd_locked_group/config.txt | 0 .../config/etc/default/useradd | 36 + .../65_useradd_locked_group/config/etc/group | 41 + .../config/etc/gshadow | 41 + .../65_useradd_locked_group/config/etc/passwd | 19 + .../65_useradd_locked_group/config/etc/shadow | 19 + .../65_useradd_locked_group/data/useradd.err | 2 + .../65_useradd_locked_group/useradd.test | 60 + .../66_useradd_locked_shadow/config.txt | 0 .../config/etc/default/useradd | 36 + .../66_useradd_locked_shadow/config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../66_useradd_locked_shadow/data/useradd.err | 2 + .../66_useradd_locked_shadow/useradd.test | 60 + .../67_useradd_locked_gshadow/config.txt | 0 .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/useradd.err | 2 + .../67_useradd_locked_gshadow/useradd.test | 60 + .../useradd/68_useradd-s_empty/config.txt | 10 + .../config/etc/default/useradd | 36 + .../68_useradd-s_empty/config/etc/group | 41 + .../68_useradd-s_empty/config/etc/gshadow | 41 + .../68_useradd-s_empty/config/etc/passwd | 19 + .../68_useradd-s_empty/config/etc/shadow | 19 + .../useradd/68_useradd-s_empty/data/group | 42 + .../useradd/68_useradd-s_empty/data/gshadow | 42 + .../useradd/68_useradd-s_empty/data/passwd | 20 + .../useradd/68_useradd-s_empty/data/shadow | 20 + .../useradd/68_useradd-s_empty/useradd.test | 39 + .../userdel/01_userdel_usage/config.txt | 10 + .../config/etc/default/useradd | 36 + .../userdel/01_userdel_usage/config/etc/group | 41 + .../01_userdel_usage/config/etc/gshadow | 41 + .../01_userdel_usage/config/etc/passwd | 19 + .../01_userdel_usage/config/etc/shadow | 19 + .../userdel/01_userdel_usage/data/usage.out | 10 + .../userdel/01_userdel_usage/userdel.test | 48 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 11 + .../userdel.test | 54 + .../03_userdel_usage_no_users/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../03_userdel_usage_no_users/data/usage.out | 10 + .../03_userdel_usage_no_users/userdel.test | 54 + .../04_userdel_usage_2_users/config.txt | 10 + .../config/etc/default/useradd | 36 + .../04_userdel_usage_2_users/config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../04_userdel_usage_2_users/data/usage.out | 10 + .../04_userdel_usage_2_users/userdel.test | 54 + .../05_userdel_no_USERGROUPS_ENAB/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/login.defs | 335 +++++ .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../05_userdel_no_USERGROUPS_ENAB/data/group | 43 + .../data/gshadow | 43 + .../05_userdel_no_USERGROUPS_ENAB/data/passwd | 20 + .../05_userdel_no_USERGROUPS_ENAB/data/shadow | 20 + .../userdel.test | 39 + .../06_userdel_no_usergroup/config.txt | 1 + .../config/etc/default/useradd | 36 + .../06_userdel_no_usergroup/config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/login.defs | 335 +++++ .../06_userdel_no_usergroup/config/etc/passwd | 21 + .../06_userdel_no_usergroup/config/etc/shadow | 21 + .../06_userdel_no_usergroup/data/group | 43 + .../06_userdel_no_usergroup/data/gshadow | 43 + .../06_userdel_no_usergroup/data/passwd | 20 + .../06_userdel_no_usergroup/data/shadow | 20 + .../06_userdel_no_usergroup/userdel.test | 39 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 44 + .../config/etc/gshadow | 44 + .../config/etc/login.defs | 335 +++++ .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 44 + .../data/gshadow | 44 + .../data/passwd | 20 + .../data/shadow | 20 + .../data/userdel.out | 1 + .../userdel.test | 48 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/login.defs | 335 +++++ .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 43 + .../data/gshadow | 43 + .../data/passwd | 20 + .../data/shadow | 20 + .../data/userdel.out | 1 + .../userdel.test | 48 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/login.defs | 335 +++++ .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 43 + .../data/gshadow | 43 + .../data/passwd | 20 + .../data/shadow | 20 + .../data/userdel.out | 1 + .../userdel.test | 48 + .../01_usermod-p_no_shadow_file/config.txt | 2 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../01_usermod-p_no_shadow_file/data/passwd | 20 + .../01_usermod-p_no_shadow_file/usermod.test | 43 + .../02_usermod-p_no_shadow_entry/config.txt | 2 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../02_usermod-p_no_shadow_entry/data/passwd | 20 + .../02_usermod-p_no_shadow_entry/usermod.test | 39 + .../config.txt | 2 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/shadow | 20 + .../usermod.test | 39 + .../config.txt | 2 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../usermod.test | 39 + .../config.txt | 2 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/shadow | 20 + .../usermod.test | 39 + .../config.txt | 2 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../usermod.test | 39 + .../config.txt | 2 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../usermod.test | 39 + .../config.txt | 2 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/shadow | 20 + .../usermod.test | 39 + .../config.txt | 2 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../usermod.test | 39 + .../usermod/10_usermod_usage/config.txt | 10 + .../config/etc/default/useradd | 36 + .../usermod/10_usermod_usage/config/etc/group | 41 + .../10_usermod_usage/config/etc/gshadow | 41 + .../10_usermod_usage/config/etc/passwd | 19 + .../10_usermod_usage/config/etc/shadow | 19 + .../usermod/10_usermod_usage/data/usage.out | 26 + .../usermod/10_usermod_usage/usermod.test | 48 + .../11_usermod_usage_bad_option/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usage.out | 27 + .../11_usermod_usage_bad_option/usermod.test | 54 + .../usermod/12_usermod_usage_bad-f/config.txt | 10 + .../config/etc/default/useradd | 36 + .../12_usermod_usage_bad-f/config/etc/group | 41 + .../12_usermod_usage_bad-f/config/etc/gshadow | 41 + .../12_usermod_usage_bad-f/config/etc/passwd | 19 + .../12_usermod_usage_bad-f/config/etc/shadow | 19 + .../12_usermod_usage_bad-f/data/usermod.err | 1 + .../12_usermod_usage_bad-f/usermod.test | 54 + .../13_usermod_usage_bad-f_negativ/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 19 + .../config/etc/shadow | 19 + .../data/usermod.err | 1 + .../usermod.test | 54 + .../14_usermod_usage_no_options/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 27 + .../14_usermod_usage_no_options/usermod.test | 54 + .../15_usermod_usage_no_user/config.txt | 10 + .../config/etc/default/useradd | 36 + .../15_usermod_usage_no_user/config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../15_usermod_usage_no_user/data/usage.out | 26 + .../15_usermod_usage_no_user/usermod.test | 54 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 1 + .../usermod.test | 58 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 1 + .../usermod.test | 58 + .../18_usermod_usage-L-p_exclusive/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 27 + .../usermod.test | 54 + .../19_usermod_usage-L-U_exclusive/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 27 + .../usermod.test | 54 + .../20_usermod_usage-p-U_exclusive/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 27 + .../usermod.test | 54 + .../config.txt | 6 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/group | 42 + .../data/passwd | 20 + .../data/shadow | 20 + .../usermod.test | 43 + .../config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 1 + .../usermod.test | 54 + .../usermod/23_usermod-e_date/config.txt | 2 + .../config/etc/default/useradd | 36 + .../23_usermod-e_date/config/etc/group | 42 + .../23_usermod-e_date/config/etc/gshadow | 42 + .../23_usermod-e_date/config/etc/passwd | 20 + .../23_usermod-e_date/config/etc/shadow | 20 + .../usermod/23_usermod-e_date/data/shadow | 20 + .../usermod/23_usermod-e_date/usermod.test | 39 + .../usermod/24_usermod-e_date/config.txt | 2 + .../config/etc/default/useradd | 36 + .../24_usermod-e_date/config/etc/group | 42 + .../24_usermod-e_date/config/etc/gshadow | 42 + .../24_usermod-e_date/config/etc/passwd | 20 + .../24_usermod-e_date/config/etc/shadow | 20 + .../usermod/24_usermod-e_date/data/shadow | 20 + .../usermod/24_usermod-e_date/usermod.test | 39 + .../usermod/25_usermod-e_empty_arg/config.txt | 2 + .../config/etc/default/useradd | 36 + .../25_usermod-e_empty_arg/config/etc/group | 42 + .../25_usermod-e_empty_arg/config/etc/gshadow | 42 + .../25_usermod-e_empty_arg/config/etc/passwd | 20 + .../25_usermod-e_empty_arg/config/etc/shadow | 20 + .../25_usermod-e_empty_arg/data/shadow | 20 + .../25_usermod-e_empty_arg/usermod.test | 39 + .../usermod/26_usermod-e-1/config.txt | 2 + .../26_usermod-e-1/config/etc/default/useradd | 36 + .../usermod/26_usermod-e-1/config/etc/group | 42 + .../usermod/26_usermod-e-1/config/etc/gshadow | 42 + .../usermod/26_usermod-e-1/config/etc/passwd | 20 + .../usermod/26_usermod-e-1/config/etc/shadow | 20 + .../usermod/26_usermod-e-1/data/shadow | 20 + .../usermod/26_usermod-e-1/usermod.test | 39 + .../usermod/27_usermod-e_invalid1/config.txt | 2 + .../config/etc/default/useradd | 36 + .../27_usermod-e_invalid1/config/etc/group | 42 + .../27_usermod-e_invalid1/config/etc/gshadow | 42 + .../27_usermod-e_invalid1/config/etc/passwd | 20 + .../27_usermod-e_invalid1/config/etc/shadow | 20 + .../27_usermod-e_invalid1/data/usermod.err | 1 + .../27_usermod-e_invalid1/usermod.test | 54 + .../usermod/28_usermod-e_invalid2/config.txt | 2 + .../config/etc/default/useradd | 36 + .../28_usermod-e_invalid2/config/etc/group | 42 + .../28_usermod-e_invalid2/config/etc/gshadow | 42 + .../28_usermod-e_invalid2/config/etc/passwd | 20 + .../28_usermod-e_invalid2/config/etc/shadow | 20 + .../28_usermod-e_invalid2/data/usermod.err | 1 + .../28_usermod-e_invalid2/usermod.test | 54 + .../usermod/29_usermod_no_changes/config.txt | 10 + .../config/etc/default/useradd | 36 + .../29_usermod_no_changes/config/etc/group | 41 + .../29_usermod_no_changes/config/etc/gshadow | 41 + .../29_usermod_no_changes/config/etc/passwd | 20 + .../29_usermod_no_changes/config/etc/shadow | 20 + .../29_usermod_no_changes/data/usermod.err | 1 + .../29_usermod_no_changes/usermod.test | 48 + .../30_usermod_usage-a_without-G/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 27 + .../30_usermod_usage-a_without-G/usermod.test | 54 + .../31_usermod_usage-o_without-u/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 27 + .../31_usermod_usage-o_without-u/usermod.test | 55 + .../32_usermod_usage-m_without-d/config.txt | 10 + .../config/etc/default/useradd | 36 + .../config/etc/group | 41 + .../config/etc/gshadow | 41 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/usage.out | 27 + .../32_usermod_usage-m_without-d/usermod.test | 54 + .../33_usermod_change_shell/config.txt | 2 + .../config/etc/default/useradd | 36 + .../33_usermod_change_shell/config/etc/group | 42 + .../config/etc/gshadow | 42 + .../33_usermod_change_shell/config/etc/passwd | 20 + .../33_usermod_change_shell/config/etc/shadow | 20 + .../33_usermod_change_shell/data/passwd | 20 + .../33_usermod_change_shell/usermod.test | 39 + .../config.txt | 2 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../data/shadow | 20 + .../usermod.test | 39 + .../35_usermod-f_no_shadow_entry/config.txt | 2 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 19 + .../35_usermod-f_no_shadow_entry/data/shadow | 20 + .../35_usermod-f_no_shadow_entry/usermod.test | 39 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/home_ls-a | 3 + .../data/home_ls-a2 | 2 + .../data/passwd | 20 + .../data/usermod.err | 1 + .../usermod.test | 84 ++ .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/passwd | 20 + .../usermod.test | 47 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/passwd | 20 + .../usermod.test | 48 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/passwd | 20 + .../39_usermod-u_copy_lastlog_entry/login.exp | 13 + .../usermod.test | 66 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 42 + .../data/passwd | 20 + .../data/shadow | 20 + .../login.exp | 13 + .../usermod.test | 74 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/passwd | 20 + .../usermod.test | 48 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/passwd | 20 + .../42_usermod-u_copy_faillog_entry/login.exp | 17 + .../usermod.test | 66 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 42 + .../config/etc/pam.d/login | 111 ++ .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/group | 42 + .../data/passwd | 20 + .../data/shadow | 20 + .../login.exp | 17 + .../usermod.test | 75 + .../44_usermod-l_move_mailbox/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/mailbox.perms | 1 + .../44_usermod-l_move_mailbox/data/passwd | 20 + .../44_usermod-l_move_mailbox/data/shadow | 20 + .../usermod/44_usermod-l_move_mailbox/test | 1 + .../44_usermod-l_move_mailbox/usermod.test | 57 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/mailbox.perms | 1 + .../data/passwd | 20 + .../usermod.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 21 + .../config/etc/shadow | 21 + .../data/mailbox.perms | 1 + .../data/passwd | 21 + .../data/usermod.err | 1 + .../usermod.test | 63 + .../47_usermod-u_default_maildir/config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/login.defs | 335 +++++ .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/mailbox.perms | 1 + .../47_usermod-u_default_maildir/data/passwd | 20 + .../47_usermod-u_default_maildir/usermod.test | 54 + .../usermod/48_usermod-u_MAIL_FILE/config.txt | 1 + .../config/etc/default/useradd | 36 + .../48_usermod-u_MAIL_FILE/config/etc/group | 42 + .../48_usermod-u_MAIL_FILE/config/etc/gshadow | 42 + .../config/etc/login.defs | 335 +++++ .../48_usermod-u_MAIL_FILE/config/etc/passwd | 20 + .../48_usermod-u_MAIL_FILE/config/etc/shadow | 20 + .../48_usermod-u_MAIL_FILE/data/mailbox.perms | 1 + .../48_usermod-u_MAIL_FILE/data/passwd | 20 + .../48_usermod-u_MAIL_FILE/usermod.test | 54 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/home_ls-a | 7 + .../data/passwd | 20 + .../usermod.test | 69 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 42 + .../config/etc/gshadow | 42 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/home_ls-a | 3 + .../data/passwd | 20 + .../usermod.test | 58 + .../config.txt | 1 + .../config/etc/default/useradd | 36 + .../config/etc/group | 43 + .../config/etc/gshadow | 43 + .../config/etc/passwd | 20 + .../config/etc/shadow | 20 + .../data/home_ls-a | 3 + .../data/passwd | 20 + .../usermod.test | 58 + 8970 files changed, 336314 insertions(+) create mode 100644 tests/README create mode 100755 tests/bug332198-test.exp create mode 100755 tests/bug334803-test.exp create mode 100644 tests/chage/01/data/chage1 create mode 100644 tests/chage/01/data/chage2 create mode 100644 tests/chage/01/data/chage3 create mode 100644 tests/chage/01/data/chage4 create mode 100644 tests/chage/01/data/chage5 create mode 100644 tests/chage/01/data/chage6 create mode 100644 tests/chage/01/data/chage7 create mode 100644 tests/chage/01/data/chage7b create mode 100644 tests/chage/01/data/chage8 create mode 100644 tests/chage/01/data/group create mode 100644 tests/chage/01/data/gshadow create mode 100644 tests/chage/01/data/passwd create mode 100644 tests/chage/01/data/shadow create mode 100644 tests/chage/01/data/usage create mode 100755 tests/chage/01/run create mode 100755 tests/chage/01/run1.exp create mode 100755 tests/chage/01/run2.exp create mode 100644 tests/chage/02/data/group create mode 100644 tests/chage/02/data/gshadow create mode 100644 tests/chage/02/data/passwd create mode 100644 tests/chage/02/data/shadow create mode 100755 tests/chage/02/run create mode 100755 tests/chage/02/run.exp create mode 100755 tests/chage/03_chsh_usage/chage.test create mode 100644 tests/chage/03_chsh_usage/config.txt create mode 100644 tests/chage/03_chsh_usage/config/etc/group create mode 100644 tests/chage/03_chsh_usage/config/etc/gshadow create mode 100644 tests/chage/03_chsh_usage/config/etc/passwd create mode 100644 tests/chage/03_chsh_usage/config/etc/shadow create mode 100644 tests/chage/03_chsh_usage/data/usage.out create mode 100755 tests/chage/04_chsh_usage_invalid_option/chage.test create mode 100644 tests/chage/04_chsh_usage_invalid_option/config.txt create mode 100644 tests/chage/04_chsh_usage_invalid_option/config/etc/group create mode 100644 tests/chage/04_chsh_usage_invalid_option/config/etc/gshadow create mode 100644 tests/chage/04_chsh_usage_invalid_option/config/etc/passwd create mode 100644 tests/chage/04_chsh_usage_invalid_option/config/etc/shadow create mode 100644 tests/chage/04_chsh_usage_invalid_option/data/usage.out create mode 100755 tests/chage/05_chsh_usage_2_users/chage.test create mode 100644 tests/chage/05_chsh_usage_2_users/config.txt create mode 100644 tests/chage/05_chsh_usage_2_users/config/etc/group create mode 100644 tests/chage/05_chsh_usage_2_users/config/etc/gshadow create mode 100644 tests/chage/05_chsh_usage_2_users/config/etc/passwd create mode 100644 tests/chage/05_chsh_usage_2_users/config/etc/shadow create mode 100644 tests/chage/05_chsh_usage_2_users/data/usage.out create mode 100755 tests/chage/06_chsh_usage_no_users/chage.test create mode 100644 tests/chage/06_chsh_usage_no_users/config.txt create mode 100644 tests/chage/06_chsh_usage_no_users/config/etc/group create mode 100644 tests/chage/06_chsh_usage_no_users/config/etc/gshadow create mode 100644 tests/chage/06_chsh_usage_no_users/config/etc/passwd create mode 100644 tests/chage/06_chsh_usage_no_users/config/etc/shadow create mode 100644 tests/chage/06_chsh_usage_no_users/data/usage.out create mode 100755 tests/chage/07_chsh_usage-l_exclusive/chage.test create mode 100644 tests/chage/07_chsh_usage-l_exclusive/config.txt create mode 100644 tests/chage/07_chsh_usage-l_exclusive/config/etc/group create mode 100644 tests/chage/07_chsh_usage-l_exclusive/config/etc/gshadow create mode 100644 tests/chage/07_chsh_usage-l_exclusive/config/etc/passwd create mode 100644 tests/chage/07_chsh_usage-l_exclusive/config/etc/shadow create mode 100644 tests/chage/07_chsh_usage-l_exclusive/data/usage.out create mode 100755 tests/chage/08_chsh_usage_invalid_date/chage.test create mode 100644 tests/chage/08_chsh_usage_invalid_date/config.txt create mode 100644 tests/chage/08_chsh_usage_invalid_date/config/etc/group create mode 100644 tests/chage/08_chsh_usage_invalid_date/config/etc/gshadow create mode 100644 tests/chage/08_chsh_usage_invalid_date/config/etc/passwd create mode 100644 tests/chage/08_chsh_usage_invalid_date/config/etc/shadow create mode 100644 tests/chage/08_chsh_usage_invalid_date/data/usage.out create mode 100755 tests/chage/09_chsh_usage_invalid_numeric_arg/chage.test create mode 100644 tests/chage/09_chsh_usage_invalid_numeric_arg/config.txt create mode 100644 tests/chage/09_chsh_usage_invalid_numeric_arg/config/etc/group create mode 100644 tests/chage/09_chsh_usage_invalid_numeric_arg/config/etc/gshadow create mode 100644 tests/chage/09_chsh_usage_invalid_numeric_arg/config/etc/passwd create mode 100644 tests/chage/09_chsh_usage_invalid_numeric_arg/config/etc/shadow create mode 100644 tests/chage/09_chsh_usage_invalid_numeric_arg/data/usage.out create mode 100755 tests/chage/10_chsh-l/chage.test create mode 100644 tests/chage/10_chsh-l/config.txt create mode 100644 tests/chage/10_chsh-l/config/etc/group create mode 100644 tests/chage/10_chsh-l/config/etc/gshadow create mode 100644 tests/chage/10_chsh-l/config/etc/passwd create mode 100644 tests/chage/10_chsh-l/config/etc/shadow create mode 100644 tests/chage/10_chsh-l/data/myuser1 create mode 100644 tests/chage/10_chsh-l/data/myuser10 create mode 100644 tests/chage/10_chsh-l/data/myuser11 create mode 100644 tests/chage/10_chsh-l/data/myuser2 create mode 100644 tests/chage/10_chsh-l/data/myuser3 create mode 100644 tests/chage/10_chsh-l/data/myuser4 create mode 100644 tests/chage/10_chsh-l/data/myuser5 create mode 100644 tests/chage/10_chsh-l/data/myuser6 create mode 100644 tests/chage/10_chsh-l/data/myuser7 create mode 100644 tests/chage/10_chsh-l/data/myuser8 create mode 100644 tests/chage/10_chsh-l/data/myuser9 create mode 100755 tests/chage/11_chsh_usage_invalid_user/chage.test create mode 100644 tests/chage/11_chsh_usage_invalid_user/config.txt create mode 100644 tests/chage/11_chsh_usage_invalid_user/config/etc/group create mode 100644 tests/chage/11_chsh_usage_invalid_user/config/etc/gshadow create mode 100644 tests/chage/11_chsh_usage_invalid_user/config/etc/passwd create mode 100644 tests/chage/11_chsh_usage_invalid_user/config/etc/shadow create mode 100644 tests/chage/11_chsh_usage_invalid_user/data/usage.out create mode 100755 tests/chage/12_chsh_usage-l_invalid_user2/chage.test create mode 100644 tests/chage/12_chsh_usage-l_invalid_user2/config.txt create mode 100644 tests/chage/12_chsh_usage-l_invalid_user2/config/etc/group create mode 100644 tests/chage/12_chsh_usage-l_invalid_user2/config/etc/gshadow create mode 100644 tests/chage/12_chsh_usage-l_invalid_user2/config/etc/passwd create mode 100644 tests/chage/12_chsh_usage-l_invalid_user2/config/etc/shadow create mode 100644 tests/chage/12_chsh_usage-l_invalid_user2/data/usage.out create mode 100755 tests/chage/13_chsh_locked_passwd/chage.test create mode 100644 tests/chage/13_chsh_locked_passwd/config.txt create mode 100644 tests/chage/13_chsh_locked_passwd/config/etc/group create mode 100644 tests/chage/13_chsh_locked_passwd/config/etc/gshadow create mode 100644 tests/chage/13_chsh_locked_passwd/config/etc/passwd create mode 100644 tests/chage/13_chsh_locked_passwd/config/etc/shadow create mode 100644 tests/chage/13_chsh_locked_passwd/data/usage.out create mode 100755 tests/chage/14_chsh_locked_shadow/chage.test create mode 100644 tests/chage/14_chsh_locked_shadow/config.txt create mode 100644 tests/chage/14_chsh_locked_shadow/config/etc/group create mode 100644 tests/chage/14_chsh_locked_shadow/config/etc/gshadow create mode 100644 tests/chage/14_chsh_locked_shadow/config/etc/passwd create mode 100644 tests/chage/14_chsh_locked_shadow/config/etc/shadow create mode 100644 tests/chage/14_chsh_locked_shadow/data/usage.out create mode 100755 tests/chage/15_chage-I_no_shadow_entry/chage.test create mode 100644 tests/chage/15_chage-I_no_shadow_entry/config.txt create mode 100644 tests/chage/15_chage-I_no_shadow_entry/config/etc/group create mode 100644 tests/chage/15_chage-I_no_shadow_entry/config/etc/gshadow create mode 100644 tests/chage/15_chage-I_no_shadow_entry/config/etc/login.defs create mode 100644 tests/chage/15_chage-I_no_shadow_entry/config/etc/passwd create mode 100644 tests/chage/15_chage-I_no_shadow_entry/config/etc/shadow create mode 100644 tests/chage/15_chage-I_no_shadow_entry/data/passwd create mode 100644 tests/chage/15_chage-I_no_shadow_entry/data/shadow create mode 100755 tests/chage/16_chage-m_no_shadow_entry/chage.test create mode 100644 tests/chage/16_chage-m_no_shadow_entry/config.txt create mode 100644 tests/chage/16_chage-m_no_shadow_entry/config/etc/group create mode 100644 tests/chage/16_chage-m_no_shadow_entry/config/etc/gshadow create mode 100644 tests/chage/16_chage-m_no_shadow_entry/config/etc/login.defs create mode 100644 tests/chage/16_chage-m_no_shadow_entry/config/etc/passwd create mode 100644 tests/chage/16_chage-m_no_shadow_entry/config/etc/shadow create mode 100644 tests/chage/16_chage-m_no_shadow_entry/data/passwd create mode 100644 tests/chage/16_chage-m_no_shadow_entry/data/shadow create mode 100755 tests/chage/17_chage-M_no_shadow_entry/chage.test create mode 100644 tests/chage/17_chage-M_no_shadow_entry/config.txt create mode 100644 tests/chage/17_chage-M_no_shadow_entry/config/etc/group create mode 100644 tests/chage/17_chage-M_no_shadow_entry/config/etc/gshadow create mode 100644 tests/chage/17_chage-M_no_shadow_entry/config/etc/login.defs create mode 100644 tests/chage/17_chage-M_no_shadow_entry/config/etc/passwd create mode 100644 tests/chage/17_chage-M_no_shadow_entry/config/etc/shadow create mode 100644 tests/chage/17_chage-M_no_shadow_entry/data/passwd create mode 100644 tests/chage/17_chage-M_no_shadow_entry/data/shadow create mode 100755 tests/chage/18_chage-d_no_shadow_entry/chage.test create mode 100644 tests/chage/18_chage-d_no_shadow_entry/config.txt create mode 100644 tests/chage/18_chage-d_no_shadow_entry/config/etc/group create mode 100644 tests/chage/18_chage-d_no_shadow_entry/config/etc/gshadow create mode 100644 tests/chage/18_chage-d_no_shadow_entry/config/etc/login.defs create mode 100644 tests/chage/18_chage-d_no_shadow_entry/config/etc/passwd create mode 100644 tests/chage/18_chage-d_no_shadow_entry/config/etc/shadow create mode 100644 tests/chage/18_chage-d_no_shadow_entry/data/passwd create mode 100644 tests/chage/18_chage-d_no_shadow_entry/data/shadow create mode 100755 tests/chage/19_chage-W_no_shadow_entry/chage.test create mode 100644 tests/chage/19_chage-W_no_shadow_entry/config.txt create mode 100644 tests/chage/19_chage-W_no_shadow_entry/config/etc/group create mode 100644 tests/chage/19_chage-W_no_shadow_entry/config/etc/gshadow create mode 100644 tests/chage/19_chage-W_no_shadow_entry/config/etc/login.defs create mode 100644 tests/chage/19_chage-W_no_shadow_entry/config/etc/passwd create mode 100644 tests/chage/19_chage-W_no_shadow_entry/config/etc/shadow create mode 100644 tests/chage/19_chage-W_no_shadow_entry/data/passwd create mode 100644 tests/chage/19_chage-W_no_shadow_entry/data/shadow create mode 100755 tests/chage/20_chage-E_no_shadow_entry/chage.test create mode 100644 tests/chage/20_chage-E_no_shadow_entry/config.txt create mode 100644 tests/chage/20_chage-E_no_shadow_entry/config/etc/group create mode 100644 tests/chage/20_chage-E_no_shadow_entry/config/etc/gshadow create mode 100644 tests/chage/20_chage-E_no_shadow_entry/config/etc/login.defs create mode 100644 tests/chage/20_chage-E_no_shadow_entry/config/etc/passwd create mode 100644 tests/chage/20_chage-E_no_shadow_entry/config/etc/shadow create mode 100644 tests/chage/20_chage-E_no_shadow_entry/data/passwd create mode 100644 tests/chage/20_chage-E_no_shadow_entry/data/shadow create mode 100755 tests/chage/21_chage_no_shadow_file/chage.test create mode 100644 tests/chage/21_chage_no_shadow_file/config.txt create mode 100644 tests/chage/21_chage_no_shadow_file/config/etc/group create mode 100644 tests/chage/21_chage_no_shadow_file/config/etc/gshadow create mode 100644 tests/chage/21_chage_no_shadow_file/config/etc/passwd create mode 100644 tests/chage/21_chage_no_shadow_file/config/etc/shadow create mode 100644 tests/chage/21_chage_no_shadow_file/data/usage.out create mode 100755 tests/chage/22_chage_myuser-l/chage.test create mode 100644 tests/chage/22_chage_myuser-l/config.txt create mode 100644 tests/chage/22_chage_myuser-l/config/etc/group create mode 100644 tests/chage/22_chage_myuser-l/config/etc/gshadow create mode 100644 tests/chage/22_chage_myuser-l/config/etc/passwd create mode 100644 tests/chage/22_chage_myuser-l/config/etc/shadow create mode 100644 tests/chage/22_chage_myuser-l/data/myuser1 create mode 100755 tests/chage/23_chage_myuser-I/chage.test create mode 100644 tests/chage/23_chage_myuser-I/config.txt create mode 100644 tests/chage/23_chage_myuser-I/config/etc/group create mode 100644 tests/chage/23_chage_myuser-I/config/etc/gshadow create mode 100644 tests/chage/23_chage_myuser-I/config/etc/passwd create mode 100644 tests/chage/23_chage_myuser-I/config/etc/shadow create mode 100644 tests/chage/23_chage_myuser-I/data/usage.out create mode 100755 tests/chage/24_chage_myuser-l_other/chage.test create mode 100644 tests/chage/24_chage_myuser-l_other/config.txt create mode 100644 tests/chage/24_chage_myuser-l_other/config/etc/group create mode 100644 tests/chage/24_chage_myuser-l_other/config/etc/gshadow create mode 100644 tests/chage/24_chage_myuser-l_other/config/etc/passwd create mode 100644 tests/chage/24_chage_myuser-l_other/config/etc/shadow create mode 100644 tests/chage/24_chage_myuser-l_other/data/usage.out create mode 100755 tests/chage/25_chage_interractive/chage.test create mode 100644 tests/chage/25_chage_interractive/config.txt create mode 100644 tests/chage/25_chage_interractive/config/etc/group create mode 100644 tests/chage/25_chage_interractive/config/etc/gshadow create mode 100644 tests/chage/25_chage_interractive/config/etc/login.defs create mode 100644 tests/chage/25_chage_interractive/config/etc/passwd create mode 100644 tests/chage/25_chage_interractive/config/etc/shadow create mode 100644 tests/chage/25_chage_interractive/data/shadow create mode 100755 tests/chage/25_chage_interractive/run.exp create mode 100755 tests/chage/26_chage_interractive_date_0/chage.test create mode 100644 tests/chage/26_chage_interractive_date_0/config.txt create mode 100644 tests/chage/26_chage_interractive_date_0/config/etc/group create mode 100644 tests/chage/26_chage_interractive_date_0/config/etc/gshadow create mode 100644 tests/chage/26_chage_interractive_date_0/config/etc/login.defs create mode 100644 tests/chage/26_chage_interractive_date_0/config/etc/passwd create mode 100644 tests/chage/26_chage_interractive_date_0/config/etc/shadow create mode 100644 tests/chage/26_chage_interractive_date_0/data/shadow create mode 100755 tests/chage/26_chage_interractive_date_0/run.exp create mode 100755 tests/chage/27_chage_interractive_date_-1/chage.test create mode 100644 tests/chage/27_chage_interractive_date_-1/config.txt create mode 100644 tests/chage/27_chage_interractive_date_-1/config/etc/group create mode 100644 tests/chage/27_chage_interractive_date_-1/config/etc/gshadow create mode 100644 tests/chage/27_chage_interractive_date_-1/config/etc/login.defs create mode 100644 tests/chage/27_chage_interractive_date_-1/config/etc/passwd create mode 100644 tests/chage/27_chage_interractive_date_-1/config/etc/shadow create mode 100644 tests/chage/27_chage_interractive_date_-1/data/shadow create mode 100755 tests/chage/27_chage_interractive_date_-1/run.exp create mode 100755 tests/chage/28_chage_interractive_date_EPOCH/chage.test create mode 100644 tests/chage/28_chage_interractive_date_EPOCH/config.txt create mode 100644 tests/chage/28_chage_interractive_date_EPOCH/config/etc/group create mode 100644 tests/chage/28_chage_interractive_date_EPOCH/config/etc/gshadow create mode 100644 tests/chage/28_chage_interractive_date_EPOCH/config/etc/login.defs create mode 100644 tests/chage/28_chage_interractive_date_EPOCH/config/etc/passwd create mode 100644 tests/chage/28_chage_interractive_date_EPOCH/config/etc/shadow create mode 100644 tests/chage/28_chage_interractive_date_EPOCH/data/shadow create mode 100755 tests/chage/28_chage_interractive_date_EPOCH/run.exp create mode 100755 tests/chage/29_chage_interractive_date_pre-EPOCH/chage.test create mode 100644 tests/chage/29_chage_interractive_date_pre-EPOCH/config.txt create mode 100644 tests/chage/29_chage_interractive_date_pre-EPOCH/config/etc/group create mode 100644 tests/chage/29_chage_interractive_date_pre-EPOCH/config/etc/gshadow create mode 100644 tests/chage/29_chage_interractive_date_pre-EPOCH/config/etc/login.defs create mode 100644 tests/chage/29_chage_interractive_date_pre-EPOCH/config/etc/passwd create mode 100644 tests/chage/29_chage_interractive_date_pre-EPOCH/config/etc/shadow create mode 100755 tests/chage/29_chage_interractive_date_pre-EPOCH/run.exp create mode 100755 tests/chage/30_chage_interractive_date_pre-EPOCH2/chage.test create mode 100644 tests/chage/30_chage_interractive_date_pre-EPOCH2/config.txt create mode 100644 tests/chage/30_chage_interractive_date_pre-EPOCH2/config/etc/group create mode 100644 tests/chage/30_chage_interractive_date_pre-EPOCH2/config/etc/gshadow create mode 100644 tests/chage/30_chage_interractive_date_pre-EPOCH2/config/etc/login.defs create mode 100644 tests/chage/30_chage_interractive_date_pre-EPOCH2/config/etc/passwd create mode 100644 tests/chage/30_chage_interractive_date_pre-EPOCH2/config/etc/shadow create mode 100755 tests/chage/30_chage_interractive_date_pre-EPOCH2/run.exp create mode 100755 tests/chage/31_chage_interractive_date_invalid/chage.test create mode 100644 tests/chage/31_chage_interractive_date_invalid/config.txt create mode 100644 tests/chage/31_chage_interractive_date_invalid/config/etc/group create mode 100644 tests/chage/31_chage_interractive_date_invalid/config/etc/gshadow create mode 100644 tests/chage/31_chage_interractive_date_invalid/config/etc/login.defs create mode 100644 tests/chage/31_chage_interractive_date_invalid/config/etc/passwd create mode 100644 tests/chage/31_chage_interractive_date_invalid/config/etc/shadow create mode 100755 tests/chage/31_chage_interractive_date_invalid/run.exp create mode 100755 tests/chage/32_chage_interractive_date_invalid2/chage.test create mode 100644 tests/chage/32_chage_interractive_date_invalid2/config.txt create mode 100644 tests/chage/32_chage_interractive_date_invalid2/config/etc/group create mode 100644 tests/chage/32_chage_interractive_date_invalid2/config/etc/gshadow create mode 100644 tests/chage/32_chage_interractive_date_invalid2/config/etc/login.defs create mode 100644 tests/chage/32_chage_interractive_date_invalid2/config/etc/passwd create mode 100644 tests/chage/32_chage_interractive_date_invalid2/config/etc/shadow create mode 100755 tests/chage/32_chage_interractive_date_invalid2/run.exp create mode 100755 tests/chage/33_chage_interractive-W_invalid1/chage.test create mode 100644 tests/chage/33_chage_interractive-W_invalid1/config.txt create mode 100644 tests/chage/33_chage_interractive-W_invalid1/config/etc/group create mode 100644 tests/chage/33_chage_interractive-W_invalid1/config/etc/gshadow create mode 100644 tests/chage/33_chage_interractive-W_invalid1/config/etc/login.defs create mode 100644 tests/chage/33_chage_interractive-W_invalid1/config/etc/passwd create mode 100644 tests/chage/33_chage_interractive-W_invalid1/config/etc/shadow create mode 100755 tests/chage/33_chage_interractive-W_invalid1/run.exp create mode 100755 tests/chage/34_chage_interractive-W_invalid2/chage.test create mode 100644 tests/chage/34_chage_interractive-W_invalid2/config.txt create mode 100644 tests/chage/34_chage_interractive-W_invalid2/config/etc/group create mode 100644 tests/chage/34_chage_interractive-W_invalid2/config/etc/gshadow create mode 100644 tests/chage/34_chage_interractive-W_invalid2/config/etc/login.defs create mode 100644 tests/chage/34_chage_interractive-W_invalid2/config/etc/passwd create mode 100644 tests/chage/34_chage_interractive-W_invalid2/config/etc/shadow create mode 100755 tests/chage/34_chage_interractive-W_invalid2/run.exp create mode 100755 tests/chage/35_chage_interractive-W-1/chage.test create mode 100644 tests/chage/35_chage_interractive-W-1/config.txt create mode 100644 tests/chage/35_chage_interractive-W-1/config/etc/group create mode 100644 tests/chage/35_chage_interractive-W-1/config/etc/gshadow create mode 100644 tests/chage/35_chage_interractive-W-1/config/etc/login.defs create mode 100644 tests/chage/35_chage_interractive-W-1/config/etc/passwd create mode 100644 tests/chage/35_chage_interractive-W-1/config/etc/shadow create mode 100644 tests/chage/35_chage_interractive-W-1/data/shadow create mode 100755 tests/chage/35_chage_interractive-W-1/run.exp create mode 100755 tests/chage/36_chage_interractive-I_invalid1/chage.test create mode 100644 tests/chage/36_chage_interractive-I_invalid1/config.txt create mode 100644 tests/chage/36_chage_interractive-I_invalid1/config/etc/group create mode 100644 tests/chage/36_chage_interractive-I_invalid1/config/etc/gshadow create mode 100644 tests/chage/36_chage_interractive-I_invalid1/config/etc/login.defs create mode 100644 tests/chage/36_chage_interractive-I_invalid1/config/etc/passwd create mode 100644 tests/chage/36_chage_interractive-I_invalid1/config/etc/shadow create mode 100755 tests/chage/36_chage_interractive-I_invalid1/run.exp create mode 100755 tests/chage/37_chage_interractive-I_invalid2/chage.test create mode 100644 tests/chage/37_chage_interractive-I_invalid2/config.txt create mode 100644 tests/chage/37_chage_interractive-I_invalid2/config/etc/group create mode 100644 tests/chage/37_chage_interractive-I_invalid2/config/etc/gshadow create mode 100644 tests/chage/37_chage_interractive-I_invalid2/config/etc/login.defs create mode 100644 tests/chage/37_chage_interractive-I_invalid2/config/etc/passwd create mode 100644 tests/chage/37_chage_interractive-I_invalid2/config/etc/shadow create mode 100755 tests/chage/37_chage_interractive-I_invalid2/run.exp create mode 100755 tests/chage/38_chage_interractive-I-1/chage.test create mode 100644 tests/chage/38_chage_interractive-I-1/config.txt create mode 100644 tests/chage/38_chage_interractive-I-1/config/etc/group create mode 100644 tests/chage/38_chage_interractive-I-1/config/etc/gshadow create mode 100644 tests/chage/38_chage_interractive-I-1/config/etc/login.defs create mode 100644 tests/chage/38_chage_interractive-I-1/config/etc/passwd create mode 100644 tests/chage/38_chage_interractive-I-1/config/etc/shadow create mode 100644 tests/chage/38_chage_interractive-I-1/data/shadow create mode 100755 tests/chage/38_chage_interractive-I-1/run.exp create mode 100755 tests/chage/39_chage_interractive-d-1/chage.test create mode 100644 tests/chage/39_chage_interractive-d-1/config.txt create mode 100644 tests/chage/39_chage_interractive-d-1/config/etc/group create mode 100644 tests/chage/39_chage_interractive-d-1/config/etc/gshadow create mode 100644 tests/chage/39_chage_interractive-d-1/config/etc/login.defs create mode 100644 tests/chage/39_chage_interractive-d-1/config/etc/passwd create mode 100644 tests/chage/39_chage_interractive-d-1/config/etc/shadow create mode 100644 tests/chage/39_chage_interractive-d-1/data/shadow create mode 100755 tests/chage/39_chage_interractive-d-1/run.exp create mode 100755 tests/chroot/chage/01_chage--root/chage.test create mode 100644 tests/chroot/chage/01_chage--root/config.txt create mode 100644 tests/chroot/chage/01_chage--root/config/etc/default/useradd create mode 100644 tests/chroot/chage/01_chage--root/config/etc/group create mode 100644 tests/chroot/chage/01_chage--root/config/etc/gshadow create mode 100644 tests/chroot/chage/01_chage--root/config/etc/passwd create mode 100644 tests/chroot/chage/01_chage--root/config/etc/shadow create mode 100644 tests/chroot/chage/01_chage--root/config_chroot/etc/group create mode 100644 tests/chroot/chage/01_chage--root/config_chroot/etc/gshadow create mode 100644 tests/chroot/chage/01_chage--root/config_chroot/etc/login.defs create mode 100644 tests/chroot/chage/01_chage--root/config_chroot/etc/passwd create mode 100644 tests/chroot/chage/01_chage--root/config_chroot/etc/shadow create mode 100644 tests/chroot/chage/01_chage--root/data/shadow create mode 100755 tests/chroot/chgpasswd/01_chgpasswd--root/chgpasswd.test create mode 100644 tests/chroot/chgpasswd/01_chgpasswd--root/config.txt create mode 100644 tests/chroot/chgpasswd/01_chgpasswd--root/config/etc/default/useradd create mode 100644 tests/chroot/chgpasswd/01_chgpasswd--root/config/etc/group create mode 100644 tests/chroot/chgpasswd/01_chgpasswd--root/config/etc/gshadow create mode 100644 tests/chroot/chgpasswd/01_chgpasswd--root/config/etc/passwd create mode 100644 tests/chroot/chgpasswd/01_chgpasswd--root/config/etc/shadow create mode 100644 tests/chroot/chgpasswd/01_chgpasswd--root/config_chroot/etc/group create mode 100644 tests/chroot/chgpasswd/01_chgpasswd--root/config_chroot/etc/gshadow create mode 100644 tests/chroot/chgpasswd/01_chgpasswd--root/config_chroot/etc/login.defs create mode 100644 tests/chroot/chgpasswd/01_chgpasswd--root/config_chroot/etc/passwd create mode 100644 tests/chroot/chgpasswd/01_chgpasswd--root/config_chroot/etc/shadow create mode 100644 tests/chroot/chgpasswd/01_chgpasswd--root/data/gshadow create mode 100755 tests/chroot/chpasswd/01_chpasswd--root_nopam/chpasswd.test create mode 100644 tests/chroot/chpasswd/01_chpasswd--root_nopam/config.txt create mode 100644 tests/chroot/chpasswd/01_chpasswd--root_nopam/config/etc/default/useradd create mode 100644 tests/chroot/chpasswd/01_chpasswd--root_nopam/config/etc/group create mode 100644 tests/chroot/chpasswd/01_chpasswd--root_nopam/config/etc/gshadow create mode 100644 tests/chroot/chpasswd/01_chpasswd--root_nopam/config/etc/passwd create mode 100644 tests/chroot/chpasswd/01_chpasswd--root_nopam/config/etc/shadow create mode 100644 tests/chroot/chpasswd/01_chpasswd--root_nopam/config_chroot/etc/group create mode 100644 tests/chroot/chpasswd/01_chpasswd--root_nopam/config_chroot/etc/gshadow create mode 100644 tests/chroot/chpasswd/01_chpasswd--root_nopam/config_chroot/etc/login.defs create mode 100644 tests/chroot/chpasswd/01_chpasswd--root_nopam/config_chroot/etc/passwd create mode 100644 tests/chroot/chpasswd/01_chpasswd--root_nopam/config_chroot/etc/shadow create mode 100644 tests/chroot/chpasswd/01_chpasswd--root_nopam/data/shadow create mode 100755 tests/chroot/chpasswd/02_chpasswd--root_pam/chpasswd.test create mode 100644 tests/chroot/chpasswd/02_chpasswd--root_pam/config.txt create mode 100644 tests/chroot/chpasswd/02_chpasswd--root_pam/config/etc/default/useradd create mode 100644 tests/chroot/chpasswd/02_chpasswd--root_pam/config/etc/group create mode 100644 tests/chroot/chpasswd/02_chpasswd--root_pam/config/etc/gshadow create mode 100644 tests/chroot/chpasswd/02_chpasswd--root_pam/config/etc/passwd create mode 100644 tests/chroot/chpasswd/02_chpasswd--root_pam/config/etc/shadow create mode 100644 tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/group create mode 100644 tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/gshadow create mode 100644 tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/login.defs create mode 100644 tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/pam.d/chpasswd create mode 100644 tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/pam.d/common-password create mode 100644 tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/passwd create mode 100644 tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/shadow create mode 100644 tests/chroot/chpasswd/02_chpasswd--root_pam/data/shadow create mode 100755 tests/chroot/chsh/01_chsh--root/chsh.test create mode 100644 tests/chroot/chsh/01_chsh--root/config.txt create mode 100644 tests/chroot/chsh/01_chsh--root/config/etc/default/useradd create mode 100644 tests/chroot/chsh/01_chsh--root/config/etc/group create mode 100644 tests/chroot/chsh/01_chsh--root/config/etc/gshadow create mode 100644 tests/chroot/chsh/01_chsh--root/config/etc/passwd create mode 100644 tests/chroot/chsh/01_chsh--root/config/etc/shadow create mode 100644 tests/chroot/chsh/01_chsh--root/config_chroot.list create mode 100644 tests/chroot/chsh/01_chsh--root/config_chroot/etc/group create mode 100644 tests/chroot/chsh/01_chsh--root/config_chroot/etc/gshadow create mode 100644 tests/chroot/chsh/01_chsh--root/config_chroot/etc/login.defs create mode 100644 tests/chroot/chsh/01_chsh--root/config_chroot/etc/pam.d/chsh create mode 100644 tests/chroot/chsh/01_chsh--root/config_chroot/etc/pam.d/common-account create mode 100644 tests/chroot/chsh/01_chsh--root/config_chroot/etc/pam.d/common-auth create mode 100644 tests/chroot/chsh/01_chsh--root/config_chroot/etc/pam.d/common-session create mode 100644 tests/chroot/chsh/01_chsh--root/config_chroot/etc/passwd create mode 100644 tests/chroot/chsh/01_chsh--root/config_chroot/etc/shadow create mode 100644 tests/chroot/chsh/01_chsh--root/config_chroot/etc/shells create mode 100644 tests/chroot/chsh/01_chsh--root/data/passwd create mode 100644 tests/chroot/gpasswd/01_gpasswd--root/config.txt create mode 100644 tests/chroot/gpasswd/01_gpasswd--root/config/etc/default/useradd create mode 100644 tests/chroot/gpasswd/01_gpasswd--root/config/etc/group create mode 100644 tests/chroot/gpasswd/01_gpasswd--root/config/etc/gshadow create mode 100644 tests/chroot/gpasswd/01_gpasswd--root/config/etc/passwd create mode 100644 tests/chroot/gpasswd/01_gpasswd--root/config/etc/shadow create mode 100644 tests/chroot/gpasswd/01_gpasswd--root/config_chroot/etc/group create mode 100644 tests/chroot/gpasswd/01_gpasswd--root/config_chroot/etc/gshadow create mode 100644 tests/chroot/gpasswd/01_gpasswd--root/config_chroot/etc/login.defs create mode 100644 tests/chroot/gpasswd/01_gpasswd--root/config_chroot/etc/passwd create mode 100644 tests/chroot/gpasswd/01_gpasswd--root/config_chroot/etc/shadow create mode 100644 tests/chroot/gpasswd/01_gpasswd--root/data/group create mode 100644 tests/chroot/gpasswd/01_gpasswd--root/data/gshadow create mode 100755 tests/chroot/gpasswd/01_gpasswd--root/gpasswd.test create mode 100644 tests/chroot/groupadd/01_groupadd--root/config.txt create mode 100644 tests/chroot/groupadd/01_groupadd--root/config/etc/default/useradd create mode 100644 tests/chroot/groupadd/01_groupadd--root/config/etc/group create mode 100644 tests/chroot/groupadd/01_groupadd--root/config/etc/gshadow create mode 100644 tests/chroot/groupadd/01_groupadd--root/config/etc/passwd create mode 100644 tests/chroot/groupadd/01_groupadd--root/config/etc/shadow create mode 100644 tests/chroot/groupadd/01_groupadd--root/config_chroot/etc/group create mode 100644 tests/chroot/groupadd/01_groupadd--root/config_chroot/etc/gshadow create mode 100644 tests/chroot/groupadd/01_groupadd--root/config_chroot/etc/login.defs create mode 100644 tests/chroot/groupadd/01_groupadd--root/config_chroot/etc/passwd create mode 100644 tests/chroot/groupadd/01_groupadd--root/config_chroot/etc/shadow create mode 100644 tests/chroot/groupadd/01_groupadd--root/data/group create mode 100644 tests/chroot/groupadd/01_groupadd--root/data/gshadow create mode 100755 tests/chroot/groupadd/01_groupadd--root/groupadd.test create mode 100644 tests/chroot/groupdel/01_groupdel--root/config.txt create mode 100644 tests/chroot/groupdel/01_groupdel--root/config/etc/default/useradd create mode 100644 tests/chroot/groupdel/01_groupdel--root/config/etc/group create mode 100644 tests/chroot/groupdel/01_groupdel--root/config/etc/gshadow create mode 100644 tests/chroot/groupdel/01_groupdel--root/config/etc/passwd create mode 100644 tests/chroot/groupdel/01_groupdel--root/config/etc/shadow create mode 100644 tests/chroot/groupdel/01_groupdel--root/config_chroot/etc/group create mode 100644 tests/chroot/groupdel/01_groupdel--root/config_chroot/etc/gshadow create mode 100644 tests/chroot/groupdel/01_groupdel--root/config_chroot/etc/login.defs create mode 100644 tests/chroot/groupdel/01_groupdel--root/config_chroot/etc/passwd create mode 100644 tests/chroot/groupdel/01_groupdel--root/config_chroot/etc/shadow create mode 100644 tests/chroot/groupdel/01_groupdel--root/data/group create mode 100644 tests/chroot/groupdel/01_groupdel--root/data/gshadow create mode 100755 tests/chroot/groupdel/01_groupdel--root/groupdel.test create mode 100644 tests/chroot/groupmod/01_groupmod--root/config.txt create mode 100644 tests/chroot/groupmod/01_groupmod--root/config/etc/default/useradd create mode 100644 tests/chroot/groupmod/01_groupmod--root/config/etc/group create mode 100644 tests/chroot/groupmod/01_groupmod--root/config/etc/gshadow create mode 100644 tests/chroot/groupmod/01_groupmod--root/config/etc/passwd create mode 100644 tests/chroot/groupmod/01_groupmod--root/config/etc/shadow create mode 100644 tests/chroot/groupmod/01_groupmod--root/config_chroot/etc/group create mode 100644 tests/chroot/groupmod/01_groupmod--root/config_chroot/etc/gshadow create mode 100644 tests/chroot/groupmod/01_groupmod--root/config_chroot/etc/login.defs create mode 100644 tests/chroot/groupmod/01_groupmod--root/config_chroot/etc/passwd create mode 100644 tests/chroot/groupmod/01_groupmod--root/config_chroot/etc/shadow create mode 100644 tests/chroot/groupmod/01_groupmod--root/data/group create mode 100644 tests/chroot/groupmod/01_groupmod--root/data/gshadow create mode 100755 tests/chroot/groupmod/01_groupmod--root/groupmod.test create mode 100644 tests/chroot/grpck/01_grpck--root/config.txt create mode 100644 tests/chroot/grpck/01_grpck--root/config/etc/default/useradd create mode 100644 tests/chroot/grpck/01_grpck--root/config/etc/group create mode 100644 tests/chroot/grpck/01_grpck--root/config/etc/gshadow create mode 100644 tests/chroot/grpck/01_grpck--root/config/etc/passwd create mode 100644 tests/chroot/grpck/01_grpck--root/config/etc/shadow create mode 100644 tests/chroot/grpck/01_grpck--root/config_chroot/etc/group create mode 100644 tests/chroot/grpck/01_grpck--root/config_chroot/etc/gshadow create mode 100644 tests/chroot/grpck/01_grpck--root/config_chroot/etc/login.defs create mode 100644 tests/chroot/grpck/01_grpck--root/config_chroot/etc/passwd create mode 100644 tests/chroot/grpck/01_grpck--root/config_chroot/etc/shadow create mode 100644 tests/chroot/grpck/01_grpck--root/data/group create mode 100644 tests/chroot/grpck/01_grpck--root/data/gshadow create mode 100755 tests/chroot/grpck/01_grpck--root/grpck.test create mode 100644 tests/chroot/grpconv/01_grpconv--root/config.txt create mode 100644 tests/chroot/grpconv/01_grpconv--root/config/etc/default/useradd create mode 100644 tests/chroot/grpconv/01_grpconv--root/config/etc/group create mode 100644 tests/chroot/grpconv/01_grpconv--root/config/etc/gshadow create mode 100644 tests/chroot/grpconv/01_grpconv--root/config/etc/passwd create mode 100644 tests/chroot/grpconv/01_grpconv--root/config/etc/shadow create mode 100644 tests/chroot/grpconv/01_grpconv--root/config_chroot/etc/group create mode 100644 tests/chroot/grpconv/01_grpconv--root/config_chroot/etc/login.defs create mode 100644 tests/chroot/grpconv/01_grpconv--root/config_chroot/etc/passwd create mode 100644 tests/chroot/grpconv/01_grpconv--root/config_chroot/etc/shadow create mode 100644 tests/chroot/grpconv/01_grpconv--root/data/group create mode 100644 tests/chroot/grpconv/01_grpconv--root/data/gshadow create mode 100755 tests/chroot/grpconv/01_grpconv--root/grpconv.test create mode 100644 tests/chroot/grpunconv/01_grpunconv--root/config.txt create mode 100644 tests/chroot/grpunconv/01_grpunconv--root/config/etc/default/useradd create mode 100644 tests/chroot/grpunconv/01_grpunconv--root/config/etc/group create mode 100644 tests/chroot/grpunconv/01_grpunconv--root/config/etc/gshadow create mode 100644 tests/chroot/grpunconv/01_grpunconv--root/config/etc/passwd create mode 100644 tests/chroot/grpunconv/01_grpunconv--root/config/etc/shadow create mode 100644 tests/chroot/grpunconv/01_grpunconv--root/config_chroot/etc/group create mode 100644 tests/chroot/grpunconv/01_grpunconv--root/config_chroot/etc/gshadow create mode 100644 tests/chroot/grpunconv/01_grpunconv--root/config_chroot/etc/login.defs create mode 100644 tests/chroot/grpunconv/01_grpunconv--root/config_chroot/etc/passwd create mode 100644 tests/chroot/grpunconv/01_grpunconv--root/config_chroot/etc/shadow create mode 100644 tests/chroot/grpunconv/01_grpunconv--root/data/group create mode 100755 tests/chroot/grpunconv/01_grpunconv--root/grpunconv.test create mode 100644 tests/chroot/lastlog/01_lastlog--root/config.txt create mode 100644 tests/chroot/lastlog/01_lastlog--root/config/etc/default/useradd create mode 100644 tests/chroot/lastlog/01_lastlog--root/config/etc/group create mode 100644 tests/chroot/lastlog/01_lastlog--root/config/etc/gshadow create mode 100644 tests/chroot/lastlog/01_lastlog--root/config/etc/passwd create mode 100644 tests/chroot/lastlog/01_lastlog--root/config/etc/shadow create mode 100644 tests/chroot/lastlog/01_lastlog--root/config_chroot/etc/group create mode 100644 tests/chroot/lastlog/01_lastlog--root/config_chroot/etc/gshadow create mode 100644 tests/chroot/lastlog/01_lastlog--root/config_chroot/etc/login.defs create mode 100644 tests/chroot/lastlog/01_lastlog--root/config_chroot/etc/passwd create mode 100644 tests/chroot/lastlog/01_lastlog--root/config_chroot/etc/shadow create mode 100644 tests/chroot/lastlog/01_lastlog--root/data/group create mode 100644 tests/chroot/lastlog/01_lastlog--root/data/gshadow create mode 100644 tests/chroot/lastlog/01_lastlog--root/data/lastlog.list create mode 100755 tests/chroot/lastlog/01_lastlog--root/lastlog.test create mode 100644 tests/chroot/login/01_login_sublogin/config.txt create mode 100644 tests/chroot/login/01_login_sublogin/config/etc/group create mode 100644 tests/chroot/login/01_login_sublogin/config/etc/gshadow create mode 100644 tests/chroot/login/01_login_sublogin/config/etc/login.defs create mode 100644 tests/chroot/login/01_login_sublogin/config/etc/passwd create mode 100644 tests/chroot/login/01_login_sublogin/config/etc/shadow create mode 100644 tests/chroot/login/01_login_sublogin/config_chroot.list create mode 100644 tests/chroot/login/01_login_sublogin/config_chroot/etc/group create mode 100644 tests/chroot/login/01_login_sublogin/config_chroot/etc/gshadow create mode 100644 tests/chroot/login/01_login_sublogin/config_chroot/etc/login.defs create mode 100644 tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/common-account create mode 100644 tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/common-auth create mode 100644 tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/common-password create mode 100644 tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/common-session create mode 100644 tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/common-session-noninteractive create mode 100644 tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/login create mode 100644 tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/other create mode 100644 tests/chroot/login/01_login_sublogin/config_chroot/etc/passwd create mode 100644 tests/chroot/login/01_login_sublogin/config_chroot/etc/securetty create mode 100644 tests/chroot/login/01_login_sublogin/config_chroot/etc/security/limits.conf create mode 100644 tests/chroot/login/01_login_sublogin/config_chroot/etc/shadow create mode 100755 tests/chroot/login/01_login_sublogin/login.exp create mode 100755 tests/chroot/login/01_login_sublogin/login.test create mode 100644 tests/chroot/pwck/01_pwck--root/config.txt create mode 100644 tests/chroot/pwck/01_pwck--root/config/etc/default/useradd create mode 100644 tests/chroot/pwck/01_pwck--root/config/etc/group create mode 100644 tests/chroot/pwck/01_pwck--root/config/etc/gshadow create mode 100644 tests/chroot/pwck/01_pwck--root/config/etc/passwd create mode 100644 tests/chroot/pwck/01_pwck--root/config/etc/shadow create mode 100644 tests/chroot/pwck/01_pwck--root/config_chroot/etc/group create mode 100644 tests/chroot/pwck/01_pwck--root/config_chroot/etc/gshadow create mode 100644 tests/chroot/pwck/01_pwck--root/config_chroot/etc/login.defs create mode 100644 tests/chroot/pwck/01_pwck--root/config_chroot/etc/passwd create mode 100644 tests/chroot/pwck/01_pwck--root/config_chroot/etc/shadow create mode 100644 tests/chroot/pwck/01_pwck--root/data/pwck.out create mode 100755 tests/chroot/pwck/01_pwck--root/pwck.test create mode 100644 tests/chroot/pwconv/01_pwconv--root/config.txt create mode 100644 tests/chroot/pwconv/01_pwconv--root/config/etc/default/useradd create mode 100644 tests/chroot/pwconv/01_pwconv--root/config/etc/group create mode 100644 tests/chroot/pwconv/01_pwconv--root/config/etc/gshadow create mode 100644 tests/chroot/pwconv/01_pwconv--root/config/etc/passwd create mode 100644 tests/chroot/pwconv/01_pwconv--root/config/etc/shadow create mode 100644 tests/chroot/pwconv/01_pwconv--root/config_chroot/etc/group create mode 100644 tests/chroot/pwconv/01_pwconv--root/config_chroot/etc/gshadow create mode 100644 tests/chroot/pwconv/01_pwconv--root/config_chroot/etc/login.defs create mode 100644 tests/chroot/pwconv/01_pwconv--root/config_chroot/etc/passwd create mode 100644 tests/chroot/pwconv/01_pwconv--root/data/passwd create mode 100644 tests/chroot/pwconv/01_pwconv--root/data/shadow create mode 100755 tests/chroot/pwconv/01_pwconv--root/pwconv.test create mode 100644 tests/chroot/pwunconv/01_pwunconv--root/config.txt create mode 100644 tests/chroot/pwunconv/01_pwunconv--root/config/etc/default/useradd create mode 100644 tests/chroot/pwunconv/01_pwunconv--root/config/etc/group create mode 100644 tests/chroot/pwunconv/01_pwunconv--root/config/etc/gshadow create mode 100644 tests/chroot/pwunconv/01_pwunconv--root/config/etc/passwd create mode 100644 tests/chroot/pwunconv/01_pwunconv--root/config/etc/shadow create mode 100644 tests/chroot/pwunconv/01_pwunconv--root/config_chroot/etc/group create mode 100644 tests/chroot/pwunconv/01_pwunconv--root/config_chroot/etc/gshadow create mode 100644 tests/chroot/pwunconv/01_pwunconv--root/config_chroot/etc/login.defs create mode 100644 tests/chroot/pwunconv/01_pwunconv--root/config_chroot/etc/passwd create mode 100644 tests/chroot/pwunconv/01_pwunconv--root/config_chroot/etc/shadow create mode 100644 tests/chroot/pwunconv/01_pwunconv--root/data/passwd create mode 100755 tests/chroot/pwunconv/01_pwunconv--root/pwunconv.test create mode 100644 tests/chroot/useradd/01_useradd--root/config.txt create mode 100644 tests/chroot/useradd/01_useradd--root/config/etc/default/useradd create mode 100644 tests/chroot/useradd/01_useradd--root/config/etc/group create mode 100644 tests/chroot/useradd/01_useradd--root/config/etc/gshadow create mode 100644 tests/chroot/useradd/01_useradd--root/config/etc/passwd create mode 100644 tests/chroot/useradd/01_useradd--root/config/etc/shadow create mode 100644 tests/chroot/useradd/01_useradd--root/config_chroot/etc/group create mode 100644 tests/chroot/useradd/01_useradd--root/config_chroot/etc/gshadow create mode 100644 tests/chroot/useradd/01_useradd--root/config_chroot/etc/login.defs create mode 100644 tests/chroot/useradd/01_useradd--root/config_chroot/etc/passwd create mode 100644 tests/chroot/useradd/01_useradd--root/config_chroot/etc/shadow create mode 100644 tests/chroot/useradd/01_useradd--root/data/group create mode 100644 tests/chroot/useradd/01_useradd--root/data/gshadow create mode 100644 tests/chroot/useradd/01_useradd--root/data/passwd create mode 100644 tests/chroot/useradd/01_useradd--root/data/shadow create mode 100755 tests/chroot/useradd/01_useradd--root/useradd.test create mode 100644 tests/chroot/useradd/02_useradd--root_login.defs/config.txt create mode 100644 tests/chroot/useradd/02_useradd--root_login.defs/config/etc/default/useradd create mode 100644 tests/chroot/useradd/02_useradd--root_login.defs/config/etc/group create mode 100644 tests/chroot/useradd/02_useradd--root_login.defs/config/etc/gshadow create mode 100644 tests/chroot/useradd/02_useradd--root_login.defs/config/etc/passwd create mode 100644 tests/chroot/useradd/02_useradd--root_login.defs/config/etc/shadow create mode 100644 tests/chroot/useradd/02_useradd--root_login.defs/config_chroot/etc/group create mode 100644 tests/chroot/useradd/02_useradd--root_login.defs/config_chroot/etc/gshadow create mode 100644 tests/chroot/useradd/02_useradd--root_login.defs/config_chroot/etc/login.defs create mode 100644 tests/chroot/useradd/02_useradd--root_login.defs/config_chroot/etc/passwd create mode 100644 tests/chroot/useradd/02_useradd--root_login.defs/config_chroot/etc/shadow create mode 100644 tests/chroot/useradd/02_useradd--root_login.defs/data/group create mode 100644 tests/chroot/useradd/02_useradd--root_login.defs/data/gshadow create mode 100644 tests/chroot/useradd/02_useradd--root_login.defs/data/passwd create mode 100644 tests/chroot/useradd/02_useradd--root_login.defs/data/shadow create mode 100755 tests/chroot/useradd/02_useradd--root_login.defs/useradd.test create mode 100644 tests/chroot/useradd/03_useradd--root_useradd.default/config.txt create mode 100644 tests/chroot/useradd/03_useradd--root_useradd.default/config/etc/default/useradd create mode 100644 tests/chroot/useradd/03_useradd--root_useradd.default/config/etc/group create mode 100644 tests/chroot/useradd/03_useradd--root_useradd.default/config/etc/gshadow create mode 100644 tests/chroot/useradd/03_useradd--root_useradd.default/config/etc/passwd create mode 100644 tests/chroot/useradd/03_useradd--root_useradd.default/config/etc/shadow create mode 100644 tests/chroot/useradd/03_useradd--root_useradd.default/config_chroot/etc/default/useradd create mode 100644 tests/chroot/useradd/03_useradd--root_useradd.default/config_chroot/etc/group create mode 100644 tests/chroot/useradd/03_useradd--root_useradd.default/config_chroot/etc/gshadow create mode 100644 tests/chroot/useradd/03_useradd--root_useradd.default/config_chroot/etc/login.defs create mode 100644 tests/chroot/useradd/03_useradd--root_useradd.default/config_chroot/etc/passwd create mode 100644 tests/chroot/useradd/03_useradd--root_useradd.default/config_chroot/etc/shadow create mode 100644 tests/chroot/useradd/03_useradd--root_useradd.default/data/group create mode 100644 tests/chroot/useradd/03_useradd--root_useradd.default/data/gshadow create mode 100644 tests/chroot/useradd/03_useradd--root_useradd.default/data/passwd create mode 100644 tests/chroot/useradd/03_useradd--root_useradd.default/data/shadow create mode 100755 tests/chroot/useradd/03_useradd--root_useradd.default/useradd.test create mode 100644 tests/chroot/useradd/04_useradd--root_useradd-D/config.txt create mode 100644 tests/chroot/useradd/04_useradd--root_useradd-D/config/etc/default/useradd create mode 100644 tests/chroot/useradd/04_useradd--root_useradd-D/config/etc/group create mode 100644 tests/chroot/useradd/04_useradd--root_useradd-D/config/etc/gshadow create mode 100644 tests/chroot/useradd/04_useradd--root_useradd-D/config/etc/passwd create mode 100644 tests/chroot/useradd/04_useradd--root_useradd-D/config/etc/shadow create mode 100644 tests/chroot/useradd/04_useradd--root_useradd-D/config_chroot/etc/default/useradd create mode 100644 tests/chroot/useradd/04_useradd--root_useradd-D/config_chroot/etc/group create mode 100644 tests/chroot/useradd/04_useradd--root_useradd-D/config_chroot/etc/gshadow create mode 100644 tests/chroot/useradd/04_useradd--root_useradd-D/config_chroot/etc/login.defs create mode 100644 tests/chroot/useradd/04_useradd--root_useradd-D/config_chroot/etc/passwd create mode 100644 tests/chroot/useradd/04_useradd--root_useradd-D/config_chroot/etc/shadow create mode 100644 tests/chroot/useradd/04_useradd--root_useradd-D/data/useradd.out create mode 100755 tests/chroot/useradd/04_useradd--root_useradd-D/useradd.test create mode 100644 tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config.txt create mode 100644 tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config/etc/default/useradd create mode 100644 tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config/etc/group create mode 100644 tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config/etc/gshadow create mode 100644 tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config/etc/passwd create mode 100644 tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config/etc/shadow create mode 100644 tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config_chroot/etc/default/useradd create mode 100644 tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config_chroot/etc/group create mode 100644 tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config_chroot/etc/gshadow create mode 100644 tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config_chroot/etc/login.defs create mode 100644 tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config_chroot/etc/passwd create mode 100644 tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config_chroot/etc/shadow create mode 100644 tests/chroot/useradd/05_useradd--root_useradd-D-e-g/data/useradd.default create mode 100755 tests/chroot/useradd/05_useradd--root_useradd-D-e-g/useradd.test create mode 100644 tests/chroot/userdel/01_userdel--root/config.txt create mode 100644 tests/chroot/userdel/01_userdel--root/config/etc/default/useradd create mode 100644 tests/chroot/userdel/01_userdel--root/config/etc/group create mode 100644 tests/chroot/userdel/01_userdel--root/config/etc/gshadow create mode 100644 tests/chroot/userdel/01_userdel--root/config/etc/passwd create mode 100644 tests/chroot/userdel/01_userdel--root/config/etc/shadow create mode 100644 tests/chroot/userdel/01_userdel--root/config_chroot/etc/group create mode 100644 tests/chroot/userdel/01_userdel--root/config_chroot/etc/gshadow create mode 100644 tests/chroot/userdel/01_userdel--root/config_chroot/etc/login.defs create mode 100644 tests/chroot/userdel/01_userdel--root/config_chroot/etc/passwd create mode 100644 tests/chroot/userdel/01_userdel--root/config_chroot/etc/shadow create mode 100644 tests/chroot/userdel/01_userdel--root/data/group create mode 100644 tests/chroot/userdel/01_userdel--root/data/gshadow create mode 100644 tests/chroot/userdel/01_userdel--root/data/passwd create mode 100644 tests/chroot/userdel/01_userdel--root/data/shadow create mode 100755 tests/chroot/userdel/01_userdel--root/userdel.test create mode 100644 tests/chroot/usermod/01_usermod--root/config.txt create mode 100644 tests/chroot/usermod/01_usermod--root/config/etc/default/useradd create mode 100644 tests/chroot/usermod/01_usermod--root/config/etc/group create mode 100644 tests/chroot/usermod/01_usermod--root/config/etc/gshadow create mode 100644 tests/chroot/usermod/01_usermod--root/config/etc/passwd create mode 100644 tests/chroot/usermod/01_usermod--root/config/etc/shadow create mode 100644 tests/chroot/usermod/01_usermod--root/config_chroot/etc/group create mode 100644 tests/chroot/usermod/01_usermod--root/config_chroot/etc/gshadow create mode 100644 tests/chroot/usermod/01_usermod--root/config_chroot/etc/login.defs create mode 100644 tests/chroot/usermod/01_usermod--root/config_chroot/etc/passwd create mode 100644 tests/chroot/usermod/01_usermod--root/config_chroot/etc/shadow create mode 100644 tests/chroot/usermod/01_usermod--root/data/passwd create mode 100755 tests/chroot/usermod/01_usermod--root/usermod.test create mode 100644 tests/chsh/01/data/chsh1 create mode 100644 tests/chsh/01/data/chsh2 create mode 100644 tests/chsh/01/data/group create mode 100644 tests/chsh/01/data/gshadow create mode 100644 tests/chsh/01/data/passwd create mode 100644 tests/chsh/01/data/shadow create mode 100644 tests/chsh/01/data/shells create mode 100755 tests/chsh/01/run create mode 100755 tests/chsh/01/run.exp create mode 100755 tests/chsh/02_chsh_usage/chsh.test create mode 100644 tests/chsh/02_chsh_usage/config.txt create mode 100644 tests/chsh/02_chsh_usage/config/etc/group create mode 100644 tests/chsh/02_chsh_usage/config/etc/gshadow create mode 100644 tests/chsh/02_chsh_usage/config/etc/passwd create mode 100644 tests/chsh/02_chsh_usage/config/etc/shadow create mode 100644 tests/chsh/02_chsh_usage/data/usage.out create mode 100755 tests/chsh/03_chsh_usage_invalid_option/chsh.test create mode 100644 tests/chsh/03_chsh_usage_invalid_option/config.txt create mode 100644 tests/chsh/03_chsh_usage_invalid_option/config/etc/group create mode 100644 tests/chsh/03_chsh_usage_invalid_option/config/etc/gshadow create mode 100644 tests/chsh/03_chsh_usage_invalid_option/config/etc/passwd create mode 100644 tests/chsh/03_chsh_usage_invalid_option/config/etc/shadow create mode 100644 tests/chsh/03_chsh_usage_invalid_option/data/usage.out create mode 100755 tests/chsh/04_chsh_usage_2_users/chsh.test create mode 100644 tests/chsh/04_chsh_usage_2_users/config.txt create mode 100644 tests/chsh/04_chsh_usage_2_users/config/etc/group create mode 100644 tests/chsh/04_chsh_usage_2_users/config/etc/gshadow create mode 100644 tests/chsh/04_chsh_usage_2_users/config/etc/passwd create mode 100644 tests/chsh/04_chsh_usage_2_users/config/etc/shadow create mode 100644 tests/chsh/04_chsh_usage_2_users/data/usage.out create mode 100755 tests/chsh/05_chsh_myuser_restricted_shell/chsh.test create mode 100644 tests/chsh/05_chsh_myuser_restricted_shell/config.txt create mode 100644 tests/chsh/05_chsh_myuser_restricted_shell/config/etc/group create mode 100644 tests/chsh/05_chsh_myuser_restricted_shell/config/etc/gshadow create mode 100644 tests/chsh/05_chsh_myuser_restricted_shell/config/etc/passwd create mode 100644 tests/chsh/05_chsh_myuser_restricted_shell/config/etc/shadow create mode 100644 tests/chsh/05_chsh_myuser_restricted_shell/config/etc/shells create mode 100755 tests/chsh/05_chsh_myuser_restricted_shell/run.exp create mode 100755 tests/chsh/06_chsh_myuser_non_restricted_shell/chsh.test create mode 100644 tests/chsh/06_chsh_myuser_non_restricted_shell/config.txt create mode 100644 tests/chsh/06_chsh_myuser_non_restricted_shell/config/etc/group create mode 100644 tests/chsh/06_chsh_myuser_non_restricted_shell/config/etc/gshadow create mode 100644 tests/chsh/06_chsh_myuser_non_restricted_shell/config/etc/passwd create mode 100644 tests/chsh/06_chsh_myuser_non_restricted_shell/config/etc/shadow create mode 100644 tests/chsh/06_chsh_myuser_non_restricted_shell/config/etc/shells create mode 100644 tests/chsh/06_chsh_myuser_non_restricted_shell/data/passwd create mode 100755 tests/chsh/06_chsh_myuser_non_restricted_shell/run.exp create mode 100755 tests/chsh/07_chsh_usage_invalid_user/chsh.test create mode 100644 tests/chsh/07_chsh_usage_invalid_user/config.txt create mode 100644 tests/chsh/07_chsh_usage_invalid_user/config/etc/group create mode 100644 tests/chsh/07_chsh_usage_invalid_user/config/etc/gshadow create mode 100644 tests/chsh/07_chsh_usage_invalid_user/config/etc/passwd create mode 100644 tests/chsh/07_chsh_usage_invalid_user/config/etc/shadow create mode 100644 tests/chsh/07_chsh_usage_invalid_user/data/usage.out create mode 100755 tests/chsh/08_chsh_myuser_to_restricted_shell/chsh.test create mode 100644 tests/chsh/08_chsh_myuser_to_restricted_shell/config.txt create mode 100644 tests/chsh/08_chsh_myuser_to_restricted_shell/config/etc/group create mode 100644 tests/chsh/08_chsh_myuser_to_restricted_shell/config/etc/gshadow create mode 100644 tests/chsh/08_chsh_myuser_to_restricted_shell/config/etc/passwd create mode 100644 tests/chsh/08_chsh_myuser_to_restricted_shell/config/etc/shadow create mode 100644 tests/chsh/08_chsh_myuser_to_restricted_shell/config/etc/shells create mode 100644 tests/chsh/08_chsh_myuser_to_restricted_shell/data/passwd create mode 100755 tests/chsh/08_chsh_myuser_to_restricted_shell/run.exp create mode 100755 tests/chsh/09_chsh_myuser_to_missing_shell/chsh.test create mode 100644 tests/chsh/09_chsh_myuser_to_missing_shell/config.txt create mode 100644 tests/chsh/09_chsh_myuser_to_missing_shell/config/etc/group create mode 100644 tests/chsh/09_chsh_myuser_to_missing_shell/config/etc/gshadow create mode 100644 tests/chsh/09_chsh_myuser_to_missing_shell/config/etc/passwd create mode 100644 tests/chsh/09_chsh_myuser_to_missing_shell/config/etc/shadow create mode 100644 tests/chsh/09_chsh_myuser_to_missing_shell/config/etc/shells create mode 100644 tests/chsh/09_chsh_myuser_to_missing_shell/data/passwd create mode 100755 tests/chsh/09_chsh_myuser_to_missing_shell/run.exp create mode 100755 tests/chsh/10_chsh_myuser_to_non_executable_shell/chsh.test create mode 100644 tests/chsh/10_chsh_myuser_to_non_executable_shell/config.txt create mode 100644 tests/chsh/10_chsh_myuser_to_non_executable_shell/config/etc/group create mode 100644 tests/chsh/10_chsh_myuser_to_non_executable_shell/config/etc/gshadow create mode 100644 tests/chsh/10_chsh_myuser_to_non_executable_shell/config/etc/passwd create mode 100644 tests/chsh/10_chsh_myuser_to_non_executable_shell/config/etc/shadow create mode 100644 tests/chsh/10_chsh_myuser_to_non_executable_shell/config/etc/shells create mode 100644 tests/chsh/10_chsh_myuser_to_non_executable_shell/data/passwd create mode 100755 tests/chsh/10_chsh_myuser_to_non_executable_shell/run.exp create mode 100755 tests/chsh/11_chsh_auth_failure/chsh.test create mode 100644 tests/chsh/11_chsh_auth_failure/config.txt create mode 100644 tests/chsh/11_chsh_auth_failure/config/etc/group create mode 100644 tests/chsh/11_chsh_auth_failure/config/etc/gshadow create mode 100644 tests/chsh/11_chsh_auth_failure/config/etc/passwd create mode 100644 tests/chsh/11_chsh_auth_failure/config/etc/shadow create mode 100644 tests/chsh/11_chsh_auth_failure/config/etc/shells create mode 100644 tests/chsh/11_chsh_auth_failure/data/passwd create mode 100755 tests/chsh/11_chsh_auth_failure/run.exp create mode 100755 tests/chsh/12_chsh_warning_missing_shell/chsh.test create mode 100644 tests/chsh/12_chsh_warning_missing_shell/config.txt create mode 100644 tests/chsh/12_chsh_warning_missing_shell/config/etc/group create mode 100644 tests/chsh/12_chsh_warning_missing_shell/config/etc/gshadow create mode 100644 tests/chsh/12_chsh_warning_missing_shell/config/etc/pam.d/chsh create mode 100644 tests/chsh/12_chsh_warning_missing_shell/config/etc/passwd create mode 100644 tests/chsh/12_chsh_warning_missing_shell/config/etc/shadow create mode 100644 tests/chsh/12_chsh_warning_missing_shell/config/etc/shells create mode 100644 tests/chsh/12_chsh_warning_missing_shell/data/chsh.err create mode 100644 tests/chsh/12_chsh_warning_missing_shell/data/passwd create mode 100755 tests/chsh/13_chsh_warning_non_executable/chsh.test create mode 100644 tests/chsh/13_chsh_warning_non_executable/config.txt create mode 100644 tests/chsh/13_chsh_warning_non_executable/config/etc/group create mode 100644 tests/chsh/13_chsh_warning_non_executable/config/etc/gshadow create mode 100644 tests/chsh/13_chsh_warning_non_executable/config/etc/pam.d/chsh create mode 100644 tests/chsh/13_chsh_warning_non_executable/config/etc/passwd create mode 100644 tests/chsh/13_chsh_warning_non_executable/config/etc/shadow create mode 100644 tests/chsh/13_chsh_warning_non_executable/config/etc/shells create mode 100644 tests/chsh/13_chsh_warning_non_executable/data/chsh.err create mode 100644 tests/chsh/13_chsh_warning_non_executable/data/passwd create mode 100755 tests/chsh/14_chsh_locked_passwd/chsh.test create mode 100644 tests/chsh/14_chsh_locked_passwd/config.txt create mode 100644 tests/chsh/14_chsh_locked_passwd/config/etc/group create mode 100644 tests/chsh/14_chsh_locked_passwd/config/etc/gshadow create mode 100644 tests/chsh/14_chsh_locked_passwd/config/etc/passwd create mode 100644 tests/chsh/14_chsh_locked_passwd/config/etc/shadow create mode 100644 tests/chsh/14_chsh_locked_passwd/data/chsh.err create mode 100755 tests/chsh/15_chsh_PAM_error/chsh.test create mode 100644 tests/chsh/15_chsh_PAM_error/config.txt create mode 100644 tests/chsh/15_chsh_PAM_error/config/etc/group create mode 100644 tests/chsh/15_chsh_PAM_error/config/etc/gshadow create mode 100644 tests/chsh/15_chsh_PAM_error/config/etc/pam.d/chsh create mode 100644 tests/chsh/15_chsh_PAM_error/config/etc/pam.d/other create mode 100644 tests/chsh/15_chsh_PAM_error/config/etc/passwd create mode 100644 tests/chsh/15_chsh_PAM_error/config/etc/shadow create mode 100644 tests/chsh/15_chsh_PAM_error/data/chsh.err create mode 100644 tests/cktools/01/data/group create mode 100644 tests/cktools/01/data/gshadow create mode 100644 tests/cktools/01/data/passwd create mode 100644 tests/cktools/01/data/run2.err create mode 100644 tests/cktools/01/data/run2.out create mode 100644 tests/cktools/01/data/shadow create mode 100755 tests/cktools/01/run1 create mode 100755 tests/cktools/01/run2 create mode 100644 tests/cktools/02_pwck_sort/config.txt create mode 100644 tests/cktools/02_pwck_sort/config/etc/group create mode 100644 tests/cktools/02_pwck_sort/config/etc/gshadow create mode 100644 tests/cktools/02_pwck_sort/config/etc/passwd create mode 100644 tests/cktools/02_pwck_sort/config/etc/shadow create mode 100644 tests/cktools/02_pwck_sort/data/passwd create mode 100644 tests/cktools/02_pwck_sort/data/shadow create mode 100755 tests/cktools/02_pwck_sort/pwck.test create mode 100644 tests/cktools/03_grpck_sort/config.txt create mode 100644 tests/cktools/03_grpck_sort/config/etc/group create mode 100644 tests/cktools/03_grpck_sort/config/etc/gshadow create mode 100644 tests/cktools/03_grpck_sort/config/etc/passwd create mode 100644 tests/cktools/03_grpck_sort/config/etc/shadow create mode 100644 tests/cktools/03_grpck_sort/data/group create mode 100644 tests/cktools/03_grpck_sort/data/gshadow create mode 100755 tests/cktools/03_grpck_sort/grpck.test create mode 100644 tests/cktools/04_pwck_sort_missing_shadow_user/config.txt create mode 100644 tests/cktools/04_pwck_sort_missing_shadow_user/config/etc/group create mode 100644 tests/cktools/04_pwck_sort_missing_shadow_user/config/etc/gshadow create mode 100644 tests/cktools/04_pwck_sort_missing_shadow_user/config/etc/passwd create mode 100644 tests/cktools/04_pwck_sort_missing_shadow_user/config/etc/shadow create mode 100644 tests/cktools/04_pwck_sort_missing_shadow_user/data/passwd create mode 100644 tests/cktools/04_pwck_sort_missing_shadow_user/data/shadow create mode 100755 tests/cktools/04_pwck_sort_missing_shadow_user/pwck.test create mode 100644 tests/cktools/05_grpck_sort_missing_shadow_group/config.txt create mode 100644 tests/cktools/05_grpck_sort_missing_shadow_group/config/etc/group create mode 100644 tests/cktools/05_grpck_sort_missing_shadow_group/config/etc/gshadow create mode 100644 tests/cktools/05_grpck_sort_missing_shadow_group/config/etc/passwd create mode 100644 tests/cktools/05_grpck_sort_missing_shadow_group/config/etc/shadow create mode 100644 tests/cktools/05_grpck_sort_missing_shadow_group/data/group create mode 100644 tests/cktools/05_grpck_sort_missing_shadow_group/data/gshadow create mode 100755 tests/cktools/05_grpck_sort_missing_shadow_group/grpck.test create mode 100644 tests/cktools/06_pwck_sort_NIS_server/config.txt create mode 100644 tests/cktools/06_pwck_sort_NIS_server/config/etc/group create mode 100644 tests/cktools/06_pwck_sort_NIS_server/config/etc/gshadow create mode 100644 tests/cktools/06_pwck_sort_NIS_server/config/etc/passwd create mode 100644 tests/cktools/06_pwck_sort_NIS_server/config/etc/shadow create mode 100644 tests/cktools/06_pwck_sort_NIS_server/data/passwd create mode 100644 tests/cktools/06_pwck_sort_NIS_server/data/shadow create mode 100755 tests/cktools/06_pwck_sort_NIS_server/pwck.test create mode 100644 tests/cktools/07_pwck_sort_NIS_client/config.txt create mode 100644 tests/cktools/07_pwck_sort_NIS_client/config/etc/group create mode 100644 tests/cktools/07_pwck_sort_NIS_client/config/etc/gshadow create mode 100644 tests/cktools/07_pwck_sort_NIS_client/config/etc/passwd create mode 100644 tests/cktools/07_pwck_sort_NIS_client/config/etc/shadow create mode 100644 tests/cktools/07_pwck_sort_NIS_client/data/passwd create mode 100644 tests/cktools/07_pwck_sort_NIS_client/data/shadow create mode 100755 tests/cktools/07_pwck_sort_NIS_client/pwck.test create mode 100644 tests/cktools/grpck/04_grpck_missing_field_group_delete/config.txt create mode 100644 tests/cktools/grpck/04_grpck_missing_field_group_delete/config/etc/group create mode 100644 tests/cktools/grpck/04_grpck_missing_field_group_delete/config/etc/gshadow create mode 100644 tests/cktools/grpck/04_grpck_missing_field_group_delete/config/etc/passwd create mode 100644 tests/cktools/grpck/04_grpck_missing_field_group_delete/config/etc/shadow create mode 100644 tests/cktools/grpck/04_grpck_missing_field_group_delete/data/group create mode 100644 tests/cktools/grpck/04_grpck_missing_field_group_delete/data/gshadow create mode 100755 tests/cktools/grpck/04_grpck_missing_field_group_delete/grpck.exp create mode 100755 tests/cktools/grpck/04_grpck_missing_field_group_delete/grpck.test create mode 100644 tests/cktools/grpck/05_grpck_missing_field_group_keep/config.txt create mode 100644 tests/cktools/grpck/05_grpck_missing_field_group_keep/config/etc/group create mode 100644 tests/cktools/grpck/05_grpck_missing_field_group_keep/config/etc/gshadow create mode 100644 tests/cktools/grpck/05_grpck_missing_field_group_keep/config/etc/passwd create mode 100644 tests/cktools/grpck/05_grpck_missing_field_group_keep/config/etc/shadow create mode 100644 tests/cktools/grpck/05_grpck_missing_field_group_keep/data/gshadow create mode 100755 tests/cktools/grpck/05_grpck_missing_field_group_keep/grpck.exp create mode 100755 tests/cktools/grpck/05_grpck_missing_field_group_keep/grpck.test create mode 100644 tests/cktools/grpck/06_grpck_missing_field_group_no_changes/config.txt create mode 100644 tests/cktools/grpck/06_grpck_missing_field_group_no_changes/config/etc/group create mode 100644 tests/cktools/grpck/06_grpck_missing_field_group_no_changes/config/etc/gshadow create mode 100644 tests/cktools/grpck/06_grpck_missing_field_group_no_changes/config/etc/passwd create mode 100644 tests/cktools/grpck/06_grpck_missing_field_group_no_changes/config/etc/shadow create mode 100755 tests/cktools/grpck/06_grpck_missing_field_group_no_changes/grpck.exp create mode 100755 tests/cktools/grpck/06_grpck_missing_field_group_no_changes/grpck.test create mode 100644 tests/cktools/grpck/07_grpck_missing_field_gshadow_add/config.txt create mode 100644 tests/cktools/grpck/07_grpck_missing_field_gshadow_add/config/etc/group create mode 100644 tests/cktools/grpck/07_grpck_missing_field_gshadow_add/config/etc/gshadow create mode 100644 tests/cktools/grpck/07_grpck_missing_field_gshadow_add/config/etc/passwd create mode 100644 tests/cktools/grpck/07_grpck_missing_field_gshadow_add/config/etc/shadow create mode 100644 tests/cktools/grpck/07_grpck_missing_field_gshadow_add/data/gshadow create mode 100755 tests/cktools/grpck/07_grpck_missing_field_gshadow_add/grpck.exp create mode 100755 tests/cktools/grpck/07_grpck_missing_field_gshadow_add/grpck.test create mode 100644 tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/config.txt create mode 100644 tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/config/etc/group create mode 100644 tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/config/etc/gshadow create mode 100644 tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/config/etc/passwd create mode 100644 tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/config/etc/shadow create mode 100644 tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/data/gshadow create mode 100755 tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/grpck.exp create mode 100755 tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/grpck.test create mode 100644 tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/config.txt create mode 100644 tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/config/etc/group create mode 100644 tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/config/etc/gshadow create mode 100644 tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/config/etc/passwd create mode 100644 tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/config/etc/shadow create mode 100755 tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/grpck.exp create mode 100755 tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/grpck.test create mode 100644 tests/cktools/grpck/10_grpck_missing_field_group_local/config.txt create mode 100644 tests/cktools/grpck/10_grpck_missing_field_group_local/config/etc/group create mode 100644 tests/cktools/grpck/10_grpck_missing_field_group_local/config/etc/gshadow create mode 100644 tests/cktools/grpck/10_grpck_missing_field_group_local/config/etc/passwd create mode 100644 tests/cktools/grpck/10_grpck_missing_field_group_local/config/etc/shadow create mode 100644 tests/cktools/grpck/10_grpck_missing_field_group_local/data/group create mode 100644 tests/cktools/grpck/10_grpck_missing_field_group_local/data/gshadow create mode 100755 tests/cktools/grpck/10_grpck_missing_field_group_local/grpck.exp create mode 100755 tests/cktools/grpck/10_grpck_missing_field_group_local/grpck.test create mode 100644 tests/cktools/grpck/11_grpck_missing_field_gshadow_local/config.txt create mode 100644 tests/cktools/grpck/11_grpck_missing_field_gshadow_local/config/etc/group create mode 100644 tests/cktools/grpck/11_grpck_missing_field_gshadow_local/config/etc/gshadow create mode 100644 tests/cktools/grpck/11_grpck_missing_field_gshadow_local/config/etc/passwd create mode 100644 tests/cktools/grpck/11_grpck_missing_field_gshadow_local/config/etc/shadow create mode 100644 tests/cktools/grpck/11_grpck_missing_field_gshadow_local/data/group create mode 100644 tests/cktools/grpck/11_grpck_missing_field_gshadow_local/data/gshadow create mode 100644 tests/cktools/grpck/11_grpck_missing_field_gshadow_local/data/shadow create mode 100755 tests/cktools/grpck/11_grpck_missing_field_gshadow_local/grpck.exp create mode 100755 tests/cktools/grpck/11_grpck_missing_field_gshadow_local/grpck.test create mode 100644 tests/cktools/grpck/12_grpck_unknown_user_group/config.txt create mode 100644 tests/cktools/grpck/12_grpck_unknown_user_group/config/etc/group create mode 100644 tests/cktools/grpck/12_grpck_unknown_user_group/config/etc/gshadow create mode 100644 tests/cktools/grpck/12_grpck_unknown_user_group/config/etc/passwd create mode 100644 tests/cktools/grpck/12_grpck_unknown_user_group/config/etc/shadow create mode 100644 tests/cktools/grpck/12_grpck_unknown_user_group/data/group create mode 100755 tests/cktools/grpck/12_grpck_unknown_user_group/grpck.exp create mode 100755 tests/cktools/grpck/12_grpck_unknown_user_group/grpck.test create mode 100644 tests/cktools/grpck/13_grpck_unknown_user_gshadow/config.txt create mode 100644 tests/cktools/grpck/13_grpck_unknown_user_gshadow/config/etc/group create mode 100644 tests/cktools/grpck/13_grpck_unknown_user_gshadow/config/etc/gshadow create mode 100644 tests/cktools/grpck/13_grpck_unknown_user_gshadow/config/etc/passwd create mode 100644 tests/cktools/grpck/13_grpck_unknown_user_gshadow/config/etc/shadow create mode 100644 tests/cktools/grpck/13_grpck_unknown_user_gshadow/data/gshadow create mode 100755 tests/cktools/grpck/13_grpck_unknown_user_gshadow/grpck.exp create mode 100755 tests/cktools/grpck/13_grpck_unknown_user_gshadow/grpck.test create mode 100644 tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/config.txt create mode 100644 tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/config/etc/group create mode 100644 tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/config/etc/gshadow create mode 100644 tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/config/etc/passwd create mode 100644 tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/config/etc/shadow create mode 100644 tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/data/gshadow create mode 100755 tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/grpck.exp create mode 100755 tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/grpck.test create mode 100644 tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/config.txt create mode 100644 tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/config/etc/group create mode 100644 tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/config/etc/gshadow create mode 100644 tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/config/etc/passwd create mode 100644 tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/config/etc/shadow create mode 100644 tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/data/group create mode 100755 tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/grpck.exp create mode 100755 tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/grpck.test create mode 100644 tests/cktools/grpck/16_grpck_duplicate_entry_group/config.txt create mode 100644 tests/cktools/grpck/16_grpck_duplicate_entry_group/config/etc/group create mode 100644 tests/cktools/grpck/16_grpck_duplicate_entry_group/config/etc/gshadow create mode 100644 tests/cktools/grpck/16_grpck_duplicate_entry_group/config/etc/passwd create mode 100644 tests/cktools/grpck/16_grpck_duplicate_entry_group/config/etc/shadow create mode 100644 tests/cktools/grpck/16_grpck_duplicate_entry_group/data/group create mode 100755 tests/cktools/grpck/16_grpck_duplicate_entry_group/grpck.exp create mode 100755 tests/cktools/grpck/16_grpck_duplicate_entry_group/grpck.test create mode 100644 tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/config.txt create mode 100644 tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/config/etc/group create mode 100644 tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/config/etc/gshadow create mode 100644 tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/config/etc/passwd create mode 100644 tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/config/etc/shadow create mode 100644 tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/data/gshadow create mode 100755 tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/grpck.exp create mode 100755 tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/grpck.test create mode 100644 tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/config.txt create mode 100644 tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/config/etc/group create mode 100644 tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/config/etc/gshadow create mode 100644 tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/config/etc/passwd create mode 100644 tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/config/etc/shadow create mode 100755 tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/grpck.exp create mode 100755 tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/grpck.test create mode 100644 tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/config.txt create mode 100644 tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/config/etc/group create mode 100644 tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/config/etc/gshadow create mode 100644 tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/config/etc/passwd create mode 100644 tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/config/etc/shadow create mode 100755 tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/grpck.exp create mode 100755 tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/grpck.test create mode 100644 tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/config.txt create mode 100644 tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/config/etc/group create mode 100644 tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/config/etc/gshadow create mode 100644 tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/config/etc/passwd create mode 100644 tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/config/etc/shadow create mode 100644 tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/data/gshadow create mode 100755 tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/grpck.exp create mode 100755 tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/grpck.test create mode 100644 tests/cktools/grpck/21_grpck_invalid_group_name/config.txt create mode 100644 tests/cktools/grpck/21_grpck_invalid_group_name/config/etc/group create mode 100644 tests/cktools/grpck/21_grpck_invalid_group_name/config/etc/gshadow create mode 100644 tests/cktools/grpck/21_grpck_invalid_group_name/config/etc/passwd create mode 100644 tests/cktools/grpck/21_grpck_invalid_group_name/config/etc/shadow create mode 100755 tests/cktools/grpck/21_grpck_invalid_group_name/grpck.exp create mode 100755 tests/cktools/grpck/21_grpck_invalid_group_name/grpck.test create mode 100644 tests/cktools/grpck/22_grpck_invalid_group_ID_-1/config.txt create mode 100644 tests/cktools/grpck/22_grpck_invalid_group_ID_-1/config/etc/group create mode 100644 tests/cktools/grpck/22_grpck_invalid_group_ID_-1/config/etc/gshadow create mode 100644 tests/cktools/grpck/22_grpck_invalid_group_ID_-1/config/etc/passwd create mode 100644 tests/cktools/grpck/22_grpck_invalid_group_ID_-1/config/etc/shadow create mode 100644 tests/cktools/grpck/22_grpck_invalid_group_ID_-1/data/group create mode 100644 tests/cktools/grpck/22_grpck_invalid_group_ID_-1/data/gshadow create mode 100755 tests/cktools/grpck/22_grpck_invalid_group_ID_-1/grpck.exp create mode 100755 tests/cktools/grpck/22_grpck_invalid_group_ID_-1/grpck.test create mode 100644 tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/config.txt create mode 100644 tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/config/etc/group create mode 100644 tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/config/etc/gshadow create mode 100644 tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/config/etc/passwd create mode 100644 tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/config/etc/shadow create mode 100755 tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/grpck.exp create mode 100755 tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/grpck.test create mode 100644 tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/config.txt create mode 100644 tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/config/etc/group create mode 100644 tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/config/etc/gshadow create mode 100644 tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/config/etc/passwd create mode 100644 tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/config/etc/shadow create mode 100644 tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/data/group create mode 100644 tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/data/gshadow create mode 100755 tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/grpck.exp create mode 100755 tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/grpck.test create mode 100644 tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/config.txt create mode 100644 tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/config/etc/group create mode 100644 tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/config/etc/gshadow create mode 100644 tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/config/etc/passwd create mode 100644 tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/config/etc/shadow create mode 100755 tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/grpck.exp create mode 100755 tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/grpck.test create mode 100644 tests/cktools/grpck/26_grpck_no_gshadow_file/config.txt create mode 100644 tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/group create mode 100644 tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/gshadow create mode 100644 tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/passwd create mode 100644 tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/shadow create mode 100644 tests/cktools/grpck/26_grpck_no_gshadow_file/data/grpck.out create mode 100755 tests/cktools/grpck/26_grpck_no_gshadow_file/grpck.test create mode 100644 tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config.txt create mode 100644 tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/group create mode 100644 tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/gshadow create mode 100644 tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/passwd create mode 100644 tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/shadow create mode 100644 tests/cktools/grpck/27_grpck_sort_no_gshadow_file/data/group create mode 100755 tests/cktools/grpck/27_grpck_sort_no_gshadow_file/grpck.test create mode 100644 tests/cktools/grpck/28_grpck_usage/config.txt create mode 100644 tests/cktools/grpck/28_grpck_usage/config/etc/default/useradd create mode 100644 tests/cktools/grpck/28_grpck_usage/config/etc/group create mode 100644 tests/cktools/grpck/28_grpck_usage/config/etc/gshadow create mode 100644 tests/cktools/grpck/28_grpck_usage/config/etc/passwd create mode 100644 tests/cktools/grpck/28_grpck_usage/config/etc/shadow create mode 100644 tests/cktools/grpck/28_grpck_usage/data/usage.out create mode 100755 tests/cktools/grpck/28_grpck_usage/grpck.test create mode 100644 tests/cktools/grpck/29_grpck_sort_readonly/config.txt create mode 100644 tests/cktools/grpck/29_grpck_sort_readonly/config/etc/default/useradd create mode 100644 tests/cktools/grpck/29_grpck_sort_readonly/config/etc/group create mode 100644 tests/cktools/grpck/29_grpck_sort_readonly/config/etc/gshadow create mode 100644 tests/cktools/grpck/29_grpck_sort_readonly/config/etc/passwd create mode 100644 tests/cktools/grpck/29_grpck_sort_readonly/config/etc/shadow create mode 100644 tests/cktools/grpck/29_grpck_sort_readonly/data/usage.out create mode 100755 tests/cktools/grpck/29_grpck_sort_readonly/grpck.test create mode 100644 tests/cktools/grpck/30_grpck_3_files/config.txt create mode 100644 tests/cktools/grpck/30_grpck_3_files/config/etc/default/useradd create mode 100644 tests/cktools/grpck/30_grpck_3_files/config/etc/group create mode 100644 tests/cktools/grpck/30_grpck_3_files/config/etc/gshadow create mode 100644 tests/cktools/grpck/30_grpck_3_files/config/etc/passwd create mode 100644 tests/cktools/grpck/30_grpck_3_files/config/etc/shadow create mode 100644 tests/cktools/grpck/30_grpck_3_files/data/usage.out create mode 100755 tests/cktools/grpck/30_grpck_3_files/grpck.test create mode 100644 tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config.txt create mode 100644 tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/group create mode 100644 tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/gshadow create mode 100644 tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/passwd create mode 100644 tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/shadow create mode 100644 tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/data/group create mode 100755 tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/grpck.exp create mode 100755 tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/grpck.test create mode 100644 tests/cktools/grpck/32_grpck_sort_nis/config.txt create mode 100644 tests/cktools/grpck/32_grpck_sort_nis/config/etc/group create mode 100644 tests/cktools/grpck/32_grpck_sort_nis/config/etc/gshadow create mode 100644 tests/cktools/grpck/32_grpck_sort_nis/config/etc/passwd create mode 100644 tests/cktools/grpck/32_grpck_sort_nis/config/etc/shadow create mode 100644 tests/cktools/grpck/32_grpck_sort_nis/data/group create mode 100644 tests/cktools/grpck/32_grpck_sort_nis/data/gshadow create mode 100755 tests/cktools/grpck/32_grpck_sort_nis/grpck.test create mode 100644 tests/cktools/grpck/33_grpck_locked_group/config.txt create mode 100644 tests/cktools/grpck/33_grpck_locked_group/config/etc/default/useradd create mode 100644 tests/cktools/grpck/33_grpck_locked_group/config/etc/group create mode 100644 tests/cktools/grpck/33_grpck_locked_group/config/etc/gshadow create mode 100644 tests/cktools/grpck/33_grpck_locked_group/config/etc/passwd create mode 100644 tests/cktools/grpck/33_grpck_locked_group/config/etc/shadow create mode 100644 tests/cktools/grpck/33_grpck_locked_group/data/grpck.err create mode 100755 tests/cktools/grpck/33_grpck_locked_group/grpck.test create mode 100644 tests/cktools/grpck/34_grpck_locked_gshadow/config.txt create mode 100644 tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/default/useradd create mode 100644 tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/group create mode 100644 tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/gshadow create mode 100644 tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/passwd create mode 100644 tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/shadow create mode 100644 tests/cktools/grpck/34_grpck_locked_gshadow/data/grpck.err create mode 100755 tests/cktools/grpck/34_grpck_locked_gshadow/grpck.test create mode 100644 tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config.txt create mode 100644 tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/group create mode 100644 tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/gshadow create mode 100644 tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/passwd create mode 100644 tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/shadow create mode 100644 tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/data/group create mode 100755 tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/grpck.exp create mode 100755 tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/grpck.test create mode 100644 tests/cktools/grpck/36_grpck_password_group_gshadow/config.txt create mode 100644 tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/group create mode 100644 tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/gshadow create mode 100644 tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/passwd create mode 100644 tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/shadow create mode 100644 tests/cktools/grpck/36_grpck_password_group_gshadow/data/grpck.out create mode 100755 tests/cktools/grpck/36_grpck_password_group_gshadow/grpck.test create mode 100644 tests/cktools/grpck/37_grpck_invalid_option/config.txt create mode 100644 tests/cktools/grpck/37_grpck_invalid_option/config/etc/group create mode 100644 tests/cktools/grpck/37_grpck_invalid_option/config/etc/gshadow create mode 100644 tests/cktools/grpck/37_grpck_invalid_option/config/etc/passwd create mode 100644 tests/cktools/grpck/37_grpck_invalid_option/config/etc/shadow create mode 100644 tests/cktools/grpck/37_grpck_invalid_option/data/usage.out create mode 100755 tests/cktools/grpck/37_grpck_invalid_option/grpck.test create mode 100644 tests/cktools/pwck/04_pwck_missing_field_passwd_delete/config.txt create mode 100644 tests/cktools/pwck/04_pwck_missing_field_passwd_delete/config/etc/group create mode 100644 tests/cktools/pwck/04_pwck_missing_field_passwd_delete/config/etc/gshadow create mode 100644 tests/cktools/pwck/04_pwck_missing_field_passwd_delete/config/etc/passwd create mode 100644 tests/cktools/pwck/04_pwck_missing_field_passwd_delete/config/etc/shadow create mode 100644 tests/cktools/pwck/04_pwck_missing_field_passwd_delete/data/passwd create mode 100644 tests/cktools/pwck/04_pwck_missing_field_passwd_delete/data/shadow create mode 100755 tests/cktools/pwck/04_pwck_missing_field_passwd_delete/pwck.exp create mode 100755 tests/cktools/pwck/04_pwck_missing_field_passwd_delete/pwck.test create mode 100644 tests/cktools/pwck/05_pwck_missing_field_passwd_keep/config.txt create mode 100644 tests/cktools/pwck/05_pwck_missing_field_passwd_keep/config/etc/group create mode 100644 tests/cktools/pwck/05_pwck_missing_field_passwd_keep/config/etc/gshadow create mode 100644 tests/cktools/pwck/05_pwck_missing_field_passwd_keep/config/etc/passwd create mode 100644 tests/cktools/pwck/05_pwck_missing_field_passwd_keep/config/etc/shadow create mode 100644 tests/cktools/pwck/05_pwck_missing_field_passwd_keep/data/shadow create mode 100755 tests/cktools/pwck/05_pwck_missing_field_passwd_keep/pwck.exp create mode 100755 tests/cktools/pwck/05_pwck_missing_field_passwd_keep/pwck.test create mode 100644 tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/config.txt create mode 100644 tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/config/etc/group create mode 100644 tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/config/etc/gshadow create mode 100644 tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/config/etc/passwd create mode 100644 tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/config/etc/shadow create mode 100755 tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/pwck.exp create mode 100755 tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/pwck.test create mode 100644 tests/cktools/pwck/07_pwck_missing_field_shadow_add/config.txt create mode 100644 tests/cktools/pwck/07_pwck_missing_field_shadow_add/config/etc/group create mode 100644 tests/cktools/pwck/07_pwck_missing_field_shadow_add/config/etc/gshadow create mode 100644 tests/cktools/pwck/07_pwck_missing_field_shadow_add/config/etc/passwd create mode 100644 tests/cktools/pwck/07_pwck_missing_field_shadow_add/config/etc/shadow create mode 100644 tests/cktools/pwck/07_pwck_missing_field_shadow_add/data/shadow create mode 100755 tests/cktools/pwck/07_pwck_missing_field_shadow_add/pwck.exp create mode 100755 tests/cktools/pwck/07_pwck_missing_field_shadow_add/pwck.test create mode 100644 tests/cktools/pwck/08_pwck_missing_field_shadow_delete/config.txt create mode 100644 tests/cktools/pwck/08_pwck_missing_field_shadow_delete/config/etc/group create mode 100644 tests/cktools/pwck/08_pwck_missing_field_shadow_delete/config/etc/gshadow create mode 100644 tests/cktools/pwck/08_pwck_missing_field_shadow_delete/config/etc/passwd create mode 100644 tests/cktools/pwck/08_pwck_missing_field_shadow_delete/config/etc/shadow create mode 100644 tests/cktools/pwck/08_pwck_missing_field_shadow_delete/data/shadow create mode 100755 tests/cktools/pwck/08_pwck_missing_field_shadow_delete/pwck.exp create mode 100755 tests/cktools/pwck/08_pwck_missing_field_shadow_delete/pwck.test create mode 100644 tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/config.txt create mode 100644 tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/config/etc/group create mode 100644 tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/config/etc/gshadow create mode 100644 tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/config/etc/passwd create mode 100644 tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/config/etc/shadow create mode 100755 tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/pwck.exp create mode 100755 tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/pwck.test create mode 100644 tests/cktools/pwck/10_pwck_missing_field_passwd_local/config.txt create mode 100644 tests/cktools/pwck/10_pwck_missing_field_passwd_local/config/etc/group create mode 100644 tests/cktools/pwck/10_pwck_missing_field_passwd_local/config/etc/gshadow create mode 100644 tests/cktools/pwck/10_pwck_missing_field_passwd_local/config/etc/passwd create mode 100644 tests/cktools/pwck/10_pwck_missing_field_passwd_local/config/etc/shadow create mode 100644 tests/cktools/pwck/10_pwck_missing_field_passwd_local/data/passwd create mode 100644 tests/cktools/pwck/10_pwck_missing_field_passwd_local/data/shadow create mode 100755 tests/cktools/pwck/10_pwck_missing_field_passwd_local/pwck.exp create mode 100755 tests/cktools/pwck/10_pwck_missing_field_passwd_local/pwck.test create mode 100644 tests/cktools/pwck/11_pwck_missing_field_shadow_local/config.txt create mode 100644 tests/cktools/pwck/11_pwck_missing_field_shadow_local/config/etc/group create mode 100644 tests/cktools/pwck/11_pwck_missing_field_shadow_local/config/etc/gshadow create mode 100644 tests/cktools/pwck/11_pwck_missing_field_shadow_local/config/etc/passwd create mode 100644 tests/cktools/pwck/11_pwck_missing_field_shadow_local/config/etc/shadow create mode 100644 tests/cktools/pwck/11_pwck_missing_field_shadow_local/data/passwd create mode 100644 tests/cktools/pwck/11_pwck_missing_field_shadow_local/data/shadow create mode 100755 tests/cktools/pwck/11_pwck_missing_field_shadow_local/pwck.exp create mode 100755 tests/cktools/pwck/11_pwck_missing_field_shadow_local/pwck.test create mode 100644 tests/cktools/pwck/12_pwck_unknown_user_group_ID/config.txt create mode 100644 tests/cktools/pwck/12_pwck_unknown_user_group_ID/config/etc/group create mode 100644 tests/cktools/pwck/12_pwck_unknown_user_group_ID/config/etc/gshadow create mode 100644 tests/cktools/pwck/12_pwck_unknown_user_group_ID/config/etc/passwd create mode 100644 tests/cktools/pwck/12_pwck_unknown_user_group_ID/config/etc/shadow create mode 100755 tests/cktools/pwck/12_pwck_unknown_user_group_ID/pwck.exp create mode 100755 tests/cktools/pwck/12_pwck_unknown_user_group_ID/pwck.test create mode 100644 tests/cktools/pwck/13_pwck_duplicate_entry_passwd/config.txt create mode 100644 tests/cktools/pwck/13_pwck_duplicate_entry_passwd/config/etc/group create mode 100644 tests/cktools/pwck/13_pwck_duplicate_entry_passwd/config/etc/gshadow create mode 100644 tests/cktools/pwck/13_pwck_duplicate_entry_passwd/config/etc/passwd create mode 100644 tests/cktools/pwck/13_pwck_duplicate_entry_passwd/config/etc/shadow create mode 100644 tests/cktools/pwck/13_pwck_duplicate_entry_passwd/data/passwd create mode 100755 tests/cktools/pwck/13_pwck_duplicate_entry_passwd/pwck.exp create mode 100755 tests/cktools/pwck/13_pwck_duplicate_entry_passwd/pwck.test create mode 100644 tests/cktools/pwck/14_pwck_duplicate_entry_shadow/config.txt create mode 100644 tests/cktools/pwck/14_pwck_duplicate_entry_shadow/config/etc/group create mode 100644 tests/cktools/pwck/14_pwck_duplicate_entry_shadow/config/etc/gshadow create mode 100644 tests/cktools/pwck/14_pwck_duplicate_entry_shadow/config/etc/passwd create mode 100644 tests/cktools/pwck/14_pwck_duplicate_entry_shadow/config/etc/shadow create mode 100644 tests/cktools/pwck/14_pwck_duplicate_entry_shadow/data/shadow create mode 100755 tests/cktools/pwck/14_pwck_duplicate_entry_shadow/pwck.exp create mode 100755 tests/cktools/pwck/14_pwck_duplicate_entry_shadow/pwck.test create mode 100644 tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/config.txt create mode 100644 tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/config/etc/group create mode 100644 tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/config/etc/gshadow create mode 100644 tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/config/etc/passwd create mode 100644 tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/config/etc/shadow create mode 100755 tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/pwck.exp create mode 100755 tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/pwck.test create mode 100644 tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/config.txt create mode 100644 tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/config/etc/group create mode 100644 tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/config/etc/gshadow create mode 100644 tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/config/etc/passwd create mode 100644 tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/config/etc/shadow create mode 100755 tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/pwck.exp create mode 100755 tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/pwck.test create mode 100644 tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/config.txt create mode 100644 tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/config/etc/group create mode 100644 tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/config/etc/gshadow create mode 100644 tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/config/etc/passwd create mode 100644 tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/config/etc/shadow create mode 100644 tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/data/passwd create mode 100755 tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/pwck.exp create mode 100755 tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/pwck.test create mode 100644 tests/cktools/pwck/18_pwck_invalid_user_name/config.txt create mode 100644 tests/cktools/pwck/18_pwck_invalid_user_name/config/etc/group create mode 100644 tests/cktools/pwck/18_pwck_invalid_user_name/config/etc/gshadow create mode 100644 tests/cktools/pwck/18_pwck_invalid_user_name/config/etc/passwd create mode 100644 tests/cktools/pwck/18_pwck_invalid_user_name/config/etc/shadow create mode 100755 tests/cktools/pwck/18_pwck_invalid_user_name/pwck.exp create mode 100755 tests/cktools/pwck/18_pwck_invalid_user_name/pwck.test create mode 100644 tests/cktools/pwck/19_pwck_invalid_user_ID_-1/config.txt create mode 100644 tests/cktools/pwck/19_pwck_invalid_user_ID_-1/config/etc/group create mode 100644 tests/cktools/pwck/19_pwck_invalid_user_ID_-1/config/etc/gshadow create mode 100644 tests/cktools/pwck/19_pwck_invalid_user_ID_-1/config/etc/passwd create mode 100644 tests/cktools/pwck/19_pwck_invalid_user_ID_-1/config/etc/shadow create mode 100644 tests/cktools/pwck/19_pwck_invalid_user_ID_-1/data/passwd create mode 100644 tests/cktools/pwck/19_pwck_invalid_user_ID_-1/data/shadow create mode 100755 tests/cktools/pwck/19_pwck_invalid_user_ID_-1/pwck.exp create mode 100755 tests/cktools/pwck/19_pwck_invalid_user_ID_-1/pwck.test create mode 100644 tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/config.txt create mode 100644 tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/config/etc/group create mode 100644 tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/config/etc/gshadow create mode 100644 tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/config/etc/passwd create mode 100644 tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/config/etc/shadow create mode 100755 tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/pwck.exp create mode 100755 tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/pwck.test create mode 100644 tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/config.txt create mode 100644 tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/config/etc/group create mode 100644 tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/config/etc/gshadow create mode 100644 tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/config/etc/passwd create mode 100644 tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/config/etc/shadow create mode 100644 tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/data/passwd create mode 100644 tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/data/shadow create mode 100755 tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/pwck.exp create mode 100755 tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/pwck.test create mode 100644 tests/cktools/pwck/22_pwck_usage/config.txt create mode 100644 tests/cktools/pwck/22_pwck_usage/config/etc/group create mode 100644 tests/cktools/pwck/22_pwck_usage/config/etc/gshadow create mode 100644 tests/cktools/pwck/22_pwck_usage/config/etc/passwd create mode 100644 tests/cktools/pwck/22_pwck_usage/config/etc/shadow create mode 100644 tests/cktools/pwck/22_pwck_usage/data/usage.out create mode 100755 tests/cktools/pwck/22_pwck_usage/pwck.test create mode 100644 tests/cktools/pwck/23_pwck_locked_passwd/config.txt create mode 100644 tests/cktools/pwck/23_pwck_locked_passwd/config/etc/group create mode 100644 tests/cktools/pwck/23_pwck_locked_passwd/config/etc/gshadow create mode 100644 tests/cktools/pwck/23_pwck_locked_passwd/config/etc/passwd create mode 100644 tests/cktools/pwck/23_pwck_locked_passwd/config/etc/shadow create mode 100644 tests/cktools/pwck/23_pwck_locked_passwd/data/pwck.err create mode 100755 tests/cktools/pwck/23_pwck_locked_passwd/pwck.test create mode 100644 tests/cktools/pwck/24_pwck_locked_shadow/config.txt create mode 100644 tests/cktools/pwck/24_pwck_locked_shadow/config/etc/group create mode 100644 tests/cktools/pwck/24_pwck_locked_shadow/config/etc/gshadow create mode 100644 tests/cktools/pwck/24_pwck_locked_shadow/config/etc/passwd create mode 100644 tests/cktools/pwck/24_pwck_locked_shadow/config/etc/shadow create mode 100644 tests/cktools/pwck/24_pwck_locked_shadow/data/pwck.err create mode 100755 tests/cktools/pwck/24_pwck_locked_shadow/pwck.test create mode 100644 tests/cktools/pwck/25_pwck_usage_invalid_option/config.txt create mode 100644 tests/cktools/pwck/25_pwck_usage_invalid_option/config/etc/group create mode 100644 tests/cktools/pwck/25_pwck_usage_invalid_option/config/etc/gshadow create mode 100644 tests/cktools/pwck/25_pwck_usage_invalid_option/config/etc/passwd create mode 100644 tests/cktools/pwck/25_pwck_usage_invalid_option/config/etc/shadow create mode 100644 tests/cktools/pwck/25_pwck_usage_invalid_option/data/pwck.err create mode 100755 tests/cktools/pwck/25_pwck_usage_invalid_option/pwck.test create mode 100644 tests/cktools/pwck/26_pwck_usage-s-r/config.txt create mode 100644 tests/cktools/pwck/26_pwck_usage-s-r/config/etc/group create mode 100644 tests/cktools/pwck/26_pwck_usage-s-r/config/etc/gshadow create mode 100644 tests/cktools/pwck/26_pwck_usage-s-r/config/etc/passwd create mode 100644 tests/cktools/pwck/26_pwck_usage-s-r/config/etc/shadow create mode 100644 tests/cktools/pwck/26_pwck_usage-s-r/data/pwck.err create mode 100755 tests/cktools/pwck/26_pwck_usage-s-r/pwck.test create mode 100644 tests/cktools/pwck/27_pwck_usage_3_files/config.txt create mode 100644 tests/cktools/pwck/27_pwck_usage_3_files/config/etc/group create mode 100644 tests/cktools/pwck/27_pwck_usage_3_files/config/etc/gshadow create mode 100644 tests/cktools/pwck/27_pwck_usage_3_files/config/etc/passwd create mode 100644 tests/cktools/pwck/27_pwck_usage_3_files/config/etc/shadow create mode 100644 tests/cktools/pwck/27_pwck_usage_3_files/data/pwck.err create mode 100755 tests/cktools/pwck/27_pwck_usage_3_files/pwck.test create mode 100644 tests/cktools/pwck/28_pwck_no_shadow_file/config.txt create mode 100644 tests/cktools/pwck/28_pwck_no_shadow_file/config/etc/group create mode 100644 tests/cktools/pwck/28_pwck_no_shadow_file/config/etc/gshadow create mode 100644 tests/cktools/pwck/28_pwck_no_shadow_file/config/etc/passwd create mode 100644 tests/cktools/pwck/28_pwck_no_shadow_file/config/etc/shadow create mode 100644 tests/cktools/pwck/28_pwck_no_shadow_file/data/pwck.out create mode 100755 tests/cktools/pwck/28_pwck_no_shadow_file/pwck.test create mode 100644 tests/cktools/pwck/29_pwck_password_change_in_future/config.txt create mode 100644 tests/cktools/pwck/29_pwck_password_change_in_future/config/etc/group create mode 100644 tests/cktools/pwck/29_pwck_password_change_in_future/config/etc/gshadow create mode 100644 tests/cktools/pwck/29_pwck_password_change_in_future/config/etc/passwd create mode 100644 tests/cktools/pwck/29_pwck_password_change_in_future/config/etc/shadow create mode 100644 tests/cktools/pwck/29_pwck_password_change_in_future/data/pwck.out create mode 100755 tests/cktools/pwck/29_pwck_password_change_in_future/pwck.test create mode 100644 tests/cktools/pwck/30_pwck_NIS_entries/config.txt create mode 100644 tests/cktools/pwck/30_pwck_NIS_entries/config/etc/group create mode 100644 tests/cktools/pwck/30_pwck_NIS_entries/config/etc/gshadow create mode 100644 tests/cktools/pwck/30_pwck_NIS_entries/config/etc/passwd create mode 100644 tests/cktools/pwck/30_pwck_NIS_entries/config/etc/shadow create mode 100644 tests/cktools/pwck/30_pwck_NIS_entries/data/pwck.out create mode 100755 tests/cktools/pwck/30_pwck_NIS_entries/pwck.test create mode 100644 tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/config.txt create mode 100644 tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/config/etc/group create mode 100644 tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/config/etc/gshadow create mode 100644 tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/config/etc/passwd create mode 100644 tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/config/etc/shadow create mode 100644 tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/data/pwck.out create mode 100755 tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/pwck.test create mode 100644 tests/cktools/pwck/32_pwck_quiet/config.txt create mode 100644 tests/cktools/pwck/32_pwck_quiet/config/etc/group create mode 100644 tests/cktools/pwck/32_pwck_quiet/config/etc/gshadow create mode 100644 tests/cktools/pwck/32_pwck_quiet/config/etc/passwd create mode 100644 tests/cktools/pwck/32_pwck_quiet/config/etc/shadow create mode 100644 tests/cktools/pwck/32_pwck_quiet/data/pwck.out create mode 100755 tests/cktools/pwck/32_pwck_quiet/pwck.test create mode 100755 tests/common/compare_file.pl create mode 100644 tests/common/config.sh create mode 100644 tests/common/config_chroot-i386.list create mode 100644 tests/common/config_chroot-powerpc.list create mode 100644 tests/common/fopen_failure.c create mode 100644 tests/common/log.sh create mode 100644 tests/common/open_RDONLY_failure.c create mode 100644 tests/common/open_RDWR_failure.c create mode 100644 tests/common/rename_failure.c create mode 100644 tests/common/rmdir_failure.c create mode 100644 tests/common/time_0.c create mode 100644 tests/common/time_past.c create mode 100644 tests/common/unlink_failure.c create mode 100644 tests/convtools/01/data/1/group create mode 100644 tests/convtools/01/data/1/passwd create mode 100644 tests/convtools/01/data/2/group create mode 100644 tests/convtools/01/data/2/gshadow create mode 100644 tests/convtools/01/data/2/passwd create mode 100644 tests/convtools/01/data/2/shadow create mode 100755 tests/convtools/01/run create mode 100644 tests/convtools/02_grpconv_remove_gshadow_only_entries/config.txt create mode 100644 tests/convtools/02_grpconv_remove_gshadow_only_entries/config/etc/group create mode 100644 tests/convtools/02_grpconv_remove_gshadow_only_entries/config/etc/gshadow create mode 100644 tests/convtools/02_grpconv_remove_gshadow_only_entries/config/etc/passwd create mode 100644 tests/convtools/02_grpconv_remove_gshadow_only_entries/config/etc/shadow create mode 100644 tests/convtools/02_grpconv_remove_gshadow_only_entries/data/gshadow create mode 100755 tests/convtools/02_grpconv_remove_gshadow_only_entries/grpconv.test create mode 100644 tests/convtools/03_grpconv_copy_passwd/config.txt create mode 100644 tests/convtools/03_grpconv_copy_passwd/config/etc/group create mode 100644 tests/convtools/03_grpconv_copy_passwd/config/etc/gshadow create mode 100644 tests/convtools/03_grpconv_copy_passwd/config/etc/passwd create mode 100644 tests/convtools/03_grpconv_copy_passwd/config/etc/shadow create mode 100644 tests/convtools/03_grpconv_copy_passwd/data/group create mode 100644 tests/convtools/03_grpconv_copy_passwd/data/gshadow create mode 100755 tests/convtools/03_grpconv_copy_passwd/grpconv.test create mode 100644 tests/convtools/04_grpconv_no_password/config.txt create mode 100644 tests/convtools/04_grpconv_no_password/config/etc/group create mode 100644 tests/convtools/04_grpconv_no_password/config/etc/gshadow create mode 100644 tests/convtools/04_grpconv_no_password/config/etc/passwd create mode 100644 tests/convtools/04_grpconv_no_password/config/etc/shadow create mode 100644 tests/convtools/04_grpconv_no_password/data/group create mode 100644 tests/convtools/04_grpconv_no_password/data/gshadow create mode 100755 tests/convtools/04_grpconv_no_password/grpconv.test create mode 100644 tests/convtools/05_grpconv_copy_passwd_existing_gshadow/config.txt create mode 100644 tests/convtools/05_grpconv_copy_passwd_existing_gshadow/config/etc/group create mode 100644 tests/convtools/05_grpconv_copy_passwd_existing_gshadow/config/etc/gshadow create mode 100644 tests/convtools/05_grpconv_copy_passwd_existing_gshadow/config/etc/passwd create mode 100644 tests/convtools/05_grpconv_copy_passwd_existing_gshadow/config/etc/shadow create mode 100644 tests/convtools/05_grpconv_copy_passwd_existing_gshadow/data/group create mode 100644 tests/convtools/05_grpconv_copy_passwd_existing_gshadow/data/gshadow create mode 100755 tests/convtools/05_grpconv_copy_passwd_existing_gshadow/grpconv.test create mode 100644 tests/convtools/06_grpconv_error_group_locked/config.txt create mode 100644 tests/convtools/06_grpconv_error_group_locked/config/etc/group create mode 100644 tests/convtools/06_grpconv_error_group_locked/config/etc/gshadow create mode 100644 tests/convtools/06_grpconv_error_group_locked/config/etc/passwd create mode 100644 tests/convtools/06_grpconv_error_group_locked/config/etc/shadow create mode 100644 tests/convtools/06_grpconv_error_group_locked/data/grpconv.err create mode 100755 tests/convtools/06_grpconv_error_group_locked/grpconv.test create mode 100644 tests/convtools/07_grpconv_error_gshadow_locked/config.txt create mode 100644 tests/convtools/07_grpconv_error_gshadow_locked/config/etc/group create mode 100644 tests/convtools/07_grpconv_error_gshadow_locked/config/etc/gshadow create mode 100644 tests/convtools/07_grpconv_error_gshadow_locked/config/etc/passwd create mode 100644 tests/convtools/07_grpconv_error_gshadow_locked/config/etc/shadow create mode 100644 tests/convtools/07_grpconv_error_gshadow_locked/data/grpconv.err create mode 100755 tests/convtools/07_grpconv_error_gshadow_locked/grpconv.test create mode 100644 tests/convtools/08_grpunconv_no_gshadow_file/config.txt create mode 100644 tests/convtools/08_grpunconv_no_gshadow_file/config/etc/group create mode 100644 tests/convtools/08_grpunconv_no_gshadow_file/config/etc/gshadow create mode 100644 tests/convtools/08_grpunconv_no_gshadow_file/config/etc/passwd create mode 100644 tests/convtools/08_grpunconv_no_gshadow_file/config/etc/shadow create mode 100755 tests/convtools/08_grpunconv_no_gshadow_file/grpunconv.test create mode 100644 tests/convtools/09_grpunconv_error_group_locked/config.txt create mode 100644 tests/convtools/09_grpunconv_error_group_locked/config/etc/group create mode 100644 tests/convtools/09_grpunconv_error_group_locked/config/etc/gshadow create mode 100644 tests/convtools/09_grpunconv_error_group_locked/config/etc/passwd create mode 100644 tests/convtools/09_grpunconv_error_group_locked/config/etc/shadow create mode 100644 tests/convtools/09_grpunconv_error_group_locked/data/grpunconv.err create mode 100755 tests/convtools/09_grpunconv_error_group_locked/grpunconv.test create mode 100644 tests/convtools/10_grpunconv_error_gshadow_locked/config.txt create mode 100644 tests/convtools/10_grpunconv_error_gshadow_locked/config/etc/group create mode 100644 tests/convtools/10_grpunconv_error_gshadow_locked/config/etc/gshadow create mode 100644 tests/convtools/10_grpunconv_error_gshadow_locked/config/etc/passwd create mode 100644 tests/convtools/10_grpunconv_error_gshadow_locked/config/etc/shadow create mode 100644 tests/convtools/10_grpunconv_error_gshadow_locked/data/grpunconv.err create mode 100755 tests/convtools/10_grpunconv_error_gshadow_locked/grpunconv.test create mode 100644 tests/convtools/11_pwconv_error_passwd_locked/config.txt create mode 100644 tests/convtools/11_pwconv_error_passwd_locked/config/etc/group create mode 100644 tests/convtools/11_pwconv_error_passwd_locked/config/etc/gshadow create mode 100644 tests/convtools/11_pwconv_error_passwd_locked/config/etc/passwd create mode 100644 tests/convtools/11_pwconv_error_passwd_locked/config/etc/shadow create mode 100644 tests/convtools/11_pwconv_error_passwd_locked/data/pwconv.err create mode 100755 tests/convtools/11_pwconv_error_passwd_locked/pwconv.test create mode 100644 tests/convtools/12_pwconv_error_shadow_locked/config.txt create mode 100644 tests/convtools/12_pwconv_error_shadow_locked/config/etc/group create mode 100644 tests/convtools/12_pwconv_error_shadow_locked/config/etc/gshadow create mode 100644 tests/convtools/12_pwconv_error_shadow_locked/config/etc/passwd create mode 100644 tests/convtools/12_pwconv_error_shadow_locked/config/etc/shadow create mode 100644 tests/convtools/12_pwconv_error_shadow_locked/data/pwconv.err create mode 100755 tests/convtools/12_pwconv_error_shadow_locked/pwconv.test create mode 100644 tests/convtools/13_pwunconv_error_passwd_locked/config.txt create mode 100644 tests/convtools/13_pwunconv_error_passwd_locked/config/etc/group create mode 100644 tests/convtools/13_pwunconv_error_passwd_locked/config/etc/gshadow create mode 100644 tests/convtools/13_pwunconv_error_passwd_locked/config/etc/passwd create mode 100644 tests/convtools/13_pwunconv_error_passwd_locked/config/etc/shadow create mode 100644 tests/convtools/13_pwunconv_error_passwd_locked/data/pwunconv.err create mode 100755 tests/convtools/13_pwunconv_error_passwd_locked/pwunconv.test create mode 100644 tests/convtools/14_pwunconv_error_shadow_locked/config.txt create mode 100644 tests/convtools/14_pwunconv_error_shadow_locked/config/etc/group create mode 100644 tests/convtools/14_pwunconv_error_shadow_locked/config/etc/gshadow create mode 100644 tests/convtools/14_pwunconv_error_shadow_locked/config/etc/passwd create mode 100644 tests/convtools/14_pwunconv_error_shadow_locked/config/etc/shadow create mode 100644 tests/convtools/14_pwunconv_error_shadow_locked/data/pwunconv.err create mode 100755 tests/convtools/14_pwunconv_error_shadow_locked/pwunconv.test create mode 100644 tests/convtools/15_pwconv_remove_shadow_only_entries/config.txt create mode 100644 tests/convtools/15_pwconv_remove_shadow_only_entries/config/etc/group create mode 100644 tests/convtools/15_pwconv_remove_shadow_only_entries/config/etc/gshadow create mode 100644 tests/convtools/15_pwconv_remove_shadow_only_entries/config/etc/passwd create mode 100644 tests/convtools/15_pwconv_remove_shadow_only_entries/config/etc/shadow create mode 100644 tests/convtools/15_pwconv_remove_shadow_only_entries/data/shadow create mode 100755 tests/convtools/15_pwconv_remove_shadow_only_entries/pwconv.test create mode 100644 tests/convtools/16_pwconv_copy_passwd/config.txt create mode 100644 tests/convtools/16_pwconv_copy_passwd/config/etc/group create mode 100644 tests/convtools/16_pwconv_copy_passwd/config/etc/gshadow create mode 100644 tests/convtools/16_pwconv_copy_passwd/config/etc/passwd create mode 100644 tests/convtools/16_pwconv_copy_passwd/config/etc/shadow create mode 100644 tests/convtools/16_pwconv_copy_passwd/data/passwd create mode 100644 tests/convtools/16_pwconv_copy_passwd/data/shadow create mode 100755 tests/convtools/16_pwconv_copy_passwd/pwconv.test create mode 100644 tests/convtools/17_pwunconv_no_shadow_file/config.txt create mode 100644 tests/convtools/17_pwunconv_no_shadow_file/config/etc/group create mode 100644 tests/convtools/17_pwunconv_no_shadow_file/config/etc/gshadow create mode 100644 tests/convtools/17_pwunconv_no_shadow_file/config/etc/passwd create mode 100644 tests/convtools/17_pwunconv_no_shadow_file/config/etc/shadow create mode 100755 tests/convtools/17_pwunconv_no_shadow_file/pwunconv.test create mode 100644 tests/convtools/18_pwunconv_user_not_in_shadow/config.txt create mode 100644 tests/convtools/18_pwunconv_user_not_in_shadow/config/etc/group create mode 100644 tests/convtools/18_pwunconv_user_not_in_shadow/config/etc/gshadow create mode 100644 tests/convtools/18_pwunconv_user_not_in_shadow/config/etc/passwd create mode 100644 tests/convtools/18_pwunconv_user_not_in_shadow/config/etc/shadow create mode 100644 tests/convtools/18_pwunconv_user_not_in_shadow/data/passwd create mode 100755 tests/convtools/18_pwunconv_user_not_in_shadow/pwunconv.test create mode 100644 tests/convtools/19_pwconv_NIS/config.txt create mode 100644 tests/convtools/19_pwconv_NIS/config/etc/group create mode 100644 tests/convtools/19_pwconv_NIS/config/etc/gshadow create mode 100644 tests/convtools/19_pwconv_NIS/config/etc/passwd create mode 100644 tests/convtools/19_pwconv_NIS/config/etc/shadow create mode 100644 tests/convtools/19_pwconv_NIS/data/passwd create mode 100644 tests/convtools/19_pwconv_NIS/data/shadow create mode 100755 tests/convtools/19_pwconv_NIS/pwconv.test create mode 100644 tests/convtools/20_pwunconv_usage_option/config.txt create mode 100644 tests/convtools/20_pwunconv_usage_option/config/etc/group create mode 100644 tests/convtools/20_pwunconv_usage_option/config/etc/gshadow create mode 100644 tests/convtools/20_pwunconv_usage_option/config/etc/passwd create mode 100644 tests/convtools/20_pwunconv_usage_option/config/etc/shadow create mode 100644 tests/convtools/20_pwunconv_usage_option/data/usage.out create mode 100755 tests/convtools/20_pwunconv_usage_option/pwunconv.test create mode 100644 tests/convtools/21_pwunconv_keep_passwd_password/config.txt create mode 100644 tests/convtools/21_pwunconv_keep_passwd_password/config/etc/group create mode 100644 tests/convtools/21_pwunconv_keep_passwd_password/config/etc/gshadow create mode 100644 tests/convtools/21_pwunconv_keep_passwd_password/config/etc/passwd create mode 100644 tests/convtools/21_pwunconv_keep_passwd_password/config/etc/shadow create mode 100644 tests/convtools/21_pwunconv_keep_passwd_password/data/passwd create mode 100755 tests/convtools/21_pwunconv_keep_passwd_password/pwunconv.test create mode 100644 tests/convtools/22_grpunconv_usage_option/config.txt create mode 100644 tests/convtools/22_grpunconv_usage_option/config/etc/group create mode 100644 tests/convtools/22_grpunconv_usage_option/config/etc/gshadow create mode 100644 tests/convtools/22_grpunconv_usage_option/config/etc/passwd create mode 100644 tests/convtools/22_grpunconv_usage_option/config/etc/shadow create mode 100644 tests/convtools/22_grpunconv_usage_option/data/usage.out create mode 100755 tests/convtools/22_grpunconv_usage_option/grpunconv.test create mode 100644 tests/convtools/23_grpunconv_keep_group_password/config.txt create mode 100644 tests/convtools/23_grpunconv_keep_group_password/config/etc/group create mode 100644 tests/convtools/23_grpunconv_keep_group_password/config/etc/gshadow create mode 100644 tests/convtools/23_grpunconv_keep_group_password/config/etc/passwd create mode 100644 tests/convtools/23_grpunconv_keep_group_password/config/etc/shadow create mode 100644 tests/convtools/23_grpunconv_keep_group_password/data/group create mode 100755 tests/convtools/23_grpunconv_keep_group_password/grpunconv.test create mode 100644 tests/convtools/24_grpunconv_no_gshadow_entry/config.txt create mode 100644 tests/convtools/24_grpunconv_no_gshadow_entry/config/etc/group create mode 100644 tests/convtools/24_grpunconv_no_gshadow_entry/config/etc/gshadow create mode 100644 tests/convtools/24_grpunconv_no_gshadow_entry/config/etc/passwd create mode 100644 tests/convtools/24_grpunconv_no_gshadow_entry/config/etc/shadow create mode 100644 tests/convtools/24_grpunconv_no_gshadow_entry/data/group create mode 100755 tests/convtools/24_grpunconv_no_gshadow_entry/grpunconv.test create mode 100644 tests/convtools/25_pwconv_usage_option/config.txt create mode 100644 tests/convtools/25_pwconv_usage_option/config/etc/group create mode 100644 tests/convtools/25_pwconv_usage_option/config/etc/gshadow create mode 100644 tests/convtools/25_pwconv_usage_option/config/etc/passwd create mode 100644 tests/convtools/25_pwconv_usage_option/config/etc/shadow create mode 100644 tests/convtools/25_pwconv_usage_option/data/usage.out create mode 100755 tests/convtools/25_pwconv_usage_option/pwconv.test create mode 100644 tests/convtools/26_grpconv_usage_option/config.txt create mode 100644 tests/convtools/26_grpconv_usage_option/config/etc/group create mode 100644 tests/convtools/26_grpconv_usage_option/config/etc/gshadow create mode 100644 tests/convtools/26_grpconv_usage_option/config/etc/passwd create mode 100644 tests/convtools/26_grpconv_usage_option/config/etc/shadow create mode 100644 tests/convtools/26_grpconv_usage_option/data/usage.out create mode 100755 tests/convtools/26_grpconv_usage_option/grpconv.test create mode 100644 tests/convtools/27_pwunconv_usage/config.txt create mode 100644 tests/convtools/27_pwunconv_usage/config/etc/group create mode 100644 tests/convtools/27_pwunconv_usage/config/etc/gshadow create mode 100644 tests/convtools/27_pwunconv_usage/config/etc/passwd create mode 100644 tests/convtools/27_pwunconv_usage/config/etc/shadow create mode 100644 tests/convtools/27_pwunconv_usage/data/usage.out create mode 100755 tests/convtools/27_pwunconv_usage/pwunconv.test create mode 100644 tests/convtools/28_pwunconv_usage_extra_arg/config.txt create mode 100644 tests/convtools/28_pwunconv_usage_extra_arg/config/etc/group create mode 100644 tests/convtools/28_pwunconv_usage_extra_arg/config/etc/gshadow create mode 100644 tests/convtools/28_pwunconv_usage_extra_arg/config/etc/passwd create mode 100644 tests/convtools/28_pwunconv_usage_extra_arg/config/etc/shadow create mode 100644 tests/convtools/28_pwunconv_usage_extra_arg/data/usage.out create mode 100755 tests/convtools/28_pwunconv_usage_extra_arg/pwunconv.test create mode 100644 tests/convtools/29_grpconv_usage/config.txt create mode 100644 tests/convtools/29_grpconv_usage/config/etc/group create mode 100644 tests/convtools/29_grpconv_usage/config/etc/gshadow create mode 100644 tests/convtools/29_grpconv_usage/config/etc/passwd create mode 100644 tests/convtools/29_grpconv_usage/config/etc/shadow create mode 100644 tests/convtools/29_grpconv_usage/data/usage.out create mode 100755 tests/convtools/29_grpconv_usage/grpconv.test create mode 100644 tests/convtools/30_grpconv_usage_extra_arg/config.txt create mode 100644 tests/convtools/30_grpconv_usage_extra_arg/config/etc/group create mode 100644 tests/convtools/30_grpconv_usage_extra_arg/config/etc/gshadow create mode 100644 tests/convtools/30_grpconv_usage_extra_arg/config/etc/passwd create mode 100644 tests/convtools/30_grpconv_usage_extra_arg/config/etc/shadow create mode 100644 tests/convtools/30_grpconv_usage_extra_arg/data/usage.out create mode 100755 tests/convtools/30_grpconv_usage_extra_arg/grpconv.test create mode 100644 tests/convtools/31_pwconv_usage/config.txt create mode 100644 tests/convtools/31_pwconv_usage/config/etc/group create mode 100644 tests/convtools/31_pwconv_usage/config/etc/gshadow create mode 100644 tests/convtools/31_pwconv_usage/config/etc/passwd create mode 100644 tests/convtools/31_pwconv_usage/config/etc/shadow create mode 100644 tests/convtools/31_pwconv_usage/data/usage.out create mode 100755 tests/convtools/31_pwconv_usage/pwconv.test create mode 100644 tests/convtools/32_pwconv_usage_extra_arg/config.txt create mode 100644 tests/convtools/32_pwconv_usage_extra_arg/config/etc/group create mode 100644 tests/convtools/32_pwconv_usage_extra_arg/config/etc/gshadow create mode 100644 tests/convtools/32_pwconv_usage_extra_arg/config/etc/passwd create mode 100644 tests/convtools/32_pwconv_usage_extra_arg/config/etc/shadow create mode 100644 tests/convtools/32_pwconv_usage_extra_arg/data/usage.out create mode 100755 tests/convtools/32_pwconv_usage_extra_arg/pwconv.test create mode 100644 tests/convtools/33_grpunconv_usage/config.txt create mode 100644 tests/convtools/33_grpunconv_usage/config/etc/group create mode 100644 tests/convtools/33_grpunconv_usage/config/etc/gshadow create mode 100644 tests/convtools/33_grpunconv_usage/config/etc/passwd create mode 100644 tests/convtools/33_grpunconv_usage/config/etc/shadow create mode 100644 tests/convtools/33_grpunconv_usage/data/usage.out create mode 100755 tests/convtools/33_grpunconv_usage/grpunconv.test create mode 100644 tests/convtools/34_grpunconv_usage_extra_arg/config.txt create mode 100644 tests/convtools/34_grpunconv_usage_extra_arg/config/etc/group create mode 100644 tests/convtools/34_grpunconv_usage_extra_arg/config/etc/gshadow create mode 100644 tests/convtools/34_grpunconv_usage_extra_arg/config/etc/passwd create mode 100644 tests/convtools/34_grpunconv_usage_extra_arg/config/etc/shadow create mode 100644 tests/convtools/34_grpunconv_usage_extra_arg/data/usage.out create mode 100755 tests/convtools/34_grpunconv_usage_extra_arg/grpunconv.test create mode 100755 tests/coverage.sh create mode 100644 tests/cptools/01/data/group create mode 100644 tests/cptools/01/data/group.new create mode 100644 tests/cptools/01/data/gshadow create mode 100644 tests/cptools/01/data/gshadow.new create mode 100644 tests/cptools/01/data/passwd create mode 100644 tests/cptools/01/data/passwd.new create mode 100644 tests/cptools/01/data/shadow create mode 100644 tests/cptools/01/data/shadow.new create mode 100755 tests/cptools/01/run1 create mode 100755 tests/cptools/01/run2 create mode 100755 tests/cptools/01/run3 create mode 100755 tests/cptools/01/run4 create mode 100644 tests/cptools/02_cppw_usage/config.txt create mode 100644 tests/cptools/02_cppw_usage/config/etc/group create mode 100644 tests/cptools/02_cppw_usage/config/etc/gshadow create mode 100644 tests/cptools/02_cppw_usage/config/etc/passwd create mode 100644 tests/cptools/02_cppw_usage/config/etc/shadow create mode 100755 tests/cptools/02_cppw_usage/cppw.test create mode 100644 tests/cptools/02_cppw_usage/data/usage.out create mode 100644 tests/cptools/03_cppw_usage_invalid_option/config.txt create mode 100644 tests/cptools/03_cppw_usage_invalid_option/config/etc/group create mode 100644 tests/cptools/03_cppw_usage_invalid_option/config/etc/gshadow create mode 100644 tests/cptools/03_cppw_usage_invalid_option/config/etc/passwd create mode 100644 tests/cptools/03_cppw_usage_invalid_option/config/etc/shadow create mode 100755 tests/cptools/03_cppw_usage_invalid_option/cppw.test create mode 100644 tests/cptools/03_cppw_usage_invalid_option/data/usage.out create mode 100644 tests/cptools/04_cppw_no_file_argument/config.txt create mode 100644 tests/cptools/04_cppw_no_file_argument/config/etc/group create mode 100644 tests/cptools/04_cppw_no_file_argument/config/etc/gshadow create mode 100644 tests/cptools/04_cppw_no_file_argument/config/etc/passwd create mode 100644 tests/cptools/04_cppw_no_file_argument/config/etc/shadow create mode 100755 tests/cptools/04_cppw_no_file_argument/cppw.test create mode 100644 tests/cptools/04_cppw_no_file_argument/data/usage.out create mode 100644 tests/cptools/05_cppw_2_files/config.txt create mode 100644 tests/cptools/05_cppw_2_files/config/etc/group create mode 100644 tests/cptools/05_cppw_2_files/config/etc/gshadow create mode 100644 tests/cptools/05_cppw_2_files/config/etc/passwd create mode 100644 tests/cptools/05_cppw_2_files/config/etc/shadow create mode 100755 tests/cptools/05_cppw_2_files/cppw.test create mode 100644 tests/cptools/05_cppw_2_files/data/passwd create mode 100644 tests/cptools/05_cppw_2_files/data/usage.out create mode 100644 tests/cptools/06_cppw_no_file/config.txt create mode 100644 tests/cptools/06_cppw_no_file/config/etc/group create mode 100644 tests/cptools/06_cppw_no_file/config/etc/gshadow create mode 100644 tests/cptools/06_cppw_no_file/config/etc/passwd create mode 100644 tests/cptools/06_cppw_no_file/config/etc/shadow create mode 100755 tests/cptools/06_cppw_no_file/cppw.test create mode 100644 tests/cptools/06_cppw_no_file/data/usage.out create mode 100644 tests/cptools/07_cppw_locked_passwd/config.txt create mode 100644 tests/cptools/07_cppw_locked_passwd/config/etc/group create mode 100644 tests/cptools/07_cppw_locked_passwd/config/etc/gshadow create mode 100644 tests/cptools/07_cppw_locked_passwd/config/etc/passwd create mode 100644 tests/cptools/07_cppw_locked_passwd/config/etc/shadow create mode 100755 tests/cptools/07_cppw_locked_passwd/cppw.test create mode 100644 tests/cptools/07_cppw_locked_passwd/data/passwd create mode 100644 tests/cptools/07_cppw_locked_passwd/data/usage.out create mode 100644 tests/cptools/08_cppw-p/config.txt create mode 100644 tests/cptools/08_cppw-p/config/etc/group create mode 100644 tests/cptools/08_cppw-p/config/etc/gshadow create mode 100644 tests/cptools/08_cppw-p/config/etc/passwd create mode 100644 tests/cptools/08_cppw-p/config/etc/shadow create mode 100755 tests/cptools/08_cppw-p/cppw.test create mode 100644 tests/cptools/08_cppw-p/data/passwd create mode 100644 tests/cptools/09_cppw-g/config.txt create mode 100644 tests/cptools/09_cppw-g/config/etc/group create mode 100644 tests/cptools/09_cppw-g/config/etc/gshadow create mode 100644 tests/cptools/09_cppw-g/config/etc/passwd create mode 100644 tests/cptools/09_cppw-g/config/etc/shadow create mode 100755 tests/cptools/09_cppw-g/cppw.test create mode 100644 tests/cptools/09_cppw-g/data/group create mode 100644 tests/cptools/10_cppw-g-s/config.txt create mode 100644 tests/cptools/10_cppw-g-s/config/etc/group create mode 100644 tests/cptools/10_cppw-g-s/config/etc/gshadow create mode 100644 tests/cptools/10_cppw-g-s/config/etc/passwd create mode 100644 tests/cptools/10_cppw-g-s/config/etc/shadow create mode 100755 tests/cptools/10_cppw-g-s/cppw.test create mode 100644 tests/cptools/10_cppw-g-s/data/gshadow create mode 100644 tests/cptools/11_cppw-p-s/config.txt create mode 100644 tests/cptools/11_cppw-p-s/config/etc/group create mode 100644 tests/cptools/11_cppw-p-s/config/etc/gshadow create mode 100644 tests/cptools/11_cppw-p-s/config/etc/passwd create mode 100644 tests/cptools/11_cppw-p-s/config/etc/shadow create mode 100755 tests/cptools/11_cppw-p-s/cppw.test create mode 100644 tests/cptools/11_cppw-p-s/data/shadow create mode 100644 tests/cptools/12_cppw-s_no_shadow_file/config.txt create mode 100644 tests/cptools/12_cppw-s_no_shadow_file/config/etc/group create mode 100644 tests/cptools/12_cppw-s_no_shadow_file/config/etc/gshadow create mode 100644 tests/cptools/12_cppw-s_no_shadow_file/config/etc/passwd create mode 100644 tests/cptools/12_cppw-s_no_shadow_file/config/etc/shadow create mode 100755 tests/cptools/12_cppw-s_no_shadow_file/cppw.test create mode 100644 tests/cptools/12_cppw-s_no_shadow_file/data/cppw.err create mode 100644 tests/cptools/12_cppw-s_no_shadow_file/data/shadow create mode 100755 tests/crypt/login.defs_DES-MD5_CRYPT_ENAB/01_chpasswd.test create mode 100644 tests/crypt/login.defs_DES-MD5_CRYPT_ENAB/01_chpasswd/group create mode 100644 tests/crypt/login.defs_DES-MD5_CRYPT_ENAB/01_chpasswd/gshadow create mode 100644 tests/crypt/login.defs_DES-MD5_CRYPT_ENAB/01_chpasswd/passwd create mode 100644 tests/crypt/login.defs_DES-MD5_CRYPT_ENAB/01_chpasswd/shadow create mode 100644 tests/crypt/login.defs_DES-MD5_CRYPT_ENAB/config/etc/group create mode 100644 tests/crypt/login.defs_DES-MD5_CRYPT_ENAB/config/etc/gshadow create mode 100644 tests/crypt/login.defs_DES-MD5_CRYPT_ENAB/config/etc/login.defs create mode 100644 tests/crypt/login.defs_DES-MD5_CRYPT_ENAB/config/etc/passwd create mode 100644 tests/crypt/login.defs_DES-MD5_CRYPT_ENAB/config/etc/shadow create mode 100755 tests/crypt/login.defs_DES/01_chpasswd.test create mode 100644 tests/crypt/login.defs_DES/01_chpasswd/group create mode 100644 tests/crypt/login.defs_DES/01_chpasswd/gshadow create mode 100644 tests/crypt/login.defs_DES/01_chpasswd/passwd create mode 100644 tests/crypt/login.defs_DES/01_chpasswd/shadow create mode 100755 tests/crypt/login.defs_DES/02_chpasswd--crypt-method-MD5.test create mode 100644 tests/crypt/login.defs_DES/02_chpasswd--crypt-method-MD5/group create mode 100644 tests/crypt/login.defs_DES/02_chpasswd--crypt-method-MD5/gshadow create mode 100644 tests/crypt/login.defs_DES/02_chpasswd--crypt-method-MD5/passwd create mode 100644 tests/crypt/login.defs_DES/02_chpasswd--crypt-method-MD5/passwd.new create mode 100644 tests/crypt/login.defs_DES/02_chpasswd--crypt-method-MD5/shadow create mode 100755 tests/crypt/login.defs_DES/03_chpasswd--crypt-method-DES.test create mode 100644 tests/crypt/login.defs_DES/03_chpasswd--crypt-method-DES/group create mode 100644 tests/crypt/login.defs_DES/03_chpasswd--crypt-method-DES/gshadow create mode 100644 tests/crypt/login.defs_DES/03_chpasswd--crypt-method-DES/passwd create mode 100644 tests/crypt/login.defs_DES/03_chpasswd--crypt-method-DES/shadow create mode 100755 tests/crypt/login.defs_DES/04_chpasswd--crypt-method-NONE.test create mode 100644 tests/crypt/login.defs_DES/04_chpasswd--crypt-method-NONE/group create mode 100644 tests/crypt/login.defs_DES/04_chpasswd--crypt-method-NONE/gshadow create mode 100644 tests/crypt/login.defs_DES/04_chpasswd--crypt-method-NONE/passwd create mode 100644 tests/crypt/login.defs_DES/04_chpasswd--crypt-method-NONE/shadow create mode 100755 tests/crypt/login.defs_DES/05_chpasswd-e.test create mode 100644 tests/crypt/login.defs_DES/05_chpasswd-e/group create mode 100644 tests/crypt/login.defs_DES/05_chpasswd-e/gshadow create mode 100644 tests/crypt/login.defs_DES/05_chpasswd-e/passwd create mode 100644 tests/crypt/login.defs_DES/05_chpasswd-e/shadow create mode 100755 tests/crypt/login.defs_DES/06_chpasswd-m.test create mode 100644 tests/crypt/login.defs_DES/06_chpasswd-m/group create mode 100644 tests/crypt/login.defs_DES/06_chpasswd-m/gshadow create mode 100644 tests/crypt/login.defs_DES/06_chpasswd-m/passwd create mode 100644 tests/crypt/login.defs_DES/06_chpasswd-m/shadow create mode 100755 tests/crypt/login.defs_DES/07_chgpasswd.test create mode 100644 tests/crypt/login.defs_DES/07_chgpasswd/group create mode 100644 tests/crypt/login.defs_DES/07_chgpasswd/gshadow create mode 100644 tests/crypt/login.defs_DES/07_chgpasswd/passwd create mode 100644 tests/crypt/login.defs_DES/07_chgpasswd/shadow create mode 100755 tests/crypt/login.defs_DES/08_chgpasswd--crypt-method-MD5.test create mode 100644 tests/crypt/login.defs_DES/08_chgpasswd--crypt-method-MD5/group create mode 100644 tests/crypt/login.defs_DES/08_chgpasswd--crypt-method-MD5/gshadow create mode 100644 tests/crypt/login.defs_DES/08_chgpasswd--crypt-method-MD5/passwd create mode 100644 tests/crypt/login.defs_DES/08_chgpasswd--crypt-method-MD5/shadow create mode 100755 tests/crypt/login.defs_DES/09_chgpasswd--crypt-method-DES.test create mode 100644 tests/crypt/login.defs_DES/09_chgpasswd--crypt-method-DES/group create mode 100644 tests/crypt/login.defs_DES/09_chgpasswd--crypt-method-DES/gshadow create mode 100644 tests/crypt/login.defs_DES/09_chgpasswd--crypt-method-DES/passwd create mode 100644 tests/crypt/login.defs_DES/09_chgpasswd--crypt-method-DES/shadow create mode 100755 tests/crypt/login.defs_DES/10_chgpasswd--crypt-method-NONE.test create mode 100644 tests/crypt/login.defs_DES/10_chgpasswd--crypt-method-NONE/group create mode 100644 tests/crypt/login.defs_DES/10_chgpasswd--crypt-method-NONE/gshadow create mode 100644 tests/crypt/login.defs_DES/10_chgpasswd--crypt-method-NONE/passwd create mode 100644 tests/crypt/login.defs_DES/10_chgpasswd--crypt-method-NONE/shadow create mode 100755 tests/crypt/login.defs_DES/11_chgpasswd-e.test create mode 100644 tests/crypt/login.defs_DES/11_chgpasswd-e/group create mode 100644 tests/crypt/login.defs_DES/11_chgpasswd-e/gshadow create mode 100644 tests/crypt/login.defs_DES/11_chgpasswd-e/passwd create mode 100644 tests/crypt/login.defs_DES/11_chgpasswd-e/shadow create mode 100755 tests/crypt/login.defs_DES/12_chgpasswd-m.test create mode 100644 tests/crypt/login.defs_DES/12_chgpasswd-m/group create mode 100644 tests/crypt/login.defs_DES/12_chgpasswd-m/gshadow create mode 100644 tests/crypt/login.defs_DES/12_chgpasswd-m/passwd create mode 100644 tests/crypt/login.defs_DES/12_chgpasswd-m/shadow create mode 100644 tests/crypt/login.defs_DES/config/etc/group create mode 100644 tests/crypt/login.defs_DES/config/etc/gshadow create mode 100644 tests/crypt/login.defs_DES/config/etc/login.defs create mode 100644 tests/crypt/login.defs_DES/config/etc/passwd create mode 100644 tests/crypt/login.defs_DES/config/etc/shadow create mode 100755 tests/crypt/login.defs_MD5/01_chpasswd.test create mode 100644 tests/crypt/login.defs_MD5/01_chpasswd/group create mode 100644 tests/crypt/login.defs_MD5/01_chpasswd/gshadow create mode 100644 tests/crypt/login.defs_MD5/01_chpasswd/passwd create mode 100644 tests/crypt/login.defs_MD5/01_chpasswd/shadow create mode 100755 tests/crypt/login.defs_MD5/02_chgpasswd.test create mode 100644 tests/crypt/login.defs_MD5/02_chgpasswd/group create mode 100644 tests/crypt/login.defs_MD5/02_chgpasswd/gshadow create mode 100644 tests/crypt/login.defs_MD5/02_chgpasswd/passwd create mode 100644 tests/crypt/login.defs_MD5/02_chgpasswd/shadow create mode 100644 tests/crypt/login.defs_MD5/config/etc/group create mode 100644 tests/crypt/login.defs_MD5/config/etc/gshadow create mode 100644 tests/crypt/login.defs_MD5/config/etc/login.defs create mode 100644 tests/crypt/login.defs_MD5/config/etc/passwd create mode 100644 tests/crypt/login.defs_MD5/config/etc/shadow create mode 100755 tests/crypt/login.defs_MD5_CRYPT_ENAB/01_chpasswd.test create mode 100644 tests/crypt/login.defs_MD5_CRYPT_ENAB/01_chpasswd/shadow create mode 100755 tests/crypt/login.defs_MD5_CRYPT_ENAB/02_chgpasswd.test create mode 100644 tests/crypt/login.defs_MD5_CRYPT_ENAB/02_chgpasswd/gshadow create mode 100644 tests/crypt/login.defs_MD5_CRYPT_ENAB/config/etc/group create mode 100644 tests/crypt/login.defs_MD5_CRYPT_ENAB/config/etc/gshadow create mode 100644 tests/crypt/login.defs_MD5_CRYPT_ENAB/config/etc/login.defs create mode 100644 tests/crypt/login.defs_MD5_CRYPT_ENAB/config/etc/passwd create mode 100644 tests/crypt/login.defs_MD5_CRYPT_ENAB/config/etc/shadow create mode 100755 tests/crypt/login.defs_SHA256-round-max/01_chpasswd.test create mode 100644 tests/crypt/login.defs_SHA256-round-max/01_chpasswd/shadow create mode 100755 tests/crypt/login.defs_SHA256-round-max/02_chgpasswd.test create mode 100644 tests/crypt/login.defs_SHA256-round-max/02_chgpasswd/gshadow create mode 100644 tests/crypt/login.defs_SHA256-round-max/config/etc/group create mode 100644 tests/crypt/login.defs_SHA256-round-max/config/etc/gshadow create mode 100644 tests/crypt/login.defs_SHA256-round-max/config/etc/login.defs create mode 100644 tests/crypt/login.defs_SHA256-round-max/config/etc/passwd create mode 100644 tests/crypt/login.defs_SHA256-round-max/config/etc/shadow create mode 100755 tests/crypt/login.defs_SHA256-round-min-max/01_chpasswd.test create mode 100644 tests/crypt/login.defs_SHA256-round-min-max/01_chpasswd/shadow create mode 100755 tests/crypt/login.defs_SHA256-round-min-max/02_chgpasswd.test create mode 100644 tests/crypt/login.defs_SHA256-round-min-max/02_chgpasswd/gshadow create mode 100644 tests/crypt/login.defs_SHA256-round-min-max/config/etc/group create mode 100644 tests/crypt/login.defs_SHA256-round-min-max/config/etc/gshadow create mode 100644 tests/crypt/login.defs_SHA256-round-min-max/config/etc/login.defs create mode 100644 tests/crypt/login.defs_SHA256-round-min-max/config/etc/passwd create mode 100644 tests/crypt/login.defs_SHA256-round-min-max/config/etc/shadow create mode 100755 tests/crypt/login.defs_SHA256-round-min/01_chpasswd.test create mode 100644 tests/crypt/login.defs_SHA256-round-min/01_chpasswd/shadow create mode 100755 tests/crypt/login.defs_SHA256-round-min/02_chgpasswd.test create mode 100644 tests/crypt/login.defs_SHA256-round-min/02_chgpasswd/gshadow create mode 100644 tests/crypt/login.defs_SHA256-round-min/config/etc/group create mode 100644 tests/crypt/login.defs_SHA256-round-min/config/etc/gshadow create mode 100644 tests/crypt/login.defs_SHA256-round-min/config/etc/login.defs create mode 100644 tests/crypt/login.defs_SHA256-round-min/config/etc/passwd create mode 100644 tests/crypt/login.defs_SHA256-round-min/config/etc/shadow create mode 100755 tests/crypt/login.defs_SHA256/01_chpasswd.test create mode 100644 tests/crypt/login.defs_SHA256/01_chpasswd/shadow create mode 100755 tests/crypt/login.defs_SHA256/02_chgpasswd.test create mode 100644 tests/crypt/login.defs_SHA256/02_chgpasswd/gshadow create mode 100644 tests/crypt/login.defs_SHA256/config/etc/group create mode 100644 tests/crypt/login.defs_SHA256/config/etc/gshadow create mode 100644 tests/crypt/login.defs_SHA256/config/etc/login.defs create mode 100644 tests/crypt/login.defs_SHA256/config/etc/passwd create mode 100644 tests/crypt/login.defs_SHA256/config/etc/shadow create mode 100755 tests/crypt/login.defs_SHA512/01_chpasswd.test create mode 100644 tests/crypt/login.defs_SHA512/01_chpasswd/shadow create mode 100755 tests/crypt/login.defs_SHA512/02_chgpasswd.test create mode 100644 tests/crypt/login.defs_SHA512/02_chgpasswd/gshadow create mode 100644 tests/crypt/login.defs_SHA512/config/etc/group create mode 100644 tests/crypt/login.defs_SHA512/config/etc/gshadow create mode 100644 tests/crypt/login.defs_SHA512/config/etc/login.defs create mode 100644 tests/crypt/login.defs_SHA512/config/etc/passwd create mode 100644 tests/crypt/login.defs_SHA512/config/etc/shadow create mode 100755 tests/crypt/login.defs_none/01_chpasswd.test create mode 100644 tests/crypt/login.defs_none/01_chpasswd/shadow create mode 100755 tests/crypt/login.defs_none/02_chgpasswd.test create mode 100644 tests/crypt/login.defs_none/02_chgpasswd/gshadow create mode 100644 tests/crypt/login.defs_none/config/etc/group create mode 100644 tests/crypt/login.defs_none/config/etc/gshadow create mode 100644 tests/crypt/login.defs_none/config/etc/login.defs create mode 100644 tests/crypt/login.defs_none/config/etc/passwd create mode 100644 tests/crypt/login.defs_none/config/etc/shadow create mode 100644 tests/debian/01/data/login_files create mode 100644 tests/debian/01/data/passwd_files create mode 100755 tests/debian/01/run create mode 100755 tests/debian/02/run create mode 100644 tests/expiry/01_expiry_-c_no_expiry/config/etc/group create mode 100644 tests/expiry/01_expiry_-c_no_expiry/config/etc/gshadow create mode 100644 tests/expiry/01_expiry_-c_no_expiry/config/etc/passwd create mode 100644 tests/expiry/01_expiry_-c_no_expiry/config/etc/shadow create mode 100755 tests/expiry/01_expiry_-c_no_expiry/expiry.exp create mode 100755 tests/expiry/01_expiry_-c_no_expiry/expiry.test create mode 100644 tests/expiry/02_expiry_-c_expired/config/etc/group create mode 100644 tests/expiry/02_expiry_-c_expired/config/etc/gshadow create mode 100644 tests/expiry/02_expiry_-c_expired/config/etc/passwd create mode 100644 tests/expiry/02_expiry_-c_expired/config/etc/shadow create mode 100755 tests/expiry/02_expiry_-c_expired/expiry.exp create mode 100755 tests/expiry/02_expiry_-c_expired/expiry.test create mode 100644 tests/expiry/03_expiry_-f_expired/config/etc/group create mode 100644 tests/expiry/03_expiry_-f_expired/config/etc/gshadow create mode 100644 tests/expiry/03_expiry_-f_expired/config/etc/pam.d/common-password create mode 100644 tests/expiry/03_expiry_-f_expired/config/etc/passwd create mode 100644 tests/expiry/03_expiry_-f_expired/config/etc/shadow create mode 100644 tests/expiry/03_expiry_-f_expired/data/shadow create mode 100755 tests/expiry/03_expiry_-f_expired/expiry.exp create mode 100755 tests/expiry/03_expiry_-f_expired/expiry.test create mode 100644 tests/expiry/04_expiry_no_options/config/etc/group create mode 100644 tests/expiry/04_expiry_no_options/config/etc/gshadow create mode 100644 tests/expiry/04_expiry_no_options/config/etc/passwd create mode 100644 tests/expiry/04_expiry_no_options/config/etc/shadow create mode 100644 tests/expiry/04_expiry_no_options/data/usage.out create mode 100755 tests/expiry/04_expiry_no_options/expiry.test create mode 100644 tests/expiry/05_expiry_-c_no_shadow_file/config/etc/group create mode 100644 tests/expiry/05_expiry_-c_no_shadow_file/config/etc/gshadow create mode 100644 tests/expiry/05_expiry_-c_no_shadow_file/config/etc/passwd create mode 100644 tests/expiry/05_expiry_-c_no_shadow_file/config/etc/shadow create mode 100755 tests/expiry/05_expiry_-c_no_shadow_file/expiry.exp create mode 100755 tests/expiry/05_expiry_-c_no_shadow_file/expiry.test create mode 100644 tests/expiry/06_expiry_-c_no_shadow_entry/config/etc/group create mode 100644 tests/expiry/06_expiry_-c_no_shadow_entry/config/etc/gshadow create mode 100644 tests/expiry/06_expiry_-c_no_shadow_entry/config/etc/passwd create mode 100644 tests/expiry/06_expiry_-c_no_shadow_entry/config/etc/shadow create mode 100755 tests/expiry/06_expiry_-c_no_shadow_entry/expiry.exp create mode 100755 tests/expiry/06_expiry_-c_no_shadow_entry/expiry.test create mode 100644 tests/expiry/07_expiry_-c_expired_account/config/etc/group create mode 100644 tests/expiry/07_expiry_-c_expired_account/config/etc/gshadow create mode 100644 tests/expiry/07_expiry_-c_expired_account/config/etc/passwd create mode 100644 tests/expiry/07_expiry_-c_expired_account/config/etc/shadow create mode 100755 tests/expiry/07_expiry_-c_expired_account/expiry.exp create mode 100755 tests/expiry/07_expiry_-c_expired_account/expiry.test create mode 100644 tests/expiry/08_expiry_-c_expired_max+inact/config/etc/group create mode 100644 tests/expiry/08_expiry_-c_expired_max+inact/config/etc/gshadow create mode 100644 tests/expiry/08_expiry_-c_expired_max+inact/config/etc/passwd create mode 100644 tests/expiry/08_expiry_-c_expired_max+inact/config/etc/shadow create mode 100755 tests/expiry/08_expiry_-c_expired_max+inact/expiry.exp create mode 100755 tests/expiry/08_expiry_-c_expired_max+inact/expiry.test create mode 100644 tests/expiry/09_expiry_-c_expired_not_inactive/config/etc/group create mode 100644 tests/expiry/09_expiry_-c_expired_not_inactive/config/etc/gshadow create mode 100644 tests/expiry/09_expiry_-c_expired_not_inactive/config/etc/passwd create mode 100644 tests/expiry/09_expiry_-c_expired_not_inactive/config/etc/shadow create mode 100755 tests/expiry/09_expiry_-c_expired_not_inactive/expiry.exp create mode 100755 tests/expiry/09_expiry_-c_expired_not_inactive/expiry.test create mode 100644 tests/expiry/10_expiry_bad_option/config/etc/group create mode 100644 tests/expiry/10_expiry_bad_option/config/etc/gshadow create mode 100644 tests/expiry/10_expiry_bad_option/config/etc/passwd create mode 100644 tests/expiry/10_expiry_bad_option/config/etc/shadow create mode 100644 tests/expiry/10_expiry_bad_option/data/usage.out create mode 100755 tests/expiry/10_expiry_bad_option/expiry.test create mode 100644 tests/expiry/11_expiry_usage/config/etc/group create mode 100644 tests/expiry/11_expiry_usage/config/etc/gshadow create mode 100644 tests/expiry/11_expiry_usage/config/etc/passwd create mode 100644 tests/expiry/11_expiry_usage/config/etc/shadow create mode 100644 tests/expiry/11_expiry_usage/data/usage.out create mode 100755 tests/expiry/11_expiry_usage/expiry.test create mode 100644 tests/expiry/12_expiry_extra_arg/config/etc/group create mode 100644 tests/expiry/12_expiry_extra_arg/config/etc/gshadow create mode 100644 tests/expiry/12_expiry_extra_arg/config/etc/passwd create mode 100644 tests/expiry/12_expiry_extra_arg/config/etc/shadow create mode 100644 tests/expiry/12_expiry_extra_arg/data/usage.out create mode 100755 tests/expiry/12_expiry_extra_arg/expiry.test create mode 100644 tests/expiry/13_expiry_usage-c-f/config/etc/group create mode 100644 tests/expiry/13_expiry_usage-c-f/config/etc/gshadow create mode 100644 tests/expiry/13_expiry_usage-c-f/config/etc/passwd create mode 100644 tests/expiry/13_expiry_usage-c-f/config/etc/shadow create mode 100644 tests/expiry/13_expiry_usage-c-f/data/usage.out create mode 100755 tests/expiry/13_expiry_usage-c-f/expiry.test create mode 100755 tests/failures/chage/01_chage_openRW_passwd_failure/chage.test create mode 100644 tests/failures/chage/01_chage_openRW_passwd_failure/config.txt create mode 100644 tests/failures/chage/01_chage_openRW_passwd_failure/config/etc/group create mode 100644 tests/failures/chage/01_chage_openRW_passwd_failure/config/etc/gshadow create mode 100644 tests/failures/chage/01_chage_openRW_passwd_failure/config/etc/login.defs create mode 100644 tests/failures/chage/01_chage_openRW_passwd_failure/config/etc/passwd create mode 100644 tests/failures/chage/01_chage_openRW_passwd_failure/config/etc/shadow create mode 100644 tests/failures/chage/01_chage_openRW_passwd_failure/data/chage.err create mode 100755 tests/failures/chage/02_chage_openRO_passwd_failure/chage.test create mode 100644 tests/failures/chage/02_chage_openRO_passwd_failure/config.txt create mode 100644 tests/failures/chage/02_chage_openRO_passwd_failure/config/etc/group create mode 100644 tests/failures/chage/02_chage_openRO_passwd_failure/config/etc/gshadow create mode 100644 tests/failures/chage/02_chage_openRO_passwd_failure/config/etc/login.defs create mode 100644 tests/failures/chage/02_chage_openRO_passwd_failure/config/etc/passwd create mode 100644 tests/failures/chage/02_chage_openRO_passwd_failure/config/etc/shadow create mode 100644 tests/failures/chage/02_chage_openRO_passwd_failure/data/chage.err create mode 100755 tests/failures/chage/03_chage_openRW_shadow_failure/chage.test create mode 100644 tests/failures/chage/03_chage_openRW_shadow_failure/config.txt create mode 100644 tests/failures/chage/03_chage_openRW_shadow_failure/config/etc/group create mode 100644 tests/failures/chage/03_chage_openRW_shadow_failure/config/etc/gshadow create mode 100644 tests/failures/chage/03_chage_openRW_shadow_failure/config/etc/login.defs create mode 100644 tests/failures/chage/03_chage_openRW_shadow_failure/config/etc/passwd create mode 100644 tests/failures/chage/03_chage_openRW_shadow_failure/config/etc/shadow create mode 100644 tests/failures/chage/03_chage_openRW_shadow_failure/data/chage.err create mode 100755 tests/failures/chage/04_chage_openRO_shadow_failure/chage.test create mode 100644 tests/failures/chage/04_chage_openRO_shadow_failure/config.txt create mode 100644 tests/failures/chage/04_chage_openRO_shadow_failure/config/etc/group create mode 100644 tests/failures/chage/04_chage_openRO_shadow_failure/config/etc/gshadow create mode 100644 tests/failures/chage/04_chage_openRO_shadow_failure/config/etc/login.defs create mode 100644 tests/failures/chage/04_chage_openRO_shadow_failure/config/etc/passwd create mode 100644 tests/failures/chage/04_chage_openRO_shadow_failure/config/etc/shadow create mode 100644 tests/failures/chage/04_chage_openRO_shadow_failure/data/chage.err create mode 100755 tests/failures/chage/05_chage_rename_shadow_failure/chage.test create mode 100644 tests/failures/chage/05_chage_rename_shadow_failure/config.txt create mode 100644 tests/failures/chage/05_chage_rename_shadow_failure/config/etc/group create mode 100644 tests/failures/chage/05_chage_rename_shadow_failure/config/etc/gshadow create mode 100644 tests/failures/chage/05_chage_rename_shadow_failure/config/etc/login.defs create mode 100644 tests/failures/chage/05_chage_rename_shadow_failure/config/etc/passwd create mode 100644 tests/failures/chage/05_chage_rename_shadow_failure/config/etc/shadow create mode 100644 tests/failures/chage/05_chage_rename_shadow_failure/data/chage.err create mode 100755 tests/failures/chage/06_chage_rename_passwd_failure/chage.test create mode 100644 tests/failures/chage/06_chage_rename_passwd_failure/config.txt create mode 100644 tests/failures/chage/06_chage_rename_passwd_failure/config/etc/group create mode 100644 tests/failures/chage/06_chage_rename_passwd_failure/config/etc/gshadow create mode 100644 tests/failures/chage/06_chage_rename_passwd_failure/config/etc/login.defs create mode 100644 tests/failures/chage/06_chage_rename_passwd_failure/config/etc/passwd create mode 100644 tests/failures/chage/06_chage_rename_passwd_failure/config/etc/shadow create mode 100644 tests/failures/chage/06_chage_rename_passwd_failure/data/chage.err create mode 100644 tests/failures/chage/06_chage_rename_passwd_failure/data/shadow create mode 100755 tests/failures/chgpasswd/01_chgpasswd-e_open_group_failure/chgpasswd.test create mode 100644 tests/failures/chgpasswd/01_chgpasswd-e_open_group_failure/config.txt create mode 100644 tests/failures/chgpasswd/01_chgpasswd-e_open_group_failure/config/etc/group create mode 100644 tests/failures/chgpasswd/01_chgpasswd-e_open_group_failure/config/etc/gshadow create mode 100644 tests/failures/chgpasswd/01_chgpasswd-e_open_group_failure/config/etc/login.defs create mode 100644 tests/failures/chgpasswd/01_chgpasswd-e_open_group_failure/config/etc/passwd create mode 100644 tests/failures/chgpasswd/01_chgpasswd-e_open_group_failure/config/etc/shadow create mode 100644 tests/failures/chgpasswd/01_chgpasswd-e_open_group_failure/data/chgpasswd.err create mode 100755 tests/failures/chgpasswd/02_chgpasswd-e_open_gshadow_failure/chgpasswd.test create mode 100644 tests/failures/chgpasswd/02_chgpasswd-e_open_gshadow_failure/config.txt create mode 100644 tests/failures/chgpasswd/02_chgpasswd-e_open_gshadow_failure/config/etc/group create mode 100644 tests/failures/chgpasswd/02_chgpasswd-e_open_gshadow_failure/config/etc/gshadow create mode 100644 tests/failures/chgpasswd/02_chgpasswd-e_open_gshadow_failure/config/etc/login.defs create mode 100644 tests/failures/chgpasswd/02_chgpasswd-e_open_gshadow_failure/config/etc/passwd create mode 100644 tests/failures/chgpasswd/02_chgpasswd-e_open_gshadow_failure/config/etc/shadow create mode 100644 tests/failures/chgpasswd/02_chgpasswd-e_open_gshadow_failure/data/chgpasswd.err create mode 100755 tests/failures/chgpasswd/03_chgpasswd-e_rename_group_failure/chgpasswd.test create mode 100644 tests/failures/chgpasswd/03_chgpasswd-e_rename_group_failure/config.txt create mode 100644 tests/failures/chgpasswd/03_chgpasswd-e_rename_group_failure/config/etc/group create mode 100644 tests/failures/chgpasswd/03_chgpasswd-e_rename_group_failure/config/etc/gshadow create mode 100644 tests/failures/chgpasswd/03_chgpasswd-e_rename_group_failure/config/etc/login.defs create mode 100644 tests/failures/chgpasswd/03_chgpasswd-e_rename_group_failure/config/etc/passwd create mode 100644 tests/failures/chgpasswd/03_chgpasswd-e_rename_group_failure/config/etc/shadow create mode 100644 tests/failures/chgpasswd/03_chgpasswd-e_rename_group_failure/data/chgpasswd.err create mode 100644 tests/failures/chgpasswd/03_chgpasswd-e_rename_group_failure/data/gshadow create mode 100755 tests/failures/chgpasswd/04_chgpasswd-e_rename_gshadow_failure/chgpasswd.test create mode 100644 tests/failures/chgpasswd/04_chgpasswd-e_rename_gshadow_failure/config.txt create mode 100644 tests/failures/chgpasswd/04_chgpasswd-e_rename_gshadow_failure/config/etc/group create mode 100644 tests/failures/chgpasswd/04_chgpasswd-e_rename_gshadow_failure/config/etc/gshadow create mode 100644 tests/failures/chgpasswd/04_chgpasswd-e_rename_gshadow_failure/config/etc/login.defs create mode 100644 tests/failures/chgpasswd/04_chgpasswd-e_rename_gshadow_failure/config/etc/passwd create mode 100644 tests/failures/chgpasswd/04_chgpasswd-e_rename_gshadow_failure/config/etc/shadow create mode 100644 tests/failures/chgpasswd/04_chgpasswd-e_rename_gshadow_failure/data/chgpasswd.err create mode 100755 tests/failures/chpasswd-PAM/01_chpasswd-e_open_passwd_failure/chpasswd.test create mode 100644 tests/failures/chpasswd-PAM/01_chpasswd-e_open_passwd_failure/config.txt create mode 100644 tests/failures/chpasswd-PAM/01_chpasswd-e_open_passwd_failure/config/etc/group create mode 100644 tests/failures/chpasswd-PAM/01_chpasswd-e_open_passwd_failure/config/etc/gshadow create mode 100644 tests/failures/chpasswd-PAM/01_chpasswd-e_open_passwd_failure/config/etc/login.defs create mode 100644 tests/failures/chpasswd-PAM/01_chpasswd-e_open_passwd_failure/config/etc/passwd create mode 100644 tests/failures/chpasswd-PAM/01_chpasswd-e_open_passwd_failure/config/etc/shadow create mode 100644 tests/failures/chpasswd-PAM/01_chpasswd-e_open_passwd_failure/data/chpasswd.err create mode 100755 tests/failures/chpasswd-PAM/02_chpasswd-e_open_shadow_failure/chpasswd.test create mode 100644 tests/failures/chpasswd-PAM/02_chpasswd-e_open_shadow_failure/config.txt create mode 100644 tests/failures/chpasswd-PAM/02_chpasswd-e_open_shadow_failure/config/etc/group create mode 100644 tests/failures/chpasswd-PAM/02_chpasswd-e_open_shadow_failure/config/etc/gshadow create mode 100644 tests/failures/chpasswd-PAM/02_chpasswd-e_open_shadow_failure/config/etc/login.defs create mode 100644 tests/failures/chpasswd-PAM/02_chpasswd-e_open_shadow_failure/config/etc/passwd create mode 100644 tests/failures/chpasswd-PAM/02_chpasswd-e_open_shadow_failure/config/etc/shadow create mode 100644 tests/failures/chpasswd-PAM/02_chpasswd-e_open_shadow_failure/data/chpasswd.err create mode 100755 tests/failures/chpasswd-PAM/03_chpasswd-e_rename_passwd_failure/chpasswd.test create mode 100644 tests/failures/chpasswd-PAM/03_chpasswd-e_rename_passwd_failure/config.txt create mode 100644 tests/failures/chpasswd-PAM/03_chpasswd-e_rename_passwd_failure/config/etc/group create mode 100644 tests/failures/chpasswd-PAM/03_chpasswd-e_rename_passwd_failure/config/etc/gshadow create mode 100644 tests/failures/chpasswd-PAM/03_chpasswd-e_rename_passwd_failure/config/etc/login.defs create mode 100644 tests/failures/chpasswd-PAM/03_chpasswd-e_rename_passwd_failure/config/etc/passwd create mode 100644 tests/failures/chpasswd-PAM/03_chpasswd-e_rename_passwd_failure/config/etc/shadow create mode 100644 tests/failures/chpasswd-PAM/03_chpasswd-e_rename_passwd_failure/data/chpasswd.err create mode 100644 tests/failures/chpasswd-PAM/03_chpasswd-e_rename_passwd_failure/data/shadow create mode 100755 tests/failures/chpasswd-PAM/04_chpasswd-e_rename_shadow_failure/chpasswd.test create mode 100644 tests/failures/chpasswd-PAM/04_chpasswd-e_rename_shadow_failure/config.txt create mode 100644 tests/failures/chpasswd-PAM/04_chpasswd-e_rename_shadow_failure/config/etc/group create mode 100644 tests/failures/chpasswd-PAM/04_chpasswd-e_rename_shadow_failure/config/etc/gshadow create mode 100644 tests/failures/chpasswd-PAM/04_chpasswd-e_rename_shadow_failure/config/etc/login.defs create mode 100644 tests/failures/chpasswd-PAM/04_chpasswd-e_rename_shadow_failure/config/etc/passwd create mode 100644 tests/failures/chpasswd-PAM/04_chpasswd-e_rename_shadow_failure/config/etc/shadow create mode 100644 tests/failures/chpasswd-PAM/04_chpasswd-e_rename_shadow_failure/data/chpasswd.err create mode 100755 tests/failures/chpasswd-PAM/05_chpasswd-e_time_0/chpasswd.test create mode 100644 tests/failures/chpasswd-PAM/05_chpasswd-e_time_0/config.txt create mode 100644 tests/failures/chpasswd-PAM/05_chpasswd-e_time_0/config/etc/group create mode 100644 tests/failures/chpasswd-PAM/05_chpasswd-e_time_0/config/etc/gshadow create mode 100644 tests/failures/chpasswd-PAM/05_chpasswd-e_time_0/config/etc/passwd create mode 100644 tests/failures/chpasswd-PAM/05_chpasswd-e_time_0/config/etc/shadow create mode 100644 tests/failures/chpasswd-PAM/05_chpasswd-e_time_0/data/shadow create mode 100755 tests/failures/chsh/01_chsh_open_passwd_failure/chsh.test create mode 100644 tests/failures/chsh/01_chsh_open_passwd_failure/config.txt create mode 100644 tests/failures/chsh/01_chsh_open_passwd_failure/config/etc/group create mode 100644 tests/failures/chsh/01_chsh_open_passwd_failure/config/etc/gshadow create mode 100644 tests/failures/chsh/01_chsh_open_passwd_failure/config/etc/login.defs create mode 100644 tests/failures/chsh/01_chsh_open_passwd_failure/config/etc/passwd create mode 100644 tests/failures/chsh/01_chsh_open_passwd_failure/config/etc/shadow create mode 100644 tests/failures/chsh/01_chsh_open_passwd_failure/data/chsh.err create mode 100755 tests/failures/chsh/02_chsh_rename_passwd_failure/chsh.test create mode 100644 tests/failures/chsh/02_chsh_rename_passwd_failure/config.txt create mode 100644 tests/failures/chsh/02_chsh_rename_passwd_failure/config/etc/group create mode 100644 tests/failures/chsh/02_chsh_rename_passwd_failure/config/etc/gshadow create mode 100644 tests/failures/chsh/02_chsh_rename_passwd_failure/config/etc/login.defs create mode 100644 tests/failures/chsh/02_chsh_rename_passwd_failure/config/etc/passwd create mode 100644 tests/failures/chsh/02_chsh_rename_passwd_failure/config/etc/shadow create mode 100644 tests/failures/chsh/02_chsh_rename_passwd_failure/data/chsh.err create mode 100644 tests/failures/chsh/02_chsh_rename_passwd_failure/data/shadow create mode 100644 tests/failures/cppw/01_cppw_open_passwd_in_failure/config.txt create mode 100644 tests/failures/cppw/01_cppw_open_passwd_in_failure/config/etc/group create mode 100644 tests/failures/cppw/01_cppw_open_passwd_in_failure/config/etc/gshadow create mode 100644 tests/failures/cppw/01_cppw_open_passwd_in_failure/config/etc/login.defs create mode 100644 tests/failures/cppw/01_cppw_open_passwd_in_failure/config/etc/passwd create mode 100644 tests/failures/cppw/01_cppw_open_passwd_in_failure/config/etc/shadow create mode 100755 tests/failures/cppw/01_cppw_open_passwd_in_failure/cppw.test create mode 100644 tests/failures/cppw/01_cppw_open_passwd_in_failure/data/cppw.err create mode 100644 tests/failures/cppw/01_cppw_open_passwd_in_failure/data/passwd create mode 100644 tests/failures/cppw/02_cppw_open_passwd_backup_failure/config.txt create mode 100644 tests/failures/cppw/02_cppw_open_passwd_backup_failure/config/etc/group create mode 100644 tests/failures/cppw/02_cppw_open_passwd_backup_failure/config/etc/gshadow create mode 100644 tests/failures/cppw/02_cppw_open_passwd_backup_failure/config/etc/login.defs create mode 100644 tests/failures/cppw/02_cppw_open_passwd_backup_failure/config/etc/passwd create mode 100644 tests/failures/cppw/02_cppw_open_passwd_backup_failure/config/etc/shadow create mode 100755 tests/failures/cppw/02_cppw_open_passwd_backup_failure/cppw.test create mode 100644 tests/failures/cppw/02_cppw_open_passwd_backup_failure/data/cppw.err create mode 100644 tests/failures/cppw/02_cppw_open_passwd_backup_failure/data/passwd create mode 100644 tests/failures/cppw/03_cppw_rename_passwd_failure/config.txt create mode 100644 tests/failures/cppw/03_cppw_rename_passwd_failure/config/etc/group create mode 100644 tests/failures/cppw/03_cppw_rename_passwd_failure/config/etc/gshadow create mode 100644 tests/failures/cppw/03_cppw_rename_passwd_failure/config/etc/login.defs create mode 100644 tests/failures/cppw/03_cppw_rename_passwd_failure/config/etc/passwd create mode 100644 tests/failures/cppw/03_cppw_rename_passwd_failure/config/etc/shadow create mode 100755 tests/failures/cppw/03_cppw_rename_passwd_failure/cppw.test create mode 100644 tests/failures/cppw/03_cppw_rename_passwd_failure/data/cppw.err create mode 100644 tests/failures/cppw/03_cppw_rename_passwd_failure/data/passwd create mode 100644 tests/failures/gpasswd/01_gpasswd_group_open_failure/config.txt create mode 100644 tests/failures/gpasswd/01_gpasswd_group_open_failure/config/etc/group create mode 100644 tests/failures/gpasswd/01_gpasswd_group_open_failure/config/etc/gshadow create mode 100644 tests/failures/gpasswd/01_gpasswd_group_open_failure/config/etc/login.defs create mode 100644 tests/failures/gpasswd/01_gpasswd_group_open_failure/config/etc/passwd create mode 100644 tests/failures/gpasswd/01_gpasswd_group_open_failure/config/etc/shadow create mode 100644 tests/failures/gpasswd/01_gpasswd_group_open_failure/data/gpasswd.err create mode 100755 tests/failures/gpasswd/01_gpasswd_group_open_failure/gpasswd.test create mode 100644 tests/failures/gpasswd/02_gpasswd_gshadow_open_failure/config.txt create mode 100644 tests/failures/gpasswd/02_gpasswd_gshadow_open_failure/config/etc/group create mode 100644 tests/failures/gpasswd/02_gpasswd_gshadow_open_failure/config/etc/gshadow create mode 100644 tests/failures/gpasswd/02_gpasswd_gshadow_open_failure/config/etc/login.defs create mode 100644 tests/failures/gpasswd/02_gpasswd_gshadow_open_failure/config/etc/passwd create mode 100644 tests/failures/gpasswd/02_gpasswd_gshadow_open_failure/config/etc/shadow create mode 100644 tests/failures/gpasswd/02_gpasswd_gshadow_open_failure/data/gpasswd.err create mode 100755 tests/failures/gpasswd/02_gpasswd_gshadow_open_failure/gpasswd.test create mode 100644 tests/failures/gpasswd/03_gpasswd-a_group_open_failure/config.txt create mode 100644 tests/failures/gpasswd/03_gpasswd-a_group_open_failure/config/etc/group create mode 100644 tests/failures/gpasswd/03_gpasswd-a_group_open_failure/config/etc/gshadow create mode 100644 tests/failures/gpasswd/03_gpasswd-a_group_open_failure/config/etc/login.defs create mode 100644 tests/failures/gpasswd/03_gpasswd-a_group_open_failure/config/etc/passwd create mode 100644 tests/failures/gpasswd/03_gpasswd-a_group_open_failure/config/etc/shadow create mode 100644 tests/failures/gpasswd/03_gpasswd-a_group_open_failure/data/gpasswd.err create mode 100755 tests/failures/gpasswd/03_gpasswd-a_group_open_failure/gpasswd.test create mode 100644 tests/failures/gpasswd/04_gpasswd-d_group_open_failure/config.txt create mode 100644 tests/failures/gpasswd/04_gpasswd-d_group_open_failure/config/etc/group create mode 100644 tests/failures/gpasswd/04_gpasswd-d_group_open_failure/config/etc/gshadow create mode 100644 tests/failures/gpasswd/04_gpasswd-d_group_open_failure/config/etc/login.defs create mode 100644 tests/failures/gpasswd/04_gpasswd-d_group_open_failure/config/etc/passwd create mode 100644 tests/failures/gpasswd/04_gpasswd-d_group_open_failure/config/etc/shadow create mode 100644 tests/failures/gpasswd/04_gpasswd-d_group_open_failure/data/gpasswd.err create mode 100755 tests/failures/gpasswd/04_gpasswd-d_group_open_failure/gpasswd.test create mode 100644 tests/failures/gpasswd/05_gpasswd-r_group_open_failure/config.txt create mode 100644 tests/failures/gpasswd/05_gpasswd-r_group_open_failure/config/etc/group create mode 100644 tests/failures/gpasswd/05_gpasswd-r_group_open_failure/config/etc/gshadow create mode 100644 tests/failures/gpasswd/05_gpasswd-r_group_open_failure/config/etc/login.defs create mode 100644 tests/failures/gpasswd/05_gpasswd-r_group_open_failure/config/etc/passwd create mode 100644 tests/failures/gpasswd/05_gpasswd-r_group_open_failure/config/etc/shadow create mode 100644 tests/failures/gpasswd/05_gpasswd-r_group_open_failure/data/gpasswd.err create mode 100755 tests/failures/gpasswd/05_gpasswd-r_group_open_failure/gpasswd.test create mode 100644 tests/failures/gpasswd/06_gpasswd-R_gshadow_open_failure/config.txt create mode 100644 tests/failures/gpasswd/06_gpasswd-R_gshadow_open_failure/config/etc/group create mode 100644 tests/failures/gpasswd/06_gpasswd-R_gshadow_open_failure/config/etc/gshadow create mode 100644 tests/failures/gpasswd/06_gpasswd-R_gshadow_open_failure/config/etc/login.defs create mode 100644 tests/failures/gpasswd/06_gpasswd-R_gshadow_open_failure/config/etc/passwd create mode 100644 tests/failures/gpasswd/06_gpasswd-R_gshadow_open_failure/config/etc/shadow create mode 100644 tests/failures/gpasswd/06_gpasswd-R_gshadow_open_failure/data/gpasswd.err create mode 100755 tests/failures/gpasswd/06_gpasswd-R_gshadow_open_failure/gpasswd.test create mode 100644 tests/failures/gpasswd/07_gpasswd-A_gshadow_open_failure/config.txt create mode 100644 tests/failures/gpasswd/07_gpasswd-A_gshadow_open_failure/config/etc/group create mode 100644 tests/failures/gpasswd/07_gpasswd-A_gshadow_open_failure/config/etc/gshadow create mode 100644 tests/failures/gpasswd/07_gpasswd-A_gshadow_open_failure/config/etc/login.defs create mode 100644 tests/failures/gpasswd/07_gpasswd-A_gshadow_open_failure/config/etc/passwd create mode 100644 tests/failures/gpasswd/07_gpasswd-A_gshadow_open_failure/config/etc/shadow create mode 100644 tests/failures/gpasswd/07_gpasswd-A_gshadow_open_failure/data/gpasswd.err create mode 100755 tests/failures/gpasswd/07_gpasswd-A_gshadow_open_failure/gpasswd.test create mode 100644 tests/failures/gpasswd/08_gpasswd_group_openRO_failure/config.txt create mode 100644 tests/failures/gpasswd/08_gpasswd_group_openRO_failure/config/etc/group create mode 100644 tests/failures/gpasswd/08_gpasswd_group_openRO_failure/config/etc/gshadow create mode 100644 tests/failures/gpasswd/08_gpasswd_group_openRO_failure/config/etc/login.defs create mode 100644 tests/failures/gpasswd/08_gpasswd_group_openRO_failure/config/etc/passwd create mode 100644 tests/failures/gpasswd/08_gpasswd_group_openRO_failure/config/etc/shadow create mode 100644 tests/failures/gpasswd/08_gpasswd_group_openRO_failure/data/gpasswd.err create mode 100755 tests/failures/gpasswd/08_gpasswd_group_openRO_failure/gpasswd.test create mode 100644 tests/failures/gpasswd/09_gpasswd_gshadow_openRO_failure/config.txt create mode 100644 tests/failures/gpasswd/09_gpasswd_gshadow_openRO_failure/config/etc/group create mode 100644 tests/failures/gpasswd/09_gpasswd_gshadow_openRO_failure/config/etc/gshadow create mode 100644 tests/failures/gpasswd/09_gpasswd_gshadow_openRO_failure/config/etc/login.defs create mode 100644 tests/failures/gpasswd/09_gpasswd_gshadow_openRO_failure/config/etc/passwd create mode 100644 tests/failures/gpasswd/09_gpasswd_gshadow_openRO_failure/config/etc/shadow create mode 100644 tests/failures/gpasswd/09_gpasswd_gshadow_openRO_failure/data/gpasswd.err create mode 100755 tests/failures/gpasswd/09_gpasswd_gshadow_openRO_failure/gpasswd.test create mode 100644 tests/failures/gpasswd/10_gpasswd_group_rename_failure/config.txt create mode 100644 tests/failures/gpasswd/10_gpasswd_group_rename_failure/config/etc/group create mode 100644 tests/failures/gpasswd/10_gpasswd_group_rename_failure/config/etc/gshadow create mode 100644 tests/failures/gpasswd/10_gpasswd_group_rename_failure/config/etc/login.defs create mode 100644 tests/failures/gpasswd/10_gpasswd_group_rename_failure/config/etc/passwd create mode 100644 tests/failures/gpasswd/10_gpasswd_group_rename_failure/config/etc/shadow create mode 100644 tests/failures/gpasswd/10_gpasswd_group_rename_failure/data/gpasswd.err create mode 100755 tests/failures/gpasswd/10_gpasswd_group_rename_failure/gpasswd.test create mode 100644 tests/failures/gpasswd/11_gpasswd_gshadow_rename_failure/config.txt create mode 100644 tests/failures/gpasswd/11_gpasswd_gshadow_rename_failure/config/etc/group create mode 100644 tests/failures/gpasswd/11_gpasswd_gshadow_rename_failure/config/etc/gshadow create mode 100644 tests/failures/gpasswd/11_gpasswd_gshadow_rename_failure/config/etc/login.defs create mode 100644 tests/failures/gpasswd/11_gpasswd_gshadow_rename_failure/config/etc/passwd create mode 100644 tests/failures/gpasswd/11_gpasswd_gshadow_rename_failure/config/etc/shadow create mode 100644 tests/failures/gpasswd/11_gpasswd_gshadow_rename_failure/data/gpasswd.err create mode 100644 tests/failures/gpasswd/11_gpasswd_gshadow_rename_failure/data/group create mode 100755 tests/failures/gpasswd/11_gpasswd_gshadow_rename_failure/gpasswd.test create mode 100644 tests/failures/groupadd/01_groupadd_gshadow_rename_failure/config.txt create mode 100644 tests/failures/groupadd/01_groupadd_gshadow_rename_failure/config/etc/default/useradd create mode 100644 tests/failures/groupadd/01_groupadd_gshadow_rename_failure/config/etc/group create mode 100644 tests/failures/groupadd/01_groupadd_gshadow_rename_failure/config/etc/gshadow create mode 100644 tests/failures/groupadd/01_groupadd_gshadow_rename_failure/config/etc/login.defs create mode 100644 tests/failures/groupadd/01_groupadd_gshadow_rename_failure/config/etc/passwd create mode 100644 tests/failures/groupadd/01_groupadd_gshadow_rename_failure/config/etc/shadow create mode 100644 tests/failures/groupadd/01_groupadd_gshadow_rename_failure/data/group create mode 100644 tests/failures/groupadd/01_groupadd_gshadow_rename_failure/data/groupadd.err create mode 100755 tests/failures/groupadd/01_groupadd_gshadow_rename_failure/groupadd.test create mode 100644 tests/failures/groupadd/02_groupadd_group_rename_failure/config.txt create mode 100644 tests/failures/groupadd/02_groupadd_group_rename_failure/config/etc/default/useradd create mode 100644 tests/failures/groupadd/02_groupadd_group_rename_failure/config/etc/group create mode 100644 tests/failures/groupadd/02_groupadd_group_rename_failure/config/etc/gshadow create mode 100644 tests/failures/groupadd/02_groupadd_group_rename_failure/config/etc/login.defs create mode 100644 tests/failures/groupadd/02_groupadd_group_rename_failure/config/etc/passwd create mode 100644 tests/failures/groupadd/02_groupadd_group_rename_failure/config/etc/shadow create mode 100644 tests/failures/groupadd/02_groupadd_group_rename_failure/data/groupadd.err create mode 100755 tests/failures/groupadd/02_groupadd_group_rename_failure/groupadd.test create mode 100644 tests/failures/groupadd/03_groupadd_gshadow_open_failure/config.txt create mode 100644 tests/failures/groupadd/03_groupadd_gshadow_open_failure/config/etc/default/useradd create mode 100644 tests/failures/groupadd/03_groupadd_gshadow_open_failure/config/etc/group create mode 100644 tests/failures/groupadd/03_groupadd_gshadow_open_failure/config/etc/gshadow create mode 100644 tests/failures/groupadd/03_groupadd_gshadow_open_failure/config/etc/login.defs create mode 100644 tests/failures/groupadd/03_groupadd_gshadow_open_failure/config/etc/passwd create mode 100644 tests/failures/groupadd/03_groupadd_gshadow_open_failure/config/etc/shadow create mode 100644 tests/failures/groupadd/03_groupadd_gshadow_open_failure/data/groupadd.err create mode 100755 tests/failures/groupadd/03_groupadd_gshadow_open_failure/groupadd.test create mode 100644 tests/failures/groupadd/04_groupadd_group_open_failure/config.txt create mode 100644 tests/failures/groupadd/04_groupadd_group_open_failure/config/etc/default/useradd create mode 100644 tests/failures/groupadd/04_groupadd_group_open_failure/config/etc/group create mode 100644 tests/failures/groupadd/04_groupadd_group_open_failure/config/etc/gshadow create mode 100644 tests/failures/groupadd/04_groupadd_group_open_failure/config/etc/login.defs create mode 100644 tests/failures/groupadd/04_groupadd_group_open_failure/config/etc/passwd create mode 100644 tests/failures/groupadd/04_groupadd_group_open_failure/config/etc/shadow create mode 100644 tests/failures/groupadd/04_groupadd_group_open_failure/data/groupadd.err create mode 100755 tests/failures/groupadd/04_groupadd_group_open_failure/groupadd.test create mode 100644 tests/failures/groupdel/01_groupdel_gshadow_rename_failure/config.txt create mode 100644 tests/failures/groupdel/01_groupdel_gshadow_rename_failure/config/etc/default/useradd create mode 100644 tests/failures/groupdel/01_groupdel_gshadow_rename_failure/config/etc/group create mode 100644 tests/failures/groupdel/01_groupdel_gshadow_rename_failure/config/etc/gshadow create mode 100644 tests/failures/groupdel/01_groupdel_gshadow_rename_failure/config/etc/login.defs create mode 100644 tests/failures/groupdel/01_groupdel_gshadow_rename_failure/config/etc/passwd create mode 100644 tests/failures/groupdel/01_groupdel_gshadow_rename_failure/config/etc/shadow create mode 100644 tests/failures/groupdel/01_groupdel_gshadow_rename_failure/data/group create mode 100644 tests/failures/groupdel/01_groupdel_gshadow_rename_failure/data/groupdel.err create mode 100755 tests/failures/groupdel/01_groupdel_gshadow_rename_failure/groupdel.test create mode 100644 tests/failures/groupdel/02_groupdel_group_rename_failure/config.txt create mode 100644 tests/failures/groupdel/02_groupdel_group_rename_failure/config/etc/default/useradd create mode 100644 tests/failures/groupdel/02_groupdel_group_rename_failure/config/etc/group create mode 100644 tests/failures/groupdel/02_groupdel_group_rename_failure/config/etc/gshadow create mode 100644 tests/failures/groupdel/02_groupdel_group_rename_failure/config/etc/login.defs create mode 100644 tests/failures/groupdel/02_groupdel_group_rename_failure/config/etc/passwd create mode 100644 tests/failures/groupdel/02_groupdel_group_rename_failure/config/etc/shadow create mode 100644 tests/failures/groupdel/02_groupdel_group_rename_failure/data/groupdel.err create mode 100755 tests/failures/groupdel/02_groupdel_group_rename_failure/groupdel.test create mode 100644 tests/failures/groupdel/03_groupdel_gshadow_open_failure/config.txt create mode 100644 tests/failures/groupdel/03_groupdel_gshadow_open_failure/config/etc/default/useradd create mode 100644 tests/failures/groupdel/03_groupdel_gshadow_open_failure/config/etc/group create mode 100644 tests/failures/groupdel/03_groupdel_gshadow_open_failure/config/etc/gshadow create mode 100644 tests/failures/groupdel/03_groupdel_gshadow_open_failure/config/etc/login.defs create mode 100644 tests/failures/groupdel/03_groupdel_gshadow_open_failure/config/etc/passwd create mode 100644 tests/failures/groupdel/03_groupdel_gshadow_open_failure/config/etc/shadow create mode 100644 tests/failures/groupdel/03_groupdel_gshadow_open_failure/data/groupdel.err create mode 100755 tests/failures/groupdel/03_groupdel_gshadow_open_failure/groupdel.test create mode 100644 tests/failures/groupdel/04_groupdel_group_open_failure/config.txt create mode 100644 tests/failures/groupdel/04_groupdel_group_open_failure/config/etc/default/useradd create mode 100644 tests/failures/groupdel/04_groupdel_group_open_failure/config/etc/group create mode 100644 tests/failures/groupdel/04_groupdel_group_open_failure/config/etc/gshadow create mode 100644 tests/failures/groupdel/04_groupdel_group_open_failure/config/etc/login.defs create mode 100644 tests/failures/groupdel/04_groupdel_group_open_failure/config/etc/passwd create mode 100644 tests/failures/groupdel/04_groupdel_group_open_failure/config/etc/shadow create mode 100644 tests/failures/groupdel/04_groupdel_group_open_failure/data/groupdel.err create mode 100755 tests/failures/groupdel/04_groupdel_group_open_failure/groupdel.test create mode 100644 tests/failures/groupmems/01_groupmems_group_open_failure/config.txt create mode 100644 tests/failures/groupmems/01_groupmems_group_open_failure/config/etc/group create mode 100644 tests/failures/groupmems/01_groupmems_group_open_failure/config/etc/gshadow create mode 100644 tests/failures/groupmems/01_groupmems_group_open_failure/config/etc/passwd create mode 100644 tests/failures/groupmems/01_groupmems_group_open_failure/config/etc/shadow create mode 100644 tests/failures/groupmems/01_groupmems_group_open_failure/data/groupmems.err create mode 100755 tests/failures/groupmems/01_groupmems_group_open_failure/groupmems.test create mode 100644 tests/failures/groupmems/02_groupmems_gshadow_open_failure/config.txt create mode 100644 tests/failures/groupmems/02_groupmems_gshadow_open_failure/config/etc/group create mode 100644 tests/failures/groupmems/02_groupmems_gshadow_open_failure/config/etc/gshadow create mode 100644 tests/failures/groupmems/02_groupmems_gshadow_open_failure/config/etc/passwd create mode 100644 tests/failures/groupmems/02_groupmems_gshadow_open_failure/config/etc/shadow create mode 100644 tests/failures/groupmems/02_groupmems_gshadow_open_failure/data/groupmems.err create mode 100755 tests/failures/groupmems/02_groupmems_gshadow_open_failure/groupmems.test create mode 100644 tests/failures/groupmod/01_groupmod_change_group_name_gshadow_rename_failure/config.txt create mode 100644 tests/failures/groupmod/01_groupmod_change_group_name_gshadow_rename_failure/config/etc/default/useradd create mode 100644 tests/failures/groupmod/01_groupmod_change_group_name_gshadow_rename_failure/config/etc/group create mode 100644 tests/failures/groupmod/01_groupmod_change_group_name_gshadow_rename_failure/config/etc/gshadow create mode 100644 tests/failures/groupmod/01_groupmod_change_group_name_gshadow_rename_failure/config/etc/login.defs create mode 100644 tests/failures/groupmod/01_groupmod_change_group_name_gshadow_rename_failure/config/etc/passwd create mode 100644 tests/failures/groupmod/01_groupmod_change_group_name_gshadow_rename_failure/config/etc/shadow create mode 100644 tests/failures/groupmod/01_groupmod_change_group_name_gshadow_rename_failure/data/group create mode 100644 tests/failures/groupmod/01_groupmod_change_group_name_gshadow_rename_failure/data/groupmod.err create mode 100755 tests/failures/groupmod/01_groupmod_change_group_name_gshadow_rename_failure/groupmod.test create mode 100644 tests/failures/groupmod/02_groupmod_change_gid_change_primary_group_passwd_rename_failure/config.txt create mode 100644 tests/failures/groupmod/02_groupmod_change_gid_change_primary_group_passwd_rename_failure/config/etc/default/useradd create mode 100644 tests/failures/groupmod/02_groupmod_change_gid_change_primary_group_passwd_rename_failure/config/etc/group create mode 100644 tests/failures/groupmod/02_groupmod_change_gid_change_primary_group_passwd_rename_failure/config/etc/gshadow create mode 100644 tests/failures/groupmod/02_groupmod_change_gid_change_primary_group_passwd_rename_failure/config/etc/login.defs create mode 100644 tests/failures/groupmod/02_groupmod_change_gid_change_primary_group_passwd_rename_failure/config/etc/passwd create mode 100644 tests/failures/groupmod/02_groupmod_change_gid_change_primary_group_passwd_rename_failure/config/etc/shadow create mode 100644 tests/failures/groupmod/02_groupmod_change_gid_change_primary_group_passwd_rename_failure/data/group create mode 100644 tests/failures/groupmod/02_groupmod_change_gid_change_primary_group_passwd_rename_failure/data/groupmod.err create mode 100755 tests/failures/groupmod/02_groupmod_change_gid_change_primary_group_passwd_rename_failure/groupmod.test create mode 100644 tests/failures/groupmod/03_groupmod_change_group_name_group_rename_failure/config.txt create mode 100644 tests/failures/groupmod/03_groupmod_change_group_name_group_rename_failure/config/etc/default/useradd create mode 100644 tests/failures/groupmod/03_groupmod_change_group_name_group_rename_failure/config/etc/group create mode 100644 tests/failures/groupmod/03_groupmod_change_group_name_group_rename_failure/config/etc/gshadow create mode 100644 tests/failures/groupmod/03_groupmod_change_group_name_group_rename_failure/config/etc/login.defs create mode 100644 tests/failures/groupmod/03_groupmod_change_group_name_group_rename_failure/config/etc/passwd create mode 100644 tests/failures/groupmod/03_groupmod_change_group_name_group_rename_failure/config/etc/shadow create mode 100644 tests/failures/groupmod/03_groupmod_change_group_name_group_rename_failure/data/groupmod.err create mode 100755 tests/failures/groupmod/03_groupmod_change_group_name_group_rename_failure/groupmod.test create mode 100644 tests/failures/groupmod/04_groupmod_group_open_failure/config.txt create mode 100644 tests/failures/groupmod/04_groupmod_group_open_failure/config/etc/default/useradd create mode 100644 tests/failures/groupmod/04_groupmod_group_open_failure/config/etc/group create mode 100644 tests/failures/groupmod/04_groupmod_group_open_failure/config/etc/gshadow create mode 100644 tests/failures/groupmod/04_groupmod_group_open_failure/config/etc/login.defs create mode 100644 tests/failures/groupmod/04_groupmod_group_open_failure/config/etc/passwd create mode 100644 tests/failures/groupmod/04_groupmod_group_open_failure/config/etc/shadow create mode 100644 tests/failures/groupmod/04_groupmod_group_open_failure/data/groupmod.err create mode 100755 tests/failures/groupmod/04_groupmod_group_open_failure/groupmod.test create mode 100644 tests/failures/groupmod/05_groupmod_gshadow_open_failure/config.txt create mode 100644 tests/failures/groupmod/05_groupmod_gshadow_open_failure/config/etc/default/useradd create mode 100644 tests/failures/groupmod/05_groupmod_gshadow_open_failure/config/etc/group create mode 100644 tests/failures/groupmod/05_groupmod_gshadow_open_failure/config/etc/gshadow create mode 100644 tests/failures/groupmod/05_groupmod_gshadow_open_failure/config/etc/login.defs create mode 100644 tests/failures/groupmod/05_groupmod_gshadow_open_failure/config/etc/passwd create mode 100644 tests/failures/groupmod/05_groupmod_gshadow_open_failure/config/etc/shadow create mode 100644 tests/failures/groupmod/05_groupmod_gshadow_open_failure/data/groupmod.err create mode 100755 tests/failures/groupmod/05_groupmod_gshadow_open_failure/groupmod.test create mode 100644 tests/failures/groupmod/06_groupmod_-g_no_gshadow_open_failure/config.txt create mode 100644 tests/failures/groupmod/06_groupmod_-g_no_gshadow_open_failure/config/etc/default/useradd create mode 100644 tests/failures/groupmod/06_groupmod_-g_no_gshadow_open_failure/config/etc/group create mode 100644 tests/failures/groupmod/06_groupmod_-g_no_gshadow_open_failure/config/etc/gshadow create mode 100644 tests/failures/groupmod/06_groupmod_-g_no_gshadow_open_failure/config/etc/login.defs create mode 100644 tests/failures/groupmod/06_groupmod_-g_no_gshadow_open_failure/config/etc/passwd create mode 100644 tests/failures/groupmod/06_groupmod_-g_no_gshadow_open_failure/config/etc/shadow create mode 100644 tests/failures/groupmod/06_groupmod_-g_no_gshadow_open_failure/data/group create mode 100755 tests/failures/groupmod/06_groupmod_-g_no_gshadow_open_failure/groupmod.test create mode 100644 tests/failures/groupmod/07_groupmod_passwd_open_failure/config.txt create mode 100644 tests/failures/groupmod/07_groupmod_passwd_open_failure/config/etc/default/useradd create mode 100644 tests/failures/groupmod/07_groupmod_passwd_open_failure/config/etc/group create mode 100644 tests/failures/groupmod/07_groupmod_passwd_open_failure/config/etc/gshadow create mode 100644 tests/failures/groupmod/07_groupmod_passwd_open_failure/config/etc/login.defs create mode 100644 tests/failures/groupmod/07_groupmod_passwd_open_failure/config/etc/passwd create mode 100644 tests/failures/groupmod/07_groupmod_passwd_open_failure/config/etc/shadow create mode 100644 tests/failures/groupmod/07_groupmod_passwd_open_failure/data/groupmod.err create mode 100755 tests/failures/groupmod/07_groupmod_passwd_open_failure/groupmod.test create mode 100644 tests/failures/groupmod/08_groupmod_-g_same_gid_no_passwd_open_failure/config.txt create mode 100644 tests/failures/groupmod/08_groupmod_-g_same_gid_no_passwd_open_failure/config/etc/default/useradd create mode 100644 tests/failures/groupmod/08_groupmod_-g_same_gid_no_passwd_open_failure/config/etc/group create mode 100644 tests/failures/groupmod/08_groupmod_-g_same_gid_no_passwd_open_failure/config/etc/gshadow create mode 100644 tests/failures/groupmod/08_groupmod_-g_same_gid_no_passwd_open_failure/config/etc/login.defs create mode 100644 tests/failures/groupmod/08_groupmod_-g_same_gid_no_passwd_open_failure/config/etc/passwd create mode 100644 tests/failures/groupmod/08_groupmod_-g_same_gid_no_passwd_open_failure/config/etc/shadow create mode 100755 tests/failures/groupmod/08_groupmod_-g_same_gid_no_passwd_open_failure/groupmod.test create mode 100644 tests/failures/groupmod/09_groupmod_-n_no_passwd_open_failure/config.txt create mode 100644 tests/failures/groupmod/09_groupmod_-n_no_passwd_open_failure/config/etc/default/useradd create mode 100644 tests/failures/groupmod/09_groupmod_-n_no_passwd_open_failure/config/etc/group create mode 100644 tests/failures/groupmod/09_groupmod_-n_no_passwd_open_failure/config/etc/gshadow create mode 100644 tests/failures/groupmod/09_groupmod_-n_no_passwd_open_failure/config/etc/login.defs create mode 100644 tests/failures/groupmod/09_groupmod_-n_no_passwd_open_failure/config/etc/passwd create mode 100644 tests/failures/groupmod/09_groupmod_-n_no_passwd_open_failure/config/etc/shadow create mode 100644 tests/failures/groupmod/09_groupmod_-n_no_passwd_open_failure/data/group create mode 100644 tests/failures/groupmod/09_groupmod_-n_no_passwd_open_failure/data/gshadow create mode 100755 tests/failures/groupmod/09_groupmod_-n_no_passwd_open_failure/groupmod.test create mode 100644 tests/failures/grpck/01_grpck_system_group_open_failure/config.txt create mode 100644 tests/failures/grpck/01_grpck_system_group_open_failure/config/etc/default/useradd create mode 100644 tests/failures/grpck/01_grpck_system_group_open_failure/config/etc/group create mode 100644 tests/failures/grpck/01_grpck_system_group_open_failure/config/etc/gshadow create mode 100644 tests/failures/grpck/01_grpck_system_group_open_failure/config/etc/login.defs create mode 100644 tests/failures/grpck/01_grpck_system_group_open_failure/config/etc/passwd create mode 100644 tests/failures/grpck/01_grpck_system_group_open_failure/config/etc/shadow create mode 100644 tests/failures/grpck/01_grpck_system_group_open_failure/data/grpck.err create mode 100755 tests/failures/grpck/01_grpck_system_group_open_failure/grpck.test create mode 100644 tests/failures/grpck/02_grpck_group_open_failure/config.txt create mode 100644 tests/failures/grpck/02_grpck_group_open_failure/config/etc/default/useradd create mode 100644 tests/failures/grpck/02_grpck_group_open_failure/config/etc/group create mode 100644 tests/failures/grpck/02_grpck_group_open_failure/config/etc/gshadow create mode 100644 tests/failures/grpck/02_grpck_group_open_failure/config/etc/login.defs create mode 100644 tests/failures/grpck/02_grpck_group_open_failure/config/etc/passwd create mode 100644 tests/failures/grpck/02_grpck_group_open_failure/config/etc/shadow create mode 100644 tests/failures/grpck/02_grpck_group_open_failure/data/grpck.err create mode 100755 tests/failures/grpck/02_grpck_group_open_failure/grpck.test create mode 100644 tests/failures/grpck/03_grpck_system_gshadow_open_failure/config.txt create mode 100644 tests/failures/grpck/03_grpck_system_gshadow_open_failure/config/etc/default/useradd create mode 100644 tests/failures/grpck/03_grpck_system_gshadow_open_failure/config/etc/group create mode 100644 tests/failures/grpck/03_grpck_system_gshadow_open_failure/config/etc/gshadow create mode 100644 tests/failures/grpck/03_grpck_system_gshadow_open_failure/config/etc/login.defs create mode 100644 tests/failures/grpck/03_grpck_system_gshadow_open_failure/config/etc/passwd create mode 100644 tests/failures/grpck/03_grpck_system_gshadow_open_failure/config/etc/shadow create mode 100644 tests/failures/grpck/03_grpck_system_gshadow_open_failure/data/grpck.err create mode 100755 tests/failures/grpck/03_grpck_system_gshadow_open_failure/grpck.test create mode 100644 tests/failures/grpck/04_grpck_gshadow_open_failure/config.txt create mode 100644 tests/failures/grpck/04_grpck_gshadow_open_failure/config/etc/default/useradd create mode 100644 tests/failures/grpck/04_grpck_gshadow_open_failure/config/etc/group create mode 100644 tests/failures/grpck/04_grpck_gshadow_open_failure/config/etc/gshadow create mode 100644 tests/failures/grpck/04_grpck_gshadow_open_failure/config/etc/login.defs create mode 100644 tests/failures/grpck/04_grpck_gshadow_open_failure/config/etc/passwd create mode 100644 tests/failures/grpck/04_grpck_gshadow_open_failure/config/etc/shadow create mode 100644 tests/failures/grpck/04_grpck_gshadow_open_failure/data/group create mode 100644 tests/failures/grpck/04_grpck_gshadow_open_failure/data/grpck.err create mode 100644 tests/failures/grpck/04_grpck_gshadow_open_failure/data/gshadow create mode 100755 tests/failures/grpck/04_grpck_gshadow_open_failure/grpck.test create mode 100644 tests/failures/grpck/05_grpck_sort_group_rename_failure/config.txt create mode 100644 tests/failures/grpck/05_grpck_sort_group_rename_failure/config/etc/default/useradd create mode 100644 tests/failures/grpck/05_grpck_sort_group_rename_failure/config/etc/group create mode 100644 tests/failures/grpck/05_grpck_sort_group_rename_failure/config/etc/gshadow create mode 100644 tests/failures/grpck/05_grpck_sort_group_rename_failure/config/etc/login.defs create mode 100644 tests/failures/grpck/05_grpck_sort_group_rename_failure/config/etc/passwd create mode 100644 tests/failures/grpck/05_grpck_sort_group_rename_failure/config/etc/shadow create mode 100644 tests/failures/grpck/05_grpck_sort_group_rename_failure/data/grpck.err create mode 100755 tests/failures/grpck/05_grpck_sort_group_rename_failure/grpck.test create mode 100644 tests/failures/grpck/06_grpck_sort_gshadow_rename_failure/config.txt create mode 100644 tests/failures/grpck/06_grpck_sort_gshadow_rename_failure/config/etc/default/useradd create mode 100644 tests/failures/grpck/06_grpck_sort_gshadow_rename_failure/config/etc/group create mode 100644 tests/failures/grpck/06_grpck_sort_gshadow_rename_failure/config/etc/gshadow create mode 100644 tests/failures/grpck/06_grpck_sort_gshadow_rename_failure/config/etc/login.defs create mode 100644 tests/failures/grpck/06_grpck_sort_gshadow_rename_failure/config/etc/passwd create mode 100644 tests/failures/grpck/06_grpck_sort_gshadow_rename_failure/config/etc/shadow create mode 100644 tests/failures/grpck/06_grpck_sort_gshadow_rename_failure/data/group create mode 100644 tests/failures/grpck/06_grpck_sort_gshadow_rename_failure/data/grpck.err create mode 100755 tests/failures/grpck/06_grpck_sort_gshadow_rename_failure/grpck.test create mode 100644 tests/failures/grpconv/01_grpconv_open_group_failure/config.txt create mode 100644 tests/failures/grpconv/01_grpconv_open_group_failure/config/etc/group create mode 100644 tests/failures/grpconv/01_grpconv_open_group_failure/config/etc/gshadow create mode 100644 tests/failures/grpconv/01_grpconv_open_group_failure/config/etc/login.defs create mode 100644 tests/failures/grpconv/01_grpconv_open_group_failure/config/etc/passwd create mode 100644 tests/failures/grpconv/01_grpconv_open_group_failure/config/etc/shadow create mode 100644 tests/failures/grpconv/01_grpconv_open_group_failure/data/grpconv.err create mode 100755 tests/failures/grpconv/01_grpconv_open_group_failure/grpconv.test create mode 100644 tests/failures/grpconv/02_grpconv_open_gshadow_failure/config.txt create mode 100644 tests/failures/grpconv/02_grpconv_open_gshadow_failure/config/etc/group create mode 100644 tests/failures/grpconv/02_grpconv_open_gshadow_failure/config/etc/gshadow create mode 100644 tests/failures/grpconv/02_grpconv_open_gshadow_failure/config/etc/login.defs create mode 100644 tests/failures/grpconv/02_grpconv_open_gshadow_failure/config/etc/passwd create mode 100644 tests/failures/grpconv/02_grpconv_open_gshadow_failure/config/etc/shadow create mode 100644 tests/failures/grpconv/02_grpconv_open_gshadow_failure/data/grpconv.err create mode 100755 tests/failures/grpconv/02_grpconv_open_gshadow_failure/grpconv.test create mode 100644 tests/failures/grpconv/03_grpconv_rename_group_failure/config.txt create mode 100644 tests/failures/grpconv/03_grpconv_rename_group_failure/config/etc/group create mode 100644 tests/failures/grpconv/03_grpconv_rename_group_failure/config/etc/gshadow create mode 100644 tests/failures/grpconv/03_grpconv_rename_group_failure/config/etc/login.defs create mode 100644 tests/failures/grpconv/03_grpconv_rename_group_failure/config/etc/passwd create mode 100644 tests/failures/grpconv/03_grpconv_rename_group_failure/config/etc/shadow create mode 100644 tests/failures/grpconv/03_grpconv_rename_group_failure/data/grpconv.err create mode 100644 tests/failures/grpconv/03_grpconv_rename_group_failure/data/gshadow create mode 100755 tests/failures/grpconv/03_grpconv_rename_group_failure/grpconv.test create mode 100644 tests/failures/grpconv/04_grpconv_rename_gshadow_failure/config.txt create mode 100644 tests/failures/grpconv/04_grpconv_rename_gshadow_failure/config/etc/group create mode 100644 tests/failures/grpconv/04_grpconv_rename_gshadow_failure/config/etc/gshadow create mode 100644 tests/failures/grpconv/04_grpconv_rename_gshadow_failure/config/etc/login.defs create mode 100644 tests/failures/grpconv/04_grpconv_rename_gshadow_failure/config/etc/passwd create mode 100644 tests/failures/grpconv/04_grpconv_rename_gshadow_failure/config/etc/shadow create mode 100644 tests/failures/grpconv/04_grpconv_rename_gshadow_failure/data/grpconv.err create mode 100755 tests/failures/grpconv/04_grpconv_rename_gshadow_failure/grpconv.test create mode 100644 tests/failures/grpunconv/01_grpunconv_group_rename_failure/config.txt create mode 100644 tests/failures/grpunconv/01_grpunconv_group_rename_failure/config/etc/group create mode 100644 tests/failures/grpunconv/01_grpunconv_group_rename_failure/config/etc/gshadow create mode 100644 tests/failures/grpunconv/01_grpunconv_group_rename_failure/config/etc/login.defs create mode 100644 tests/failures/grpunconv/01_grpunconv_group_rename_failure/config/etc/passwd create mode 100644 tests/failures/grpunconv/01_grpunconv_group_rename_failure/config/etc/shadow create mode 100644 tests/failures/grpunconv/01_grpunconv_group_rename_failure/data/grpunconv.err create mode 100755 tests/failures/grpunconv/01_grpunconv_group_rename_failure/grpunconv.test create mode 100644 tests/failures/grpunconv/02_grpunconv_open_group_failure/config.txt create mode 100644 tests/failures/grpunconv/02_grpunconv_open_group_failure/config/etc/group create mode 100644 tests/failures/grpunconv/02_grpunconv_open_group_failure/config/etc/gshadow create mode 100644 tests/failures/grpunconv/02_grpunconv_open_group_failure/config/etc/login.defs create mode 100644 tests/failures/grpunconv/02_grpunconv_open_group_failure/config/etc/passwd create mode 100644 tests/failures/grpunconv/02_grpunconv_open_group_failure/config/etc/shadow create mode 100644 tests/failures/grpunconv/02_grpunconv_open_group_failure/data/grpunconv.err create mode 100755 tests/failures/grpunconv/02_grpunconv_open_group_failure/grpunconv.test create mode 100644 tests/failures/grpunconv/03_grpunconv_open_gshadow_failure/config.txt create mode 100644 tests/failures/grpunconv/03_grpunconv_open_gshadow_failure/config/etc/group create mode 100644 tests/failures/grpunconv/03_grpunconv_open_gshadow_failure/config/etc/gshadow create mode 100644 tests/failures/grpunconv/03_grpunconv_open_gshadow_failure/config/etc/login.defs create mode 100644 tests/failures/grpunconv/03_grpunconv_open_gshadow_failure/config/etc/passwd create mode 100644 tests/failures/grpunconv/03_grpunconv_open_gshadow_failure/config/etc/shadow create mode 100644 tests/failures/grpunconv/03_grpunconv_open_gshadow_failure/data/grpunconv.err create mode 100755 tests/failures/grpunconv/03_grpunconv_open_gshadow_failure/grpunconv.test create mode 100644 tests/failures/grpunconv/04_grpunconv_unlink_gshadow_failure/config.txt create mode 100644 tests/failures/grpunconv/04_grpunconv_unlink_gshadow_failure/config/etc/group create mode 100644 tests/failures/grpunconv/04_grpunconv_unlink_gshadow_failure/config/etc/gshadow create mode 100644 tests/failures/grpunconv/04_grpunconv_unlink_gshadow_failure/config/etc/login.defs create mode 100644 tests/failures/grpunconv/04_grpunconv_unlink_gshadow_failure/config/etc/passwd create mode 100644 tests/failures/grpunconv/04_grpunconv_unlink_gshadow_failure/config/etc/shadow create mode 100644 tests/failures/grpunconv/04_grpunconv_unlink_gshadow_failure/data/group create mode 100644 tests/failures/grpunconv/04_grpunconv_unlink_gshadow_failure/data/grpunconv.err create mode 100755 tests/failures/grpunconv/04_grpunconv_unlink_gshadow_failure/grpunconv.test create mode 100644 tests/failures/newusers/01_newusers_open_passwd_failure/config.txt create mode 100644 tests/failures/newusers/01_newusers_open_passwd_failure/config/etc/default/useradd create mode 100644 tests/failures/newusers/01_newusers_open_passwd_failure/config/etc/group create mode 100644 tests/failures/newusers/01_newusers_open_passwd_failure/config/etc/gshadow create mode 100644 tests/failures/newusers/01_newusers_open_passwd_failure/config/etc/login.defs create mode 100644 tests/failures/newusers/01_newusers_open_passwd_failure/config/etc/passwd create mode 100644 tests/failures/newusers/01_newusers_open_passwd_failure/config/etc/shadow create mode 100644 tests/failures/newusers/01_newusers_open_passwd_failure/data/newusers.err create mode 100644 tests/failures/newusers/01_newusers_open_passwd_failure/data/newusers.list create mode 100755 tests/failures/newusers/01_newusers_open_passwd_failure/newusers.test create mode 100644 tests/failures/newusers/02_newusers_open_shadow_failure/config.txt create mode 100644 tests/failures/newusers/02_newusers_open_shadow_failure/config/etc/default/useradd create mode 100644 tests/failures/newusers/02_newusers_open_shadow_failure/config/etc/group create mode 100644 tests/failures/newusers/02_newusers_open_shadow_failure/config/etc/gshadow create mode 100644 tests/failures/newusers/02_newusers_open_shadow_failure/config/etc/login.defs create mode 100644 tests/failures/newusers/02_newusers_open_shadow_failure/config/etc/passwd create mode 100644 tests/failures/newusers/02_newusers_open_shadow_failure/config/etc/shadow create mode 100644 tests/failures/newusers/02_newusers_open_shadow_failure/data/newusers.err create mode 100644 tests/failures/newusers/02_newusers_open_shadow_failure/data/newusers.list create mode 100755 tests/failures/newusers/02_newusers_open_shadow_failure/newusers.test create mode 100644 tests/failures/newusers/03_newusers_open_group_failure/config.txt create mode 100644 tests/failures/newusers/03_newusers_open_group_failure/config/etc/default/useradd create mode 100644 tests/failures/newusers/03_newusers_open_group_failure/config/etc/group create mode 100644 tests/failures/newusers/03_newusers_open_group_failure/config/etc/gshadow create mode 100644 tests/failures/newusers/03_newusers_open_group_failure/config/etc/login.defs create mode 100644 tests/failures/newusers/03_newusers_open_group_failure/config/etc/passwd create mode 100644 tests/failures/newusers/03_newusers_open_group_failure/config/etc/shadow create mode 100644 tests/failures/newusers/03_newusers_open_group_failure/data/newusers.err create mode 100644 tests/failures/newusers/03_newusers_open_group_failure/data/newusers.list create mode 100755 tests/failures/newusers/03_newusers_open_group_failure/newusers.test create mode 100644 tests/failures/newusers/04_newusers_open_gshadow_failure/config.txt create mode 100644 tests/failures/newusers/04_newusers_open_gshadow_failure/config/etc/default/useradd create mode 100644 tests/failures/newusers/04_newusers_open_gshadow_failure/config/etc/group create mode 100644 tests/failures/newusers/04_newusers_open_gshadow_failure/config/etc/gshadow create mode 100644 tests/failures/newusers/04_newusers_open_gshadow_failure/config/etc/login.defs create mode 100644 tests/failures/newusers/04_newusers_open_gshadow_failure/config/etc/passwd create mode 100644 tests/failures/newusers/04_newusers_open_gshadow_failure/config/etc/shadow create mode 100644 tests/failures/newusers/04_newusers_open_gshadow_failure/data/newusers.err create mode 100644 tests/failures/newusers/04_newusers_open_gshadow_failure/data/newusers.list create mode 100755 tests/failures/newusers/04_newusers_open_gshadow_failure/newusers.test create mode 100644 tests/failures/newusers/05_newusers_rename_passwd_failure/config.txt create mode 100644 tests/failures/newusers/05_newusers_rename_passwd_failure/config/etc/default/useradd create mode 100644 tests/failures/newusers/05_newusers_rename_passwd_failure/config/etc/group create mode 100644 tests/failures/newusers/05_newusers_rename_passwd_failure/config/etc/gshadow create mode 100644 tests/failures/newusers/05_newusers_rename_passwd_failure/config/etc/login.defs create mode 100644 tests/failures/newusers/05_newusers_rename_passwd_failure/config/etc/passwd create mode 100644 tests/failures/newusers/05_newusers_rename_passwd_failure/config/etc/shadow create mode 100644 tests/failures/newusers/05_newusers_rename_passwd_failure/data/newusers.err create mode 100644 tests/failures/newusers/05_newusers_rename_passwd_failure/data/newusers.list create mode 100755 tests/failures/newusers/05_newusers_rename_passwd_failure/newusers.test create mode 100644 tests/failures/newusers/06_newusers_rename_shadow_failure/config.txt create mode 100644 tests/failures/newusers/06_newusers_rename_shadow_failure/config/etc/group create mode 100644 tests/failures/newusers/06_newusers_rename_shadow_failure/config/etc/gshadow create mode 100644 tests/failures/newusers/06_newusers_rename_shadow_failure/config/etc/login.defs create mode 100644 tests/failures/newusers/06_newusers_rename_shadow_failure/config/etc/passwd create mode 100644 tests/failures/newusers/06_newusers_rename_shadow_failure/config/etc/shadow create mode 100644 tests/failures/newusers/06_newusers_rename_shadow_failure/data/newusers.err create mode 100644 tests/failures/newusers/06_newusers_rename_shadow_failure/data/newusers.list create mode 100644 tests/failures/newusers/06_newusers_rename_shadow_failure/data/passwd create mode 100755 tests/failures/newusers/06_newusers_rename_shadow_failure/newusers.test create mode 100644 tests/failures/newusers/07_newusers_rename_group_failure/config.txt create mode 100644 tests/failures/newusers/07_newusers_rename_group_failure/config/etc/group create mode 100644 tests/failures/newusers/07_newusers_rename_group_failure/config/etc/gshadow create mode 100644 tests/failures/newusers/07_newusers_rename_group_failure/config/etc/login.defs create mode 100644 tests/failures/newusers/07_newusers_rename_group_failure/config/etc/passwd create mode 100644 tests/failures/newusers/07_newusers_rename_group_failure/config/etc/shadow create mode 100644 tests/failures/newusers/07_newusers_rename_group_failure/data/newusers.err create mode 100644 tests/failures/newusers/07_newusers_rename_group_failure/data/newusers.list create mode 100644 tests/failures/newusers/07_newusers_rename_group_failure/data/passwd create mode 100644 tests/failures/newusers/07_newusers_rename_group_failure/data/shadow create mode 100755 tests/failures/newusers/07_newusers_rename_group_failure/newusers.test create mode 100644 tests/failures/newusers/08_newusers_rename_gshadow_failure/config.txt create mode 100644 tests/failures/newusers/08_newusers_rename_gshadow_failure/config/etc/group create mode 100644 tests/failures/newusers/08_newusers_rename_gshadow_failure/config/etc/gshadow create mode 100644 tests/failures/newusers/08_newusers_rename_gshadow_failure/config/etc/login.defs create mode 100644 tests/failures/newusers/08_newusers_rename_gshadow_failure/config/etc/passwd create mode 100644 tests/failures/newusers/08_newusers_rename_gshadow_failure/config/etc/shadow create mode 100644 tests/failures/newusers/08_newusers_rename_gshadow_failure/data/group create mode 100644 tests/failures/newusers/08_newusers_rename_gshadow_failure/data/newusers.err create mode 100644 tests/failures/newusers/08_newusers_rename_gshadow_failure/data/newusers.list create mode 100644 tests/failures/newusers/08_newusers_rename_gshadow_failure/data/passwd create mode 100644 tests/failures/newusers/08_newusers_rename_gshadow_failure/data/shadow create mode 100755 tests/failures/newusers/08_newusers_rename_gshadow_failure/newusers.test create mode 100644 tests/failures/newusers/09_newusers_rename_shadow_failure_PAM/config.txt create mode 100644 tests/failures/newusers/09_newusers_rename_shadow_failure_PAM/config/etc/group create mode 100644 tests/failures/newusers/09_newusers_rename_shadow_failure_PAM/config/etc/gshadow create mode 100644 tests/failures/newusers/09_newusers_rename_shadow_failure_PAM/config/etc/login.defs create mode 100644 tests/failures/newusers/09_newusers_rename_shadow_failure_PAM/config/etc/passwd create mode 100644 tests/failures/newusers/09_newusers_rename_shadow_failure_PAM/config/etc/shadow create mode 100644 tests/failures/newusers/09_newusers_rename_shadow_failure_PAM/data/group create mode 100644 tests/failures/newusers/09_newusers_rename_shadow_failure_PAM/data/gshadow create mode 100644 tests/failures/newusers/09_newusers_rename_shadow_failure_PAM/data/newusers.err create mode 100644 tests/failures/newusers/09_newusers_rename_shadow_failure_PAM/data/newusers.list create mode 100644 tests/failures/newusers/09_newusers_rename_shadow_failure_PAM/data/passwd create mode 100755 tests/failures/newusers/09_newusers_rename_shadow_failure_PAM/newusers.test create mode 100644 tests/failures/newusers/10_newusers_time_0/config.txt create mode 100644 tests/failures/newusers/10_newusers_time_0/config/etc/default/useradd create mode 100644 tests/failures/newusers/10_newusers_time_0/config/etc/group create mode 100644 tests/failures/newusers/10_newusers_time_0/config/etc/gshadow create mode 100644 tests/failures/newusers/10_newusers_time_0/config/etc/pam.d/common-password create mode 100644 tests/failures/newusers/10_newusers_time_0/config/etc/passwd create mode 100644 tests/failures/newusers/10_newusers_time_0/config/etc/shadow create mode 100644 tests/failures/newusers/10_newusers_time_0/data/group create mode 100644 tests/failures/newusers/10_newusers_time_0/data/gshadow create mode 100644 tests/failures/newusers/10_newusers_time_0/data/newusers.list create mode 100644 tests/failures/newusers/10_newusers_time_0/data/passwd create mode 100644 tests/failures/newusers/10_newusers_time_0/data/shadow create mode 100755 tests/failures/newusers/10_newusers_time_0/newusers.test create mode 100644 tests/failures/pwck/01_pwck_system_passwd_open_failure/config.txt create mode 100644 tests/failures/pwck/01_pwck_system_passwd_open_failure/config/etc/group create mode 100644 tests/failures/pwck/01_pwck_system_passwd_open_failure/config/etc/gshadow create mode 100644 tests/failures/pwck/01_pwck_system_passwd_open_failure/config/etc/passwd create mode 100644 tests/failures/pwck/01_pwck_system_passwd_open_failure/config/etc/shadow create mode 100644 tests/failures/pwck/01_pwck_system_passwd_open_failure/data/pwck.err create mode 100755 tests/failures/pwck/01_pwck_system_passwd_open_failure/pwck.test create mode 100644 tests/failures/pwck/02_pwck_passwd_open_failure/config.txt create mode 100644 tests/failures/pwck/02_pwck_passwd_open_failure/config/etc/group create mode 100644 tests/failures/pwck/02_pwck_passwd_open_failure/config/etc/gshadow create mode 100644 tests/failures/pwck/02_pwck_passwd_open_failure/config/etc/passwd create mode 100644 tests/failures/pwck/02_pwck_passwd_open_failure/config/etc/shadow create mode 100644 tests/failures/pwck/02_pwck_passwd_open_failure/data/pwck.err create mode 100755 tests/failures/pwck/02_pwck_passwd_open_failure/pwck.test create mode 100644 tests/failures/pwck/03_pwck_system_shadow_open_failure/config.txt create mode 100644 tests/failures/pwck/03_pwck_system_shadow_open_failure/config/etc/group create mode 100644 tests/failures/pwck/03_pwck_system_shadow_open_failure/config/etc/gshadow create mode 100644 tests/failures/pwck/03_pwck_system_shadow_open_failure/config/etc/passwd create mode 100644 tests/failures/pwck/03_pwck_system_shadow_open_failure/config/etc/shadow create mode 100644 tests/failures/pwck/03_pwck_system_shadow_open_failure/data/pwck.err create mode 100755 tests/failures/pwck/03_pwck_system_shadow_open_failure/pwck.test create mode 100644 tests/failures/pwck/04_pwck_shadow_open_failure/config.txt create mode 100644 tests/failures/pwck/04_pwck_shadow_open_failure/config/etc/group create mode 100644 tests/failures/pwck/04_pwck_shadow_open_failure/config/etc/gshadow create mode 100644 tests/failures/pwck/04_pwck_shadow_open_failure/config/etc/passwd create mode 100644 tests/failures/pwck/04_pwck_shadow_open_failure/config/etc/shadow create mode 100644 tests/failures/pwck/04_pwck_shadow_open_failure/data/passwd create mode 100644 tests/failures/pwck/04_pwck_shadow_open_failure/data/pwck.err create mode 100755 tests/failures/pwck/04_pwck_shadow_open_failure/pwck.test create mode 100644 tests/failures/pwck/05_pwck_sort_system_passwd_rename_failure/config.txt create mode 100644 tests/failures/pwck/05_pwck_sort_system_passwd_rename_failure/config/etc/group create mode 100644 tests/failures/pwck/05_pwck_sort_system_passwd_rename_failure/config/etc/gshadow create mode 100644 tests/failures/pwck/05_pwck_sort_system_passwd_rename_failure/config/etc/passwd create mode 100644 tests/failures/pwck/05_pwck_sort_system_passwd_rename_failure/config/etc/shadow create mode 100644 tests/failures/pwck/05_pwck_sort_system_passwd_rename_failure/data/pwck.err create mode 100755 tests/failures/pwck/05_pwck_sort_system_passwd_rename_failure/pwck.test create mode 100644 tests/failures/pwck/06_pwck_sort_system_shadow_rename_failure/config.txt create mode 100644 tests/failures/pwck/06_pwck_sort_system_shadow_rename_failure/config/etc/group create mode 100644 tests/failures/pwck/06_pwck_sort_system_shadow_rename_failure/config/etc/gshadow create mode 100644 tests/failures/pwck/06_pwck_sort_system_shadow_rename_failure/config/etc/passwd create mode 100644 tests/failures/pwck/06_pwck_sort_system_shadow_rename_failure/config/etc/shadow create mode 100644 tests/failures/pwck/06_pwck_sort_system_shadow_rename_failure/data/passwd create mode 100644 tests/failures/pwck/06_pwck_sort_system_shadow_rename_failure/data/pwck.err create mode 100755 tests/failures/pwck/06_pwck_sort_system_shadow_rename_failure/pwck.test create mode 100644 tests/failures/pwck/07_pwck_sort_passwd_rename_failure/config.txt create mode 100644 tests/failures/pwck/07_pwck_sort_passwd_rename_failure/config/etc/group create mode 100644 tests/failures/pwck/07_pwck_sort_passwd_rename_failure/config/etc/gshadow create mode 100644 tests/failures/pwck/07_pwck_sort_passwd_rename_failure/config/etc/passwd create mode 100644 tests/failures/pwck/07_pwck_sort_passwd_rename_failure/config/etc/shadow create mode 100644 tests/failures/pwck/07_pwck_sort_passwd_rename_failure/data/passwd create mode 100644 tests/failures/pwck/07_pwck_sort_passwd_rename_failure/data/pwck.err create mode 100755 tests/failures/pwck/07_pwck_sort_passwd_rename_failure/pwck.test create mode 100644 tests/failures/pwck/08_pwck_sort_shadow_rename_failure/config.txt create mode 100644 tests/failures/pwck/08_pwck_sort_shadow_rename_failure/config/etc/group create mode 100644 tests/failures/pwck/08_pwck_sort_shadow_rename_failure/config/etc/gshadow create mode 100644 tests/failures/pwck/08_pwck_sort_shadow_rename_failure/config/etc/passwd create mode 100644 tests/failures/pwck/08_pwck_sort_shadow_rename_failure/config/etc/shadow create mode 100644 tests/failures/pwck/08_pwck_sort_shadow_rename_failure/data/passwd create mode 100644 tests/failures/pwck/08_pwck_sort_shadow_rename_failure/data/passwd.out create mode 100644 tests/failures/pwck/08_pwck_sort_shadow_rename_failure/data/pwck.err create mode 100644 tests/failures/pwck/08_pwck_sort_shadow_rename_failure/data/shadow create mode 100755 tests/failures/pwck/08_pwck_sort_shadow_rename_failure/pwck.test create mode 100644 tests/failures/pwck/09_pwck_create_shadow_entry_time_0/config.txt create mode 100644 tests/failures/pwck/09_pwck_create_shadow_entry_time_0/config/etc/group create mode 100644 tests/failures/pwck/09_pwck_create_shadow_entry_time_0/config/etc/gshadow create mode 100644 tests/failures/pwck/09_pwck_create_shadow_entry_time_0/config/etc/passwd create mode 100644 tests/failures/pwck/09_pwck_create_shadow_entry_time_0/config/etc/shadow create mode 100644 tests/failures/pwck/09_pwck_create_shadow_entry_time_0/data/shadow create mode 100755 tests/failures/pwck/09_pwck_create_shadow_entry_time_0/pwck.exp create mode 100755 tests/failures/pwck/09_pwck_create_shadow_entry_time_0/pwck.test create mode 100644 tests/failures/pwconv/01_pwconv_open_passwd_failure/config.txt create mode 100644 tests/failures/pwconv/01_pwconv_open_passwd_failure/config/etc/group create mode 100644 tests/failures/pwconv/01_pwconv_open_passwd_failure/config/etc/gshadow create mode 100644 tests/failures/pwconv/01_pwconv_open_passwd_failure/config/etc/login.defs create mode 100644 tests/failures/pwconv/01_pwconv_open_passwd_failure/config/etc/passwd create mode 100644 tests/failures/pwconv/01_pwconv_open_passwd_failure/config/etc/shadow create mode 100644 tests/failures/pwconv/01_pwconv_open_passwd_failure/data/pwconv.err create mode 100755 tests/failures/pwconv/01_pwconv_open_passwd_failure/pwconv.test create mode 100644 tests/failures/pwconv/02_pwconv_open_shadow_failure/config.txt create mode 100644 tests/failures/pwconv/02_pwconv_open_shadow_failure/config/etc/group create mode 100644 tests/failures/pwconv/02_pwconv_open_shadow_failure/config/etc/gshadow create mode 100644 tests/failures/pwconv/02_pwconv_open_shadow_failure/config/etc/login.defs create mode 100644 tests/failures/pwconv/02_pwconv_open_shadow_failure/config/etc/passwd create mode 100644 tests/failures/pwconv/02_pwconv_open_shadow_failure/config/etc/shadow create mode 100644 tests/failures/pwconv/02_pwconv_open_shadow_failure/data/pwconv.err create mode 100755 tests/failures/pwconv/02_pwconv_open_shadow_failure/pwconv.test create mode 100644 tests/failures/pwconv/03_pwconv_rename_passwd_failure/config.txt create mode 100644 tests/failures/pwconv/03_pwconv_rename_passwd_failure/config/etc/group create mode 100644 tests/failures/pwconv/03_pwconv_rename_passwd_failure/config/etc/gshadow create mode 100644 tests/failures/pwconv/03_pwconv_rename_passwd_failure/config/etc/login.defs create mode 100644 tests/failures/pwconv/03_pwconv_rename_passwd_failure/config/etc/passwd create mode 100644 tests/failures/pwconv/03_pwconv_rename_passwd_failure/config/etc/shadow create mode 100644 tests/failures/pwconv/03_pwconv_rename_passwd_failure/data/pwconv.err create mode 100644 tests/failures/pwconv/03_pwconv_rename_passwd_failure/data/shadow create mode 100755 tests/failures/pwconv/03_pwconv_rename_passwd_failure/pwconv.test create mode 100644 tests/failures/pwconv/04_pwconv_rename_shadow_failure/config.txt create mode 100644 tests/failures/pwconv/04_pwconv_rename_shadow_failure/config/etc/group create mode 100644 tests/failures/pwconv/04_pwconv_rename_shadow_failure/config/etc/gshadow create mode 100644 tests/failures/pwconv/04_pwconv_rename_shadow_failure/config/etc/login.defs create mode 100644 tests/failures/pwconv/04_pwconv_rename_shadow_failure/config/etc/passwd create mode 100644 tests/failures/pwconv/04_pwconv_rename_shadow_failure/config/etc/shadow create mode 100644 tests/failures/pwconv/04_pwconv_rename_shadow_failure/data/pwconv.err create mode 100755 tests/failures/pwconv/04_pwconv_rename_shadow_failure/pwconv.test create mode 100644 tests/failures/pwconv/05_pwconv_time_0/config.txt create mode 100644 tests/failures/pwconv/05_pwconv_time_0/config/etc/group create mode 100644 tests/failures/pwconv/05_pwconv_time_0/config/etc/gshadow create mode 100644 tests/failures/pwconv/05_pwconv_time_0/config/etc/passwd create mode 100644 tests/failures/pwconv/05_pwconv_time_0/config/etc/shadow create mode 100644 tests/failures/pwconv/05_pwconv_time_0/data/passwd create mode 100644 tests/failures/pwconv/05_pwconv_time_0/data/shadow create mode 100755 tests/failures/pwconv/05_pwconv_time_0/pwconv.test create mode 100644 tests/failures/pwunconv/01_pwunconv_passwd_rename_failure/config.txt create mode 100644 tests/failures/pwunconv/01_pwunconv_passwd_rename_failure/config/etc/group create mode 100644 tests/failures/pwunconv/01_pwunconv_passwd_rename_failure/config/etc/gshadow create mode 100644 tests/failures/pwunconv/01_pwunconv_passwd_rename_failure/config/etc/login.defs create mode 100644 tests/failures/pwunconv/01_pwunconv_passwd_rename_failure/config/etc/passwd create mode 100644 tests/failures/pwunconv/01_pwunconv_passwd_rename_failure/config/etc/shadow create mode 100644 tests/failures/pwunconv/01_pwunconv_passwd_rename_failure/data/pwunconv.err create mode 100755 tests/failures/pwunconv/01_pwunconv_passwd_rename_failure/pwunconv.test create mode 100644 tests/failures/pwunconv/02_pwunconv_open_passwd_failure/config.txt create mode 100644 tests/failures/pwunconv/02_pwunconv_open_passwd_failure/config/etc/group create mode 100644 tests/failures/pwunconv/02_pwunconv_open_passwd_failure/config/etc/gshadow create mode 100644 tests/failures/pwunconv/02_pwunconv_open_passwd_failure/config/etc/login.defs create mode 100644 tests/failures/pwunconv/02_pwunconv_open_passwd_failure/config/etc/passwd create mode 100644 tests/failures/pwunconv/02_pwunconv_open_passwd_failure/config/etc/shadow create mode 100644 tests/failures/pwunconv/02_pwunconv_open_passwd_failure/data/pwunconv.err create mode 100755 tests/failures/pwunconv/02_pwunconv_open_passwd_failure/pwunconv.test create mode 100644 tests/failures/pwunconv/03_pwunconv_open_shadow_failure/config.txt create mode 100644 tests/failures/pwunconv/03_pwunconv_open_shadow_failure/config/etc/group create mode 100644 tests/failures/pwunconv/03_pwunconv_open_shadow_failure/config/etc/gshadow create mode 100644 tests/failures/pwunconv/03_pwunconv_open_shadow_failure/config/etc/login.defs create mode 100644 tests/failures/pwunconv/03_pwunconv_open_shadow_failure/config/etc/passwd create mode 100644 tests/failures/pwunconv/03_pwunconv_open_shadow_failure/config/etc/shadow create mode 100644 tests/failures/pwunconv/03_pwunconv_open_shadow_failure/data/pwunconv.err create mode 100755 tests/failures/pwunconv/03_pwunconv_open_shadow_failure/pwunconv.test create mode 100644 tests/failures/pwunconv/04_pwunconv_unlink_shadow_failure/config.txt create mode 100644 tests/failures/pwunconv/04_pwunconv_unlink_shadow_failure/config/etc/group create mode 100644 tests/failures/pwunconv/04_pwunconv_unlink_shadow_failure/config/etc/gshadow create mode 100644 tests/failures/pwunconv/04_pwunconv_unlink_shadow_failure/config/etc/login.defs create mode 100644 tests/failures/pwunconv/04_pwunconv_unlink_shadow_failure/config/etc/passwd create mode 100644 tests/failures/pwunconv/04_pwunconv_unlink_shadow_failure/config/etc/shadow create mode 100644 tests/failures/pwunconv/04_pwunconv_unlink_shadow_failure/data/passwd create mode 100644 tests/failures/pwunconv/04_pwunconv_unlink_shadow_failure/data/pwunconv.err create mode 100755 tests/failures/pwunconv/04_pwunconv_unlink_shadow_failure/pwunconv.test create mode 100644 tests/failures/useradd/01_useradd_open_passwd_failure/config.txt create mode 100644 tests/failures/useradd/01_useradd_open_passwd_failure/config/etc/default/useradd create mode 100644 tests/failures/useradd/01_useradd_open_passwd_failure/config/etc/group create mode 100644 tests/failures/useradd/01_useradd_open_passwd_failure/config/etc/gshadow create mode 100644 tests/failures/useradd/01_useradd_open_passwd_failure/config/etc/login.defs create mode 100644 tests/failures/useradd/01_useradd_open_passwd_failure/config/etc/passwd create mode 100644 tests/failures/useradd/01_useradd_open_passwd_failure/config/etc/shadow create mode 100644 tests/failures/useradd/01_useradd_open_passwd_failure/data/useradd.err create mode 100755 tests/failures/useradd/01_useradd_open_passwd_failure/useradd.test create mode 100644 tests/failures/useradd/02_useradd_open_shadow_failure/config.txt create mode 100644 tests/failures/useradd/02_useradd_open_shadow_failure/config/etc/default/useradd create mode 100644 tests/failures/useradd/02_useradd_open_shadow_failure/config/etc/group create mode 100644 tests/failures/useradd/02_useradd_open_shadow_failure/config/etc/gshadow create mode 100644 tests/failures/useradd/02_useradd_open_shadow_failure/config/etc/login.defs create mode 100644 tests/failures/useradd/02_useradd_open_shadow_failure/config/etc/passwd create mode 100644 tests/failures/useradd/02_useradd_open_shadow_failure/config/etc/shadow create mode 100644 tests/failures/useradd/02_useradd_open_shadow_failure/data/useradd.err create mode 100755 tests/failures/useradd/02_useradd_open_shadow_failure/useradd.test create mode 100644 tests/failures/useradd/03_useradd_open_group_failure/config.txt create mode 100644 tests/failures/useradd/03_useradd_open_group_failure/config/etc/default/useradd create mode 100644 tests/failures/useradd/03_useradd_open_group_failure/config/etc/group create mode 100644 tests/failures/useradd/03_useradd_open_group_failure/config/etc/gshadow create mode 100644 tests/failures/useradd/03_useradd_open_group_failure/config/etc/login.defs create mode 100644 tests/failures/useradd/03_useradd_open_group_failure/config/etc/passwd create mode 100644 tests/failures/useradd/03_useradd_open_group_failure/config/etc/shadow create mode 100644 tests/failures/useradd/03_useradd_open_group_failure/data/useradd.err create mode 100755 tests/failures/useradd/03_useradd_open_group_failure/useradd.test create mode 100644 tests/failures/useradd/04_useradd_open_gshadow_failure/config.txt create mode 100644 tests/failures/useradd/04_useradd_open_gshadow_failure/config/etc/default/useradd create mode 100644 tests/failures/useradd/04_useradd_open_gshadow_failure/config/etc/group create mode 100644 tests/failures/useradd/04_useradd_open_gshadow_failure/config/etc/gshadow create mode 100644 tests/failures/useradd/04_useradd_open_gshadow_failure/config/etc/login.defs create mode 100644 tests/failures/useradd/04_useradd_open_gshadow_failure/config/etc/passwd create mode 100644 tests/failures/useradd/04_useradd_open_gshadow_failure/config/etc/shadow create mode 100644 tests/failures/useradd/04_useradd_open_gshadow_failure/data/useradd.err create mode 100755 tests/failures/useradd/04_useradd_open_gshadow_failure/useradd.test create mode 100644 tests/failures/useradd/05_useradd_rename_passwd_failure/config.txt create mode 100644 tests/failures/useradd/05_useradd_rename_passwd_failure/config/etc/default/useradd create mode 100644 tests/failures/useradd/05_useradd_rename_passwd_failure/config/etc/group create mode 100644 tests/failures/useradd/05_useradd_rename_passwd_failure/config/etc/gshadow create mode 100644 tests/failures/useradd/05_useradd_rename_passwd_failure/config/etc/login.defs create mode 100644 tests/failures/useradd/05_useradd_rename_passwd_failure/config/etc/passwd create mode 100644 tests/failures/useradd/05_useradd_rename_passwd_failure/config/etc/shadow create mode 100644 tests/failures/useradd/05_useradd_rename_passwd_failure/data/useradd.err create mode 100755 tests/failures/useradd/05_useradd_rename_passwd_failure/useradd.test create mode 100644 tests/failures/useradd/06_useradd_rename_shadow_failure/config.txt create mode 100644 tests/failures/useradd/06_useradd_rename_shadow_failure/config/etc/default/useradd create mode 100644 tests/failures/useradd/06_useradd_rename_shadow_failure/config/etc/group create mode 100644 tests/failures/useradd/06_useradd_rename_shadow_failure/config/etc/gshadow create mode 100644 tests/failures/useradd/06_useradd_rename_shadow_failure/config/etc/login.defs create mode 100644 tests/failures/useradd/06_useradd_rename_shadow_failure/config/etc/passwd create mode 100644 tests/failures/useradd/06_useradd_rename_shadow_failure/config/etc/shadow create mode 100644 tests/failures/useradd/06_useradd_rename_shadow_failure/data/passwd create mode 100644 tests/failures/useradd/06_useradd_rename_shadow_failure/data/useradd.err create mode 100755 tests/failures/useradd/06_useradd_rename_shadow_failure/useradd.test create mode 100644 tests/failures/useradd/07_useradd_rename_group_failure/config.txt create mode 100644 tests/failures/useradd/07_useradd_rename_group_failure/config/etc/default/useradd create mode 100644 tests/failures/useradd/07_useradd_rename_group_failure/config/etc/group create mode 100644 tests/failures/useradd/07_useradd_rename_group_failure/config/etc/gshadow create mode 100644 tests/failures/useradd/07_useradd_rename_group_failure/config/etc/login.defs create mode 100644 tests/failures/useradd/07_useradd_rename_group_failure/config/etc/passwd create mode 100644 tests/failures/useradd/07_useradd_rename_group_failure/config/etc/shadow create mode 100644 tests/failures/useradd/07_useradd_rename_group_failure/data/passwd create mode 100644 tests/failures/useradd/07_useradd_rename_group_failure/data/shadow create mode 100644 tests/failures/useradd/07_useradd_rename_group_failure/data/useradd.err create mode 100755 tests/failures/useradd/07_useradd_rename_group_failure/useradd.test create mode 100644 tests/failures/useradd/08_useradd_rename_gshadow_failure/config.txt create mode 100644 tests/failures/useradd/08_useradd_rename_gshadow_failure/config/etc/default/useradd create mode 100644 tests/failures/useradd/08_useradd_rename_gshadow_failure/config/etc/group create mode 100644 tests/failures/useradd/08_useradd_rename_gshadow_failure/config/etc/gshadow create mode 100644 tests/failures/useradd/08_useradd_rename_gshadow_failure/config/etc/login.defs create mode 100644 tests/failures/useradd/08_useradd_rename_gshadow_failure/config/etc/passwd create mode 100644 tests/failures/useradd/08_useradd_rename_gshadow_failure/config/etc/shadow create mode 100644 tests/failures/useradd/08_useradd_rename_gshadow_failure/data/group create mode 100644 tests/failures/useradd/08_useradd_rename_gshadow_failure/data/passwd create mode 100644 tests/failures/useradd/08_useradd_rename_gshadow_failure/data/shadow create mode 100644 tests/failures/useradd/08_useradd_rename_gshadow_failure/data/useradd.err create mode 100755 tests/failures/useradd/08_useradd_rename_gshadow_failure/useradd.test create mode 100644 tests/failures/useradd/09_useradd_rename_defaults_failure/config.txt create mode 100644 tests/failures/useradd/09_useradd_rename_defaults_failure/config/etc/default/useradd create mode 100644 tests/failures/useradd/09_useradd_rename_defaults_failure/config/etc/group create mode 100644 tests/failures/useradd/09_useradd_rename_defaults_failure/config/etc/gshadow create mode 100644 tests/failures/useradd/09_useradd_rename_defaults_failure/config/etc/login.defs create mode 100644 tests/failures/useradd/09_useradd_rename_defaults_failure/config/etc/passwd create mode 100644 tests/failures/useradd/09_useradd_rename_defaults_failure/config/etc/shadow create mode 100644 tests/failures/useradd/09_useradd_rename_defaults_failure/data/useradd.err create mode 100755 tests/failures/useradd/09_useradd_rename_defaults_failure/useradd.test create mode 100644 tests/failures/useradd/10_useradd_rename_defaults_backup_failure/config.txt create mode 100644 tests/failures/useradd/10_useradd_rename_defaults_backup_failure/config/etc/default/useradd create mode 100644 tests/failures/useradd/10_useradd_rename_defaults_backup_failure/config/etc/group create mode 100644 tests/failures/useradd/10_useradd_rename_defaults_backup_failure/config/etc/gshadow create mode 100644 tests/failures/useradd/10_useradd_rename_defaults_backup_failure/config/etc/login.defs create mode 100644 tests/failures/useradd/10_useradd_rename_defaults_backup_failure/config/etc/passwd create mode 100644 tests/failures/useradd/10_useradd_rename_defaults_backup_failure/config/etc/shadow create mode 100644 tests/failures/useradd/10_useradd_rename_defaults_backup_failure/data/useradd.err create mode 100755 tests/failures/useradd/10_useradd_rename_defaults_backup_failure/useradd.test create mode 100644 tests/failures/useradd/11_useradd_time_0/config.txt create mode 100644 tests/failures/useradd/11_useradd_time_0/config/etc/default/useradd create mode 100644 tests/failures/useradd/11_useradd_time_0/config/etc/group create mode 100644 tests/failures/useradd/11_useradd_time_0/config/etc/gshadow create mode 100644 tests/failures/useradd/11_useradd_time_0/config/etc/pam.d/common-password create mode 100644 tests/failures/useradd/11_useradd_time_0/config/etc/passwd create mode 100644 tests/failures/useradd/11_useradd_time_0/config/etc/shadow create mode 100644 tests/failures/useradd/11_useradd_time_0/data/group create mode 100644 tests/failures/useradd/11_useradd_time_0/data/gshadow create mode 100644 tests/failures/useradd/11_useradd_time_0/data/newusers.list create mode 100644 tests/failures/useradd/11_useradd_time_0/data/passwd create mode 100644 tests/failures/useradd/11_useradd_time_0/data/shadow create mode 100755 tests/failures/useradd/11_useradd_time_0/useradd.test create mode 100644 tests/failures/userdel/01_userdel_gshadow_rename_failure/config.txt create mode 100644 tests/failures/userdel/01_userdel_gshadow_rename_failure/config/etc/default/useradd create mode 100644 tests/failures/userdel/01_userdel_gshadow_rename_failure/config/etc/group create mode 100644 tests/failures/userdel/01_userdel_gshadow_rename_failure/config/etc/gshadow create mode 100644 tests/failures/userdel/01_userdel_gshadow_rename_failure/config/etc/login.defs create mode 100644 tests/failures/userdel/01_userdel_gshadow_rename_failure/config/etc/passwd create mode 100644 tests/failures/userdel/01_userdel_gshadow_rename_failure/config/etc/shadow create mode 100644 tests/failures/userdel/01_userdel_gshadow_rename_failure/data/group create mode 100644 tests/failures/userdel/01_userdel_gshadow_rename_failure/data/passwd create mode 100644 tests/failures/userdel/01_userdel_gshadow_rename_failure/data/shadow create mode 100644 tests/failures/userdel/01_userdel_gshadow_rename_failure/data/userdel.err create mode 100755 tests/failures/userdel/01_userdel_gshadow_rename_failure/userdel.test create mode 100644 tests/failures/userdel/02_userdel_group_rename_failure/config.txt create mode 100644 tests/failures/userdel/02_userdel_group_rename_failure/config/etc/default/useradd create mode 100644 tests/failures/userdel/02_userdel_group_rename_failure/config/etc/group create mode 100644 tests/failures/userdel/02_userdel_group_rename_failure/config/etc/gshadow create mode 100644 tests/failures/userdel/02_userdel_group_rename_failure/config/etc/login.defs create mode 100644 tests/failures/userdel/02_userdel_group_rename_failure/config/etc/passwd create mode 100644 tests/failures/userdel/02_userdel_group_rename_failure/config/etc/shadow create mode 100644 tests/failures/userdel/02_userdel_group_rename_failure/data/passwd create mode 100644 tests/failures/userdel/02_userdel_group_rename_failure/data/shadow create mode 100644 tests/failures/userdel/02_userdel_group_rename_failure/data/userdel.err create mode 100755 tests/failures/userdel/02_userdel_group_rename_failure/userdel.test create mode 100644 tests/failures/userdel/03_userdel_shadow_rename_failure/config.txt create mode 100644 tests/failures/userdel/03_userdel_shadow_rename_failure/config/etc/default/useradd create mode 100644 tests/failures/userdel/03_userdel_shadow_rename_failure/config/etc/group create mode 100644 tests/failures/userdel/03_userdel_shadow_rename_failure/config/etc/gshadow create mode 100644 tests/failures/userdel/03_userdel_shadow_rename_failure/config/etc/login.defs create mode 100644 tests/failures/userdel/03_userdel_shadow_rename_failure/config/etc/passwd create mode 100644 tests/failures/userdel/03_userdel_shadow_rename_failure/config/etc/shadow create mode 100644 tests/failures/userdel/03_userdel_shadow_rename_failure/data/passwd create mode 100644 tests/failures/userdel/03_userdel_shadow_rename_failure/data/userdel.err create mode 100755 tests/failures/userdel/03_userdel_shadow_rename_failure/userdel.test create mode 100644 tests/failures/userdel/04_userdel_passwd_rename_failure/config.txt create mode 100644 tests/failures/userdel/04_userdel_passwd_rename_failure/config/etc/default/useradd create mode 100644 tests/failures/userdel/04_userdel_passwd_rename_failure/config/etc/group create mode 100644 tests/failures/userdel/04_userdel_passwd_rename_failure/config/etc/gshadow create mode 100644 tests/failures/userdel/04_userdel_passwd_rename_failure/config/etc/login.defs create mode 100644 tests/failures/userdel/04_userdel_passwd_rename_failure/config/etc/passwd create mode 100644 tests/failures/userdel/04_userdel_passwd_rename_failure/config/etc/shadow create mode 100644 tests/failures/userdel/04_userdel_passwd_rename_failure/data/userdel.err create mode 100755 tests/failures/userdel/04_userdel_passwd_rename_failure/userdel.test create mode 100644 tests/failures/userdel/05_userdel_failure_remove_mailbox/config.txt create mode 100644 tests/failures/userdel/05_userdel_failure_remove_mailbox/config/etc/default/useradd create mode 100644 tests/failures/userdel/05_userdel_failure_remove_mailbox/config/etc/group create mode 100644 tests/failures/userdel/05_userdel_failure_remove_mailbox/config/etc/gshadow create mode 100644 tests/failures/userdel/05_userdel_failure_remove_mailbox/config/etc/login.defs create mode 100644 tests/failures/userdel/05_userdel_failure_remove_mailbox/config/etc/passwd create mode 100644 tests/failures/userdel/05_userdel_failure_remove_mailbox/config/etc/shadow create mode 100644 tests/failures/userdel/05_userdel_failure_remove_mailbox/config/var/mail/foo create mode 100644 tests/failures/userdel/05_userdel_failure_remove_mailbox/data/group create mode 100644 tests/failures/userdel/05_userdel_failure_remove_mailbox/data/gshadow create mode 100644 tests/failures/userdel/05_userdel_failure_remove_mailbox/data/passwd create mode 100644 tests/failures/userdel/05_userdel_failure_remove_mailbox/data/shadow create mode 100644 tests/failures/userdel/05_userdel_failure_remove_mailbox/data/userdel.err create mode 100755 tests/failures/userdel/05_userdel_failure_remove_mailbox/userdel.test create mode 100644 tests/failures/userdel/06_userdel_failure_remove_file_homedir/config.txt create mode 100644 tests/failures/userdel/06_userdel_failure_remove_file_homedir/config/etc/default/useradd create mode 100644 tests/failures/userdel/06_userdel_failure_remove_file_homedir/config/etc/group create mode 100644 tests/failures/userdel/06_userdel_failure_remove_file_homedir/config/etc/gshadow create mode 100644 tests/failures/userdel/06_userdel_failure_remove_file_homedir/config/etc/login.defs create mode 100644 tests/failures/userdel/06_userdel_failure_remove_file_homedir/config/etc/passwd create mode 100644 tests/failures/userdel/06_userdel_failure_remove_file_homedir/config/etc/shadow create mode 100644 tests/failures/userdel/06_userdel_failure_remove_file_homedir/data/group create mode 100644 tests/failures/userdel/06_userdel_failure_remove_file_homedir/data/gshadow create mode 100644 tests/failures/userdel/06_userdel_failure_remove_file_homedir/data/passwd create mode 100644 tests/failures/userdel/06_userdel_failure_remove_file_homedir/data/shadow create mode 100644 tests/failures/userdel/06_userdel_failure_remove_file_homedir/data/userdel.err create mode 100755 tests/failures/userdel/06_userdel_failure_remove_file_homedir/userdel.test create mode 100644 tests/failures/userdel/07_userdel_failure_remove_homedir/config.txt create mode 100644 tests/failures/userdel/07_userdel_failure_remove_homedir/config/etc/default/useradd create mode 100644 tests/failures/userdel/07_userdel_failure_remove_homedir/config/etc/group create mode 100644 tests/failures/userdel/07_userdel_failure_remove_homedir/config/etc/gshadow create mode 100644 tests/failures/userdel/07_userdel_failure_remove_homedir/config/etc/login.defs create mode 100644 tests/failures/userdel/07_userdel_failure_remove_homedir/config/etc/passwd create mode 100644 tests/failures/userdel/07_userdel_failure_remove_homedir/config/etc/shadow create mode 100644 tests/failures/userdel/07_userdel_failure_remove_homedir/data/group create mode 100644 tests/failures/userdel/07_userdel_failure_remove_homedir/data/gshadow create mode 100644 tests/failures/userdel/07_userdel_failure_remove_homedir/data/passwd create mode 100644 tests/failures/userdel/07_userdel_failure_remove_homedir/data/shadow create mode 100644 tests/failures/userdel/07_userdel_failure_remove_homedir/data/userdel.err create mode 100755 tests/failures/userdel/07_userdel_failure_remove_homedir/userdel.test create mode 100644 tests/failures/userdel/08_userdel_open_passwd_failure/config.txt create mode 100644 tests/failures/userdel/08_userdel_open_passwd_failure/config/etc/default/useradd create mode 100644 tests/failures/userdel/08_userdel_open_passwd_failure/config/etc/group create mode 100644 tests/failures/userdel/08_userdel_open_passwd_failure/config/etc/gshadow create mode 100644 tests/failures/userdel/08_userdel_open_passwd_failure/config/etc/login.defs create mode 100644 tests/failures/userdel/08_userdel_open_passwd_failure/config/etc/passwd create mode 100644 tests/failures/userdel/08_userdel_open_passwd_failure/config/etc/shadow create mode 100644 tests/failures/userdel/08_userdel_open_passwd_failure/data/userdel.err create mode 100755 tests/failures/userdel/08_userdel_open_passwd_failure/userdel.test create mode 100644 tests/failures/userdel/09_userdel_open_shadow_failure/config.txt create mode 100644 tests/failures/userdel/09_userdel_open_shadow_failure/config/etc/default/useradd create mode 100644 tests/failures/userdel/09_userdel_open_shadow_failure/config/etc/group create mode 100644 tests/failures/userdel/09_userdel_open_shadow_failure/config/etc/gshadow create mode 100644 tests/failures/userdel/09_userdel_open_shadow_failure/config/etc/login.defs create mode 100644 tests/failures/userdel/09_userdel_open_shadow_failure/config/etc/passwd create mode 100644 tests/failures/userdel/09_userdel_open_shadow_failure/config/etc/shadow create mode 100644 tests/failures/userdel/09_userdel_open_shadow_failure/data/userdel.err create mode 100755 tests/failures/userdel/09_userdel_open_shadow_failure/userdel.test create mode 100644 tests/failures/userdel/10_userdel_open_group_failure/config.txt create mode 100644 tests/failures/userdel/10_userdel_open_group_failure/config/etc/default/useradd create mode 100644 tests/failures/userdel/10_userdel_open_group_failure/config/etc/group create mode 100644 tests/failures/userdel/10_userdel_open_group_failure/config/etc/gshadow create mode 100644 tests/failures/userdel/10_userdel_open_group_failure/config/etc/login.defs create mode 100644 tests/failures/userdel/10_userdel_open_group_failure/config/etc/passwd create mode 100644 tests/failures/userdel/10_userdel_open_group_failure/config/etc/shadow create mode 100644 tests/failures/userdel/10_userdel_open_group_failure/data/userdel.err create mode 100755 tests/failures/userdel/10_userdel_open_group_failure/userdel.test create mode 100644 tests/failures/userdel/11_userdel_open_gshadow_failure/config.txt create mode 100644 tests/failures/userdel/11_userdel_open_gshadow_failure/config/etc/default/useradd create mode 100644 tests/failures/userdel/11_userdel_open_gshadow_failure/config/etc/group create mode 100644 tests/failures/userdel/11_userdel_open_gshadow_failure/config/etc/gshadow create mode 100644 tests/failures/userdel/11_userdel_open_gshadow_failure/config/etc/login.defs create mode 100644 tests/failures/userdel/11_userdel_open_gshadow_failure/config/etc/passwd create mode 100644 tests/failures/userdel/11_userdel_open_gshadow_failure/config/etc/shadow create mode 100644 tests/failures/userdel/11_userdel_open_gshadow_failure/data/userdel.err create mode 100755 tests/failures/userdel/11_userdel_open_gshadow_failure/userdel.test create mode 100644 tests/failures/usermod/01_usermod_change_user_name_gshadow_rename_failure/config.txt create mode 100644 tests/failures/usermod/01_usermod_change_user_name_gshadow_rename_failure/config/etc/default/useradd create mode 100644 tests/failures/usermod/01_usermod_change_user_name_gshadow_rename_failure/config/etc/group create mode 100644 tests/failures/usermod/01_usermod_change_user_name_gshadow_rename_failure/config/etc/gshadow create mode 100644 tests/failures/usermod/01_usermod_change_user_name_gshadow_rename_failure/config/etc/login.defs create mode 100644 tests/failures/usermod/01_usermod_change_user_name_gshadow_rename_failure/config/etc/passwd create mode 100644 tests/failures/usermod/01_usermod_change_user_name_gshadow_rename_failure/config/etc/shadow create mode 100644 tests/failures/usermod/01_usermod_change_user_name_gshadow_rename_failure/data/group create mode 100644 tests/failures/usermod/01_usermod_change_user_name_gshadow_rename_failure/data/passwd create mode 100644 tests/failures/usermod/01_usermod_change_user_name_gshadow_rename_failure/data/shadow create mode 100644 tests/failures/usermod/01_usermod_change_user_name_gshadow_rename_failure/data/usermod.err create mode 100755 tests/failures/usermod/01_usermod_change_user_name_gshadow_rename_failure/usermod.test create mode 100644 tests/failures/usermod/02_usermod_change_uid_passwd_rename_failure/config.txt create mode 100644 tests/failures/usermod/02_usermod_change_uid_passwd_rename_failure/config/etc/default/useradd create mode 100644 tests/failures/usermod/02_usermod_change_uid_passwd_rename_failure/config/etc/group create mode 100644 tests/failures/usermod/02_usermod_change_uid_passwd_rename_failure/config/etc/gshadow create mode 100644 tests/failures/usermod/02_usermod_change_uid_passwd_rename_failure/config/etc/login.defs create mode 100644 tests/failures/usermod/02_usermod_change_uid_passwd_rename_failure/config/etc/passwd create mode 100644 tests/failures/usermod/02_usermod_change_uid_passwd_rename_failure/config/etc/shadow create mode 100644 tests/failures/usermod/02_usermod_change_uid_passwd_rename_failure/data/usermod.err create mode 100755 tests/failures/usermod/02_usermod_change_uid_passwd_rename_failure/usermod.test create mode 100644 tests/failures/usermod/03_usermod_change_user_name_group_rename_failure/config.txt create mode 100644 tests/failures/usermod/03_usermod_change_user_name_group_rename_failure/config/etc/default/useradd create mode 100644 tests/failures/usermod/03_usermod_change_user_name_group_rename_failure/config/etc/group create mode 100644 tests/failures/usermod/03_usermod_change_user_name_group_rename_failure/config/etc/gshadow create mode 100644 tests/failures/usermod/03_usermod_change_user_name_group_rename_failure/config/etc/login.defs create mode 100644 tests/failures/usermod/03_usermod_change_user_name_group_rename_failure/config/etc/passwd create mode 100644 tests/failures/usermod/03_usermod_change_user_name_group_rename_failure/config/etc/shadow create mode 100644 tests/failures/usermod/03_usermod_change_user_name_group_rename_failure/data/passwd create mode 100644 tests/failures/usermod/03_usermod_change_user_name_group_rename_failure/data/shadow create mode 100644 tests/failures/usermod/03_usermod_change_user_name_group_rename_failure/data/usermod.err create mode 100755 tests/failures/usermod/03_usermod_change_user_name_group_rename_failure/usermod.test create mode 100644 tests/failures/usermod/04_usermod_change_user_name_gshadow_rename_no_failure/config.txt create mode 100644 tests/failures/usermod/04_usermod_change_user_name_gshadow_rename_no_failure/config/etc/default/useradd create mode 100644 tests/failures/usermod/04_usermod_change_user_name_gshadow_rename_no_failure/config/etc/group create mode 100644 tests/failures/usermod/04_usermod_change_user_name_gshadow_rename_no_failure/config/etc/gshadow create mode 100644 tests/failures/usermod/04_usermod_change_user_name_gshadow_rename_no_failure/config/etc/login.defs create mode 100644 tests/failures/usermod/04_usermod_change_user_name_gshadow_rename_no_failure/config/etc/passwd create mode 100644 tests/failures/usermod/04_usermod_change_user_name_gshadow_rename_no_failure/config/etc/shadow create mode 100644 tests/failures/usermod/04_usermod_change_user_name_gshadow_rename_no_failure/data/passwd create mode 100644 tests/failures/usermod/04_usermod_change_user_name_gshadow_rename_no_failure/data/shadow create mode 100755 tests/failures/usermod/04_usermod_change_user_name_gshadow_rename_no_failure/usermod.test create mode 100644 tests/failures/usermod/05_usermod_change_uid_shadow_rename_failure/config.txt create mode 100644 tests/failures/usermod/05_usermod_change_uid_shadow_rename_failure/config/etc/default/useradd create mode 100644 tests/failures/usermod/05_usermod_change_uid_shadow_rename_failure/config/etc/group create mode 100644 tests/failures/usermod/05_usermod_change_uid_shadow_rename_failure/config/etc/gshadow create mode 100644 tests/failures/usermod/05_usermod_change_uid_shadow_rename_failure/config/etc/login.defs create mode 100644 tests/failures/usermod/05_usermod_change_uid_shadow_rename_failure/config/etc/passwd create mode 100644 tests/failures/usermod/05_usermod_change_uid_shadow_rename_failure/config/etc/shadow create mode 100644 tests/failures/usermod/05_usermod_change_uid_shadow_rename_failure/data/passwd create mode 100644 tests/failures/usermod/05_usermod_change_uid_shadow_rename_failure/data/usermod.err create mode 100755 tests/failures/usermod/05_usermod_change_uid_shadow_rename_failure/usermod.test create mode 100644 tests/failures/usermod/06_usermod_change_user_name_open_passwd_failure/config.txt create mode 100644 tests/failures/usermod/06_usermod_change_user_name_open_passwd_failure/config/etc/default/useradd create mode 100644 tests/failures/usermod/06_usermod_change_user_name_open_passwd_failure/config/etc/group create mode 100644 tests/failures/usermod/06_usermod_change_user_name_open_passwd_failure/config/etc/gshadow create mode 100644 tests/failures/usermod/06_usermod_change_user_name_open_passwd_failure/config/etc/login.defs create mode 100644 tests/failures/usermod/06_usermod_change_user_name_open_passwd_failure/config/etc/passwd create mode 100644 tests/failures/usermod/06_usermod_change_user_name_open_passwd_failure/config/etc/shadow create mode 100644 tests/failures/usermod/06_usermod_change_user_name_open_passwd_failure/data/usermod.err create mode 100755 tests/failures/usermod/06_usermod_change_user_name_open_passwd_failure/usermod.test create mode 100644 tests/failures/usermod/07_usermod_change_user_name_open_shadow_failure/config.txt create mode 100644 tests/failures/usermod/07_usermod_change_user_name_open_shadow_failure/config/etc/default/useradd create mode 100644 tests/failures/usermod/07_usermod_change_user_name_open_shadow_failure/config/etc/group create mode 100644 tests/failures/usermod/07_usermod_change_user_name_open_shadow_failure/config/etc/gshadow create mode 100644 tests/failures/usermod/07_usermod_change_user_name_open_shadow_failure/config/etc/login.defs create mode 100644 tests/failures/usermod/07_usermod_change_user_name_open_shadow_failure/config/etc/passwd create mode 100644 tests/failures/usermod/07_usermod_change_user_name_open_shadow_failure/config/etc/shadow create mode 100644 tests/failures/usermod/07_usermod_change_user_name_open_shadow_failure/data/usermod.err create mode 100755 tests/failures/usermod/07_usermod_change_user_name_open_shadow_failure/usermod.test create mode 100644 tests/failures/usermod/08_usermod_change_user_name_open_group_failure/config.txt create mode 100644 tests/failures/usermod/08_usermod_change_user_name_open_group_failure/config/etc/default/useradd create mode 100644 tests/failures/usermod/08_usermod_change_user_name_open_group_failure/config/etc/group create mode 100644 tests/failures/usermod/08_usermod_change_user_name_open_group_failure/config/etc/gshadow create mode 100644 tests/failures/usermod/08_usermod_change_user_name_open_group_failure/config/etc/login.defs create mode 100644 tests/failures/usermod/08_usermod_change_user_name_open_group_failure/config/etc/passwd create mode 100644 tests/failures/usermod/08_usermod_change_user_name_open_group_failure/config/etc/shadow create mode 100644 tests/failures/usermod/08_usermod_change_user_name_open_group_failure/data/usermod.err create mode 100755 tests/failures/usermod/08_usermod_change_user_name_open_group_failure/usermod.test create mode 100644 tests/failures/usermod/09_usermod_change_user_name_open_gshadow_failure/config.txt create mode 100644 tests/failures/usermod/09_usermod_change_user_name_open_gshadow_failure/config/etc/default/useradd create mode 100644 tests/failures/usermod/09_usermod_change_user_name_open_gshadow_failure/config/etc/group create mode 100644 tests/failures/usermod/09_usermod_change_user_name_open_gshadow_failure/config/etc/gshadow create mode 100644 tests/failures/usermod/09_usermod_change_user_name_open_gshadow_failure/config/etc/login.defs create mode 100644 tests/failures/usermod/09_usermod_change_user_name_open_gshadow_failure/config/etc/passwd create mode 100644 tests/failures/usermod/09_usermod_change_user_name_open_gshadow_failure/config/etc/shadow create mode 100644 tests/failures/usermod/09_usermod_change_user_name_open_gshadow_failure/data/usermod.err create mode 100755 tests/failures/usermod/09_usermod_change_user_name_open_gshadow_failure/usermod.test create mode 100644 tests/failures/usermod/10_usermod_-p_time_0/config.txt create mode 100644 tests/failures/usermod/10_usermod_-p_time_0/config/etc/default/useradd create mode 100644 tests/failures/usermod/10_usermod_-p_time_0/config/etc/group create mode 100644 tests/failures/usermod/10_usermod_-p_time_0/config/etc/gshadow create mode 100644 tests/failures/usermod/10_usermod_-p_time_0/config/etc/passwd create mode 100644 tests/failures/usermod/10_usermod_-p_time_0/config/etc/shadow create mode 100644 tests/failures/usermod/10_usermod_-p_time_0/data/passwd create mode 100644 tests/failures/usermod/10_usermod_-p_time_0/data/shadow create mode 100755 tests/failures/usermod/10_usermod_-p_time_0/usermod.test create mode 100644 tests/failures/usermod/11_usermod-f_no_shadow_entry_time_0/config.txt create mode 100644 tests/failures/usermod/11_usermod-f_no_shadow_entry_time_0/config/etc/default/useradd create mode 100644 tests/failures/usermod/11_usermod-f_no_shadow_entry_time_0/config/etc/group create mode 100644 tests/failures/usermod/11_usermod-f_no_shadow_entry_time_0/config/etc/gshadow create mode 100644 tests/failures/usermod/11_usermod-f_no_shadow_entry_time_0/config/etc/passwd create mode 100644 tests/failures/usermod/11_usermod-f_no_shadow_entry_time_0/config/etc/shadow create mode 100644 tests/failures/usermod/11_usermod-f_no_shadow_entry_time_0/data/shadow create mode 100755 tests/failures/usermod/11_usermod-f_no_shadow_entry_time_0/usermod.test create mode 100644 tests/failures/usermod/12_usermod_change_uid_passwd_unlock_passwd_failure/config.txt create mode 100644 tests/failures/usermod/12_usermod_change_uid_passwd_unlock_passwd_failure/config/etc/default/useradd create mode 100644 tests/failures/usermod/12_usermod_change_uid_passwd_unlock_passwd_failure/config/etc/group create mode 100644 tests/failures/usermod/12_usermod_change_uid_passwd_unlock_passwd_failure/config/etc/gshadow create mode 100644 tests/failures/usermod/12_usermod_change_uid_passwd_unlock_passwd_failure/config/etc/login.defs create mode 100644 tests/failures/usermod/12_usermod_change_uid_passwd_unlock_passwd_failure/config/etc/passwd create mode 100644 tests/failures/usermod/12_usermod_change_uid_passwd_unlock_passwd_failure/config/etc/shadow create mode 100644 tests/failures/usermod/12_usermod_change_uid_passwd_unlock_passwd_failure/data/usermod.err create mode 100755 tests/failures/usermod/12_usermod_change_uid_passwd_unlock_passwd_failure/usermod.test create mode 100755 tests/grouptools/chgpasswd/01_chgpasswd_invalid_group/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/01_chgpasswd_invalid_group/config/etc/group create mode 100644 tests/grouptools/chgpasswd/01_chgpasswd_invalid_group/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/01_chgpasswd_invalid_group/config/etc/login.defs create mode 100644 tests/grouptools/chgpasswd/01_chgpasswd_invalid_group/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/01_chgpasswd_invalid_group/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/01_chgpasswd_invalid_group/data/chgpasswd.err create mode 100755 tests/grouptools/chgpasswd/02_chgpasswd_multiple_groups/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/02_chgpasswd_multiple_groups/config/etc/group create mode 100644 tests/grouptools/chgpasswd/02_chgpasswd_multiple_groups/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/02_chgpasswd_multiple_groups/config/etc/login.defs create mode 100644 tests/grouptools/chgpasswd/02_chgpasswd_multiple_groups/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/02_chgpasswd_multiple_groups/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/02_chgpasswd_multiple_groups/data/gshadow create mode 100755 tests/grouptools/chgpasswd/03_chgpasswd_no_gshadow_file/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/03_chgpasswd_no_gshadow_file/config/etc/group create mode 100644 tests/grouptools/chgpasswd/03_chgpasswd_no_gshadow_file/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/03_chgpasswd_no_gshadow_file/config/etc/login.defs create mode 100644 tests/grouptools/chgpasswd/03_chgpasswd_no_gshadow_file/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/03_chgpasswd_no_gshadow_file/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/03_chgpasswd_no_gshadow_file/data/group create mode 100755 tests/grouptools/chgpasswd/04_chgpasswd_no_gshadow_entry/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/04_chgpasswd_no_gshadow_entry/config/etc/group create mode 100644 tests/grouptools/chgpasswd/04_chgpasswd_no_gshadow_entry/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/04_chgpasswd_no_gshadow_entry/config/etc/login.defs create mode 100644 tests/grouptools/chgpasswd/04_chgpasswd_no_gshadow_entry/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/04_chgpasswd_no_gshadow_entry/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/04_chgpasswd_no_gshadow_entry/data/group create mode 100644 tests/grouptools/chgpasswd/04_chgpasswd_no_gshadow_entry/data/gshadow create mode 100755 tests/grouptools/chgpasswd/05_chgpasswd_error_no_password/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/05_chgpasswd_error_no_password/config/etc/group create mode 100644 tests/grouptools/chgpasswd/05_chgpasswd_error_no_password/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/05_chgpasswd_error_no_password/config/etc/login.defs create mode 100644 tests/grouptools/chgpasswd/05_chgpasswd_error_no_password/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/05_chgpasswd_error_no_password/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/05_chgpasswd_error_no_password/data/chgpasswd.err create mode 100755 tests/grouptools/chgpasswd/06_chgpasswd_usage/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/06_chgpasswd_usage/config.txt create mode 100644 tests/grouptools/chgpasswd/06_chgpasswd_usage/config/etc/default/useradd create mode 100644 tests/grouptools/chgpasswd/06_chgpasswd_usage/config/etc/group create mode 100644 tests/grouptools/chgpasswd/06_chgpasswd_usage/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/06_chgpasswd_usage/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/06_chgpasswd_usage/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/06_chgpasswd_usage/data/usage.out create mode 100755 tests/grouptools/chgpasswd/07_chgpasswd_usage_bad_option/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/07_chgpasswd_usage_bad_option/config.txt create mode 100644 tests/grouptools/chgpasswd/07_chgpasswd_usage_bad_option/config/etc/default/useradd create mode 100644 tests/grouptools/chgpasswd/07_chgpasswd_usage_bad_option/config/etc/group create mode 100644 tests/grouptools/chgpasswd/07_chgpasswd_usage_bad_option/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/07_chgpasswd_usage_bad_option/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/07_chgpasswd_usage_bad_option/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/07_chgpasswd_usage_bad_option/data/usage.out create mode 100755 tests/grouptools/chgpasswd/08_chgpasswd_usage-e-m_exclusive/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/08_chgpasswd_usage-e-m_exclusive/config.txt create mode 100644 tests/grouptools/chgpasswd/08_chgpasswd_usage-e-m_exclusive/config/etc/default/useradd create mode 100644 tests/grouptools/chgpasswd/08_chgpasswd_usage-e-m_exclusive/config/etc/group create mode 100644 tests/grouptools/chgpasswd/08_chgpasswd_usage-e-m_exclusive/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/08_chgpasswd_usage-e-m_exclusive/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/08_chgpasswd_usage-e-m_exclusive/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/08_chgpasswd_usage-e-m_exclusive/data/usage.out create mode 100755 tests/grouptools/chgpasswd/09_chgpasswd_usage-e-c_exclusive/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/09_chgpasswd_usage-e-c_exclusive/config.txt create mode 100644 tests/grouptools/chgpasswd/09_chgpasswd_usage-e-c_exclusive/config/etc/default/useradd create mode 100644 tests/grouptools/chgpasswd/09_chgpasswd_usage-e-c_exclusive/config/etc/group create mode 100644 tests/grouptools/chgpasswd/09_chgpasswd_usage-e-c_exclusive/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/09_chgpasswd_usage-e-c_exclusive/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/09_chgpasswd_usage-e-c_exclusive/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/09_chgpasswd_usage-e-c_exclusive/data/usage.out create mode 100755 tests/grouptools/chgpasswd/10_chgpasswd_usage-m-c_exclusive/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/10_chgpasswd_usage-m-c_exclusive/config.txt create mode 100644 tests/grouptools/chgpasswd/10_chgpasswd_usage-m-c_exclusive/config/etc/default/useradd create mode 100644 tests/grouptools/chgpasswd/10_chgpasswd_usage-m-c_exclusive/config/etc/group create mode 100644 tests/grouptools/chgpasswd/10_chgpasswd_usage-m-c_exclusive/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/10_chgpasswd_usage-m-c_exclusive/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/10_chgpasswd_usage-m-c_exclusive/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/10_chgpasswd_usage-m-c_exclusive/data/usage.out create mode 100755 tests/grouptools/chgpasswd/11_chgpasswd_usage-s_without-c/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/11_chgpasswd_usage-s_without-c/config.txt create mode 100644 tests/grouptools/chgpasswd/11_chgpasswd_usage-s_without-c/config/etc/default/useradd create mode 100644 tests/grouptools/chgpasswd/11_chgpasswd_usage-s_without-c/config/etc/group create mode 100644 tests/grouptools/chgpasswd/11_chgpasswd_usage-s_without-c/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/11_chgpasswd_usage-s_without-c/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/11_chgpasswd_usage-s_without-c/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/11_chgpasswd_usage-s_without-c/data/usage.out create mode 100755 tests/grouptools/chgpasswd/12_chgpasswd_usage-s_invalid/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/12_chgpasswd_usage-s_invalid/config.txt create mode 100644 tests/grouptools/chgpasswd/12_chgpasswd_usage-s_invalid/config/etc/default/useradd create mode 100644 tests/grouptools/chgpasswd/12_chgpasswd_usage-s_invalid/config/etc/group create mode 100644 tests/grouptools/chgpasswd/12_chgpasswd_usage-s_invalid/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/12_chgpasswd_usage-s_invalid/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/12_chgpasswd_usage-s_invalid/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/12_chgpasswd_usage-s_invalid/data/usage.out create mode 100755 tests/grouptools/chgpasswd/13_chgpasswd_usage-c_invalid/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/13_chgpasswd_usage-c_invalid/config.txt create mode 100644 tests/grouptools/chgpasswd/13_chgpasswd_usage-c_invalid/config/etc/default/useradd create mode 100644 tests/grouptools/chgpasswd/13_chgpasswd_usage-c_invalid/config/etc/group create mode 100644 tests/grouptools/chgpasswd/13_chgpasswd_usage-c_invalid/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/13_chgpasswd_usage-c_invalid/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/13_chgpasswd_usage-c_invalid/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/13_chgpasswd_usage-c_invalid/data/usage.out create mode 100755 tests/grouptools/chgpasswd/14_chgpasswd_password_encrypted/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/14_chgpasswd_password_encrypted/config/etc/group create mode 100644 tests/grouptools/chgpasswd/14_chgpasswd_password_encrypted/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/14_chgpasswd_password_encrypted/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/14_chgpasswd_password_encrypted/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/14_chgpasswd_password_encrypted/data/gshadow create mode 100755 tests/grouptools/chgpasswd/15_chgpasswd_password_md5/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/15_chgpasswd_password_md5/config/etc/group create mode 100644 tests/grouptools/chgpasswd/15_chgpasswd_password_md5/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/15_chgpasswd_password_md5/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/15_chgpasswd_password_md5/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/15_chgpasswd_password_md5/data/gshadow create mode 100755 tests/grouptools/chgpasswd/16_chgpasswd_password_NONE/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/16_chgpasswd_password_NONE/config/etc/group create mode 100644 tests/grouptools/chgpasswd/16_chgpasswd_password_NONE/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/16_chgpasswd_password_NONE/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/16_chgpasswd_password_NONE/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/16_chgpasswd_password_NONE/data/gshadow create mode 100755 tests/grouptools/chgpasswd/17_chgpasswd_password_MD5/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/17_chgpasswd_password_MD5/config/etc/group create mode 100644 tests/grouptools/chgpasswd/17_chgpasswd_password_MD5/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/17_chgpasswd_password_MD5/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/17_chgpasswd_password_MD5/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/17_chgpasswd_password_MD5/data/gshadow create mode 100755 tests/grouptools/chgpasswd/18_chgpasswd_password_DES/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/18_chgpasswd_password_DES/config/etc/group create mode 100644 tests/grouptools/chgpasswd/18_chgpasswd_password_DES/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/18_chgpasswd_password_DES/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/18_chgpasswd_password_DES/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/18_chgpasswd_password_DES/data/gshadow create mode 100755 tests/grouptools/chgpasswd/19_chgpasswd_password_SHA256/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/19_chgpasswd_password_SHA256/config/etc/group create mode 100644 tests/grouptools/chgpasswd/19_chgpasswd_password_SHA256/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/19_chgpasswd_password_SHA256/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/19_chgpasswd_password_SHA256/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/19_chgpasswd_password_SHA256/data/gshadow create mode 100755 tests/grouptools/chgpasswd/20_chgpasswd_password_SHA256_rounds_900/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/20_chgpasswd_password_SHA256_rounds_900/config/etc/group create mode 100644 tests/grouptools/chgpasswd/20_chgpasswd_password_SHA256_rounds_900/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/20_chgpasswd_password_SHA256_rounds_900/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/20_chgpasswd_password_SHA256_rounds_900/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/20_chgpasswd_password_SHA256_rounds_900/data/gshadow create mode 100755 tests/grouptools/chgpasswd/21_chgpasswd_password_SHA256_rounds_9000/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/21_chgpasswd_password_SHA256_rounds_9000/config/etc/group create mode 100644 tests/grouptools/chgpasswd/21_chgpasswd_password_SHA256_rounds_9000/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/21_chgpasswd_password_SHA256_rounds_9000/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/21_chgpasswd_password_SHA256_rounds_9000/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/21_chgpasswd_password_SHA256_rounds_9000/data/gshadow create mode 100755 tests/grouptools/chgpasswd/22_chgpasswd_password_SHA512/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/22_chgpasswd_password_SHA512/config/etc/group create mode 100644 tests/grouptools/chgpasswd/22_chgpasswd_password_SHA512/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/22_chgpasswd_password_SHA512/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/22_chgpasswd_password_SHA512/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/22_chgpasswd_password_SHA512/data/gshadow create mode 100755 tests/grouptools/chgpasswd/23_chgpasswd_password_SHA512_rounds_900/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/23_chgpasswd_password_SHA512_rounds_900/config/etc/group create mode 100644 tests/grouptools/chgpasswd/23_chgpasswd_password_SHA512_rounds_900/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/23_chgpasswd_password_SHA512_rounds_900/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/23_chgpasswd_password_SHA512_rounds_900/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/23_chgpasswd_password_SHA512_rounds_900/data/gshadow create mode 100755 tests/grouptools/chgpasswd/24_chgpasswd_password_SHA512_rounds_9000/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/24_chgpasswd_password_SHA512_rounds_9000/config/etc/group create mode 100644 tests/grouptools/chgpasswd/24_chgpasswd_password_SHA512_rounds_9000/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/24_chgpasswd_password_SHA512_rounds_9000/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/24_chgpasswd_password_SHA512_rounds_9000/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/24_chgpasswd_password_SHA512_rounds_9000/data/gshadow create mode 100755 tests/grouptools/chgpasswd/25_chgpasswd-e_no_gshadow_file/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/25_chgpasswd-e_no_gshadow_file/config/etc/group create mode 100644 tests/grouptools/chgpasswd/25_chgpasswd-e_no_gshadow_file/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/25_chgpasswd-e_no_gshadow_file/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/25_chgpasswd-e_no_gshadow_file/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/25_chgpasswd-e_no_gshadow_file/data/group create mode 100755 tests/grouptools/chgpasswd/26_chgpasswd_no_gshadow_file_invalid_group/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/26_chgpasswd_no_gshadow_file_invalid_group/config/etc/group create mode 100644 tests/grouptools/chgpasswd/26_chgpasswd_no_gshadow_file_invalid_group/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/26_chgpasswd_no_gshadow_file_invalid_group/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/26_chgpasswd_no_gshadow_file_invalid_group/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/26_chgpasswd_no_gshadow_file_invalid_group/data/group create mode 100755 tests/grouptools/chgpasswd/29_chgpasswd-e_no_gshadow_entry/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/29_chgpasswd-e_no_gshadow_entry/config/etc/group create mode 100644 tests/grouptools/chgpasswd/29_chgpasswd-e_no_gshadow_entry/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/29_chgpasswd-e_no_gshadow_entry/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/29_chgpasswd-e_no_gshadow_entry/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/29_chgpasswd-e_no_gshadow_entry/data/group create mode 100644 tests/grouptools/chgpasswd/29_chgpasswd-e_no_gshadow_entry/data/gshadow create mode 100755 tests/grouptools/chgpasswd/30_chgpasswd_locked_group/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/30_chgpasswd_locked_group/config.txt create mode 100644 tests/grouptools/chgpasswd/30_chgpasswd_locked_group/config/etc/default/useradd create mode 100644 tests/grouptools/chgpasswd/30_chgpasswd_locked_group/config/etc/group create mode 100644 tests/grouptools/chgpasswd/30_chgpasswd_locked_group/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/30_chgpasswd_locked_group/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/30_chgpasswd_locked_group/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/30_chgpasswd_locked_group/data/chgpasswd.err create mode 100755 tests/grouptools/chgpasswd/31_chgpasswd_locked_gshadow/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/31_chgpasswd_locked_gshadow/config.txt create mode 100644 tests/grouptools/chgpasswd/31_chgpasswd_locked_gshadow/config/etc/default/useradd create mode 100644 tests/grouptools/chgpasswd/31_chgpasswd_locked_gshadow/config/etc/group create mode 100644 tests/grouptools/chgpasswd/31_chgpasswd_locked_gshadow/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/31_chgpasswd_locked_gshadow/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/31_chgpasswd_locked_gshadow/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/31_chgpasswd_locked_gshadow/data/chgpasswd.err create mode 100755 tests/grouptools/chgpasswd/32_chgpasswd_invalid_group/chgpasswd.test create mode 100644 tests/grouptools/chgpasswd/32_chgpasswd_invalid_group/config.txt create mode 100644 tests/grouptools/chgpasswd/32_chgpasswd_invalid_group/config/etc/default/useradd create mode 100644 tests/grouptools/chgpasswd/32_chgpasswd_invalid_group/config/etc/group create mode 100644 tests/grouptools/chgpasswd/32_chgpasswd_invalid_group/config/etc/gshadow create mode 100644 tests/grouptools/chgpasswd/32_chgpasswd_invalid_group/config/etc/passwd create mode 100644 tests/grouptools/chgpasswd/32_chgpasswd_invalid_group/config/etc/shadow create mode 100644 tests/grouptools/chgpasswd/32_chgpasswd_invalid_group/data/chgpasswd.err create mode 100644 tests/grouptools/gpasswd/01_gpasswd_change_member_list/config.txt create mode 100644 tests/grouptools/gpasswd/01_gpasswd_change_member_list/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/01_gpasswd_change_member_list/config/etc/group create mode 100644 tests/grouptools/gpasswd/01_gpasswd_change_member_list/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/01_gpasswd_change_member_list/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/01_gpasswd_change_member_list/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/01_gpasswd_change_member_list/data/group create mode 100644 tests/grouptools/gpasswd/01_gpasswd_change_member_list/data/gshadow create mode 100755 tests/grouptools/gpasswd/01_gpasswd_change_member_list/gpasswd.test create mode 100644 tests/grouptools/gpasswd/02_gpasswd_change_member_list/config.txt create mode 100644 tests/grouptools/gpasswd/02_gpasswd_change_member_list/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/02_gpasswd_change_member_list/config/etc/group create mode 100644 tests/grouptools/gpasswd/02_gpasswd_change_member_list/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/02_gpasswd_change_member_list/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/02_gpasswd_change_member_list/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/02_gpasswd_change_member_list/data/group create mode 100644 tests/grouptools/gpasswd/02_gpasswd_change_member_list/data/gshadow create mode 100755 tests/grouptools/gpasswd/02_gpasswd_change_member_list/gpasswd.test create mode 100644 tests/grouptools/gpasswd/03_gpasswd_change_member_list/config.txt create mode 100644 tests/grouptools/gpasswd/03_gpasswd_change_member_list/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/03_gpasswd_change_member_list/config/etc/group create mode 100644 tests/grouptools/gpasswd/03_gpasswd_change_member_list/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/03_gpasswd_change_member_list/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/03_gpasswd_change_member_list/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/03_gpasswd_change_member_list/data/group create mode 100644 tests/grouptools/gpasswd/03_gpasswd_change_member_list/data/gshadow create mode 100755 tests/grouptools/gpasswd/03_gpasswd_change_member_list/gpasswd.test create mode 100644 tests/grouptools/gpasswd/04_gpasswd_change_member_list/config.txt create mode 100644 tests/grouptools/gpasswd/04_gpasswd_change_member_list/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/04_gpasswd_change_member_list/config/etc/group create mode 100644 tests/grouptools/gpasswd/04_gpasswd_change_member_list/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/04_gpasswd_change_member_list/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/04_gpasswd_change_member_list/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/04_gpasswd_change_member_list/data/group create mode 100644 tests/grouptools/gpasswd/04_gpasswd_change_member_list/data/gshadow create mode 100755 tests/grouptools/gpasswd/04_gpasswd_change_member_list/gpasswd.test create mode 100644 tests/grouptools/gpasswd/05_gpasswd_change_member_list/config.txt create mode 100644 tests/grouptools/gpasswd/05_gpasswd_change_member_list/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/05_gpasswd_change_member_list/config/etc/group create mode 100644 tests/grouptools/gpasswd/05_gpasswd_change_member_list/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/05_gpasswd_change_member_list/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/05_gpasswd_change_member_list/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/05_gpasswd_change_member_list/data/group create mode 100644 tests/grouptools/gpasswd/05_gpasswd_change_member_list/data/gshadow create mode 100755 tests/grouptools/gpasswd/05_gpasswd_change_member_list/gpasswd.test create mode 100644 tests/grouptools/gpasswd/06_gpasswd_change_member_list/config.txt create mode 100644 tests/grouptools/gpasswd/06_gpasswd_change_member_list/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/06_gpasswd_change_member_list/config/etc/group create mode 100644 tests/grouptools/gpasswd/06_gpasswd_change_member_list/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/06_gpasswd_change_member_list/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/06_gpasswd_change_member_list/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/06_gpasswd_change_member_list/data/group create mode 100644 tests/grouptools/gpasswd/06_gpasswd_change_member_list/data/gshadow create mode 100755 tests/grouptools/gpasswd/06_gpasswd_change_member_list/gpasswd.test create mode 100644 tests/grouptools/gpasswd/07_gpasswd_change_member_list-no_shadow_group/config.txt create mode 100644 tests/grouptools/gpasswd/07_gpasswd_change_member_list-no_shadow_group/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/07_gpasswd_change_member_list-no_shadow_group/config/etc/group create mode 100644 tests/grouptools/gpasswd/07_gpasswd_change_member_list-no_shadow_group/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/07_gpasswd_change_member_list-no_shadow_group/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/07_gpasswd_change_member_list-no_shadow_group/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/07_gpasswd_change_member_list-no_shadow_group/data/group create mode 100644 tests/grouptools/gpasswd/07_gpasswd_change_member_list-no_shadow_group/data/gshadow create mode 100755 tests/grouptools/gpasswd/07_gpasswd_change_member_list-no_shadow_group/gpasswd.test create mode 100644 tests/grouptools/gpasswd/08_gpasswd_change_member_list-no_shadow_group/config.txt create mode 100644 tests/grouptools/gpasswd/08_gpasswd_change_member_list-no_shadow_group/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/08_gpasswd_change_member_list-no_shadow_group/config/etc/group create mode 100644 tests/grouptools/gpasswd/08_gpasswd_change_member_list-no_shadow_group/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/08_gpasswd_change_member_list-no_shadow_group/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/08_gpasswd_change_member_list-no_shadow_group/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/08_gpasswd_change_member_list-no_shadow_group/data/group create mode 100644 tests/grouptools/gpasswd/08_gpasswd_change_member_list-no_shadow_group/data/gshadow create mode 100755 tests/grouptools/gpasswd/08_gpasswd_change_member_list-no_shadow_group/gpasswd.test create mode 100644 tests/grouptools/gpasswd/09_gpasswd_change_member_list-no_shadow_group/config.txt create mode 100644 tests/grouptools/gpasswd/09_gpasswd_change_member_list-no_shadow_group/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/09_gpasswd_change_member_list-no_shadow_group/config/etc/group create mode 100644 tests/grouptools/gpasswd/09_gpasswd_change_member_list-no_shadow_group/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/09_gpasswd_change_member_list-no_shadow_group/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/09_gpasswd_change_member_list-no_shadow_group/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/09_gpasswd_change_member_list-no_shadow_group/data/group create mode 100644 tests/grouptools/gpasswd/09_gpasswd_change_member_list-no_shadow_group/data/gshadow create mode 100755 tests/grouptools/gpasswd/09_gpasswd_change_member_list-no_shadow_group/gpasswd.test create mode 100644 tests/grouptools/gpasswd/10_gpasswd_change_member_list-no_shadow_group/config.txt create mode 100644 tests/grouptools/gpasswd/10_gpasswd_change_member_list-no_shadow_group/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/10_gpasswd_change_member_list-no_shadow_group/config/etc/group create mode 100644 tests/grouptools/gpasswd/10_gpasswd_change_member_list-no_shadow_group/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/10_gpasswd_change_member_list-no_shadow_group/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/10_gpasswd_change_member_list-no_shadow_group/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/10_gpasswd_change_member_list-no_shadow_group/data/group create mode 100644 tests/grouptools/gpasswd/10_gpasswd_change_member_list-no_shadow_group/data/gshadow create mode 100755 tests/grouptools/gpasswd/10_gpasswd_change_member_list-no_shadow_group/gpasswd.test create mode 100644 tests/grouptools/gpasswd/11_gpasswd_change_member_list-no_shadow_group/config.txt create mode 100644 tests/grouptools/gpasswd/11_gpasswd_change_member_list-no_shadow_group/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/11_gpasswd_change_member_list-no_shadow_group/config/etc/group create mode 100644 tests/grouptools/gpasswd/11_gpasswd_change_member_list-no_shadow_group/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/11_gpasswd_change_member_list-no_shadow_group/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/11_gpasswd_change_member_list-no_shadow_group/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/11_gpasswd_change_member_list-no_shadow_group/data/group create mode 100644 tests/grouptools/gpasswd/11_gpasswd_change_member_list-no_shadow_group/data/gshadow create mode 100755 tests/grouptools/gpasswd/11_gpasswd_change_member_list-no_shadow_group/gpasswd.test create mode 100644 tests/grouptools/gpasswd/12_gpasswd_change_member_list-no_shadow_group/config.txt create mode 100644 tests/grouptools/gpasswd/12_gpasswd_change_member_list-no_shadow_group/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/12_gpasswd_change_member_list-no_shadow_group/config/etc/group create mode 100644 tests/grouptools/gpasswd/12_gpasswd_change_member_list-no_shadow_group/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/12_gpasswd_change_member_list-no_shadow_group/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/12_gpasswd_change_member_list-no_shadow_group/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/12_gpasswd_change_member_list-no_shadow_group/data/group create mode 100644 tests/grouptools/gpasswd/12_gpasswd_change_member_list-no_shadow_group/data/gshadow create mode 100755 tests/grouptools/gpasswd/12_gpasswd_change_member_list-no_shadow_group/gpasswd.test create mode 100644 tests/grouptools/gpasswd/13_gpasswd_change_member_list-no_gshadow_file/config.txt create mode 100644 tests/grouptools/gpasswd/13_gpasswd_change_member_list-no_gshadow_file/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/13_gpasswd_change_member_list-no_gshadow_file/config/etc/group create mode 100644 tests/grouptools/gpasswd/13_gpasswd_change_member_list-no_gshadow_file/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/13_gpasswd_change_member_list-no_gshadow_file/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/13_gpasswd_change_member_list-no_gshadow_file/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/13_gpasswd_change_member_list-no_gshadow_file/data/group create mode 100755 tests/grouptools/gpasswd/13_gpasswd_change_member_list-no_gshadow_file/gpasswd.test create mode 100644 tests/grouptools/gpasswd/14_gpasswd_change_member_list-no_gshadow_file/config.txt create mode 100644 tests/grouptools/gpasswd/14_gpasswd_change_member_list-no_gshadow_file/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/14_gpasswd_change_member_list-no_gshadow_file/config/etc/group create mode 100644 tests/grouptools/gpasswd/14_gpasswd_change_member_list-no_gshadow_file/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/14_gpasswd_change_member_list-no_gshadow_file/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/14_gpasswd_change_member_list-no_gshadow_file/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/14_gpasswd_change_member_list-no_gshadow_file/data/group create mode 100755 tests/grouptools/gpasswd/14_gpasswd_change_member_list-no_gshadow_file/gpasswd.test create mode 100644 tests/grouptools/gpasswd/15_gpasswd_change_member_list-no_gshadow_file/config.txt create mode 100644 tests/grouptools/gpasswd/15_gpasswd_change_member_list-no_gshadow_file/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/15_gpasswd_change_member_list-no_gshadow_file/config/etc/group create mode 100644 tests/grouptools/gpasswd/15_gpasswd_change_member_list-no_gshadow_file/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/15_gpasswd_change_member_list-no_gshadow_file/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/15_gpasswd_change_member_list-no_gshadow_file/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/15_gpasswd_change_member_list-no_gshadow_file/data/group create mode 100755 tests/grouptools/gpasswd/15_gpasswd_change_member_list-no_gshadow_file/gpasswd.test create mode 100644 tests/grouptools/gpasswd/16_gpasswd_change_member_list-no_gshadow_file/config.txt create mode 100644 tests/grouptools/gpasswd/16_gpasswd_change_member_list-no_gshadow_file/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/16_gpasswd_change_member_list-no_gshadow_file/config/etc/group create mode 100644 tests/grouptools/gpasswd/16_gpasswd_change_member_list-no_gshadow_file/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/16_gpasswd_change_member_list-no_gshadow_file/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/16_gpasswd_change_member_list-no_gshadow_file/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/16_gpasswd_change_member_list-no_gshadow_file/data/group create mode 100755 tests/grouptools/gpasswd/16_gpasswd_change_member_list-no_gshadow_file/gpasswd.test create mode 100644 tests/grouptools/gpasswd/17_gpasswd_change_member_list-no_gshadow_file/config.txt create mode 100644 tests/grouptools/gpasswd/17_gpasswd_change_member_list-no_gshadow_file/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/17_gpasswd_change_member_list-no_gshadow_file/config/etc/group create mode 100644 tests/grouptools/gpasswd/17_gpasswd_change_member_list-no_gshadow_file/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/17_gpasswd_change_member_list-no_gshadow_file/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/17_gpasswd_change_member_list-no_gshadow_file/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/17_gpasswd_change_member_list-no_gshadow_file/data/group create mode 100755 tests/grouptools/gpasswd/17_gpasswd_change_member_list-no_gshadow_file/gpasswd.test create mode 100644 tests/grouptools/gpasswd/18_gpasswd_change_member_list-no_gshadow_file/config.txt create mode 100644 tests/grouptools/gpasswd/18_gpasswd_change_member_list-no_gshadow_file/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/18_gpasswd_change_member_list-no_gshadow_file/config/etc/group create mode 100644 tests/grouptools/gpasswd/18_gpasswd_change_member_list-no_gshadow_file/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/18_gpasswd_change_member_list-no_gshadow_file/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/18_gpasswd_change_member_list-no_gshadow_file/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/18_gpasswd_change_member_list-no_gshadow_file/data/group create mode 100755 tests/grouptools/gpasswd/18_gpasswd_change_member_list-no_gshadow_file/gpasswd.test create mode 100644 tests/grouptools/gpasswd/19_gpasswd_change_passwd-root/config.txt create mode 100644 tests/grouptools/gpasswd/19_gpasswd_change_passwd-root/config/etc/group create mode 100644 tests/grouptools/gpasswd/19_gpasswd_change_passwd-root/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/19_gpasswd_change_passwd-root/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/19_gpasswd_change_passwd-root/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/19_gpasswd_change_passwd-root/data/gshadow create mode 100755 tests/grouptools/gpasswd/19_gpasswd_change_passwd-root/gpasswd.exp create mode 100755 tests/grouptools/gpasswd/19_gpasswd_change_passwd-root/gpasswd.test create mode 100644 tests/grouptools/gpasswd/20_gpasswd_change_passwd-root-no_shadow_group/config.txt create mode 100644 tests/grouptools/gpasswd/20_gpasswd_change_passwd-root-no_shadow_group/config/etc/group create mode 100644 tests/grouptools/gpasswd/20_gpasswd_change_passwd-root-no_shadow_group/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/20_gpasswd_change_passwd-root-no_shadow_group/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/20_gpasswd_change_passwd-root-no_shadow_group/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/20_gpasswd_change_passwd-root-no_shadow_group/data/gshadow create mode 100755 tests/grouptools/gpasswd/20_gpasswd_change_passwd-root-no_shadow_group/gpasswd.exp create mode 100755 tests/grouptools/gpasswd/20_gpasswd_change_passwd-root-no_shadow_group/gpasswd.test create mode 100644 tests/grouptools/gpasswd/21_gpasswd_change_passwd-root-no_gshadow_file/config.txt create mode 100644 tests/grouptools/gpasswd/21_gpasswd_change_passwd-root-no_gshadow_file/config/etc/group create mode 100644 tests/grouptools/gpasswd/21_gpasswd_change_passwd-root-no_gshadow_file/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/21_gpasswd_change_passwd-root-no_gshadow_file/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/21_gpasswd_change_passwd-root-no_gshadow_file/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/21_gpasswd_change_passwd-root-no_gshadow_file/data/group create mode 100755 tests/grouptools/gpasswd/21_gpasswd_change_passwd-root-no_gshadow_file/gpasswd.exp create mode 100755 tests/grouptools/gpasswd/21_gpasswd_change_passwd-root-no_gshadow_file/gpasswd.test create mode 100644 tests/grouptools/gpasswd/22_gpasswd_change_passwd-myuser/config.txt create mode 100644 tests/grouptools/gpasswd/22_gpasswd_change_passwd-myuser/config/etc/group create mode 100644 tests/grouptools/gpasswd/22_gpasswd_change_passwd-myuser/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/22_gpasswd_change_passwd-myuser/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/22_gpasswd_change_passwd-myuser/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/22_gpasswd_change_passwd-myuser/data/gshadow create mode 100755 tests/grouptools/gpasswd/22_gpasswd_change_passwd-myuser/gpasswd.exp create mode 100755 tests/grouptools/gpasswd/22_gpasswd_change_passwd-myuser/gpasswd.test create mode 100644 tests/grouptools/gpasswd/23_gpasswd_change_passwd-myuser-denied/config.txt create mode 100644 tests/grouptools/gpasswd/23_gpasswd_change_passwd-myuser-denied/config/etc/group create mode 100644 tests/grouptools/gpasswd/23_gpasswd_change_passwd-myuser-denied/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/23_gpasswd_change_passwd-myuser-denied/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/23_gpasswd_change_passwd-myuser-denied/config/etc/shadow create mode 100755 tests/grouptools/gpasswd/23_gpasswd_change_passwd-myuser-denied/gpasswd.exp create mode 100755 tests/grouptools/gpasswd/23_gpasswd_change_passwd-myuser-denied/gpasswd.test create mode 100644 tests/grouptools/gpasswd/24_gpasswd_change_passwd-myuser-denied-no_gshadow_file/config.txt create mode 100644 tests/grouptools/gpasswd/24_gpasswd_change_passwd-myuser-denied-no_gshadow_file/config/etc/group create mode 100644 tests/grouptools/gpasswd/24_gpasswd_change_passwd-myuser-denied-no_gshadow_file/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/24_gpasswd_change_passwd-myuser-denied-no_gshadow_file/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/24_gpasswd_change_passwd-myuser-denied-no_gshadow_file/config/etc/shadow create mode 100755 tests/grouptools/gpasswd/24_gpasswd_change_passwd-myuser-denied-no_gshadow_file/gpasswd.exp create mode 100755 tests/grouptools/gpasswd/24_gpasswd_change_passwd-myuser-denied-no_gshadow_file/gpasswd.test create mode 100644 tests/grouptools/gpasswd/25_gpasswd_remove_password/config.txt create mode 100644 tests/grouptools/gpasswd/25_gpasswd_remove_password/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/25_gpasswd_remove_password/config/etc/group create mode 100644 tests/grouptools/gpasswd/25_gpasswd_remove_password/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/25_gpasswd_remove_password/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/25_gpasswd_remove_password/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/25_gpasswd_remove_password/data/group create mode 100644 tests/grouptools/gpasswd/25_gpasswd_remove_password/data/gshadow create mode 100755 tests/grouptools/gpasswd/25_gpasswd_remove_password/gpasswd.test create mode 100644 tests/grouptools/gpasswd/26_gpasswd_remove_password-no_shadow_group/config.txt create mode 100644 tests/grouptools/gpasswd/26_gpasswd_remove_password-no_shadow_group/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/26_gpasswd_remove_password-no_shadow_group/config/etc/group create mode 100644 tests/grouptools/gpasswd/26_gpasswd_remove_password-no_shadow_group/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/26_gpasswd_remove_password-no_shadow_group/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/26_gpasswd_remove_password-no_shadow_group/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/26_gpasswd_remove_password-no_shadow_group/data/group create mode 100644 tests/grouptools/gpasswd/26_gpasswd_remove_password-no_shadow_group/data/gshadow create mode 100755 tests/grouptools/gpasswd/26_gpasswd_remove_password-no_shadow_group/gpasswd.test create mode 100644 tests/grouptools/gpasswd/27_gpasswd_remove_password-no_gshadow_file/config.txt create mode 100644 tests/grouptools/gpasswd/27_gpasswd_remove_password-no_gshadow_file/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/27_gpasswd_remove_password-no_gshadow_file/config/etc/group create mode 100644 tests/grouptools/gpasswd/27_gpasswd_remove_password-no_gshadow_file/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/27_gpasswd_remove_password-no_gshadow_file/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/27_gpasswd_remove_password-no_gshadow_file/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/27_gpasswd_remove_password-no_gshadow_file/data/group create mode 100755 tests/grouptools/gpasswd/27_gpasswd_remove_password-no_gshadow_file/gpasswd.test create mode 100644 tests/grouptools/gpasswd/28_gpasswd_lock_password/config.txt create mode 100644 tests/grouptools/gpasswd/28_gpasswd_lock_password/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/28_gpasswd_lock_password/config/etc/group create mode 100644 tests/grouptools/gpasswd/28_gpasswd_lock_password/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/28_gpasswd_lock_password/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/28_gpasswd_lock_password/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/28_gpasswd_lock_password/data/group create mode 100644 tests/grouptools/gpasswd/28_gpasswd_lock_password/data/gshadow create mode 100755 tests/grouptools/gpasswd/28_gpasswd_lock_password/gpasswd.test create mode 100644 tests/grouptools/gpasswd/29_gpasswd_lock_password-no_shadow_group/config.txt create mode 100644 tests/grouptools/gpasswd/29_gpasswd_lock_password-no_shadow_group/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/29_gpasswd_lock_password-no_shadow_group/config/etc/group create mode 100644 tests/grouptools/gpasswd/29_gpasswd_lock_password-no_shadow_group/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/29_gpasswd_lock_password-no_shadow_group/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/29_gpasswd_lock_password-no_shadow_group/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/29_gpasswd_lock_password-no_shadow_group/data/group create mode 100644 tests/grouptools/gpasswd/29_gpasswd_lock_password-no_shadow_group/data/gshadow create mode 100755 tests/grouptools/gpasswd/29_gpasswd_lock_password-no_shadow_group/gpasswd.test create mode 100644 tests/grouptools/gpasswd/30_gpasswd_lock_password-no_gshadow_file/config.txt create mode 100644 tests/grouptools/gpasswd/30_gpasswd_lock_password-no_gshadow_file/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/30_gpasswd_lock_password-no_gshadow_file/config/etc/group create mode 100644 tests/grouptools/gpasswd/30_gpasswd_lock_password-no_gshadow_file/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/30_gpasswd_lock_password-no_gshadow_file/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/30_gpasswd_lock_password-no_gshadow_file/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/30_gpasswd_lock_password-no_gshadow_file/data/group create mode 100755 tests/grouptools/gpasswd/30_gpasswd_lock_password-no_gshadow_file/gpasswd.test create mode 100644 tests/grouptools/gpasswd/31_gpasswd_add_user_to_group/config.txt create mode 100644 tests/grouptools/gpasswd/31_gpasswd_add_user_to_group/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/31_gpasswd_add_user_to_group/config/etc/group create mode 100644 tests/grouptools/gpasswd/31_gpasswd_add_user_to_group/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/31_gpasswd_add_user_to_group/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/31_gpasswd_add_user_to_group/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/31_gpasswd_add_user_to_group/data/group create mode 100644 tests/grouptools/gpasswd/31_gpasswd_add_user_to_group/data/gshadow create mode 100755 tests/grouptools/gpasswd/31_gpasswd_add_user_to_group/gpasswd.test create mode 100644 tests/grouptools/gpasswd/32_gpasswd_add_user_to_group-no_shadow_group/config.txt create mode 100644 tests/grouptools/gpasswd/32_gpasswd_add_user_to_group-no_shadow_group/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/32_gpasswd_add_user_to_group-no_shadow_group/config/etc/group create mode 100644 tests/grouptools/gpasswd/32_gpasswd_add_user_to_group-no_shadow_group/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/32_gpasswd_add_user_to_group-no_shadow_group/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/32_gpasswd_add_user_to_group-no_shadow_group/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/32_gpasswd_add_user_to_group-no_shadow_group/data/group create mode 100644 tests/grouptools/gpasswd/32_gpasswd_add_user_to_group-no_shadow_group/data/gshadow create mode 100755 tests/grouptools/gpasswd/32_gpasswd_add_user_to_group-no_shadow_group/gpasswd.test create mode 100644 tests/grouptools/gpasswd/33_gpasswd_add_user_to_group-no_gshadow_file/config.txt create mode 100644 tests/grouptools/gpasswd/33_gpasswd_add_user_to_group-no_gshadow_file/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/33_gpasswd_add_user_to_group-no_gshadow_file/config/etc/group create mode 100644 tests/grouptools/gpasswd/33_gpasswd_add_user_to_group-no_gshadow_file/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/33_gpasswd_add_user_to_group-no_gshadow_file/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/33_gpasswd_add_user_to_group-no_gshadow_file/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/33_gpasswd_add_user_to_group-no_gshadow_file/data/group create mode 100755 tests/grouptools/gpasswd/33_gpasswd_add_user_to_group-no_gshadow_file/gpasswd.test create mode 100644 tests/grouptools/gpasswd/34_gpasswd_remove_user_from_group/config.txt create mode 100644 tests/grouptools/gpasswd/34_gpasswd_remove_user_from_group/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/34_gpasswd_remove_user_from_group/config/etc/group create mode 100644 tests/grouptools/gpasswd/34_gpasswd_remove_user_from_group/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/34_gpasswd_remove_user_from_group/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/34_gpasswd_remove_user_from_group/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/34_gpasswd_remove_user_from_group/data/group create mode 100644 tests/grouptools/gpasswd/34_gpasswd_remove_user_from_group/data/gshadow create mode 100755 tests/grouptools/gpasswd/34_gpasswd_remove_user_from_group/gpasswd.test create mode 100644 tests/grouptools/gpasswd/35_gpasswd_remove_user_from_group/config.txt create mode 100644 tests/grouptools/gpasswd/35_gpasswd_remove_user_from_group/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/35_gpasswd_remove_user_from_group/config/etc/group create mode 100644 tests/grouptools/gpasswd/35_gpasswd_remove_user_from_group/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/35_gpasswd_remove_user_from_group/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/35_gpasswd_remove_user_from_group/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/35_gpasswd_remove_user_from_group/data/group create mode 100644 tests/grouptools/gpasswd/35_gpasswd_remove_user_from_group/data/gshadow create mode 100755 tests/grouptools/gpasswd/35_gpasswd_remove_user_from_group/gpasswd.test create mode 100644 tests/grouptools/gpasswd/36_gpasswd_remove_user_from_group/config.txt create mode 100644 tests/grouptools/gpasswd/36_gpasswd_remove_user_from_group/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/36_gpasswd_remove_user_from_group/config/etc/group create mode 100644 tests/grouptools/gpasswd/36_gpasswd_remove_user_from_group/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/36_gpasswd_remove_user_from_group/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/36_gpasswd_remove_user_from_group/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/36_gpasswd_remove_user_from_group/data/group create mode 100644 tests/grouptools/gpasswd/36_gpasswd_remove_user_from_group/data/gshadow create mode 100755 tests/grouptools/gpasswd/36_gpasswd_remove_user_from_group/gpasswd.test create mode 100644 tests/grouptools/gpasswd/37_gpasswd_remove_user_from_group-no_shadow_group/config.txt create mode 100644 tests/grouptools/gpasswd/37_gpasswd_remove_user_from_group-no_shadow_group/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/37_gpasswd_remove_user_from_group-no_shadow_group/config/etc/group create mode 100644 tests/grouptools/gpasswd/37_gpasswd_remove_user_from_group-no_shadow_group/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/37_gpasswd_remove_user_from_group-no_shadow_group/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/37_gpasswd_remove_user_from_group-no_shadow_group/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/37_gpasswd_remove_user_from_group-no_shadow_group/data/group create mode 100644 tests/grouptools/gpasswd/37_gpasswd_remove_user_from_group-no_shadow_group/data/gshadow create mode 100755 tests/grouptools/gpasswd/37_gpasswd_remove_user_from_group-no_shadow_group/gpasswd.test create mode 100644 tests/grouptools/gpasswd/38_gpasswd_remove_user_from_group-no_shadow_group/config.txt create mode 100644 tests/grouptools/gpasswd/38_gpasswd_remove_user_from_group-no_shadow_group/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/38_gpasswd_remove_user_from_group-no_shadow_group/config/etc/group create mode 100644 tests/grouptools/gpasswd/38_gpasswd_remove_user_from_group-no_shadow_group/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/38_gpasswd_remove_user_from_group-no_shadow_group/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/38_gpasswd_remove_user_from_group-no_shadow_group/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/38_gpasswd_remove_user_from_group-no_shadow_group/data/group create mode 100644 tests/grouptools/gpasswd/38_gpasswd_remove_user_from_group-no_shadow_group/data/gshadow create mode 100755 tests/grouptools/gpasswd/38_gpasswd_remove_user_from_group-no_shadow_group/gpasswd.test create mode 100644 tests/grouptools/gpasswd/39_gpasswd_remove_user_from_group-no_shadow_group/config.txt create mode 100644 tests/grouptools/gpasswd/39_gpasswd_remove_user_from_group-no_shadow_group/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/39_gpasswd_remove_user_from_group-no_shadow_group/config/etc/group create mode 100644 tests/grouptools/gpasswd/39_gpasswd_remove_user_from_group-no_shadow_group/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/39_gpasswd_remove_user_from_group-no_shadow_group/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/39_gpasswd_remove_user_from_group-no_shadow_group/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/39_gpasswd_remove_user_from_group-no_shadow_group/data/group create mode 100644 tests/grouptools/gpasswd/39_gpasswd_remove_user_from_group-no_shadow_group/data/gshadow create mode 100755 tests/grouptools/gpasswd/39_gpasswd_remove_user_from_group-no_shadow_group/gpasswd.test create mode 100644 tests/grouptools/gpasswd/40_gpasswd_remove_user_from_group-no_gshadow_file/config.txt create mode 100644 tests/grouptools/gpasswd/40_gpasswd_remove_user_from_group-no_gshadow_file/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/40_gpasswd_remove_user_from_group-no_gshadow_file/config/etc/group create mode 100644 tests/grouptools/gpasswd/40_gpasswd_remove_user_from_group-no_gshadow_file/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/40_gpasswd_remove_user_from_group-no_gshadow_file/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/40_gpasswd_remove_user_from_group-no_gshadow_file/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/40_gpasswd_remove_user_from_group-no_gshadow_file/data/group create mode 100755 tests/grouptools/gpasswd/40_gpasswd_remove_user_from_group-no_gshadow_file/gpasswd.test create mode 100644 tests/grouptools/gpasswd/41_gpasswd_remove_user_from_group-no_gshadow_file/config.txt create mode 100644 tests/grouptools/gpasswd/41_gpasswd_remove_user_from_group-no_gshadow_file/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/41_gpasswd_remove_user_from_group-no_gshadow_file/config/etc/group create mode 100644 tests/grouptools/gpasswd/41_gpasswd_remove_user_from_group-no_gshadow_file/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/41_gpasswd_remove_user_from_group-no_gshadow_file/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/41_gpasswd_remove_user_from_group-no_gshadow_file/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/41_gpasswd_remove_user_from_group-no_gshadow_file/data/group create mode 100755 tests/grouptools/gpasswd/41_gpasswd_remove_user_from_group-no_gshadow_file/gpasswd.test create mode 100644 tests/grouptools/gpasswd/42_gpasswd_remove_user_from_group-no_gshadow_file/config.txt create mode 100644 tests/grouptools/gpasswd/42_gpasswd_remove_user_from_group-no_gshadow_file/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/42_gpasswd_remove_user_from_group-no_gshadow_file/config/etc/group create mode 100644 tests/grouptools/gpasswd/42_gpasswd_remove_user_from_group-no_gshadow_file/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/42_gpasswd_remove_user_from_group-no_gshadow_file/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/42_gpasswd_remove_user_from_group-no_gshadow_file/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/42_gpasswd_remove_user_from_group-no_gshadow_file/data/group create mode 100755 tests/grouptools/gpasswd/42_gpasswd_remove_user_from_group-no_gshadow_file/gpasswd.test create mode 100644 tests/grouptools/gpasswd/43_gpasswd_-r_locked_group/config.txt create mode 100644 tests/grouptools/gpasswd/43_gpasswd_-r_locked_group/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/43_gpasswd_-r_locked_group/config/etc/group create mode 100644 tests/grouptools/gpasswd/43_gpasswd_-r_locked_group/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/43_gpasswd_-r_locked_group/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/43_gpasswd_-r_locked_group/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/43_gpasswd_-r_locked_group/data/gpasswd.err create mode 100755 tests/grouptools/gpasswd/43_gpasswd_-r_locked_group/gpasswd.test create mode 100644 tests/grouptools/gpasswd/44_gpasswd_-r_locked_gshadow/config.txt create mode 100644 tests/grouptools/gpasswd/44_gpasswd_-r_locked_gshadow/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/44_gpasswd_-r_locked_gshadow/config/etc/group create mode 100644 tests/grouptools/gpasswd/44_gpasswd_-r_locked_gshadow/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/44_gpasswd_-r_locked_gshadow/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/44_gpasswd_-r_locked_gshadow/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/44_gpasswd_-r_locked_gshadow/data/gpasswd.err create mode 100755 tests/grouptools/gpasswd/44_gpasswd_-r_locked_gshadow/gpasswd.test create mode 100644 tests/grouptools/gpasswd/45_gpasswd_-r_unknown_group/config.txt create mode 100644 tests/grouptools/gpasswd/45_gpasswd_-r_unknown_group/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/45_gpasswd_-r_unknown_group/config/etc/group create mode 100644 tests/grouptools/gpasswd/45_gpasswd_-r_unknown_group/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/45_gpasswd_-r_unknown_group/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/45_gpasswd_-r_unknown_group/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/45_gpasswd_-r_unknown_group/data/gpasswd.err create mode 100755 tests/grouptools/gpasswd/45_gpasswd_-r_unknown_group/gpasswd.test create mode 100644 tests/grouptools/gpasswd/46_gpasswd_-a_unknown_user/config.txt create mode 100644 tests/grouptools/gpasswd/46_gpasswd_-a_unknown_user/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/46_gpasswd_-a_unknown_user/config/etc/group create mode 100644 tests/grouptools/gpasswd/46_gpasswd_-a_unknown_user/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/46_gpasswd_-a_unknown_user/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/46_gpasswd_-a_unknown_user/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/46_gpasswd_-a_unknown_user/data/gpasswd.err create mode 100755 tests/grouptools/gpasswd/46_gpasswd_-a_unknown_user/gpasswd.test create mode 100644 tests/grouptools/gpasswd/47_gpasswd_-M_unknown_user/config.txt create mode 100644 tests/grouptools/gpasswd/47_gpasswd_-M_unknown_user/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/47_gpasswd_-M_unknown_user/config/etc/group create mode 100644 tests/grouptools/gpasswd/47_gpasswd_-M_unknown_user/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/47_gpasswd_-M_unknown_user/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/47_gpasswd_-M_unknown_user/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/47_gpasswd_-M_unknown_user/data/gpasswd.err create mode 100755 tests/grouptools/gpasswd/47_gpasswd_-M_unknown_user/gpasswd.test create mode 100644 tests/grouptools/gpasswd/48_gpasswd_change_admin_list/config.txt create mode 100644 tests/grouptools/gpasswd/48_gpasswd_change_admin_list/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/48_gpasswd_change_admin_list/config/etc/group create mode 100644 tests/grouptools/gpasswd/48_gpasswd_change_admin_list/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/48_gpasswd_change_admin_list/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/48_gpasswd_change_admin_list/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/48_gpasswd_change_admin_list/data/gshadow create mode 100755 tests/grouptools/gpasswd/48_gpasswd_change_admin_list/gpasswd.test create mode 100644 tests/grouptools/gpasswd/49_gpasswd_change_admin_list/config.txt create mode 100644 tests/grouptools/gpasswd/49_gpasswd_change_admin_list/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/49_gpasswd_change_admin_list/config/etc/group create mode 100644 tests/grouptools/gpasswd/49_gpasswd_change_admin_list/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/49_gpasswd_change_admin_list/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/49_gpasswd_change_admin_list/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/49_gpasswd_change_admin_list/data/gshadow create mode 100755 tests/grouptools/gpasswd/49_gpasswd_change_admin_list/gpasswd.test create mode 100644 tests/grouptools/gpasswd/50_gpasswd_change_admin_list/config.txt create mode 100644 tests/grouptools/gpasswd/50_gpasswd_change_admin_list/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/50_gpasswd_change_admin_list/config/etc/group create mode 100644 tests/grouptools/gpasswd/50_gpasswd_change_admin_list/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/50_gpasswd_change_admin_list/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/50_gpasswd_change_admin_list/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/50_gpasswd_change_admin_list/data/gshadow create mode 100755 tests/grouptools/gpasswd/50_gpasswd_change_admin_list/gpasswd.test create mode 100644 tests/grouptools/gpasswd/51_gpasswd_change_admin_list/config.txt create mode 100644 tests/grouptools/gpasswd/51_gpasswd_change_admin_list/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/51_gpasswd_change_admin_list/config/etc/group create mode 100644 tests/grouptools/gpasswd/51_gpasswd_change_admin_list/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/51_gpasswd_change_admin_list/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/51_gpasswd_change_admin_list/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/51_gpasswd_change_admin_list/data/gshadow create mode 100755 tests/grouptools/gpasswd/51_gpasswd_change_admin_list/gpasswd.test create mode 100644 tests/grouptools/gpasswd/52_gpasswd_change_admin_list/config.txt create mode 100644 tests/grouptools/gpasswd/52_gpasswd_change_admin_list/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/52_gpasswd_change_admin_list/config/etc/group create mode 100644 tests/grouptools/gpasswd/52_gpasswd_change_admin_list/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/52_gpasswd_change_admin_list/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/52_gpasswd_change_admin_list/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/52_gpasswd_change_admin_list/data/gshadow create mode 100755 tests/grouptools/gpasswd/52_gpasswd_change_admin_list/gpasswd.test create mode 100644 tests/grouptools/gpasswd/53_gpasswd_change_admin_list/config.txt create mode 100644 tests/grouptools/gpasswd/53_gpasswd_change_admin_list/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/53_gpasswd_change_admin_list/config/etc/group create mode 100644 tests/grouptools/gpasswd/53_gpasswd_change_admin_list/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/53_gpasswd_change_admin_list/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/53_gpasswd_change_admin_list/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/53_gpasswd_change_admin_list/data/gshadow create mode 100755 tests/grouptools/gpasswd/53_gpasswd_change_admin_list/gpasswd.test create mode 100644 tests/grouptools/gpasswd/54_gpasswd_change_admin_list-no_shadow_group/config.txt create mode 100644 tests/grouptools/gpasswd/54_gpasswd_change_admin_list-no_shadow_group/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/54_gpasswd_change_admin_list-no_shadow_group/config/etc/group create mode 100644 tests/grouptools/gpasswd/54_gpasswd_change_admin_list-no_shadow_group/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/54_gpasswd_change_admin_list-no_shadow_group/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/54_gpasswd_change_admin_list-no_shadow_group/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/54_gpasswd_change_admin_list-no_shadow_group/data/gshadow create mode 100755 tests/grouptools/gpasswd/54_gpasswd_change_admin_list-no_shadow_group/gpasswd.test create mode 100644 tests/grouptools/gpasswd/55_gpasswd_change_admin_list-no_gshadow_file/config.txt create mode 100644 tests/grouptools/gpasswd/55_gpasswd_change_admin_list-no_gshadow_file/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/55_gpasswd_change_admin_list-no_gshadow_file/config/etc/group create mode 100644 tests/grouptools/gpasswd/55_gpasswd_change_admin_list-no_gshadow_file/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/55_gpasswd_change_admin_list-no_gshadow_file/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/55_gpasswd_change_admin_list-no_gshadow_file/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/55_gpasswd_change_admin_list-no_gshadow_file/data/gpasswd.err create mode 100755 tests/grouptools/gpasswd/55_gpasswd_change_admin_list-no_gshadow_file/gpasswd.test create mode 100644 tests/grouptools/gpasswd/56_gpasswd_add_user_to_group/config.txt create mode 100644 tests/grouptools/gpasswd/56_gpasswd_add_user_to_group/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/56_gpasswd_add_user_to_group/config/etc/group create mode 100644 tests/grouptools/gpasswd/56_gpasswd_add_user_to_group/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/56_gpasswd_add_user_to_group/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/56_gpasswd_add_user_to_group/config/etc/shadow create mode 100755 tests/grouptools/gpasswd/56_gpasswd_add_user_to_group/gpasswd.test create mode 100644 tests/grouptools/gpasswd/57_gpasswd_remove_user_from_group-not_member/config.txt create mode 100644 tests/grouptools/gpasswd/57_gpasswd_remove_user_from_group-not_member/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/57_gpasswd_remove_user_from_group-not_member/config/etc/group create mode 100644 tests/grouptools/gpasswd/57_gpasswd_remove_user_from_group-not_member/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/57_gpasswd_remove_user_from_group-not_member/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/57_gpasswd_remove_user_from_group-not_member/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/57_gpasswd_remove_user_from_group-not_member/data/gpasswd.err create mode 100755 tests/grouptools/gpasswd/57_gpasswd_remove_user_from_group-not_member/gpasswd.test create mode 100644 tests/grouptools/gpasswd/58_gpasswd_remove_user_from_group-not_gshadow_member/config.txt create mode 100644 tests/grouptools/gpasswd/58_gpasswd_remove_user_from_group-not_gshadow_member/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/58_gpasswd_remove_user_from_group-not_gshadow_member/config/etc/group create mode 100644 tests/grouptools/gpasswd/58_gpasswd_remove_user_from_group-not_gshadow_member/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/58_gpasswd_remove_user_from_group-not_gshadow_member/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/58_gpasswd_remove_user_from_group-not_gshadow_member/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/58_gpasswd_remove_user_from_group-not_gshadow_member/data/group create mode 100755 tests/grouptools/gpasswd/58_gpasswd_remove_user_from_group-not_gshadow_member/gpasswd.test create mode 100644 tests/grouptools/gpasswd/59_gpasswd_remove_user_from_group-not_group_member/config.txt create mode 100644 tests/grouptools/gpasswd/59_gpasswd_remove_user_from_group-not_group_member/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/59_gpasswd_remove_user_from_group-not_group_member/config/etc/group create mode 100644 tests/grouptools/gpasswd/59_gpasswd_remove_user_from_group-not_group_member/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/59_gpasswd_remove_user_from_group-not_group_member/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/59_gpasswd_remove_user_from_group-not_group_member/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/59_gpasswd_remove_user_from_group-not_group_member/data/gshadow create mode 100755 tests/grouptools/gpasswd/59_gpasswd_remove_user_from_group-not_group_member/gpasswd.test create mode 100644 tests/grouptools/gpasswd/60_gpasswd_add_long_user_to_group/config.txt create mode 100644 tests/grouptools/gpasswd/60_gpasswd_add_long_user_to_group/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/60_gpasswd_add_long_user_to_group/config/etc/group create mode 100644 tests/grouptools/gpasswd/60_gpasswd_add_long_user_to_group/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/60_gpasswd_add_long_user_to_group/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/60_gpasswd_add_long_user_to_group/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/60_gpasswd_add_long_user_to_group/data/group create mode 100644 tests/grouptools/gpasswd/60_gpasswd_add_long_user_to_group/data/gshadow create mode 100755 tests/grouptools/gpasswd/60_gpasswd_add_long_user_to_group/gpasswd.test create mode 100644 tests/grouptools/gpasswd/61_gpasswd_usage/config.txt create mode 100644 tests/grouptools/gpasswd/61_gpasswd_usage/config/etc/group create mode 100644 tests/grouptools/gpasswd/61_gpasswd_usage/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/61_gpasswd_usage/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/61_gpasswd_usage/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/61_gpasswd_usage/data/usage.out create mode 100755 tests/grouptools/gpasswd/61_gpasswd_usage/gpasswd.test create mode 100644 tests/grouptools/gpasswd/62_gpasswd_-A_unknown_user/config.txt create mode 100644 tests/grouptools/gpasswd/62_gpasswd_-A_unknown_user/config/etc/default/useradd create mode 100644 tests/grouptools/gpasswd/62_gpasswd_-A_unknown_user/config/etc/group create mode 100644 tests/grouptools/gpasswd/62_gpasswd_-A_unknown_user/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/62_gpasswd_-A_unknown_user/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/62_gpasswd_-A_unknown_user/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/62_gpasswd_-A_unknown_user/data/gpasswd.err create mode 100755 tests/grouptools/gpasswd/62_gpasswd_-A_unknown_user/gpasswd.test create mode 100644 tests/grouptools/gpasswd/63_gpasswd_usage_bad_option/config.txt create mode 100644 tests/grouptools/gpasswd/63_gpasswd_usage_bad_option/config/etc/group create mode 100644 tests/grouptools/gpasswd/63_gpasswd_usage_bad_option/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/63_gpasswd_usage_bad_option/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/63_gpasswd_usage_bad_option/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/63_gpasswd_usage_bad_option/data/usage.out create mode 100755 tests/grouptools/gpasswd/63_gpasswd_usage_bad_option/gpasswd.test create mode 100644 tests/grouptools/gpasswd/64_gpasswd_usage-a-d/config.txt create mode 100644 tests/grouptools/gpasswd/64_gpasswd_usage-a-d/config/etc/group create mode 100644 tests/grouptools/gpasswd/64_gpasswd_usage-a-d/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/64_gpasswd_usage-a-d/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/64_gpasswd_usage-a-d/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/64_gpasswd_usage-a-d/data/usage.out create mode 100755 tests/grouptools/gpasswd/64_gpasswd_usage-a-d/gpasswd.test create mode 100644 tests/grouptools/gpasswd/65_gpasswd_usage_no_groups/config.txt create mode 100644 tests/grouptools/gpasswd/65_gpasswd_usage_no_groups/config/etc/group create mode 100644 tests/grouptools/gpasswd/65_gpasswd_usage_no_groups/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/65_gpasswd_usage_no_groups/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/65_gpasswd_usage_no_groups/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/65_gpasswd_usage_no_groups/data/usage.out create mode 100755 tests/grouptools/gpasswd/65_gpasswd_usage_no_groups/gpasswd.test create mode 100644 tests/grouptools/gpasswd/66_gpasswd_usage_2_groups/config.txt create mode 100644 tests/grouptools/gpasswd/66_gpasswd_usage_2_groups/config/etc/group create mode 100644 tests/grouptools/gpasswd/66_gpasswd_usage_2_groups/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/66_gpasswd_usage_2_groups/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/66_gpasswd_usage_2_groups/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/66_gpasswd_usage_2_groups/data/usage.out create mode 100755 tests/grouptools/gpasswd/66_gpasswd_usage_2_groups/gpasswd.test create mode 100644 tests/grouptools/gpasswd/67_gpasswd-A_myuser/config.txt create mode 100644 tests/grouptools/gpasswd/67_gpasswd-A_myuser/config/etc/group create mode 100644 tests/grouptools/gpasswd/67_gpasswd-A_myuser/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/67_gpasswd-A_myuser/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/67_gpasswd-A_myuser/config/etc/shadow create mode 100755 tests/grouptools/gpasswd/67_gpasswd-A_myuser/gpasswd.exp create mode 100755 tests/grouptools/gpasswd/67_gpasswd-A_myuser/gpasswd.test create mode 100644 tests/grouptools/gpasswd/68_gpasswd-M_myuser/config.txt create mode 100644 tests/grouptools/gpasswd/68_gpasswd-M_myuser/config/etc/group create mode 100644 tests/grouptools/gpasswd/68_gpasswd-M_myuser/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/68_gpasswd-M_myuser/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/68_gpasswd-M_myuser/config/etc/shadow create mode 100755 tests/grouptools/gpasswd/68_gpasswd-M_myuser/gpasswd.exp create mode 100755 tests/grouptools/gpasswd/68_gpasswd-M_myuser/gpasswd.test create mode 100644 tests/grouptools/gpasswd/69_gpasswd_change_passwd_2_tries/config.txt create mode 100644 tests/grouptools/gpasswd/69_gpasswd_change_passwd_2_tries/config/etc/group create mode 100644 tests/grouptools/gpasswd/69_gpasswd_change_passwd_2_tries/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/69_gpasswd_change_passwd_2_tries/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/69_gpasswd_change_passwd_2_tries/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/69_gpasswd_change_passwd_2_tries/data/gshadow create mode 100755 tests/grouptools/gpasswd/69_gpasswd_change_passwd_2_tries/gpasswd.exp create mode 100755 tests/grouptools/gpasswd/69_gpasswd_change_passwd_2_tries/gpasswd.test create mode 100644 tests/grouptools/gpasswd/70_gpasswd_change_passwd_3_tries/config.txt create mode 100644 tests/grouptools/gpasswd/70_gpasswd_change_passwd_3_tries/config/etc/group create mode 100644 tests/grouptools/gpasswd/70_gpasswd_change_passwd_3_tries/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/70_gpasswd_change_passwd_3_tries/config/etc/login.defs create mode 100644 tests/grouptools/gpasswd/70_gpasswd_change_passwd_3_tries/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/70_gpasswd_change_passwd_3_tries/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/70_gpasswd_change_passwd_3_tries/data/gshadow create mode 100755 tests/grouptools/gpasswd/70_gpasswd_change_passwd_3_tries/gpasswd.exp create mode 100755 tests/grouptools/gpasswd/70_gpasswd_change_passwd_3_tries/gpasswd.test create mode 100644 tests/grouptools/gpasswd/71_gpasswd_change_passwd_4_tries/config.txt create mode 100644 tests/grouptools/gpasswd/71_gpasswd_change_passwd_4_tries/config/etc/group create mode 100644 tests/grouptools/gpasswd/71_gpasswd_change_passwd_4_tries/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/71_gpasswd_change_passwd_4_tries/config/etc/login.defs create mode 100644 tests/grouptools/gpasswd/71_gpasswd_change_passwd_4_tries/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/71_gpasswd_change_passwd_4_tries/config/etc/shadow create mode 100755 tests/grouptools/gpasswd/71_gpasswd_change_passwd_4_tries/gpasswd.exp create mode 100755 tests/grouptools/gpasswd/71_gpasswd_change_passwd_4_tries/gpasswd.test create mode 100644 tests/grouptools/gpasswd/72_gpasswd-M-A/config.txt create mode 100644 tests/grouptools/gpasswd/72_gpasswd-M-A/config/etc/group create mode 100644 tests/grouptools/gpasswd/72_gpasswd-M-A/config/etc/gshadow create mode 100644 tests/grouptools/gpasswd/72_gpasswd-M-A/config/etc/passwd create mode 100644 tests/grouptools/gpasswd/72_gpasswd-M-A/config/etc/shadow create mode 100644 tests/grouptools/gpasswd/72_gpasswd-M-A/data/group create mode 100644 tests/grouptools/gpasswd/72_gpasswd-M-A/data/gshadow create mode 100755 tests/grouptools/gpasswd/72_gpasswd-M-A/gpasswd.test create mode 100644 tests/grouptools/groupadd/01_groupadd_add_group/config.txt create mode 100644 tests/grouptools/groupadd/01_groupadd_add_group/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/01_groupadd_add_group/config/etc/group create mode 100644 tests/grouptools/groupadd/01_groupadd_add_group/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/01_groupadd_add_group/config/etc/login.defs create mode 100644 tests/grouptools/groupadd/01_groupadd_add_group/config/etc/passwd create mode 100644 tests/grouptools/groupadd/01_groupadd_add_group/config/etc/shadow create mode 100644 tests/grouptools/groupadd/01_groupadd_add_group/data/group create mode 100644 tests/grouptools/groupadd/01_groupadd_add_group/data/gshadow create mode 100755 tests/grouptools/groupadd/01_groupadd_add_group/groupadd.test create mode 100644 tests/grouptools/groupadd/02_groupadd_add_group_GID_MIN/config.txt create mode 100644 tests/grouptools/groupadd/02_groupadd_add_group_GID_MIN/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/02_groupadd_add_group_GID_MIN/config/etc/group create mode 100644 tests/grouptools/groupadd/02_groupadd_add_group_GID_MIN/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/02_groupadd_add_group_GID_MIN/config/etc/login.defs create mode 100644 tests/grouptools/groupadd/02_groupadd_add_group_GID_MIN/config/etc/passwd create mode 100644 tests/grouptools/groupadd/02_groupadd_add_group_GID_MIN/config/etc/shadow create mode 100644 tests/grouptools/groupadd/02_groupadd_add_group_GID_MIN/data/group create mode 100644 tests/grouptools/groupadd/02_groupadd_add_group_GID_MIN/data/gshadow create mode 100755 tests/grouptools/groupadd/02_groupadd_add_group_GID_MIN/groupadd.test create mode 100644 tests/grouptools/groupadd/03_groupadd_add_group_-K_GID_MIN/config.txt create mode 100644 tests/grouptools/groupadd/03_groupadd_add_group_-K_GID_MIN/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/03_groupadd_add_group_-K_GID_MIN/config/etc/group create mode 100644 tests/grouptools/groupadd/03_groupadd_add_group_-K_GID_MIN/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/03_groupadd_add_group_-K_GID_MIN/config/etc/login.defs create mode 100644 tests/grouptools/groupadd/03_groupadd_add_group_-K_GID_MIN/config/etc/passwd create mode 100644 tests/grouptools/groupadd/03_groupadd_add_group_-K_GID_MIN/config/etc/shadow create mode 100644 tests/grouptools/groupadd/03_groupadd_add_group_-K_GID_MIN/data/group create mode 100644 tests/grouptools/groupadd/03_groupadd_add_group_-K_GID_MIN/data/gshadow create mode 100755 tests/grouptools/groupadd/03_groupadd_add_group_-K_GID_MIN/groupadd.test create mode 100644 tests/grouptools/groupadd/04_groupadd_set_password/config.txt create mode 100644 tests/grouptools/groupadd/04_groupadd_set_password/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/04_groupadd_set_password/config/etc/group create mode 100644 tests/grouptools/groupadd/04_groupadd_set_password/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/04_groupadd_set_password/config/etc/login.defs create mode 100644 tests/grouptools/groupadd/04_groupadd_set_password/config/etc/passwd create mode 100644 tests/grouptools/groupadd/04_groupadd_set_password/config/etc/shadow create mode 100644 tests/grouptools/groupadd/04_groupadd_set_password/data/group create mode 100644 tests/grouptools/groupadd/04_groupadd_set_password/data/gshadow create mode 100755 tests/grouptools/groupadd/04_groupadd_set_password/groupadd.test create mode 100644 tests/grouptools/groupadd/05_groupadd_set_GID/config.txt create mode 100644 tests/grouptools/groupadd/05_groupadd_set_GID/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/05_groupadd_set_GID/config/etc/group create mode 100644 tests/grouptools/groupadd/05_groupadd_set_GID/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/05_groupadd_set_GID/config/etc/login.defs create mode 100644 tests/grouptools/groupadd/05_groupadd_set_GID/config/etc/passwd create mode 100644 tests/grouptools/groupadd/05_groupadd_set_GID/config/etc/shadow create mode 100644 tests/grouptools/groupadd/05_groupadd_set_GID/data/group create mode 100644 tests/grouptools/groupadd/05_groupadd_set_GID/data/gshadow create mode 100755 tests/grouptools/groupadd/05_groupadd_set_GID/groupadd.test create mode 100644 tests/grouptools/groupadd/06_groupadd_-f_add_existing_group/config.txt create mode 100644 tests/grouptools/groupadd/06_groupadd_-f_add_existing_group/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/06_groupadd_-f_add_existing_group/config/etc/group create mode 100644 tests/grouptools/groupadd/06_groupadd_-f_add_existing_group/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/06_groupadd_-f_add_existing_group/config/etc/login.defs create mode 100644 tests/grouptools/groupadd/06_groupadd_-f_add_existing_group/config/etc/passwd create mode 100644 tests/grouptools/groupadd/06_groupadd_-f_add_existing_group/config/etc/shadow create mode 100755 tests/grouptools/groupadd/06_groupadd_-f_add_existing_group/groupadd.test create mode 100644 tests/grouptools/groupadd/07_groupadd_-f_add_existing_GID/config.txt create mode 100644 tests/grouptools/groupadd/07_groupadd_-f_add_existing_GID/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/07_groupadd_-f_add_existing_GID/config/etc/group create mode 100644 tests/grouptools/groupadd/07_groupadd_-f_add_existing_GID/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/07_groupadd_-f_add_existing_GID/config/etc/login.defs create mode 100644 tests/grouptools/groupadd/07_groupadd_-f_add_existing_GID/config/etc/passwd create mode 100644 tests/grouptools/groupadd/07_groupadd_-f_add_existing_GID/config/etc/shadow create mode 100644 tests/grouptools/groupadd/07_groupadd_-f_add_existing_GID/data/group create mode 100644 tests/grouptools/groupadd/07_groupadd_-f_add_existing_GID/data/gshadow create mode 100755 tests/grouptools/groupadd/07_groupadd_-f_add_existing_GID/groupadd.test create mode 100644 tests/grouptools/groupadd/08_groupadd_locked_group/config.txt create mode 100644 tests/grouptools/groupadd/08_groupadd_locked_group/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/08_groupadd_locked_group/config/etc/group create mode 100644 tests/grouptools/groupadd/08_groupadd_locked_group/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/08_groupadd_locked_group/config/etc/passwd create mode 100644 tests/grouptools/groupadd/08_groupadd_locked_group/config/etc/shadow create mode 100644 tests/grouptools/groupadd/08_groupadd_locked_group/data/groupadd.err create mode 100755 tests/grouptools/groupadd/08_groupadd_locked_group/groupadd.test create mode 100644 tests/grouptools/groupadd/09_groupadd_locked_gshadow/config.txt create mode 100644 tests/grouptools/groupadd/09_groupadd_locked_gshadow/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/09_groupadd_locked_gshadow/config/etc/group create mode 100644 tests/grouptools/groupadd/09_groupadd_locked_gshadow/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/09_groupadd_locked_gshadow/config/etc/passwd create mode 100644 tests/grouptools/groupadd/09_groupadd_locked_gshadow/config/etc/shadow create mode 100644 tests/grouptools/groupadd/09_groupadd_locked_gshadow/data/groupadd.err create mode 100755 tests/grouptools/groupadd/09_groupadd_locked_gshadow/groupadd.test create mode 100644 tests/grouptools/groupadd/10_groupadd_-o_add_existing_GID/config.txt create mode 100644 tests/grouptools/groupadd/10_groupadd_-o_add_existing_GID/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/10_groupadd_-o_add_existing_GID/config/etc/group create mode 100644 tests/grouptools/groupadd/10_groupadd_-o_add_existing_GID/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/10_groupadd_-o_add_existing_GID/config/etc/login.defs create mode 100644 tests/grouptools/groupadd/10_groupadd_-o_add_existing_GID/config/etc/passwd create mode 100644 tests/grouptools/groupadd/10_groupadd_-o_add_existing_GID/config/etc/shadow create mode 100644 tests/grouptools/groupadd/10_groupadd_-o_add_existing_GID/data/group create mode 100644 tests/grouptools/groupadd/10_groupadd_-o_add_existing_GID/data/gshadow create mode 100755 tests/grouptools/groupadd/10_groupadd_-o_add_existing_GID/groupadd.test create mode 100644 tests/grouptools/groupadd/11_groupadd_invalid_GID/config.txt create mode 100644 tests/grouptools/groupadd/11_groupadd_invalid_GID/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/11_groupadd_invalid_GID/config/etc/group create mode 100644 tests/grouptools/groupadd/11_groupadd_invalid_GID/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/11_groupadd_invalid_GID/config/etc/passwd create mode 100644 tests/grouptools/groupadd/11_groupadd_invalid_GID/config/etc/shadow create mode 100644 tests/grouptools/groupadd/11_groupadd_invalid_GID/data/groupadd.err create mode 100755 tests/grouptools/groupadd/11_groupadd_invalid_GID/groupadd.test create mode 100644 tests/grouptools/groupadd/12_groupadd_negativ_GID/config.txt create mode 100644 tests/grouptools/groupadd/12_groupadd_negativ_GID/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/12_groupadd_negativ_GID/config/etc/group create mode 100644 tests/grouptools/groupadd/12_groupadd_negativ_GID/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/12_groupadd_negativ_GID/config/etc/passwd create mode 100644 tests/grouptools/groupadd/12_groupadd_negativ_GID/config/etc/shadow create mode 100644 tests/grouptools/groupadd/12_groupadd_negativ_GID/data/groupadd.err create mode 100755 tests/grouptools/groupadd/12_groupadd_negativ_GID/groupadd.test create mode 100644 tests/grouptools/groupadd/13_groupadd_invalid_name/config.txt create mode 100644 tests/grouptools/groupadd/13_groupadd_invalid_name/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/13_groupadd_invalid_name/config/etc/group create mode 100644 tests/grouptools/groupadd/13_groupadd_invalid_name/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/13_groupadd_invalid_name/config/etc/passwd create mode 100644 tests/grouptools/groupadd/13_groupadd_invalid_name/config/etc/shadow create mode 100644 tests/grouptools/groupadd/13_groupadd_invalid_name/data/groupadd.err create mode 100755 tests/grouptools/groupadd/13_groupadd_invalid_name/groupadd.test create mode 100644 tests/grouptools/groupadd/14_groupadd_invalid_-K_option/config.txt create mode 100644 tests/grouptools/groupadd/14_groupadd_invalid_-K_option/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/14_groupadd_invalid_-K_option/config/etc/group create mode 100644 tests/grouptools/groupadd/14_groupadd_invalid_-K_option/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/14_groupadd_invalid_-K_option/config/etc/passwd create mode 100644 tests/grouptools/groupadd/14_groupadd_invalid_-K_option/config/etc/shadow create mode 100644 tests/grouptools/groupadd/14_groupadd_invalid_-K_option/data/groupadd.err create mode 100755 tests/grouptools/groupadd/14_groupadd_invalid_-K_option/groupadd.test create mode 100644 tests/grouptools/groupadd/15_groupadd_invalid_-K_no_=/config.txt create mode 100644 tests/grouptools/groupadd/15_groupadd_invalid_-K_no_=/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/15_groupadd_invalid_-K_no_=/config/etc/group create mode 100644 tests/grouptools/groupadd/15_groupadd_invalid_-K_no_=/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/15_groupadd_invalid_-K_no_=/config/etc/passwd create mode 100644 tests/grouptools/groupadd/15_groupadd_invalid_-K_no_=/config/etc/shadow create mode 100644 tests/grouptools/groupadd/15_groupadd_invalid_-K_no_=/data/groupadd.err create mode 100755 tests/grouptools/groupadd/15_groupadd_invalid_-K_no_=/groupadd.test create mode 100644 tests/grouptools/groupadd/16_groupadd_existing_group/config.txt create mode 100644 tests/grouptools/groupadd/16_groupadd_existing_group/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/16_groupadd_existing_group/config/etc/group create mode 100644 tests/grouptools/groupadd/16_groupadd_existing_group/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/16_groupadd_existing_group/config/etc/passwd create mode 100644 tests/grouptools/groupadd/16_groupadd_existing_group/config/etc/shadow create mode 100644 tests/grouptools/groupadd/16_groupadd_existing_group/data/groupadd.err create mode 100755 tests/grouptools/groupadd/16_groupadd_existing_group/groupadd.test create mode 100644 tests/grouptools/groupadd/17_groupadd_add_systemgroup/config.txt create mode 100644 tests/grouptools/groupadd/17_groupadd_add_systemgroup/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/17_groupadd_add_systemgroup/config/etc/group create mode 100644 tests/grouptools/groupadd/17_groupadd_add_systemgroup/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/17_groupadd_add_systemgroup/config/etc/login.defs create mode 100644 tests/grouptools/groupadd/17_groupadd_add_systemgroup/config/etc/passwd create mode 100644 tests/grouptools/groupadd/17_groupadd_add_systemgroup/config/etc/shadow create mode 100644 tests/grouptools/groupadd/17_groupadd_add_systemgroup/data/group create mode 100644 tests/grouptools/groupadd/17_groupadd_add_systemgroup/data/gshadow create mode 100755 tests/grouptools/groupadd/17_groupadd_add_systemgroup/groupadd.test create mode 100644 tests/grouptools/groupadd/18_groupadd_no_more_GID/config.txt create mode 100644 tests/grouptools/groupadd/18_groupadd_no_more_GID/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/18_groupadd_no_more_GID/config/etc/group create mode 100644 tests/grouptools/groupadd/18_groupadd_no_more_GID/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/18_groupadd_no_more_GID/config/etc/login.defs create mode 100644 tests/grouptools/groupadd/18_groupadd_no_more_GID/config/etc/passwd create mode 100644 tests/grouptools/groupadd/18_groupadd_no_more_GID/config/etc/shadow create mode 100644 tests/grouptools/groupadd/18_groupadd_no_more_GID/data/groupadd.err create mode 100755 tests/grouptools/groupadd/18_groupadd_no_more_GID/groupadd.test create mode 100644 tests/grouptools/groupadd/19_groupadd_-r_no_more_system_GID/config.txt create mode 100644 tests/grouptools/groupadd/19_groupadd_-r_no_more_system_GID/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/19_groupadd_-r_no_more_system_GID/config/etc/group create mode 100644 tests/grouptools/groupadd/19_groupadd_-r_no_more_system_GID/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/19_groupadd_-r_no_more_system_GID/config/etc/login.defs create mode 100644 tests/grouptools/groupadd/19_groupadd_-r_no_more_system_GID/config/etc/passwd create mode 100644 tests/grouptools/groupadd/19_groupadd_-r_no_more_system_GID/config/etc/shadow create mode 100644 tests/grouptools/groupadd/19_groupadd_-r_no_more_system_GID/data/groupadd.err create mode 100755 tests/grouptools/groupadd/19_groupadd_-r_no_more_system_GID/groupadd.test create mode 100644 tests/grouptools/groupadd/20_groupadd_add_existing_GID/config.txt create mode 100644 tests/grouptools/groupadd/20_groupadd_add_existing_GID/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/20_groupadd_add_existing_GID/config/etc/group create mode 100644 tests/grouptools/groupadd/20_groupadd_add_existing_GID/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/20_groupadd_add_existing_GID/config/etc/passwd create mode 100644 tests/grouptools/groupadd/20_groupadd_add_existing_GID/config/etc/shadow create mode 100644 tests/grouptools/groupadd/20_groupadd_add_existing_GID/data/groupadd.err create mode 100755 tests/grouptools/groupadd/20_groupadd_add_existing_GID/groupadd.test create mode 100644 tests/grouptools/groupadd/21_groupadd_invalid_GID_4294967295/config.txt create mode 100644 tests/grouptools/groupadd/21_groupadd_invalid_GID_4294967295/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/21_groupadd_invalid_GID_4294967295/config/etc/group create mode 100644 tests/grouptools/groupadd/21_groupadd_invalid_GID_4294967295/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/21_groupadd_invalid_GID_4294967295/config/etc/passwd create mode 100644 tests/grouptools/groupadd/21_groupadd_invalid_GID_4294967295/config/etc/shadow create mode 100644 tests/grouptools/groupadd/21_groupadd_invalid_GID_4294967295/data/groupadd.err create mode 100755 tests/grouptools/groupadd/21_groupadd_invalid_GID_4294967295/groupadd.test create mode 100644 tests/grouptools/groupadd/22_groupadd_usage/config.txt create mode 100644 tests/grouptools/groupadd/22_groupadd_usage/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/22_groupadd_usage/config/etc/group create mode 100644 tests/grouptools/groupadd/22_groupadd_usage/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/22_groupadd_usage/config/etc/passwd create mode 100644 tests/grouptools/groupadd/22_groupadd_usage/config/etc/shadow create mode 100644 tests/grouptools/groupadd/22_groupadd_usage/data/usage.out create mode 100755 tests/grouptools/groupadd/22_groupadd_usage/groupadd.test create mode 100644 tests/grouptools/groupadd/23_groupadd_no_groups/config.txt create mode 100644 tests/grouptools/groupadd/23_groupadd_no_groups/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/23_groupadd_no_groups/config/etc/group create mode 100644 tests/grouptools/groupadd/23_groupadd_no_groups/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/23_groupadd_no_groups/config/etc/passwd create mode 100644 tests/grouptools/groupadd/23_groupadd_no_groups/config/etc/shadow create mode 100644 tests/grouptools/groupadd/23_groupadd_no_groups/data/groupadd.err create mode 100755 tests/grouptools/groupadd/23_groupadd_no_groups/groupadd.test create mode 100644 tests/grouptools/groupadd/24_groupadd_2_groups/config.txt create mode 100644 tests/grouptools/groupadd/24_groupadd_2_groups/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/24_groupadd_2_groups/config/etc/group create mode 100644 tests/grouptools/groupadd/24_groupadd_2_groups/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/24_groupadd_2_groups/config/etc/passwd create mode 100644 tests/grouptools/groupadd/24_groupadd_2_groups/config/etc/shadow create mode 100644 tests/grouptools/groupadd/24_groupadd_2_groups/data/groupadd.err create mode 100755 tests/grouptools/groupadd/24_groupadd_2_groups/groupadd.test create mode 100644 tests/grouptools/groupadd/25_groupadd_no_gshadow/config.txt create mode 100644 tests/grouptools/groupadd/25_groupadd_no_gshadow/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/25_groupadd_no_gshadow/config/etc/group create mode 100644 tests/grouptools/groupadd/25_groupadd_no_gshadow/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/25_groupadd_no_gshadow/config/etc/login.defs create mode 100644 tests/grouptools/groupadd/25_groupadd_no_gshadow/config/etc/passwd create mode 100644 tests/grouptools/groupadd/25_groupadd_no_gshadow/config/etc/shadow create mode 100644 tests/grouptools/groupadd/25_groupadd_no_gshadow/data/group create mode 100755 tests/grouptools/groupadd/25_groupadd_no_gshadow/groupadd.test create mode 100644 tests/grouptools/groupadd/26_groupadd_-o_without_-g/config.txt create mode 100644 tests/grouptools/groupadd/26_groupadd_-o_without_-g/config/etc/default/useradd create mode 100644 tests/grouptools/groupadd/26_groupadd_-o_without_-g/config/etc/group create mode 100644 tests/grouptools/groupadd/26_groupadd_-o_without_-g/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/26_groupadd_-o_without_-g/config/etc/passwd create mode 100644 tests/grouptools/groupadd/26_groupadd_-o_without_-g/config/etc/shadow create mode 100644 tests/grouptools/groupadd/26_groupadd_-o_without_-g/data/groupadd.err create mode 100755 tests/grouptools/groupadd/26_groupadd_-o_without_-g/groupadd.test create mode 100644 tests/grouptools/groupadd/27_groupadd_invalid_option/config.txt create mode 100644 tests/grouptools/groupadd/27_groupadd_invalid_option/config/etc/group create mode 100644 tests/grouptools/groupadd/27_groupadd_invalid_option/config/etc/gshadow create mode 100644 tests/grouptools/groupadd/27_groupadd_invalid_option/config/etc/passwd create mode 100644 tests/grouptools/groupadd/27_groupadd_invalid_option/config/etc/shadow create mode 100644 tests/grouptools/groupadd/27_groupadd_invalid_option/data/groupadd.err create mode 100755 tests/grouptools/groupadd/27_groupadd_invalid_option/groupadd.test create mode 100644 tests/grouptools/groupdel/01_groupdel_delete_group/config.txt create mode 100644 tests/grouptools/groupdel/01_groupdel_delete_group/config/etc/default/useradd create mode 100644 tests/grouptools/groupdel/01_groupdel_delete_group/config/etc/group create mode 100644 tests/grouptools/groupdel/01_groupdel_delete_group/config/etc/gshadow create mode 100644 tests/grouptools/groupdel/01_groupdel_delete_group/config/etc/login.defs create mode 100644 tests/grouptools/groupdel/01_groupdel_delete_group/config/etc/passwd create mode 100644 tests/grouptools/groupdel/01_groupdel_delete_group/config/etc/shadow create mode 100644 tests/grouptools/groupdel/01_groupdel_delete_group/data/group create mode 100644 tests/grouptools/groupdel/01_groupdel_delete_group/data/gshadow create mode 100755 tests/grouptools/groupdel/01_groupdel_delete_group/groupdel.test create mode 100644 tests/grouptools/groupdel/02_groupdel_delete_group_no_gshadow_group/config.txt create mode 100644 tests/grouptools/groupdel/02_groupdel_delete_group_no_gshadow_group/config/etc/default/useradd create mode 100644 tests/grouptools/groupdel/02_groupdel_delete_group_no_gshadow_group/config/etc/group create mode 100644 tests/grouptools/groupdel/02_groupdel_delete_group_no_gshadow_group/config/etc/gshadow create mode 100644 tests/grouptools/groupdel/02_groupdel_delete_group_no_gshadow_group/config/etc/login.defs create mode 100644 tests/grouptools/groupdel/02_groupdel_delete_group_no_gshadow_group/config/etc/passwd create mode 100644 tests/grouptools/groupdel/02_groupdel_delete_group_no_gshadow_group/config/etc/shadow create mode 100644 tests/grouptools/groupdel/02_groupdel_delete_group_no_gshadow_group/data/group create mode 100755 tests/grouptools/groupdel/02_groupdel_delete_group_no_gshadow_group/groupdel.test create mode 100644 tests/grouptools/groupdel/03_groupdel_delete_group_no_gshadow_file/config.txt create mode 100644 tests/grouptools/groupdel/03_groupdel_delete_group_no_gshadow_file/config/etc/default/useradd create mode 100644 tests/grouptools/groupdel/03_groupdel_delete_group_no_gshadow_file/config/etc/group create mode 100644 tests/grouptools/groupdel/03_groupdel_delete_group_no_gshadow_file/config/etc/gshadow create mode 100644 tests/grouptools/groupdel/03_groupdel_delete_group_no_gshadow_file/config/etc/login.defs create mode 100644 tests/grouptools/groupdel/03_groupdel_delete_group_no_gshadow_file/config/etc/passwd create mode 100644 tests/grouptools/groupdel/03_groupdel_delete_group_no_gshadow_file/config/etc/shadow create mode 100644 tests/grouptools/groupdel/03_groupdel_delete_group_no_gshadow_file/data/group create mode 100755 tests/grouptools/groupdel/03_groupdel_delete_group_no_gshadow_file/groupdel.test create mode 100644 tests/grouptools/groupdel/04_groupdel_delete_group_error_busy_group/config.txt create mode 100644 tests/grouptools/groupdel/04_groupdel_delete_group_error_busy_group/config/etc/default/useradd create mode 100644 tests/grouptools/groupdel/04_groupdel_delete_group_error_busy_group/config/etc/group create mode 100644 tests/grouptools/groupdel/04_groupdel_delete_group_error_busy_group/config/etc/gshadow create mode 100644 tests/grouptools/groupdel/04_groupdel_delete_group_error_busy_group/config/etc/login.defs create mode 100644 tests/grouptools/groupdel/04_groupdel_delete_group_error_busy_group/config/etc/passwd create mode 100644 tests/grouptools/groupdel/04_groupdel_delete_group_error_busy_group/config/etc/shadow create mode 100644 tests/grouptools/groupdel/04_groupdel_delete_group_error_busy_group/data/groupdel.err create mode 100755 tests/grouptools/groupdel/04_groupdel_delete_group_error_busy_group/groupdel.test create mode 100644 tests/grouptools/groupdel/05_groupdel_delete_group_error_unknown_group/config.txt create mode 100644 tests/grouptools/groupdel/05_groupdel_delete_group_error_unknown_group/config/etc/default/useradd create mode 100644 tests/grouptools/groupdel/05_groupdel_delete_group_error_unknown_group/config/etc/group create mode 100644 tests/grouptools/groupdel/05_groupdel_delete_group_error_unknown_group/config/etc/gshadow create mode 100644 tests/grouptools/groupdel/05_groupdel_delete_group_error_unknown_group/config/etc/login.defs create mode 100644 tests/grouptools/groupdel/05_groupdel_delete_group_error_unknown_group/config/etc/passwd create mode 100644 tests/grouptools/groupdel/05_groupdel_delete_group_error_unknown_group/config/etc/shadow create mode 100644 tests/grouptools/groupdel/05_groupdel_delete_group_error_unknown_group/data/groupdel.err create mode 100755 tests/grouptools/groupdel/05_groupdel_delete_group_error_unknown_group/groupdel.test create mode 100644 tests/grouptools/groupdel/06_groupdel_delete_group_error_locked_group/config.txt create mode 100644 tests/grouptools/groupdel/06_groupdel_delete_group_error_locked_group/config/etc/default/useradd create mode 100644 tests/grouptools/groupdel/06_groupdel_delete_group_error_locked_group/config/etc/group create mode 100644 tests/grouptools/groupdel/06_groupdel_delete_group_error_locked_group/config/etc/gshadow create mode 100644 tests/grouptools/groupdel/06_groupdel_delete_group_error_locked_group/config/etc/login.defs create mode 100644 tests/grouptools/groupdel/06_groupdel_delete_group_error_locked_group/config/etc/passwd create mode 100644 tests/grouptools/groupdel/06_groupdel_delete_group_error_locked_group/config/etc/shadow create mode 100644 tests/grouptools/groupdel/06_groupdel_delete_group_error_locked_group/data/groupdel.err create mode 100755 tests/grouptools/groupdel/06_groupdel_delete_group_error_locked_group/groupdel.test create mode 100644 tests/grouptools/groupdel/07_groupdel_delete_group_error_locked_gshadow/config.txt create mode 100644 tests/grouptools/groupdel/07_groupdel_delete_group_error_locked_gshadow/config/etc/default/useradd create mode 100644 tests/grouptools/groupdel/07_groupdel_delete_group_error_locked_gshadow/config/etc/group create mode 100644 tests/grouptools/groupdel/07_groupdel_delete_group_error_locked_gshadow/config/etc/gshadow create mode 100644 tests/grouptools/groupdel/07_groupdel_delete_group_error_locked_gshadow/config/etc/login.defs create mode 100644 tests/grouptools/groupdel/07_groupdel_delete_group_error_locked_gshadow/config/etc/passwd create mode 100644 tests/grouptools/groupdel/07_groupdel_delete_group_error_locked_gshadow/config/etc/shadow create mode 100644 tests/grouptools/groupdel/07_groupdel_delete_group_error_locked_gshadow/data/groupdel.err create mode 100755 tests/grouptools/groupdel/07_groupdel_delete_group_error_locked_gshadow/groupdel.test create mode 100644 tests/grouptools/groupdel/08_groupdel_delete_group_error_no_group_parameter/config.txt create mode 100644 tests/grouptools/groupdel/08_groupdel_delete_group_error_no_group_parameter/config/etc/default/useradd create mode 100644 tests/grouptools/groupdel/08_groupdel_delete_group_error_no_group_parameter/config/etc/group create mode 100644 tests/grouptools/groupdel/08_groupdel_delete_group_error_no_group_parameter/config/etc/gshadow create mode 100644 tests/grouptools/groupdel/08_groupdel_delete_group_error_no_group_parameter/config/etc/login.defs create mode 100644 tests/grouptools/groupdel/08_groupdel_delete_group_error_no_group_parameter/config/etc/passwd create mode 100644 tests/grouptools/groupdel/08_groupdel_delete_group_error_no_group_parameter/config/etc/shadow create mode 100644 tests/grouptools/groupdel/08_groupdel_delete_group_error_no_group_parameter/data/groupdel.err create mode 100755 tests/grouptools/groupdel/08_groupdel_delete_group_error_no_group_parameter/groupdel.test create mode 100644 tests/grouptools/groupdel/09_groupdel_delete_group_error_two_group_parameter/config.txt create mode 100644 tests/grouptools/groupdel/09_groupdel_delete_group_error_two_group_parameter/config/etc/default/useradd create mode 100644 tests/grouptools/groupdel/09_groupdel_delete_group_error_two_group_parameter/config/etc/group create mode 100644 tests/grouptools/groupdel/09_groupdel_delete_group_error_two_group_parameter/config/etc/gshadow create mode 100644 tests/grouptools/groupdel/09_groupdel_delete_group_error_two_group_parameter/config/etc/login.defs create mode 100644 tests/grouptools/groupdel/09_groupdel_delete_group_error_two_group_parameter/config/etc/passwd create mode 100644 tests/grouptools/groupdel/09_groupdel_delete_group_error_two_group_parameter/config/etc/shadow create mode 100644 tests/grouptools/groupdel/09_groupdel_delete_group_error_two_group_parameter/data/groupdel.err create mode 100755 tests/grouptools/groupdel/09_groupdel_delete_group_error_two_group_parameter/groupdel.test create mode 100644 tests/grouptools/groupdel/10_groupdel_usage/config.txt create mode 100644 tests/grouptools/groupdel/10_groupdel_usage/config/etc/default/useradd create mode 100644 tests/grouptools/groupdel/10_groupdel_usage/config/etc/group create mode 100644 tests/grouptools/groupdel/10_groupdel_usage/config/etc/gshadow create mode 100644 tests/grouptools/groupdel/10_groupdel_usage/config/etc/login.defs create mode 100644 tests/grouptools/groupdel/10_groupdel_usage/config/etc/passwd create mode 100644 tests/grouptools/groupdel/10_groupdel_usage/config/etc/shadow create mode 100644 tests/grouptools/groupdel/10_groupdel_usage/data/usage.out create mode 100755 tests/grouptools/groupdel/10_groupdel_usage/groupdel.test create mode 100644 tests/grouptools/groupdel/11_groupdel_invalid_option/config.txt create mode 100644 tests/grouptools/groupdel/11_groupdel_invalid_option/config/etc/default/useradd create mode 100644 tests/grouptools/groupdel/11_groupdel_invalid_option/config/etc/group create mode 100644 tests/grouptools/groupdel/11_groupdel_invalid_option/config/etc/gshadow create mode 100644 tests/grouptools/groupdel/11_groupdel_invalid_option/config/etc/login.defs create mode 100644 tests/grouptools/groupdel/11_groupdel_invalid_option/config/etc/passwd create mode 100644 tests/grouptools/groupdel/11_groupdel_invalid_option/config/etc/shadow create mode 100644 tests/grouptools/groupdel/11_groupdel_invalid_option/data/groupdel.err create mode 100755 tests/grouptools/groupdel/11_groupdel_invalid_option/groupdel.test create mode 100644 tests/grouptools/groupmems/01_groupmems_root_add_user/config.txt create mode 100644 tests/grouptools/groupmems/01_groupmems_root_add_user/config/etc/group create mode 100644 tests/grouptools/groupmems/01_groupmems_root_add_user/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/01_groupmems_root_add_user/config/etc/passwd create mode 100644 tests/grouptools/groupmems/01_groupmems_root_add_user/config/etc/shadow create mode 100644 tests/grouptools/groupmems/01_groupmems_root_add_user/data/group create mode 100644 tests/grouptools/groupmems/01_groupmems_root_add_user/data/gshadow create mode 100755 tests/grouptools/groupmems/01_groupmems_root_add_user/groupmems.test create mode 100644 tests/grouptools/groupmems/02_groupmems_root_del_user/config.txt create mode 100644 tests/grouptools/groupmems/02_groupmems_root_del_user/config/etc/group create mode 100644 tests/grouptools/groupmems/02_groupmems_root_del_user/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/02_groupmems_root_del_user/config/etc/passwd create mode 100644 tests/grouptools/groupmems/02_groupmems_root_del_user/config/etc/shadow create mode 100644 tests/grouptools/groupmems/02_groupmems_root_del_user/data/group create mode 100644 tests/grouptools/groupmems/02_groupmems_root_del_user/data/gshadow create mode 100755 tests/grouptools/groupmems/02_groupmems_root_del_user/groupmems.test create mode 100644 tests/grouptools/groupmems/03_groupmems_root_del_user_admin/config.txt create mode 100644 tests/grouptools/groupmems/03_groupmems_root_del_user_admin/config/etc/group create mode 100644 tests/grouptools/groupmems/03_groupmems_root_del_user_admin/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/03_groupmems_root_del_user_admin/config/etc/passwd create mode 100644 tests/grouptools/groupmems/03_groupmems_root_del_user_admin/config/etc/shadow create mode 100644 tests/grouptools/groupmems/03_groupmems_root_del_user_admin/data/group create mode 100644 tests/grouptools/groupmems/03_groupmems_root_del_user_admin/data/gshadow create mode 100755 tests/grouptools/groupmems/03_groupmems_root_del_user_admin/groupmems.test create mode 100644 tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/config.txt create mode 100644 tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/config/etc/group create mode 100644 tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/config/etc/passwd create mode 100644 tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/config/etc/shadow create mode 100644 tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/data/group create mode 100644 tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/data/gshadow create mode 100755 tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/groupmems.test create mode 100644 tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/config.txt create mode 100644 tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/config/etc/group create mode 100644 tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/config/etc/passwd create mode 100644 tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/config/etc/shadow create mode 100644 tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/data/group create mode 100644 tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/data/gshadow create mode 100755 tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/groupmems.test create mode 100644 tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/config.txt create mode 100644 tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/config/etc/group create mode 100644 tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/config/etc/passwd create mode 100644 tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/config/etc/shadow create mode 100644 tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/data/group create mode 100644 tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/data/gshadow create mode 100755 tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/groupmems.test create mode 100644 tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/config.txt create mode 100644 tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/config/etc/group create mode 100644 tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/config/etc/passwd create mode 100644 tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/config/etc/shadow create mode 100644 tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/data/group create mode 100644 tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/data/gshadow create mode 100755 tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/groupmems.test create mode 100644 tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/config.txt create mode 100644 tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/config/etc/group create mode 100644 tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/config/etc/passwd create mode 100644 tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/config/etc/shadow create mode 100644 tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/data/group create mode 100644 tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/data/gshadow create mode 100755 tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/groupmems.test create mode 100644 tests/grouptools/groupmems/09_groupmems_root_purge_user/config.txt create mode 100644 tests/grouptools/groupmems/09_groupmems_root_purge_user/config/etc/group create mode 100644 tests/grouptools/groupmems/09_groupmems_root_purge_user/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/09_groupmems_root_purge_user/config/etc/passwd create mode 100644 tests/grouptools/groupmems/09_groupmems_root_purge_user/config/etc/shadow create mode 100644 tests/grouptools/groupmems/09_groupmems_root_purge_user/data/group create mode 100644 tests/grouptools/groupmems/09_groupmems_root_purge_user/data/gshadow create mode 100755 tests/grouptools/groupmems/09_groupmems_root_purge_user/groupmems.test create mode 100644 tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/config.txt create mode 100644 tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/config/etc/group create mode 100644 tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/config/etc/passwd create mode 100644 tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/config/etc/shadow create mode 100644 tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/data/group create mode 100644 tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/data/gshadow create mode 100755 tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/groupmems.test create mode 100644 tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/config.txt create mode 100644 tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/config/etc/group create mode 100644 tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/config/etc/passwd create mode 100644 tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/config/etc/shadow create mode 100644 tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/data/group create mode 100644 tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/data/gshadow create mode 100755 tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/groupmems.test create mode 100644 tests/grouptools/groupmems/12_groupmems_user_add_user/config.txt create mode 100644 tests/grouptools/groupmems/12_groupmems_user_add_user/config/etc/group create mode 100644 tests/grouptools/groupmems/12_groupmems_user_add_user/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/12_groupmems_user_add_user/config/etc/passwd create mode 100644 tests/grouptools/groupmems/12_groupmems_user_add_user/config/etc/shadow create mode 100644 tests/grouptools/groupmems/12_groupmems_user_add_user/data/group create mode 100644 tests/grouptools/groupmems/12_groupmems_user_add_user/data/gshadow create mode 100755 tests/grouptools/groupmems/12_groupmems_user_add_user/groupmems.test create mode 100755 tests/grouptools/groupmems/12_groupmems_user_add_user/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/13_groupmems_user_del_user/config.txt create mode 100644 tests/grouptools/groupmems/13_groupmems_user_del_user/config/etc/group create mode 100644 tests/grouptools/groupmems/13_groupmems_user_del_user/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/13_groupmems_user_del_user/config/etc/passwd create mode 100644 tests/grouptools/groupmems/13_groupmems_user_del_user/config/etc/shadow create mode 100644 tests/grouptools/groupmems/13_groupmems_user_del_user/data/group create mode 100644 tests/grouptools/groupmems/13_groupmems_user_del_user/data/gshadow create mode 100755 tests/grouptools/groupmems/13_groupmems_user_del_user/groupmems.test create mode 100755 tests/grouptools/groupmems/13_groupmems_user_del_user/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/14_groupmems_user_del_user_admin/config.txt create mode 100644 tests/grouptools/groupmems/14_groupmems_user_del_user_admin/config/etc/group create mode 100644 tests/grouptools/groupmems/14_groupmems_user_del_user_admin/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/14_groupmems_user_del_user_admin/config/etc/passwd create mode 100644 tests/grouptools/groupmems/14_groupmems_user_del_user_admin/config/etc/shadow create mode 100644 tests/grouptools/groupmems/14_groupmems_user_del_user_admin/data/group create mode 100644 tests/grouptools/groupmems/14_groupmems_user_del_user_admin/data/gshadow create mode 100755 tests/grouptools/groupmems/14_groupmems_user_del_user_admin/groupmems.test create mode 100755 tests/grouptools/groupmems/14_groupmems_user_del_user_admin/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/config.txt create mode 100644 tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/config/etc/group create mode 100644 tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/config/etc/passwd create mode 100644 tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/config/etc/shadow create mode 100644 tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/data/group create mode 100644 tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/data/gshadow create mode 100755 tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/groupmems.test create mode 100755 tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/config.txt create mode 100644 tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/config/etc/group create mode 100644 tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/config/etc/passwd create mode 100644 tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/config/etc/shadow create mode 100644 tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/data/group create mode 100644 tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/data/gshadow create mode 100755 tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/groupmems.test create mode 100755 tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/config.txt create mode 100644 tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/config/etc/group create mode 100644 tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/config/etc/passwd create mode 100644 tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/config/etc/shadow create mode 100644 tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/data/group create mode 100644 tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/data/gshadow create mode 100755 tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/groupmems.test create mode 100755 tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/config.txt create mode 100644 tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/config/etc/group create mode 100644 tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/config/etc/passwd create mode 100644 tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/config/etc/shadow create mode 100644 tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/data/group create mode 100644 tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/data/gshadow create mode 100755 tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/groupmems.test create mode 100755 tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/config.txt create mode 100644 tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/config/etc/group create mode 100644 tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/config/etc/passwd create mode 100644 tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/config/etc/shadow create mode 100644 tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/data/group create mode 100644 tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/data/gshadow create mode 100755 tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/groupmems.test create mode 100755 tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/20_groupmems_user_purge_user/config.txt create mode 100644 tests/grouptools/groupmems/20_groupmems_user_purge_user/config/etc/group create mode 100644 tests/grouptools/groupmems/20_groupmems_user_purge_user/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/20_groupmems_user_purge_user/config/etc/passwd create mode 100644 tests/grouptools/groupmems/20_groupmems_user_purge_user/config/etc/shadow create mode 100644 tests/grouptools/groupmems/20_groupmems_user_purge_user/data/group create mode 100644 tests/grouptools/groupmems/20_groupmems_user_purge_user/data/gshadow create mode 100755 tests/grouptools/groupmems/20_groupmems_user_purge_user/groupmems.test create mode 100755 tests/grouptools/groupmems/20_groupmems_user_purge_user/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/config.txt create mode 100644 tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/config/etc/group create mode 100644 tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/config/etc/passwd create mode 100644 tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/config/etc/shadow create mode 100644 tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/data/group create mode 100644 tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/data/gshadow create mode 100755 tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/groupmems.test create mode 100755 tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/config.txt create mode 100644 tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/config/etc/group create mode 100644 tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/config/etc/passwd create mode 100644 tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/config/etc/shadow create mode 100644 tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/data/group create mode 100644 tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/data/gshadow create mode 100755 tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/groupmems.test create mode 100755 tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/config.txt create mode 100644 tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/config/etc/group create mode 100644 tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/config/etc/passwd create mode 100644 tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/config/etc/shadow create mode 100755 tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/groupmems.test create mode 100755 tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/config.txt create mode 100644 tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/config/etc/group create mode 100644 tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/config/etc/passwd create mode 100644 tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/config/etc/shadow create mode 100755 tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/groupmems.test create mode 100755 tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/config.txt create mode 100644 tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/config/etc/group create mode 100644 tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/config/etc/passwd create mode 100644 tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/config/etc/shadow create mode 100755 tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/groupmems.test create mode 100755 tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/config.txt create mode 100644 tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/config/etc/group create mode 100644 tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/config/etc/passwd create mode 100644 tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/config/etc/shadow create mode 100755 tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/groupmems.test create mode 100755 tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/config.txt create mode 100644 tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/config/etc/group create mode 100644 tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/config/etc/passwd create mode 100644 tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/config/etc/shadow create mode 100755 tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/groupmems.test create mode 100755 tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/config.txt create mode 100644 tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/config/etc/group create mode 100644 tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/config/etc/passwd create mode 100644 tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/config/etc/shadow create mode 100644 tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/data/group create mode 100755 tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/groupmems.test create mode 100755 tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/config.txt create mode 100644 tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/config/etc/group create mode 100644 tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/config/etc/passwd create mode 100644 tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/config/etc/shadow create mode 100755 tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/groupmems.test create mode 100755 tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/config.txt create mode 100644 tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/config/etc/group create mode 100644 tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/config/etc/passwd create mode 100644 tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/config/etc/shadow create mode 100644 tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/data/group create mode 100644 tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/data/gshadow create mode 100755 tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/groupmems.test create mode 100755 tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/config.txt create mode 100644 tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/config/etc/group create mode 100644 tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/config/etc/passwd create mode 100644 tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/config/etc/shadow create mode 100644 tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/data/group create mode 100755 tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/groupmems.test create mode 100755 tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/config.txt create mode 100644 tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/config/etc/group create mode 100644 tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/config/etc/passwd create mode 100644 tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/config/etc/shadow create mode 100755 tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/groupmems.test create mode 100755 tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/config.txt create mode 100644 tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/config/etc/group create mode 100644 tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/config/etc/passwd create mode 100644 tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/config/etc/shadow create mode 100644 tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/data/group create mode 100755 tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/groupmems.test create mode 100755 tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/config.txt create mode 100644 tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/config/etc/group create mode 100644 tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/config/etc/passwd create mode 100644 tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/config/etc/shadow create mode 100644 tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/data/group create mode 100644 tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/data/gshadow create mode 100755 tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/groupmems.test create mode 100755 tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/config.txt create mode 100644 tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/config/etc/group create mode 100644 tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/config/etc/passwd create mode 100644 tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/config/etc/shadow create mode 100644 tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/data/group create mode 100644 tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/data/gshadow create mode 100755 tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/groupmems.test create mode 100755 tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/config.txt create mode 100644 tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/config/etc/group create mode 100644 tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/config/etc/passwd create mode 100644 tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/config/etc/shadow create mode 100644 tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/data/group create mode 100755 tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/groupmems.test create mode 100755 tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/config.txt create mode 100644 tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/config/etc/group create mode 100644 tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/config/etc/passwd create mode 100644 tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/config/etc/shadow create mode 100644 tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/data/gshadow create mode 100755 tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/groupmems.test create mode 100755 tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/config.txt create mode 100644 tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/config/etc/group create mode 100644 tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/config/etc/passwd create mode 100644 tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/config/etc/shadow create mode 100644 tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/data/group create mode 100644 tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/data/gshadow create mode 100755 tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/groupmems.test create mode 100755 tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/config.txt create mode 100644 tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/config/etc/group create mode 100644 tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/config/etc/passwd create mode 100644 tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/config/etc/shadow create mode 100644 tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/data/group create mode 100755 tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/groupmems.test create mode 100755 tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/config.txt create mode 100644 tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/config/etc/group create mode 100644 tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/config/etc/passwd create mode 100644 tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/config/etc/shadow create mode 100755 tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/groupmems.test create mode 100755 tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/config.txt create mode 100644 tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/config/etc/group create mode 100644 tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/config/etc/passwd create mode 100644 tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/config/etc/shadow create mode 100755 tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/groupmems.test create mode 100755 tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/42_groupmems_user_list_users/config.txt create mode 100644 tests/grouptools/groupmems/42_groupmems_user_list_users/config/etc/group create mode 100644 tests/grouptools/groupmems/42_groupmems_user_list_users/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/42_groupmems_user_list_users/config/etc/passwd create mode 100644 tests/grouptools/groupmems/42_groupmems_user_list_users/config/etc/shadow create mode 100755 tests/grouptools/groupmems/42_groupmems_user_list_users/groupmems.test create mode 100755 tests/grouptools/groupmems/42_groupmems_user_list_users/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/config.txt create mode 100644 tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/config/etc/group create mode 100644 tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/config/etc/passwd create mode 100644 tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/config/etc/shadow create mode 100755 tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/groupmems.test create mode 100755 tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/config.txt create mode 100644 tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/config/etc/group create mode 100644 tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/config/etc/passwd create mode 100644 tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/config/etc/shadow create mode 100755 tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/groupmems.test create mode 100755 tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/config.txt create mode 100644 tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/config/etc/group create mode 100644 tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/config/etc/passwd create mode 100644 tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/config/etc/shadow create mode 100755 tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/groupmems.test create mode 100755 tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/config.txt create mode 100644 tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/config/etc/group create mode 100644 tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/config/etc/passwd create mode 100644 tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/config/etc/shadow create mode 100755 tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/groupmems.test create mode 100755 tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/config.txt create mode 100644 tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/config/etc/group create mode 100644 tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/config/etc/passwd create mode 100644 tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/config/etc/shadow create mode 100755 tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/groupmems.test create mode 100755 tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/config.txt create mode 100644 tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/config/etc/group create mode 100644 tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/config/etc/passwd create mode 100644 tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/config/etc/shadow create mode 100755 tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/groupmems.test create mode 100755 tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/config.txt create mode 100644 tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/config/etc/group create mode 100644 tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/config/etc/passwd create mode 100644 tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/config/etc/shadow create mode 100755 tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/groupmems.test create mode 100755 tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/config.txt create mode 100644 tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/config/etc/group create mode 100644 tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/config/etc/passwd create mode 100644 tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/config/etc/shadow create mode 100755 tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/groupmems.test create mode 100755 tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/config.txt create mode 100644 tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/config/etc/group create mode 100644 tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/config/etc/passwd create mode 100644 tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/config/etc/shadow create mode 100755 tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/groupmems.test create mode 100755 tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/config.txt create mode 100644 tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/config/etc/group create mode 100644 tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/config/etc/passwd create mode 100644 tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/config/etc/shadow create mode 100755 tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/groupmems.test create mode 100755 tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/53_groupmems_usage/config.txt create mode 100644 tests/grouptools/groupmems/53_groupmems_usage/config/etc/group create mode 100644 tests/grouptools/groupmems/53_groupmems_usage/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/53_groupmems_usage/config/etc/passwd create mode 100644 tests/grouptools/groupmems/53_groupmems_usage/config/etc/shadow create mode 100644 tests/grouptools/groupmems/53_groupmems_usage/data/usage.out create mode 100755 tests/grouptools/groupmems/53_groupmems_usage/groupmems.test create mode 100644 tests/grouptools/groupmems/54_groupmems_usage_invalid_option/config.txt create mode 100644 tests/grouptools/groupmems/54_groupmems_usage_invalid_option/config/etc/group create mode 100644 tests/grouptools/groupmems/54_groupmems_usage_invalid_option/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/54_groupmems_usage_invalid_option/config/etc/login.defs create mode 100644 tests/grouptools/groupmems/54_groupmems_usage_invalid_option/config/etc/passwd create mode 100644 tests/grouptools/groupmems/54_groupmems_usage_invalid_option/config/etc/shadow create mode 100644 tests/grouptools/groupmems/54_groupmems_usage_invalid_option/data/groupmems.err create mode 100755 tests/grouptools/groupmems/54_groupmems_usage_invalid_option/groupmems.test create mode 100644 tests/grouptools/groupmems/55_groupmems_usage-a-d/config.txt create mode 100644 tests/grouptools/groupmems/55_groupmems_usage-a-d/config/etc/group create mode 100644 tests/grouptools/groupmems/55_groupmems_usage-a-d/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/55_groupmems_usage-a-d/config/etc/login.defs create mode 100644 tests/grouptools/groupmems/55_groupmems_usage-a-d/config/etc/passwd create mode 100644 tests/grouptools/groupmems/55_groupmems_usage-a-d/config/etc/shadow create mode 100644 tests/grouptools/groupmems/55_groupmems_usage-a-d/data/groupmems.err create mode 100755 tests/grouptools/groupmems/55_groupmems_usage-a-d/groupmems.test create mode 100644 tests/grouptools/groupmems/56_groupmems_usage_extra_arg/config.txt create mode 100644 tests/grouptools/groupmems/56_groupmems_usage_extra_arg/config/etc/group create mode 100644 tests/grouptools/groupmems/56_groupmems_usage_extra_arg/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/56_groupmems_usage_extra_arg/config/etc/login.defs create mode 100644 tests/grouptools/groupmems/56_groupmems_usage_extra_arg/config/etc/passwd create mode 100644 tests/grouptools/groupmems/56_groupmems_usage_extra_arg/config/etc/shadow create mode 100644 tests/grouptools/groupmems/56_groupmems_usage_extra_arg/data/groupmems.err create mode 100755 tests/grouptools/groupmems/56_groupmems_usage_extra_arg/groupmems.test create mode 100644 tests/grouptools/groupmems/57_groupmems_authentication/config.txt create mode 100644 tests/grouptools/groupmems/57_groupmems_authentication/config/etc/group create mode 100644 tests/grouptools/groupmems/57_groupmems_authentication/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/57_groupmems_authentication/config/etc/pam.d/common-account create mode 100644 tests/grouptools/groupmems/57_groupmems_authentication/config/etc/pam.d/common-auth create mode 100644 tests/grouptools/groupmems/57_groupmems_authentication/config/etc/pam.d/groupmems create mode 100644 tests/grouptools/groupmems/57_groupmems_authentication/config/etc/passwd create mode 100644 tests/grouptools/groupmems/57_groupmems_authentication/config/etc/shadow create mode 100644 tests/grouptools/groupmems/57_groupmems_authentication/data/group create mode 100644 tests/grouptools/groupmems/57_groupmems_authentication/data/gshadow create mode 100755 tests/grouptools/groupmems/57_groupmems_authentication/groupmems.test create mode 100755 tests/grouptools/groupmems/57_groupmems_authentication/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/58_groupmems_authentication_failure1/config.txt create mode 100644 tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/group create mode 100644 tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/pam.d/common-account create mode 100644 tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/pam.d/common-auth create mode 100644 tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/pam.d/groupmems create mode 100644 tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/passwd create mode 100644 tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/shadow create mode 100755 tests/grouptools/groupmems/58_groupmems_authentication_failure1/groupmems.test create mode 100755 tests/grouptools/groupmems/58_groupmems_authentication_failure1/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/59_groupmems_authentication_failure2/config.txt create mode 100644 tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/group create mode 100644 tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/pam.d/common-account create mode 100644 tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/pam.d/common-auth create mode 100644 tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/pam.d/groupmems create mode 100644 tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/passwd create mode 100644 tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/shadow create mode 100755 tests/grouptools/groupmems/59_groupmems_authentication_failure2/groupmems.test create mode 100755 tests/grouptools/groupmems/59_groupmems_authentication_failure2/run_groupmems.exp create mode 100644 tests/grouptools/groupmems/60_groupmems_authentication_failure3/config.txt create mode 100644 tests/grouptools/groupmems/60_groupmems_authentication_failure3/config/etc/group create mode 100644 tests/grouptools/groupmems/60_groupmems_authentication_failure3/config/etc/gshadow create mode 100644 tests/grouptools/groupmems/60_groupmems_authentication_failure3/config/etc/pam.d/groupmems create mode 100644 tests/grouptools/groupmems/60_groupmems_authentication_failure3/config/etc/pam.d/other create mode 100644 tests/grouptools/groupmems/60_groupmems_authentication_failure3/config/etc/passwd create mode 100644 tests/grouptools/groupmems/60_groupmems_authentication_failure3/config/etc/shadow create mode 100755 tests/grouptools/groupmems/60_groupmems_authentication_failure3/groupmems.test create mode 100755 tests/grouptools/groupmems/60_groupmems_authentication_failure3/run_groupmems.exp create mode 100644 tests/grouptools/groupmod/01_groupmod_change_gid/config.txt create mode 100644 tests/grouptools/groupmod/01_groupmod_change_gid/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/01_groupmod_change_gid/config/etc/group create mode 100644 tests/grouptools/groupmod/01_groupmod_change_gid/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/01_groupmod_change_gid/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/01_groupmod_change_gid/config/etc/passwd create mode 100644 tests/grouptools/groupmod/01_groupmod_change_gid/config/etc/shadow create mode 100644 tests/grouptools/groupmod/01_groupmod_change_gid/data/group create mode 100755 tests/grouptools/groupmod/01_groupmod_change_gid/groupmod.test create mode 100644 tests/grouptools/groupmod/02_groupmod_change_gid_change_primary_group/config.txt create mode 100644 tests/grouptools/groupmod/02_groupmod_change_gid_change_primary_group/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/02_groupmod_change_gid_change_primary_group/config/etc/group create mode 100644 tests/grouptools/groupmod/02_groupmod_change_gid_change_primary_group/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/02_groupmod_change_gid_change_primary_group/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/02_groupmod_change_gid_change_primary_group/config/etc/passwd create mode 100644 tests/grouptools/groupmod/02_groupmod_change_gid_change_primary_group/config/etc/shadow create mode 100644 tests/grouptools/groupmod/02_groupmod_change_gid_change_primary_group/data/group create mode 100644 tests/grouptools/groupmod/02_groupmod_change_gid_change_primary_group/data/passwd create mode 100755 tests/grouptools/groupmod/02_groupmod_change_gid_change_primary_group/groupmod.test create mode 100644 tests/grouptools/groupmod/03_groupmod_change_gid_no_gshadow_group/config.txt create mode 100644 tests/grouptools/groupmod/03_groupmod_change_gid_no_gshadow_group/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/03_groupmod_change_gid_no_gshadow_group/config/etc/group create mode 100644 tests/grouptools/groupmod/03_groupmod_change_gid_no_gshadow_group/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/03_groupmod_change_gid_no_gshadow_group/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/03_groupmod_change_gid_no_gshadow_group/config/etc/passwd create mode 100644 tests/grouptools/groupmod/03_groupmod_change_gid_no_gshadow_group/config/etc/shadow create mode 100644 tests/grouptools/groupmod/03_groupmod_change_gid_no_gshadow_group/data/group create mode 100755 tests/grouptools/groupmod/03_groupmod_change_gid_no_gshadow_group/groupmod.test create mode 100644 tests/grouptools/groupmod/04_groupmod_change_gid_no_gshadow_file/config.txt create mode 100644 tests/grouptools/groupmod/04_groupmod_change_gid_no_gshadow_file/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/04_groupmod_change_gid_no_gshadow_file/config/etc/group create mode 100644 tests/grouptools/groupmod/04_groupmod_change_gid_no_gshadow_file/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/04_groupmod_change_gid_no_gshadow_file/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/04_groupmod_change_gid_no_gshadow_file/config/etc/passwd create mode 100644 tests/grouptools/groupmod/04_groupmod_change_gid_no_gshadow_file/config/etc/shadow create mode 100644 tests/grouptools/groupmod/04_groupmod_change_gid_no_gshadow_file/data/group create mode 100755 tests/grouptools/groupmod/04_groupmod_change_gid_no_gshadow_file/groupmod.test create mode 100644 tests/grouptools/groupmod/05_groupmod_change_gid_-o_override_used_GID/config.txt create mode 100644 tests/grouptools/groupmod/05_groupmod_change_gid_-o_override_used_GID/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/05_groupmod_change_gid_-o_override_used_GID/config/etc/group create mode 100644 tests/grouptools/groupmod/05_groupmod_change_gid_-o_override_used_GID/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/05_groupmod_change_gid_-o_override_used_GID/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/05_groupmod_change_gid_-o_override_used_GID/config/etc/passwd create mode 100644 tests/grouptools/groupmod/05_groupmod_change_gid_-o_override_used_GID/config/etc/shadow create mode 100644 tests/grouptools/groupmod/05_groupmod_change_gid_-o_override_used_GID/data/group create mode 100755 tests/grouptools/groupmod/05_groupmod_change_gid_-o_override_used_GID/groupmod.test create mode 100644 tests/grouptools/groupmod/06_groupmod_change_group_name/config.txt create mode 100644 tests/grouptools/groupmod/06_groupmod_change_group_name/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/06_groupmod_change_group_name/config/etc/group create mode 100644 tests/grouptools/groupmod/06_groupmod_change_group_name/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/06_groupmod_change_group_name/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/06_groupmod_change_group_name/config/etc/passwd create mode 100644 tests/grouptools/groupmod/06_groupmod_change_group_name/config/etc/shadow create mode 100644 tests/grouptools/groupmod/06_groupmod_change_group_name/data/group create mode 100644 tests/grouptools/groupmod/06_groupmod_change_group_name/data/gshadow create mode 100755 tests/grouptools/groupmod/06_groupmod_change_group_name/groupmod.test create mode 100644 tests/grouptools/groupmod/07_groupmod_change_group_name_no_gshadow_group/config.txt create mode 100644 tests/grouptools/groupmod/07_groupmod_change_group_name_no_gshadow_group/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/07_groupmod_change_group_name_no_gshadow_group/config/etc/group create mode 100644 tests/grouptools/groupmod/07_groupmod_change_group_name_no_gshadow_group/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/07_groupmod_change_group_name_no_gshadow_group/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/07_groupmod_change_group_name_no_gshadow_group/config/etc/passwd create mode 100644 tests/grouptools/groupmod/07_groupmod_change_group_name_no_gshadow_group/config/etc/shadow create mode 100644 tests/grouptools/groupmod/07_groupmod_change_group_name_no_gshadow_group/data/group create mode 100755 tests/grouptools/groupmod/07_groupmod_change_group_name_no_gshadow_group/groupmod.test create mode 100644 tests/grouptools/groupmod/08_groupmod_change_group_name_no_gshadow_file/config.txt create mode 100644 tests/grouptools/groupmod/08_groupmod_change_group_name_no_gshadow_file/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/08_groupmod_change_group_name_no_gshadow_file/config/etc/group create mode 100644 tests/grouptools/groupmod/08_groupmod_change_group_name_no_gshadow_file/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/08_groupmod_change_group_name_no_gshadow_file/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/08_groupmod_change_group_name_no_gshadow_file/config/etc/passwd create mode 100644 tests/grouptools/groupmod/08_groupmod_change_group_name_no_gshadow_file/config/etc/shadow create mode 100644 tests/grouptools/groupmod/08_groupmod_change_group_name_no_gshadow_file/data/group create mode 100755 tests/grouptools/groupmod/08_groupmod_change_group_name_no_gshadow_file/groupmod.test create mode 100644 tests/grouptools/groupmod/09_groupmod_set_password/config.txt create mode 100644 tests/grouptools/groupmod/09_groupmod_set_password/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/09_groupmod_set_password/config/etc/group create mode 100644 tests/grouptools/groupmod/09_groupmod_set_password/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/09_groupmod_set_password/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/09_groupmod_set_password/config/etc/passwd create mode 100644 tests/grouptools/groupmod/09_groupmod_set_password/config/etc/shadow create mode 100644 tests/grouptools/groupmod/09_groupmod_set_password/data/gshadow create mode 100755 tests/grouptools/groupmod/09_groupmod_set_password/groupmod.test create mode 100644 tests/grouptools/groupmod/10_groupmod_set_password_no_gshadow_group/config.txt create mode 100644 tests/grouptools/groupmod/10_groupmod_set_password_no_gshadow_group/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/10_groupmod_set_password_no_gshadow_group/config/etc/group create mode 100644 tests/grouptools/groupmod/10_groupmod_set_password_no_gshadow_group/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/10_groupmod_set_password_no_gshadow_group/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/10_groupmod_set_password_no_gshadow_group/config/etc/passwd create mode 100644 tests/grouptools/groupmod/10_groupmod_set_password_no_gshadow_group/config/etc/shadow create mode 100644 tests/grouptools/groupmod/10_groupmod_set_password_no_gshadow_group/data/gshadow create mode 100755 tests/grouptools/groupmod/10_groupmod_set_password_no_gshadow_group/groupmod.test create mode 100644 tests/grouptools/groupmod/11_groupmod_set_password_no_gshadow_file/config.txt create mode 100644 tests/grouptools/groupmod/11_groupmod_set_password_no_gshadow_file/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/11_groupmod_set_password_no_gshadow_file/config/etc/group create mode 100644 tests/grouptools/groupmod/11_groupmod_set_password_no_gshadow_file/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/11_groupmod_set_password_no_gshadow_file/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/11_groupmod_set_password_no_gshadow_file/config/etc/passwd create mode 100644 tests/grouptools/groupmod/11_groupmod_set_password_no_gshadow_file/config/etc/shadow create mode 100644 tests/grouptools/groupmod/11_groupmod_set_password_no_gshadow_file/data/group create mode 100755 tests/grouptools/groupmod/11_groupmod_set_password_no_gshadow_file/groupmod.test create mode 100644 tests/grouptools/groupmod/12_groupmod_change_gid_error_unknown_group/config.txt create mode 100644 tests/grouptools/groupmod/12_groupmod_change_gid_error_unknown_group/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/12_groupmod_change_gid_error_unknown_group/config/etc/group create mode 100644 tests/grouptools/groupmod/12_groupmod_change_gid_error_unknown_group/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/12_groupmod_change_gid_error_unknown_group/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/12_groupmod_change_gid_error_unknown_group/config/etc/passwd create mode 100644 tests/grouptools/groupmod/12_groupmod_change_gid_error_unknown_group/config/etc/shadow create mode 100644 tests/grouptools/groupmod/12_groupmod_change_gid_error_unknown_group/data/groupmod.err create mode 100755 tests/grouptools/groupmod/12_groupmod_change_gid_error_unknown_group/groupmod.test create mode 100644 tests/grouptools/groupmod/13_groupmod_change_gid_error_used_GID/config.txt create mode 100644 tests/grouptools/groupmod/13_groupmod_change_gid_error_used_GID/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/13_groupmod_change_gid_error_used_GID/config/etc/group create mode 100644 tests/grouptools/groupmod/13_groupmod_change_gid_error_used_GID/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/13_groupmod_change_gid_error_used_GID/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/13_groupmod_change_gid_error_used_GID/config/etc/passwd create mode 100644 tests/grouptools/groupmod/13_groupmod_change_gid_error_used_GID/config/etc/shadow create mode 100644 tests/grouptools/groupmod/13_groupmod_change_gid_error_used_GID/data/groupmod.err create mode 100755 tests/grouptools/groupmod/13_groupmod_change_gid_error_used_GID/groupmod.test create mode 100644 tests/grouptools/groupmod/14_groupmod_change_group_name_error_used_name/config.txt create mode 100644 tests/grouptools/groupmod/14_groupmod_change_group_name_error_used_name/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/14_groupmod_change_group_name_error_used_name/config/etc/group create mode 100644 tests/grouptools/groupmod/14_groupmod_change_group_name_error_used_name/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/14_groupmod_change_group_name_error_used_name/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/14_groupmod_change_group_name_error_used_name/config/etc/passwd create mode 100644 tests/grouptools/groupmod/14_groupmod_change_group_name_error_used_name/config/etc/shadow create mode 100644 tests/grouptools/groupmod/14_groupmod_change_group_name_error_used_name/data/groupmod.err create mode 100755 tests/grouptools/groupmod/14_groupmod_change_group_name_error_used_name/groupmod.test create mode 100644 tests/grouptools/groupmod/15_groupmod_change_group_name_error_invalid_name/config.txt create mode 100644 tests/grouptools/groupmod/15_groupmod_change_group_name_error_invalid_name/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/15_groupmod_change_group_name_error_invalid_name/config/etc/group create mode 100644 tests/grouptools/groupmod/15_groupmod_change_group_name_error_invalid_name/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/15_groupmod_change_group_name_error_invalid_name/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/15_groupmod_change_group_name_error_invalid_name/config/etc/passwd create mode 100644 tests/grouptools/groupmod/15_groupmod_change_group_name_error_invalid_name/config/etc/shadow create mode 100644 tests/grouptools/groupmod/15_groupmod_change_group_name_error_invalid_name/data/groupmod.err create mode 100755 tests/grouptools/groupmod/15_groupmod_change_group_name_error_invalid_name/groupmod.test create mode 100644 tests/grouptools/groupmod/16_groupmod_change_group_name_no_changes/config.txt create mode 100644 tests/grouptools/groupmod/16_groupmod_change_group_name_no_changes/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/16_groupmod_change_group_name_no_changes/config/etc/group create mode 100644 tests/grouptools/groupmod/16_groupmod_change_group_name_no_changes/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/16_groupmod_change_group_name_no_changes/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/16_groupmod_change_group_name_no_changes/config/etc/passwd create mode 100644 tests/grouptools/groupmod/16_groupmod_change_group_name_no_changes/config/etc/shadow create mode 100755 tests/grouptools/groupmod/16_groupmod_change_group_name_no_changes/groupmod.test create mode 100644 tests/grouptools/groupmod/17_groupmod_change_gid_error_locked_group/config.txt create mode 100644 tests/grouptools/groupmod/17_groupmod_change_gid_error_locked_group/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/17_groupmod_change_gid_error_locked_group/config/etc/group create mode 100644 tests/grouptools/groupmod/17_groupmod_change_gid_error_locked_group/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/17_groupmod_change_gid_error_locked_group/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/17_groupmod_change_gid_error_locked_group/config/etc/passwd create mode 100644 tests/grouptools/groupmod/17_groupmod_change_gid_error_locked_group/config/etc/shadow create mode 100644 tests/grouptools/groupmod/17_groupmod_change_gid_error_locked_group/data/groupmod.err create mode 100755 tests/grouptools/groupmod/17_groupmod_change_gid_error_locked_group/groupmod.test create mode 100644 tests/grouptools/groupmod/18_groupmod_change_gid_no_error_locked_gshadow/config.txt create mode 100644 tests/grouptools/groupmod/18_groupmod_change_gid_no_error_locked_gshadow/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/18_groupmod_change_gid_no_error_locked_gshadow/config/etc/group create mode 100644 tests/grouptools/groupmod/18_groupmod_change_gid_no_error_locked_gshadow/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/18_groupmod_change_gid_no_error_locked_gshadow/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/18_groupmod_change_gid_no_error_locked_gshadow/config/etc/passwd create mode 100644 tests/grouptools/groupmod/18_groupmod_change_gid_no_error_locked_gshadow/config/etc/shadow create mode 100644 tests/grouptools/groupmod/18_groupmod_change_gid_no_error_locked_gshadow/data/group create mode 100755 tests/grouptools/groupmod/18_groupmod_change_gid_no_error_locked_gshadow/groupmod.test create mode 100644 tests/grouptools/groupmod/19_groupmod_change_gid_error_invalid_GID/config.txt create mode 100644 tests/grouptools/groupmod/19_groupmod_change_gid_error_invalid_GID/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/19_groupmod_change_gid_error_invalid_GID/config/etc/group create mode 100644 tests/grouptools/groupmod/19_groupmod_change_gid_error_invalid_GID/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/19_groupmod_change_gid_error_invalid_GID/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/19_groupmod_change_gid_error_invalid_GID/config/etc/passwd create mode 100644 tests/grouptools/groupmod/19_groupmod_change_gid_error_invalid_GID/config/etc/shadow create mode 100644 tests/grouptools/groupmod/19_groupmod_change_gid_error_invalid_GID/data/groupmod.err create mode 100755 tests/grouptools/groupmod/19_groupmod_change_gid_error_invalid_GID/groupmod.test create mode 100644 tests/grouptools/groupmod/20_groupmod_change_gid_error_negativ_GID/config.txt create mode 100644 tests/grouptools/groupmod/20_groupmod_change_gid_error_negativ_GID/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/20_groupmod_change_gid_error_negativ_GID/config/etc/group create mode 100644 tests/grouptools/groupmod/20_groupmod_change_gid_error_negativ_GID/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/20_groupmod_change_gid_error_negativ_GID/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/20_groupmod_change_gid_error_negativ_GID/config/etc/passwd create mode 100644 tests/grouptools/groupmod/20_groupmod_change_gid_error_negativ_GID/config/etc/shadow create mode 100644 tests/grouptools/groupmod/20_groupmod_change_gid_error_negativ_GID/data/groupmod.err create mode 100755 tests/grouptools/groupmod/20_groupmod_change_gid_error_negativ_GID/groupmod.test create mode 100644 tests/grouptools/groupmod/21_groupmod_change_gid_error_no_group/config.txt create mode 100644 tests/grouptools/groupmod/21_groupmod_change_gid_error_no_group/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/21_groupmod_change_gid_error_no_group/config/etc/group create mode 100644 tests/grouptools/groupmod/21_groupmod_change_gid_error_no_group/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/21_groupmod_change_gid_error_no_group/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/21_groupmod_change_gid_error_no_group/config/etc/passwd create mode 100644 tests/grouptools/groupmod/21_groupmod_change_gid_error_no_group/config/etc/shadow create mode 100644 tests/grouptools/groupmod/21_groupmod_change_gid_error_no_group/data/groupmod.err create mode 100755 tests/grouptools/groupmod/21_groupmod_change_gid_error_no_group/groupmod.test create mode 100644 tests/grouptools/groupmod/22_groupmod_change_gid_and_group_name/config/etc/group create mode 100644 tests/grouptools/groupmod/22_groupmod_change_gid_and_group_name/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/22_groupmod_change_gid_and_group_name/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/22_groupmod_change_gid_and_group_name/config/etc/passwd create mode 100644 tests/grouptools/groupmod/22_groupmod_change_gid_and_group_name/config/etc/shadow create mode 100644 tests/grouptools/groupmod/22_groupmod_change_gid_and_group_name/data/group create mode 100644 tests/grouptools/groupmod/22_groupmod_change_gid_and_group_name/data/gshadow create mode 100755 tests/grouptools/groupmod/22_groupmod_change_gid_and_group_name/groupmod.test create mode 100644 tests/grouptools/groupmod/23_groupmod_change_gid_and_group_name_and_password/config/etc/group create mode 100644 tests/grouptools/groupmod/23_groupmod_change_gid_and_group_name_and_password/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/23_groupmod_change_gid_and_group_name_and_password/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/23_groupmod_change_gid_and_group_name_and_password/config/etc/passwd create mode 100644 tests/grouptools/groupmod/23_groupmod_change_gid_and_group_name_and_password/config/etc/shadow create mode 100644 tests/grouptools/groupmod/23_groupmod_change_gid_and_group_name_and_password/data/group create mode 100644 tests/grouptools/groupmod/23_groupmod_change_gid_and_group_name_and_password/data/gshadow create mode 100644 tests/grouptools/groupmod/23_groupmod_change_gid_and_group_name_and_password/data/passwd create mode 100755 tests/grouptools/groupmod/23_groupmod_change_gid_and_group_name_and_password/groupmod.test create mode 100644 tests/grouptools/groupmod/24_groupmod_change_gid_and_name_error_locked_gshadow/config/etc/group create mode 100644 tests/grouptools/groupmod/24_groupmod_change_gid_and_name_error_locked_gshadow/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/24_groupmod_change_gid_and_name_error_locked_gshadow/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/24_groupmod_change_gid_and_name_error_locked_gshadow/config/etc/passwd create mode 100644 tests/grouptools/groupmod/24_groupmod_change_gid_and_name_error_locked_gshadow/config/etc/shadow create mode 100644 tests/grouptools/groupmod/24_groupmod_change_gid_and_name_error_locked_gshadow/data/groupmod.err create mode 100755 tests/grouptools/groupmod/24_groupmod_change_gid_and_name_error_locked_gshadow/groupmod.test create mode 100644 tests/grouptools/groupmod/25_groupmod_change_gid_change_primary_group_error_locked_passwd/config/etc/group create mode 100644 tests/grouptools/groupmod/25_groupmod_change_gid_change_primary_group_error_locked_passwd/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/25_groupmod_change_gid_change_primary_group_error_locked_passwd/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/25_groupmod_change_gid_change_primary_group_error_locked_passwd/config/etc/passwd create mode 100644 tests/grouptools/groupmod/25_groupmod_change_gid_change_primary_group_error_locked_passwd/config/etc/shadow create mode 100644 tests/grouptools/groupmod/25_groupmod_change_gid_change_primary_group_error_locked_passwd/data/groupmod.err create mode 100755 tests/grouptools/groupmod/25_groupmod_change_gid_change_primary_group_error_locked_passwd/groupmod.test create mode 100644 tests/grouptools/groupmod/26_groupmod_change_group_name_no_error_locked_passwd/config/etc/group create mode 100644 tests/grouptools/groupmod/26_groupmod_change_group_name_no_error_locked_passwd/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/26_groupmod_change_group_name_no_error_locked_passwd/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/26_groupmod_change_group_name_no_error_locked_passwd/config/etc/passwd create mode 100644 tests/grouptools/groupmod/26_groupmod_change_group_name_no_error_locked_passwd/config/etc/shadow create mode 100644 tests/grouptools/groupmod/26_groupmod_change_group_name_no_error_locked_passwd/data/group create mode 100644 tests/grouptools/groupmod/26_groupmod_change_group_name_no_error_locked_passwd/data/gshadow create mode 100755 tests/grouptools/groupmod/26_groupmod_change_group_name_no_error_locked_passwd/groupmod.test create mode 100644 tests/grouptools/groupmod/27_groupmod_change_gid_error_GID_4294967295/config.txt create mode 100644 tests/grouptools/groupmod/27_groupmod_change_gid_error_GID_4294967295/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/27_groupmod_change_gid_error_GID_4294967295/config/etc/group create mode 100644 tests/grouptools/groupmod/27_groupmod_change_gid_error_GID_4294967295/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/27_groupmod_change_gid_error_GID_4294967295/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/27_groupmod_change_gid_error_GID_4294967295/config/etc/passwd create mode 100644 tests/grouptools/groupmod/27_groupmod_change_gid_error_GID_4294967295/config/etc/shadow create mode 100644 tests/grouptools/groupmod/27_groupmod_change_gid_error_GID_4294967295/data/groupmod.err create mode 100755 tests/grouptools/groupmod/27_groupmod_change_gid_error_GID_4294967295/groupmod.test create mode 100644 tests/grouptools/groupmod/28_groupmod_usage/config.txt create mode 100644 tests/grouptools/groupmod/28_groupmod_usage/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/28_groupmod_usage/config/etc/group create mode 100644 tests/grouptools/groupmod/28_groupmod_usage/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/28_groupmod_usage/config/etc/passwd create mode 100644 tests/grouptools/groupmod/28_groupmod_usage/config/etc/shadow create mode 100644 tests/grouptools/groupmod/28_groupmod_usage/data/usage.out create mode 100755 tests/grouptools/groupmod/28_groupmod_usage/groupmod.test create mode 100644 tests/grouptools/groupmod/29_groupmod_-g_same_gid_new_name/config.txt create mode 100644 tests/grouptools/groupmod/29_groupmod_-g_same_gid_new_name/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/29_groupmod_-g_same_gid_new_name/config/etc/group create mode 100644 tests/grouptools/groupmod/29_groupmod_-g_same_gid_new_name/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/29_groupmod_-g_same_gid_new_name/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/29_groupmod_-g_same_gid_new_name/config/etc/passwd create mode 100644 tests/grouptools/groupmod/29_groupmod_-g_same_gid_new_name/config/etc/shadow create mode 100644 tests/grouptools/groupmod/29_groupmod_-g_same_gid_new_name/data/group create mode 100644 tests/grouptools/groupmod/29_groupmod_-g_same_gid_new_name/data/gshadow create mode 100755 tests/grouptools/groupmod/29_groupmod_-g_same_gid_new_name/groupmod.test create mode 100644 tests/grouptools/groupmod/30_groupmod_-g_same_gid_same_name/config.txt create mode 100644 tests/grouptools/groupmod/30_groupmod_-g_same_gid_same_name/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/30_groupmod_-g_same_gid_same_name/config/etc/group create mode 100644 tests/grouptools/groupmod/30_groupmod_-g_same_gid_same_name/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/30_groupmod_-g_same_gid_same_name/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/30_groupmod_-g_same_gid_same_name/config/etc/passwd create mode 100644 tests/grouptools/groupmod/30_groupmod_-g_same_gid_same_name/config/etc/shadow create mode 100755 tests/grouptools/groupmod/30_groupmod_-g_same_gid_same_name/groupmod.test create mode 100644 tests/grouptools/groupmod/31_groupmod_-g_same_gid/config.txt create mode 100644 tests/grouptools/groupmod/31_groupmod_-g_same_gid/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/31_groupmod_-g_same_gid/config/etc/group create mode 100644 tests/grouptools/groupmod/31_groupmod_-g_same_gid/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/31_groupmod_-g_same_gid/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/31_groupmod_-g_same_gid/config/etc/passwd create mode 100644 tests/grouptools/groupmod/31_groupmod_-g_same_gid/config/etc/shadow create mode 100755 tests/grouptools/groupmod/31_groupmod_-g_same_gid/groupmod.test create mode 100644 tests/grouptools/groupmod/32_groupmod_-o_without_-g/config.txt create mode 100644 tests/grouptools/groupmod/32_groupmod_-o_without_-g/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/32_groupmod_-o_without_-g/config/etc/group create mode 100644 tests/grouptools/groupmod/32_groupmod_-o_without_-g/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/32_groupmod_-o_without_-g/config/etc/passwd create mode 100644 tests/grouptools/groupmod/32_groupmod_-o_without_-g/config/etc/shadow create mode 100644 tests/grouptools/groupmod/32_groupmod_-o_without_-g/data/groupmod.err create mode 100755 tests/grouptools/groupmod/32_groupmod_-o_without_-g/groupmod.test create mode 100644 tests/grouptools/groupmod/33_groupmod_set_password_no_gshadow_file_with_group_pwd_x/config.txt create mode 100644 tests/grouptools/groupmod/33_groupmod_set_password_no_gshadow_file_with_group_pwd_x/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/33_groupmod_set_password_no_gshadow_file_with_group_pwd_x/config/etc/group create mode 100644 tests/grouptools/groupmod/33_groupmod_set_password_no_gshadow_file_with_group_pwd_x/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/33_groupmod_set_password_no_gshadow_file_with_group_pwd_x/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/33_groupmod_set_password_no_gshadow_file_with_group_pwd_x/config/etc/passwd create mode 100644 tests/grouptools/groupmod/33_groupmod_set_password_no_gshadow_file_with_group_pwd_x/config/etc/shadow create mode 100644 tests/grouptools/groupmod/33_groupmod_set_password_no_gshadow_file_with_group_pwd_x/data/group create mode 100755 tests/grouptools/groupmod/33_groupmod_set_password_no_gshadow_file_with_group_pwd_x/groupmod.test create mode 100644 tests/grouptools/groupmod/34_groupmod_set_password_group_without_shadow_pwd/config.txt create mode 100644 tests/grouptools/groupmod/34_groupmod_set_password_group_without_shadow_pwd/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/34_groupmod_set_password_group_without_shadow_pwd/config/etc/group create mode 100644 tests/grouptools/groupmod/34_groupmod_set_password_group_without_shadow_pwd/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/34_groupmod_set_password_group_without_shadow_pwd/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/34_groupmod_set_password_group_without_shadow_pwd/config/etc/passwd create mode 100644 tests/grouptools/groupmod/34_groupmod_set_password_group_without_shadow_pwd/config/etc/shadow create mode 100644 tests/grouptools/groupmod/34_groupmod_set_password_group_without_shadow_pwd/data/group create mode 100644 tests/grouptools/groupmod/34_groupmod_set_password_group_without_shadow_pwd/data/gshadow create mode 100755 tests/grouptools/groupmod/34_groupmod_set_password_group_without_shadow_pwd/groupmod.test create mode 100644 tests/grouptools/groupmod/35_groupmod_set_password_group_without_shadow_pwd_no_gshadow_group/config.txt create mode 100644 tests/grouptools/groupmod/35_groupmod_set_password_group_without_shadow_pwd_no_gshadow_group/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/35_groupmod_set_password_group_without_shadow_pwd_no_gshadow_group/config/etc/group create mode 100644 tests/grouptools/groupmod/35_groupmod_set_password_group_without_shadow_pwd_no_gshadow_group/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/35_groupmod_set_password_group_without_shadow_pwd_no_gshadow_group/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/35_groupmod_set_password_group_without_shadow_pwd_no_gshadow_group/config/etc/passwd create mode 100644 tests/grouptools/groupmod/35_groupmod_set_password_group_without_shadow_pwd_no_gshadow_group/config/etc/shadow create mode 100644 tests/grouptools/groupmod/35_groupmod_set_password_group_without_shadow_pwd_no_gshadow_group/data/group create mode 100755 tests/grouptools/groupmod/35_groupmod_set_password_group_without_shadow_pwd_no_gshadow_group/groupmod.test create mode 100644 tests/grouptools/groupmod/36_groupmod_set_password_group_with_shadow_pwd_no_gshadow_group/config.txt create mode 100644 tests/grouptools/groupmod/36_groupmod_set_password_group_with_shadow_pwd_no_gshadow_group/config/etc/default/useradd create mode 100644 tests/grouptools/groupmod/36_groupmod_set_password_group_with_shadow_pwd_no_gshadow_group/config/etc/group create mode 100644 tests/grouptools/groupmod/36_groupmod_set_password_group_with_shadow_pwd_no_gshadow_group/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/36_groupmod_set_password_group_with_shadow_pwd_no_gshadow_group/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/36_groupmod_set_password_group_with_shadow_pwd_no_gshadow_group/config/etc/passwd create mode 100644 tests/grouptools/groupmod/36_groupmod_set_password_group_with_shadow_pwd_no_gshadow_group/config/etc/shadow create mode 100644 tests/grouptools/groupmod/36_groupmod_set_password_group_with_shadow_pwd_no_gshadow_group/data/gshadow create mode 100755 tests/grouptools/groupmod/36_groupmod_set_password_group_with_shadow_pwd_no_gshadow_group/groupmod.test create mode 100644 tests/grouptools/groupmod/37_groupmod_invalid_option/config.txt create mode 100644 tests/grouptools/groupmod/37_groupmod_invalid_option/config/etc/group create mode 100644 tests/grouptools/groupmod/37_groupmod_invalid_option/config/etc/gshadow create mode 100644 tests/grouptools/groupmod/37_groupmod_invalid_option/config/etc/login.defs create mode 100644 tests/grouptools/groupmod/37_groupmod_invalid_option/config/etc/passwd create mode 100644 tests/grouptools/groupmod/37_groupmod_invalid_option/config/etc/shadow create mode 100644 tests/grouptools/groupmod/37_groupmod_invalid_option/data/groupmod.err create mode 100755 tests/grouptools/groupmod/37_groupmod_invalid_option/groupmod.test create mode 100644 tests/log/faillog/01_faillog_no_faillog/config.txt create mode 100644 tests/log/faillog/01_faillog_no_faillog/config/etc/group create mode 100644 tests/log/faillog/01_faillog_no_faillog/config/etc/gshadow create mode 100644 tests/log/faillog/01_faillog_no_faillog/config/etc/passwd create mode 100644 tests/log/faillog/01_faillog_no_faillog/config/etc/shadow create mode 100644 tests/log/faillog/01_faillog_no_faillog/data/faillog.err create mode 100755 tests/log/faillog/01_faillog_no_faillog/faillog.test create mode 100644 tests/log/faillog/02_faillog_usage/config.txt create mode 100644 tests/log/faillog/02_faillog_usage/config/etc/group create mode 100644 tests/log/faillog/02_faillog_usage/config/etc/gshadow create mode 100644 tests/log/faillog/02_faillog_usage/config/etc/passwd create mode 100644 tests/log/faillog/02_faillog_usage/config/etc/shadow create mode 100644 tests/log/faillog/02_faillog_usage/data/usage.out create mode 100755 tests/log/faillog/02_faillog_usage/faillog.test create mode 100644 tests/log/faillog/03_faillog_format/config.txt create mode 100644 tests/log/faillog/03_faillog_format/config/etc/group create mode 100644 tests/log/faillog/03_faillog_format/config/etc/gshadow create mode 100644 tests/log/faillog/03_faillog_format/config/etc/pam.d/login create mode 100644 tests/log/faillog/03_faillog_format/config/etc/passwd create mode 100644 tests/log/faillog/03_faillog_format/config/etc/shadow create mode 100644 tests/log/faillog/03_faillog_format/data/faillog.out create mode 100644 tests/log/faillog/03_faillog_format/data/lastlog.out create mode 100755 tests/log/faillog/03_faillog_format/faillog.test create mode 100755 tests/log/faillog/03_faillog_format/login.exp create mode 100644 tests/log/faillog/04_faillog_mulitple/config.txt create mode 100644 tests/log/faillog/04_faillog_mulitple/config/etc/group create mode 100644 tests/log/faillog/04_faillog_mulitple/config/etc/gshadow create mode 100644 tests/log/faillog/04_faillog_mulitple/config/etc/pam.d/login create mode 100644 tests/log/faillog/04_faillog_mulitple/config/etc/passwd create mode 100644 tests/log/faillog/04_faillog_mulitple/config/etc/shadow create mode 100644 tests/log/faillog/04_faillog_mulitple/data/faillog.list create mode 100755 tests/log/faillog/04_faillog_mulitple/faillog.test create mode 100755 tests/log/faillog/04_faillog_mulitple/login.exp create mode 100644 tests/log/faillog/05_faillog-u_ID/config.txt create mode 100644 tests/log/faillog/05_faillog-u_ID/config/etc/group create mode 100644 tests/log/faillog/05_faillog-u_ID/config/etc/gshadow create mode 100644 tests/log/faillog/05_faillog-u_ID/config/etc/passwd create mode 100644 tests/log/faillog/05_faillog-u_ID/config/etc/shadow create mode 100644 tests/log/faillog/05_faillog-u_ID/data/faillog.list create mode 100755 tests/log/faillog/05_faillog-u_ID/faillog.test create mode 100644 tests/log/faillog/06_faillog-u_name/config.txt create mode 100644 tests/log/faillog/06_faillog-u_name/config/etc/group create mode 100644 tests/log/faillog/06_faillog-u_name/config/etc/gshadow create mode 100644 tests/log/faillog/06_faillog-u_name/config/etc/passwd create mode 100644 tests/log/faillog/06_faillog-u_name/config/etc/shadow create mode 100644 tests/log/faillog/06_faillog-u_name/data/faillog.list create mode 100755 tests/log/faillog/06_faillog-u_name/faillog.test create mode 100644 tests/log/faillog/07_faillog-u_ID_invalid/config.txt create mode 100644 tests/log/faillog/07_faillog-u_ID_invalid/config/etc/group create mode 100644 tests/log/faillog/07_faillog-u_ID_invalid/config/etc/gshadow create mode 100644 tests/log/faillog/07_faillog-u_ID_invalid/config/etc/passwd create mode 100644 tests/log/faillog/07_faillog-u_ID_invalid/config/etc/shadow create mode 100644 tests/log/faillog/07_faillog-u_ID_invalid/data/faillog.list create mode 100755 tests/log/faillog/07_faillog-u_ID_invalid/faillog.test create mode 100644 tests/log/faillog/08_faillog-u_name_invalid/config.txt create mode 100644 tests/log/faillog/08_faillog-u_name_invalid/config/etc/group create mode 100644 tests/log/faillog/08_faillog-u_name_invalid/config/etc/gshadow create mode 100644 tests/log/faillog/08_faillog-u_name_invalid/config/etc/passwd create mode 100644 tests/log/faillog/08_faillog-u_name_invalid/config/etc/shadow create mode 100644 tests/log/faillog/08_faillog-u_name_invalid/data/faillog.err create mode 100755 tests/log/faillog/08_faillog-u_name_invalid/faillog.test create mode 100644 tests/log/faillog/09_faillog-u_range/config.txt create mode 100644 tests/log/faillog/09_faillog-u_range/config/etc/group create mode 100644 tests/log/faillog/09_faillog-u_range/config/etc/gshadow create mode 100644 tests/log/faillog/09_faillog-u_range/config/etc/pam.d/login create mode 100644 tests/log/faillog/09_faillog-u_range/config/etc/passwd create mode 100644 tests/log/faillog/09_faillog-u_range/config/etc/shadow create mode 100644 tests/log/faillog/09_faillog-u_range/data/faillog.list create mode 100755 tests/log/faillog/09_faillog-u_range/faillog.test create mode 100755 tests/log/faillog/09_faillog-u_range/login.exp create mode 100644 tests/log/faillog/10_faillog-u_open_range/config.txt create mode 100644 tests/log/faillog/10_faillog-u_open_range/config/etc/group create mode 100644 tests/log/faillog/10_faillog-u_open_range/config/etc/gshadow create mode 100644 tests/log/faillog/10_faillog-u_open_range/config/etc/passwd create mode 100644 tests/log/faillog/10_faillog-u_open_range/config/etc/shadow create mode 100644 tests/log/faillog/10_faillog-u_open_range/data/faillog.list create mode 100755 tests/log/faillog/10_faillog-u_open_range/faillog.test create mode 100644 tests/log/faillog/11_faillog-u_range_open/config.txt create mode 100644 tests/log/faillog/11_faillog-u_range_open/config/etc/group create mode 100644 tests/log/faillog/11_faillog-u_range_open/config/etc/gshadow create mode 100644 tests/log/faillog/11_faillog-u_range_open/config/etc/passwd create mode 100644 tests/log/faillog/11_faillog-u_range_open/config/etc/shadow create mode 100644 tests/log/faillog/11_faillog-u_range_open/data/faillog.list create mode 100755 tests/log/faillog/11_faillog-u_range_open/faillog.test create mode 100644 tests/log/faillog/12_faillog-u_range_invalid1/config.txt create mode 100644 tests/log/faillog/12_faillog-u_range_invalid1/config/etc/group create mode 100644 tests/log/faillog/12_faillog-u_range_invalid1/config/etc/gshadow create mode 100644 tests/log/faillog/12_faillog-u_range_invalid1/config/etc/passwd create mode 100644 tests/log/faillog/12_faillog-u_range_invalid1/config/etc/shadow create mode 100644 tests/log/faillog/12_faillog-u_range_invalid1/data/faillog.err create mode 100755 tests/log/faillog/12_faillog-u_range_invalid1/faillog.test create mode 100644 tests/log/faillog/13_faillog-u_range_invalid2/config.txt create mode 100644 tests/log/faillog/13_faillog-u_range_invalid2/config/etc/group create mode 100644 tests/log/faillog/13_faillog-u_range_invalid2/config/etc/gshadow create mode 100644 tests/log/faillog/13_faillog-u_range_invalid2/config/etc/passwd create mode 100644 tests/log/faillog/13_faillog-u_range_invalid2/config/etc/shadow create mode 100644 tests/log/faillog/13_faillog-u_range_invalid2/data/faillog.err create mode 100755 tests/log/faillog/13_faillog-u_range_invalid2/faillog.test create mode 100644 tests/log/faillog/14_faillog-u_range_invalid3/config.txt create mode 100644 tests/log/faillog/14_faillog-u_range_invalid3/config/etc/group create mode 100644 tests/log/faillog/14_faillog-u_range_invalid3/config/etc/gshadow create mode 100644 tests/log/faillog/14_faillog-u_range_invalid3/config/etc/passwd create mode 100644 tests/log/faillog/14_faillog-u_range_invalid3/config/etc/shadow create mode 100644 tests/log/faillog/14_faillog-u_range_invalid3/data/faillog.err create mode 100755 tests/log/faillog/14_faillog-u_range_invalid3/faillog.test create mode 100644 tests/log/faillog/15_faillog_bad_option/config.txt create mode 100644 tests/log/faillog/15_faillog_bad_option/config/etc/group create mode 100644 tests/log/faillog/15_faillog_bad_option/config/etc/gshadow create mode 100644 tests/log/faillog/15_faillog_bad_option/config/etc/passwd create mode 100644 tests/log/faillog/15_faillog_bad_option/config/etc/shadow create mode 100644 tests/log/faillog/15_faillog_bad_option/data/usage.out create mode 100755 tests/log/faillog/15_faillog_bad_option/faillog.test create mode 100644 tests/log/faillog/16_faillog_extra_arg/config.txt create mode 100644 tests/log/faillog/16_faillog_extra_arg/config/etc/group create mode 100644 tests/log/faillog/16_faillog_extra_arg/config/etc/gshadow create mode 100644 tests/log/faillog/16_faillog_extra_arg/config/etc/passwd create mode 100644 tests/log/faillog/16_faillog_extra_arg/config/etc/shadow create mode 100644 tests/log/faillog/16_faillog_extra_arg/data/usage.out create mode 100755 tests/log/faillog/16_faillog_extra_arg/faillog.test create mode 100644 tests/log/faillog/17_faillog-t/config.txt create mode 100644 tests/log/faillog/17_faillog-t/config/etc/group create mode 100644 tests/log/faillog/17_faillog-t/config/etc/gshadow create mode 100644 tests/log/faillog/17_faillog-t/config/etc/pam.d/login create mode 100644 tests/log/faillog/17_faillog-t/config/etc/passwd create mode 100644 tests/log/faillog/17_faillog-t/config/etc/shadow create mode 100644 tests/log/faillog/17_faillog-t/data/faillog.list create mode 100755 tests/log/faillog/17_faillog-t/faillog.test create mode 100755 tests/log/faillog/17_faillog-t/login.exp create mode 100644 tests/log/faillog/18_faillog-t_invalid/config.txt create mode 100644 tests/log/faillog/18_faillog-t_invalid/config/etc/group create mode 100644 tests/log/faillog/18_faillog-t_invalid/config/etc/gshadow create mode 100644 tests/log/faillog/18_faillog-t_invalid/config/etc/passwd create mode 100644 tests/log/faillog/18_faillog-t_invalid/config/etc/shadow create mode 100644 tests/log/faillog/18_faillog-t_invalid/data/faillog.err create mode 100755 tests/log/faillog/18_faillog-t_invalid/faillog.test create mode 100644 tests/log/faillog/19_faillog_multiple_same_user/config.txt create mode 100644 tests/log/faillog/19_faillog_multiple_same_user/config/etc/group create mode 100644 tests/log/faillog/19_faillog_multiple_same_user/config/etc/gshadow create mode 100644 tests/log/faillog/19_faillog_multiple_same_user/config/etc/pam.d/login create mode 100644 tests/log/faillog/19_faillog_multiple_same_user/config/etc/passwd create mode 100644 tests/log/faillog/19_faillog_multiple_same_user/config/etc/shadow create mode 100644 tests/log/faillog/19_faillog_multiple_same_user/data/faillog.list create mode 100755 tests/log/faillog/19_faillog_multiple_same_user/faillog.test create mode 100755 tests/log/faillog/19_faillog_multiple_same_user/login.exp create mode 100644 tests/log/faillog/20_faillog-r-u/config.txt create mode 100644 tests/log/faillog/20_faillog-r-u/config/etc/group create mode 100644 tests/log/faillog/20_faillog-r-u/config/etc/gshadow create mode 100644 tests/log/faillog/20_faillog-r-u/config/etc/pam.d/login create mode 100644 tests/log/faillog/20_faillog-r-u/config/etc/passwd create mode 100644 tests/log/faillog/20_faillog-r-u/config/etc/shadow create mode 100644 tests/log/faillog/20_faillog-r-u/data/faillog.list create mode 100755 tests/log/faillog/20_faillog-r-u/faillog.test create mode 100755 tests/log/faillog/20_faillog-r-u/login.exp create mode 100644 tests/log/faillog/21_faillog-r-u_range/config.txt create mode 100644 tests/log/faillog/21_faillog-r-u_range/config/etc/group create mode 100644 tests/log/faillog/21_faillog-r-u_range/config/etc/gshadow create mode 100644 tests/log/faillog/21_faillog-r-u_range/config/etc/pam.d/login create mode 100644 tests/log/faillog/21_faillog-r-u_range/config/etc/passwd create mode 100644 tests/log/faillog/21_faillog-r-u_range/config/etc/shadow create mode 100644 tests/log/faillog/21_faillog-r-u_range/data/faillog.list create mode 100755 tests/log/faillog/21_faillog-r-u_range/faillog.test create mode 100755 tests/log/faillog/21_faillog-r-u_range/login.exp create mode 100644 tests/log/faillog/22_faillog_removed_user/config.txt create mode 100644 tests/log/faillog/22_faillog_removed_user/config/etc/group create mode 100644 tests/log/faillog/22_faillog_removed_user/config/etc/gshadow create mode 100644 tests/log/faillog/22_faillog_removed_user/config/etc/pam.d/login create mode 100644 tests/log/faillog/22_faillog_removed_user/config/etc/passwd create mode 100644 tests/log/faillog/22_faillog_removed_user/config/etc/shadow create mode 100644 tests/log/faillog/22_faillog_removed_user/data/faillog.list create mode 100755 tests/log/faillog/22_faillog_removed_user/faillog.test create mode 100755 tests/log/faillog/22_faillog_removed_user/login.exp create mode 100644 tests/log/faillog/23_faillog-a_removed_user/config.txt create mode 100644 tests/log/faillog/23_faillog-a_removed_user/config/etc/group create mode 100644 tests/log/faillog/23_faillog-a_removed_user/config/etc/gshadow create mode 100644 tests/log/faillog/23_faillog-a_removed_user/config/etc/pam.d/login create mode 100644 tests/log/faillog/23_faillog-a_removed_user/config/etc/passwd create mode 100644 tests/log/faillog/23_faillog-a_removed_user/config/etc/shadow create mode 100644 tests/log/faillog/23_faillog-a_removed_user/data/faillog.list create mode 100755 tests/log/faillog/23_faillog-a_removed_user/faillog.test create mode 100755 tests/log/faillog/23_faillog-a_removed_user/login.exp create mode 100644 tests/log/faillog/24_faillog-u_removed_user/config.txt create mode 100644 tests/log/faillog/24_faillog-u_removed_user/config/etc/group create mode 100644 tests/log/faillog/24_faillog-u_removed_user/config/etc/gshadow create mode 100644 tests/log/faillog/24_faillog-u_removed_user/config/etc/pam.d/login create mode 100644 tests/log/faillog/24_faillog-u_removed_user/config/etc/passwd create mode 100644 tests/log/faillog/24_faillog-u_removed_user/config/etc/shadow create mode 100644 tests/log/faillog/24_faillog-u_removed_user/data/faillog.list create mode 100755 tests/log/faillog/24_faillog-u_removed_user/faillog.test create mode 100755 tests/log/faillog/24_faillog-u_removed_user/login.exp create mode 100644 tests/log/faillog/25_faillog-r-u_removed_user/config.txt create mode 100644 tests/log/faillog/25_faillog-r-u_removed_user/config/etc/group create mode 100644 tests/log/faillog/25_faillog-r-u_removed_user/config/etc/gshadow create mode 100644 tests/log/faillog/25_faillog-r-u_removed_user/config/etc/pam.d/login create mode 100644 tests/log/faillog/25_faillog-r-u_removed_user/config/etc/passwd create mode 100644 tests/log/faillog/25_faillog-r-u_removed_user/config/etc/shadow create mode 100644 tests/log/faillog/25_faillog-r-u_removed_user/data/faillog.list create mode 100755 tests/log/faillog/25_faillog-r-u_removed_user/faillog.test create mode 100755 tests/log/faillog/25_faillog-r-u_removed_user/login.exp create mode 100644 tests/log/faillog/26_faillog-r-u_range_removed_user/config.txt create mode 100644 tests/log/faillog/26_faillog-r-u_range_removed_user/config/etc/group create mode 100644 tests/log/faillog/26_faillog-r-u_range_removed_user/config/etc/gshadow create mode 100644 tests/log/faillog/26_faillog-r-u_range_removed_user/config/etc/pam.d/login create mode 100644 tests/log/faillog/26_faillog-r-u_range_removed_user/config/etc/passwd create mode 100644 tests/log/faillog/26_faillog-r-u_range_removed_user/config/etc/shadow create mode 100644 tests/log/faillog/26_faillog-r-u_range_removed_user/data/faillog.list create mode 100755 tests/log/faillog/26_faillog-r-u_range_removed_user/faillog.test create mode 100755 tests/log/faillog/26_faillog-r-u_range_removed_user/login.exp create mode 100644 tests/log/faillog/27_faillog-r-a-u_range_removed_user/config.txt create mode 100644 tests/log/faillog/27_faillog-r-a-u_range_removed_user/config/etc/group create mode 100644 tests/log/faillog/27_faillog-r-a-u_range_removed_user/config/etc/gshadow create mode 100644 tests/log/faillog/27_faillog-r-a-u_range_removed_user/config/etc/pam.d/login create mode 100644 tests/log/faillog/27_faillog-r-a-u_range_removed_user/config/etc/passwd create mode 100644 tests/log/faillog/27_faillog-r-a-u_range_removed_user/config/etc/shadow create mode 100644 tests/log/faillog/27_faillog-r-a-u_range_removed_user/data/faillog.list create mode 100755 tests/log/faillog/27_faillog-r-a-u_range_removed_user/faillog.test create mode 100755 tests/log/faillog/27_faillog-r-a-u_range_removed_user/login.exp create mode 100644 tests/log/faillog/28_faillog-r-a-u_open_range_removed_user/config.txt create mode 100644 tests/log/faillog/28_faillog-r-a-u_open_range_removed_user/config/etc/group create mode 100644 tests/log/faillog/28_faillog-r-a-u_open_range_removed_user/config/etc/gshadow create mode 100644 tests/log/faillog/28_faillog-r-a-u_open_range_removed_user/config/etc/pam.d/login create mode 100644 tests/log/faillog/28_faillog-r-a-u_open_range_removed_user/config/etc/passwd create mode 100644 tests/log/faillog/28_faillog-r-a-u_open_range_removed_user/config/etc/shadow create mode 100644 tests/log/faillog/28_faillog-r-a-u_open_range_removed_user/data/faillog.list create mode 100755 tests/log/faillog/28_faillog-r-a-u_open_range_removed_user/faillog.test create mode 100755 tests/log/faillog/28_faillog-r-a-u_open_range_removed_user/login.exp create mode 100644 tests/log/faillog/29_faillog-r-a-u_range_open_removed_user/config.txt create mode 100644 tests/log/faillog/29_faillog-r-a-u_range_open_removed_user/config/etc/group create mode 100644 tests/log/faillog/29_faillog-r-a-u_range_open_removed_user/config/etc/gshadow create mode 100644 tests/log/faillog/29_faillog-r-a-u_range_open_removed_user/config/etc/pam.d/login create mode 100644 tests/log/faillog/29_faillog-r-a-u_range_open_removed_user/config/etc/passwd create mode 100644 tests/log/faillog/29_faillog-r-a-u_range_open_removed_user/config/etc/shadow create mode 100644 tests/log/faillog/29_faillog-r-a-u_range_open_removed_user/data/faillog.list create mode 100755 tests/log/faillog/29_faillog-r-a-u_range_open_removed_user/faillog.test create mode 100755 tests/log/faillog/29_faillog-r-a-u_range_open_removed_user/login.exp create mode 100644 tests/log/faillog/30_faillog-r/config.txt create mode 100644 tests/log/faillog/30_faillog-r/config/etc/group create mode 100644 tests/log/faillog/30_faillog-r/config/etc/gshadow create mode 100644 tests/log/faillog/30_faillog-r/config/etc/pam.d/login create mode 100644 tests/log/faillog/30_faillog-r/config/etc/passwd create mode 100644 tests/log/faillog/30_faillog-r/config/etc/shadow create mode 100644 tests/log/faillog/30_faillog-r/data/faillog.list create mode 100755 tests/log/faillog/30_faillog-r/faillog.test create mode 100755 tests/log/faillog/30_faillog-r/login.exp create mode 100644 tests/log/faillog/31_faillog-r-u_open_range/config.txt create mode 100644 tests/log/faillog/31_faillog-r-u_open_range/config/etc/group create mode 100644 tests/log/faillog/31_faillog-r-u_open_range/config/etc/gshadow create mode 100644 tests/log/faillog/31_faillog-r-u_open_range/config/etc/pam.d/login create mode 100644 tests/log/faillog/31_faillog-r-u_open_range/config/etc/passwd create mode 100644 tests/log/faillog/31_faillog-r-u_open_range/config/etc/shadow create mode 100644 tests/log/faillog/31_faillog-r-u_open_range/data/faillog.list create mode 100755 tests/log/faillog/31_faillog-r-u_open_range/faillog.test create mode 100755 tests/log/faillog/31_faillog-r-u_open_range/login.exp create mode 100644 tests/log/faillog/32_faillog-l/config.txt create mode 100644 tests/log/faillog/32_faillog-l/config/etc/group create mode 100644 tests/log/faillog/32_faillog-l/config/etc/gshadow create mode 100644 tests/log/faillog/32_faillog-l/config/etc/pam.d/login create mode 100644 tests/log/faillog/32_faillog-l/config/etc/passwd create mode 100644 tests/log/faillog/32_faillog-l/config/etc/shadow create mode 100644 tests/log/faillog/32_faillog-l/data/faillog.list create mode 100755 tests/log/faillog/32_faillog-l/faillog.test create mode 100755 tests/log/faillog/32_faillog-l/login.exp create mode 100644 tests/log/faillog/33_faillog-l-u_user/config.txt create mode 100644 tests/log/faillog/33_faillog-l-u_user/config/etc/group create mode 100644 tests/log/faillog/33_faillog-l-u_user/config/etc/gshadow create mode 100644 tests/log/faillog/33_faillog-l-u_user/config/etc/pam.d/login create mode 100644 tests/log/faillog/33_faillog-l-u_user/config/etc/passwd create mode 100644 tests/log/faillog/33_faillog-l-u_user/config/etc/shadow create mode 100644 tests/log/faillog/33_faillog-l-u_user/data/faillog.list create mode 100755 tests/log/faillog/33_faillog-l-u_user/faillog.test create mode 100755 tests/log/faillog/33_faillog-l-u_user/login.exp create mode 100644 tests/log/faillog/34_faillog-l-u_range/config.txt create mode 100644 tests/log/faillog/34_faillog-l-u_range/config/etc/group create mode 100644 tests/log/faillog/34_faillog-l-u_range/config/etc/gshadow create mode 100644 tests/log/faillog/34_faillog-l-u_range/config/etc/pam.d/login create mode 100644 tests/log/faillog/34_faillog-l-u_range/config/etc/passwd create mode 100644 tests/log/faillog/34_faillog-l-u_range/config/etc/shadow create mode 100644 tests/log/faillog/34_faillog-l-u_range/data/faillog.list create mode 100755 tests/log/faillog/34_faillog-l-u_range/faillog.test create mode 100755 tests/log/faillog/34_faillog-l-u_range/login.exp create mode 100644 tests/log/faillog/35_faillog-l-u_open_range/config.txt create mode 100644 tests/log/faillog/35_faillog-l-u_open_range/config/etc/group create mode 100644 tests/log/faillog/35_faillog-l-u_open_range/config/etc/gshadow create mode 100644 tests/log/faillog/35_faillog-l-u_open_range/config/etc/pam.d/login create mode 100644 tests/log/faillog/35_faillog-l-u_open_range/config/etc/passwd create mode 100644 tests/log/faillog/35_faillog-l-u_open_range/config/etc/shadow create mode 100644 tests/log/faillog/35_faillog-l-u_open_range/data/faillog.list create mode 100755 tests/log/faillog/35_faillog-l-u_open_range/faillog.test create mode 100755 tests/log/faillog/35_faillog-l-u_open_range/login.exp create mode 100644 tests/log/faillog/36_faillog-l-u_range_open/config.txt create mode 100644 tests/log/faillog/36_faillog-l-u_range_open/config/etc/group create mode 100644 tests/log/faillog/36_faillog-l-u_range_open/config/etc/gshadow create mode 100644 tests/log/faillog/36_faillog-l-u_range_open/config/etc/pam.d/login create mode 100644 tests/log/faillog/36_faillog-l-u_range_open/config/etc/passwd create mode 100644 tests/log/faillog/36_faillog-l-u_range_open/config/etc/shadow create mode 100644 tests/log/faillog/36_faillog-l-u_range_open/data/faillog.list create mode 100755 tests/log/faillog/36_faillog-l-u_range_open/faillog.test create mode 100755 tests/log/faillog/36_faillog-l-u_range_open/login.exp create mode 100644 tests/log/faillog/37_faillog-l-a-u_user/config.txt create mode 100644 tests/log/faillog/37_faillog-l-a-u_user/config/etc/group create mode 100644 tests/log/faillog/37_faillog-l-a-u_user/config/etc/gshadow create mode 100644 tests/log/faillog/37_faillog-l-a-u_user/config/etc/pam.d/login create mode 100644 tests/log/faillog/37_faillog-l-a-u_user/config/etc/passwd create mode 100644 tests/log/faillog/37_faillog-l-a-u_user/config/etc/shadow create mode 100644 tests/log/faillog/37_faillog-l-a-u_user/data/faillog.list create mode 100755 tests/log/faillog/37_faillog-l-a-u_user/faillog.test create mode 100755 tests/log/faillog/37_faillog-l-a-u_user/login.exp create mode 100644 tests/log/faillog/38_faillog-l-a-u_range/config.txt create mode 100644 tests/log/faillog/38_faillog-l-a-u_range/config/etc/group create mode 100644 tests/log/faillog/38_faillog-l-a-u_range/config/etc/gshadow create mode 100644 tests/log/faillog/38_faillog-l-a-u_range/config/etc/pam.d/login create mode 100644 tests/log/faillog/38_faillog-l-a-u_range/config/etc/passwd create mode 100644 tests/log/faillog/38_faillog-l-a-u_range/config/etc/shadow create mode 100644 tests/log/faillog/38_faillog-l-a-u_range/data/faillog.list create mode 100755 tests/log/faillog/38_faillog-l-a-u_range/faillog.test create mode 100755 tests/log/faillog/38_faillog-l-a-u_range/login.exp create mode 100644 tests/log/faillog/39_faillog-l-a-u_open_range/config.txt create mode 100644 tests/log/faillog/39_faillog-l-a-u_open_range/config/etc/group create mode 100644 tests/log/faillog/39_faillog-l-a-u_open_range/config/etc/gshadow create mode 100644 tests/log/faillog/39_faillog-l-a-u_open_range/config/etc/pam.d/login create mode 100644 tests/log/faillog/39_faillog-l-a-u_open_range/config/etc/passwd create mode 100644 tests/log/faillog/39_faillog-l-a-u_open_range/config/etc/shadow create mode 100644 tests/log/faillog/39_faillog-l-a-u_open_range/data/faillog.list create mode 100755 tests/log/faillog/39_faillog-l-a-u_open_range/faillog.test create mode 100755 tests/log/faillog/39_faillog-l-a-u_open_range/login.exp create mode 100644 tests/log/faillog/40_faillog-l-a-u_range_open/config.txt create mode 100644 tests/log/faillog/40_faillog-l-a-u_range_open/config/etc/group create mode 100644 tests/log/faillog/40_faillog-l-a-u_range_open/config/etc/gshadow create mode 100644 tests/log/faillog/40_faillog-l-a-u_range_open/config/etc/pam.d/login create mode 100644 tests/log/faillog/40_faillog-l-a-u_range_open/config/etc/passwd create mode 100644 tests/log/faillog/40_faillog-l-a-u_range_open/config/etc/shadow create mode 100644 tests/log/faillog/40_faillog-l-a-u_range_open/data/faillog.list create mode 100755 tests/log/faillog/40_faillog-l-a-u_range_open/faillog.test create mode 100755 tests/log/faillog/40_faillog-l-a-u_range_open/login.exp create mode 100644 tests/log/faillog/41_faillog-l_invalid/config.txt create mode 100644 tests/log/faillog/41_faillog-l_invalid/config/etc/group create mode 100644 tests/log/faillog/41_faillog-l_invalid/config/etc/gshadow create mode 100644 tests/log/faillog/41_faillog-l_invalid/config/etc/passwd create mode 100644 tests/log/faillog/41_faillog-l_invalid/config/etc/shadow create mode 100644 tests/log/faillog/41_faillog-l_invalid/data/faillog.err create mode 100755 tests/log/faillog/41_faillog-l_invalid/faillog.test create mode 100644 tests/log/faillog/42_faillog-m/config.txt create mode 100644 tests/log/faillog/42_faillog-m/config/etc/group create mode 100644 tests/log/faillog/42_faillog-m/config/etc/gshadow create mode 100644 tests/log/faillog/42_faillog-m/config/etc/pam.d/login create mode 100644 tests/log/faillog/42_faillog-m/config/etc/passwd create mode 100644 tests/log/faillog/42_faillog-m/config/etc/shadow create mode 100644 tests/log/faillog/42_faillog-m/data/faillog.list create mode 100755 tests/log/faillog/42_faillog-m/faillog.test create mode 100755 tests/log/faillog/42_faillog-m/login.exp create mode 100644 tests/log/faillog/43_faillog-m-u_user/config.txt create mode 100644 tests/log/faillog/43_faillog-m-u_user/config/etc/group create mode 100644 tests/log/faillog/43_faillog-m-u_user/config/etc/gshadow create mode 100644 tests/log/faillog/43_faillog-m-u_user/config/etc/pam.d/login create mode 100644 tests/log/faillog/43_faillog-m-u_user/config/etc/passwd create mode 100644 tests/log/faillog/43_faillog-m-u_user/config/etc/shadow create mode 100644 tests/log/faillog/43_faillog-m-u_user/data/faillog.list create mode 100755 tests/log/faillog/43_faillog-m-u_user/faillog.test create mode 100755 tests/log/faillog/43_faillog-m-u_user/login.exp create mode 100644 tests/log/faillog/44_faillog-m-u_range/config.txt create mode 100644 tests/log/faillog/44_faillog-m-u_range/config/etc/group create mode 100644 tests/log/faillog/44_faillog-m-u_range/config/etc/gshadow create mode 100644 tests/log/faillog/44_faillog-m-u_range/config/etc/pam.d/login create mode 100644 tests/log/faillog/44_faillog-m-u_range/config/etc/passwd create mode 100644 tests/log/faillog/44_faillog-m-u_range/config/etc/shadow create mode 100644 tests/log/faillog/44_faillog-m-u_range/data/faillog.list create mode 100755 tests/log/faillog/44_faillog-m-u_range/faillog.test create mode 100755 tests/log/faillog/44_faillog-m-u_range/login.exp create mode 100644 tests/log/faillog/45_faillog-m-u_open_range/config.txt create mode 100644 tests/log/faillog/45_faillog-m-u_open_range/config/etc/group create mode 100644 tests/log/faillog/45_faillog-m-u_open_range/config/etc/gshadow create mode 100644 tests/log/faillog/45_faillog-m-u_open_range/config/etc/pam.d/login create mode 100644 tests/log/faillog/45_faillog-m-u_open_range/config/etc/passwd create mode 100644 tests/log/faillog/45_faillog-m-u_open_range/config/etc/shadow create mode 100644 tests/log/faillog/45_faillog-m-u_open_range/data/faillog.list create mode 100755 tests/log/faillog/45_faillog-m-u_open_range/faillog.test create mode 100755 tests/log/faillog/45_faillog-m-u_open_range/login.exp create mode 100644 tests/log/faillog/46_faillog-m-u_range_open/config.txt create mode 100644 tests/log/faillog/46_faillog-m-u_range_open/config/etc/group create mode 100644 tests/log/faillog/46_faillog-m-u_range_open/config/etc/gshadow create mode 100644 tests/log/faillog/46_faillog-m-u_range_open/config/etc/pam.d/login create mode 100644 tests/log/faillog/46_faillog-m-u_range_open/config/etc/passwd create mode 100644 tests/log/faillog/46_faillog-m-u_range_open/config/etc/shadow create mode 100644 tests/log/faillog/46_faillog-m-u_range_open/data/faillog.list create mode 100755 tests/log/faillog/46_faillog-m-u_range_open/faillog.test create mode 100755 tests/log/faillog/46_faillog-m-u_range_open/login.exp create mode 100644 tests/log/faillog/47_faillog-m-a-u_user/config.txt create mode 100644 tests/log/faillog/47_faillog-m-a-u_user/config/etc/group create mode 100644 tests/log/faillog/47_faillog-m-a-u_user/config/etc/gshadow create mode 100644 tests/log/faillog/47_faillog-m-a-u_user/config/etc/pam.d/login create mode 100644 tests/log/faillog/47_faillog-m-a-u_user/config/etc/passwd create mode 100644 tests/log/faillog/47_faillog-m-a-u_user/config/etc/shadow create mode 100644 tests/log/faillog/47_faillog-m-a-u_user/data/faillog.list create mode 100755 tests/log/faillog/47_faillog-m-a-u_user/faillog.test create mode 100755 tests/log/faillog/47_faillog-m-a-u_user/login.exp create mode 100644 tests/log/faillog/48_faillog-m-a-u_range/config.txt create mode 100644 tests/log/faillog/48_faillog-m-a-u_range/config/etc/group create mode 100644 tests/log/faillog/48_faillog-m-a-u_range/config/etc/gshadow create mode 100644 tests/log/faillog/48_faillog-m-a-u_range/config/etc/pam.d/login create mode 100644 tests/log/faillog/48_faillog-m-a-u_range/config/etc/passwd create mode 100644 tests/log/faillog/48_faillog-m-a-u_range/config/etc/shadow create mode 100644 tests/log/faillog/48_faillog-m-a-u_range/data/faillog.list create mode 100755 tests/log/faillog/48_faillog-m-a-u_range/faillog.test create mode 100755 tests/log/faillog/48_faillog-m-a-u_range/login.exp create mode 100644 tests/log/faillog/49_faillog-m-a-u_open_range/config.txt create mode 100644 tests/log/faillog/49_faillog-m-a-u_open_range/config/etc/group create mode 100644 tests/log/faillog/49_faillog-m-a-u_open_range/config/etc/gshadow create mode 100644 tests/log/faillog/49_faillog-m-a-u_open_range/config/etc/pam.d/login create mode 100644 tests/log/faillog/49_faillog-m-a-u_open_range/config/etc/passwd create mode 100644 tests/log/faillog/49_faillog-m-a-u_open_range/config/etc/shadow create mode 100644 tests/log/faillog/49_faillog-m-a-u_open_range/data/faillog.list create mode 100755 tests/log/faillog/49_faillog-m-a-u_open_range/faillog.test create mode 100755 tests/log/faillog/49_faillog-m-a-u_open_range/login.exp create mode 100644 tests/log/faillog/50_faillog-m-a-u_range_open/config.txt create mode 100644 tests/log/faillog/50_faillog-m-a-u_range_open/config/etc/group create mode 100644 tests/log/faillog/50_faillog-m-a-u_range_open/config/etc/gshadow create mode 100644 tests/log/faillog/50_faillog-m-a-u_range_open/config/etc/pam.d/login create mode 100644 tests/log/faillog/50_faillog-m-a-u_range_open/config/etc/passwd create mode 100644 tests/log/faillog/50_faillog-m-a-u_range_open/config/etc/shadow create mode 100644 tests/log/faillog/50_faillog-m-a-u_range_open/data/faillog.list create mode 100755 tests/log/faillog/50_faillog-m-a-u_range_open/faillog.test create mode 100755 tests/log/faillog/50_faillog-m-a-u_range_open/login.exp create mode 100644 tests/log/faillog/51_faillog-m_invalid/config.txt create mode 100644 tests/log/faillog/51_faillog-m_invalid/config/etc/group create mode 100644 tests/log/faillog/51_faillog-m_invalid/config/etc/gshadow create mode 100644 tests/log/faillog/51_faillog-m_invalid/config/etc/passwd create mode 100644 tests/log/faillog/51_faillog-m_invalid/config/etc/shadow create mode 100644 tests/log/faillog/51_faillog-m_invalid/data/faillog.err create mode 100755 tests/log/faillog/51_faillog-m_invalid/faillog.test create mode 100644 tests/log/faillog/52_faillog-t-l_exclusive/config.txt create mode 100644 tests/log/faillog/52_faillog-t-l_exclusive/config/etc/group create mode 100644 tests/log/faillog/52_faillog-t-l_exclusive/config/etc/gshadow create mode 100644 tests/log/faillog/52_faillog-t-l_exclusive/config/etc/passwd create mode 100644 tests/log/faillog/52_faillog-t-l_exclusive/config/etc/shadow create mode 100644 tests/log/faillog/52_faillog-t-l_exclusive/data/usage.out create mode 100755 tests/log/faillog/52_faillog-t-l_exclusive/faillog.test create mode 100644 tests/log/faillog/53_faillog-t-m_exclusive/config.txt create mode 100644 tests/log/faillog/53_faillog-t-m_exclusive/config/etc/group create mode 100644 tests/log/faillog/53_faillog-t-m_exclusive/config/etc/gshadow create mode 100644 tests/log/faillog/53_faillog-t-m_exclusive/config/etc/passwd create mode 100644 tests/log/faillog/53_faillog-t-m_exclusive/config/etc/shadow create mode 100644 tests/log/faillog/53_faillog-t-m_exclusive/data/usage.out create mode 100755 tests/log/faillog/53_faillog-t-m_exclusive/faillog.test create mode 100644 tests/log/faillog/54_faillog-t-r_exclusive/config.txt create mode 100644 tests/log/faillog/54_faillog-t-r_exclusive/config/etc/group create mode 100644 tests/log/faillog/54_faillog-t-r_exclusive/config/etc/gshadow create mode 100644 tests/log/faillog/54_faillog-t-r_exclusive/config/etc/passwd create mode 100644 tests/log/faillog/54_faillog-t-r_exclusive/config/etc/shadow create mode 100644 tests/log/faillog/54_faillog-t-r_exclusive/data/usage.out create mode 100755 tests/log/faillog/54_faillog-t-r_exclusive/faillog.test create mode 100644 tests/log/faillog/55_faillog_no_changes/config.txt create mode 100644 tests/log/faillog/55_faillog_no_changes/config/etc/group create mode 100644 tests/log/faillog/55_faillog_no_changes/config/etc/gshadow create mode 100644 tests/log/faillog/55_faillog_no_changes/config/etc/pam.d/login create mode 100644 tests/log/faillog/55_faillog_no_changes/config/etc/passwd create mode 100644 tests/log/faillog/55_faillog_no_changes/config/etc/shadow create mode 100644 tests/log/faillog/55_faillog_no_changes/data/faillog.stat create mode 100755 tests/log/faillog/55_faillog_no_changes/faillog.test create mode 100755 tests/log/faillog/55_faillog_no_changes/login.exp create mode 100644 tests/log/faillog/56_faillog-l-m_empty_file/config.txt create mode 100644 tests/log/faillog/56_faillog-l-m_empty_file/config/etc/group create mode 100644 tests/log/faillog/56_faillog-l-m_empty_file/config/etc/gshadow create mode 100644 tests/log/faillog/56_faillog-l-m_empty_file/config/etc/pam.d/login create mode 100644 tests/log/faillog/56_faillog-l-m_empty_file/config/etc/passwd create mode 100644 tests/log/faillog/56_faillog-l-m_empty_file/config/etc/shadow create mode 100644 tests/log/faillog/56_faillog-l-m_empty_file/data/faillog.stat create mode 100755 tests/log/faillog/56_faillog-l-m_empty_file/faillog.test create mode 100644 tests/log/faillog/57_faillog-r_empty_file/config.txt create mode 100644 tests/log/faillog/57_faillog-r_empty_file/config/etc/group create mode 100644 tests/log/faillog/57_faillog-r_empty_file/config/etc/gshadow create mode 100644 tests/log/faillog/57_faillog-r_empty_file/config/etc/pam.d/login create mode 100644 tests/log/faillog/57_faillog-r_empty_file/config/etc/passwd create mode 100644 tests/log/faillog/57_faillog-r_empty_file/config/etc/shadow create mode 100644 tests/log/faillog/57_faillog-r_empty_file/data/faillog.stat create mode 100755 tests/log/faillog/57_faillog-r_empty_file/faillog.test create mode 100644 tests/log/faillog/58_faillog-l_no_failcount/config.txt create mode 100644 tests/log/faillog/58_faillog-l_no_failcount/config/etc/group create mode 100644 tests/log/faillog/58_faillog-l_no_failcount/config/etc/gshadow create mode 100644 tests/log/faillog/58_faillog-l_no_failcount/config/etc/pam.d/login create mode 100644 tests/log/faillog/58_faillog-l_no_failcount/config/etc/passwd create mode 100644 tests/log/faillog/58_faillog-l_no_failcount/config/etc/shadow create mode 100644 tests/log/faillog/58_faillog-l_no_failcount/data/faillog.list create mode 100755 tests/log/faillog/58_faillog-l_no_failcount/faillog.test create mode 100755 tests/log/faillog/58_faillog-l_no_failcount/login.exp create mode 100644 tests/log/lastlog/01_lastlog_no_lastlog/config.txt create mode 100644 tests/log/lastlog/01_lastlog_no_lastlog/config/etc/group create mode 100644 tests/log/lastlog/01_lastlog_no_lastlog/config/etc/gshadow create mode 100644 tests/log/lastlog/01_lastlog_no_lastlog/config/etc/passwd create mode 100644 tests/log/lastlog/01_lastlog_no_lastlog/config/etc/shadow create mode 100644 tests/log/lastlog/01_lastlog_no_lastlog/data/lastlog.err create mode 100755 tests/log/lastlog/01_lastlog_no_lastlog/lastlog.test create mode 100644 tests/log/lastlog/02_lastlog_usage/config.txt create mode 100644 tests/log/lastlog/02_lastlog_usage/config/etc/group create mode 100644 tests/log/lastlog/02_lastlog_usage/config/etc/gshadow create mode 100644 tests/log/lastlog/02_lastlog_usage/config/etc/passwd create mode 100644 tests/log/lastlog/02_lastlog_usage/config/etc/shadow create mode 100644 tests/log/lastlog/02_lastlog_usage/data/usage.out create mode 100755 tests/log/lastlog/02_lastlog_usage/lastlog.test create mode 100644 tests/log/lastlog/03_lastlog_format/config.txt create mode 100644 tests/log/lastlog/03_lastlog_format/config/etc/group create mode 100644 tests/log/lastlog/03_lastlog_format/config/etc/gshadow create mode 100644 tests/log/lastlog/03_lastlog_format/config/etc/passwd create mode 100644 tests/log/lastlog/03_lastlog_format/config/etc/shadow create mode 100644 tests/log/lastlog/03_lastlog_format/data/lastlog.out create mode 100755 tests/log/lastlog/03_lastlog_format/lastlog.test create mode 100755 tests/log/lastlog/03_lastlog_format/login.exp create mode 100644 tests/log/lastlog/04_lastlog_mulitple/config.txt create mode 100644 tests/log/lastlog/04_lastlog_mulitple/config/etc/group create mode 100644 tests/log/lastlog/04_lastlog_mulitple/config/etc/gshadow create mode 100644 tests/log/lastlog/04_lastlog_mulitple/config/etc/passwd create mode 100644 tests/log/lastlog/04_lastlog_mulitple/config/etc/shadow create mode 100644 tests/log/lastlog/04_lastlog_mulitple/data/lastlog.list create mode 100755 tests/log/lastlog/04_lastlog_mulitple/lastlog.test create mode 100755 tests/log/lastlog/04_lastlog_mulitple/login.exp create mode 100644 tests/log/lastlog/05_lastlog-u_ID/config.txt create mode 100644 tests/log/lastlog/05_lastlog-u_ID/config/etc/group create mode 100644 tests/log/lastlog/05_lastlog-u_ID/config/etc/gshadow create mode 100644 tests/log/lastlog/05_lastlog-u_ID/config/etc/passwd create mode 100644 tests/log/lastlog/05_lastlog-u_ID/config/etc/shadow create mode 100644 tests/log/lastlog/05_lastlog-u_ID/data/lastlog.list create mode 100755 tests/log/lastlog/05_lastlog-u_ID/lastlog.test create mode 100644 tests/log/lastlog/06_lastlog-u_name/config.txt create mode 100644 tests/log/lastlog/06_lastlog-u_name/config/etc/group create mode 100644 tests/log/lastlog/06_lastlog-u_name/config/etc/gshadow create mode 100644 tests/log/lastlog/06_lastlog-u_name/config/etc/passwd create mode 100644 tests/log/lastlog/06_lastlog-u_name/config/etc/shadow create mode 100644 tests/log/lastlog/06_lastlog-u_name/data/lastlog.list create mode 100755 tests/log/lastlog/06_lastlog-u_name/lastlog.test create mode 100644 tests/log/lastlog/07_lastlog-u_ID_invalid/config.txt create mode 100644 tests/log/lastlog/07_lastlog-u_ID_invalid/config/etc/group create mode 100644 tests/log/lastlog/07_lastlog-u_ID_invalid/config/etc/gshadow create mode 100644 tests/log/lastlog/07_lastlog-u_ID_invalid/config/etc/passwd create mode 100644 tests/log/lastlog/07_lastlog-u_ID_invalid/config/etc/shadow create mode 100644 tests/log/lastlog/07_lastlog-u_ID_invalid/data/lastlog.list create mode 100755 tests/log/lastlog/07_lastlog-u_ID_invalid/lastlog.test create mode 100644 tests/log/lastlog/08_lastlog-u_name_invalid/config.txt create mode 100644 tests/log/lastlog/08_lastlog-u_name_invalid/config/etc/group create mode 100644 tests/log/lastlog/08_lastlog-u_name_invalid/config/etc/gshadow create mode 100644 tests/log/lastlog/08_lastlog-u_name_invalid/config/etc/passwd create mode 100644 tests/log/lastlog/08_lastlog-u_name_invalid/config/etc/shadow create mode 100644 tests/log/lastlog/08_lastlog-u_name_invalid/data/lastlog.err create mode 100755 tests/log/lastlog/08_lastlog-u_name_invalid/lastlog.test create mode 100644 tests/log/lastlog/09_lastlog-u_range/config.txt create mode 100644 tests/log/lastlog/09_lastlog-u_range/config/etc/group create mode 100644 tests/log/lastlog/09_lastlog-u_range/config/etc/gshadow create mode 100644 tests/log/lastlog/09_lastlog-u_range/config/etc/passwd create mode 100644 tests/log/lastlog/09_lastlog-u_range/config/etc/shadow create mode 100644 tests/log/lastlog/09_lastlog-u_range/data/lastlog.list create mode 100755 tests/log/lastlog/09_lastlog-u_range/lastlog.test create mode 100644 tests/log/lastlog/10_lastlog-u_open_range/config.txt create mode 100644 tests/log/lastlog/10_lastlog-u_open_range/config/etc/group create mode 100644 tests/log/lastlog/10_lastlog-u_open_range/config/etc/gshadow create mode 100644 tests/log/lastlog/10_lastlog-u_open_range/config/etc/passwd create mode 100644 tests/log/lastlog/10_lastlog-u_open_range/config/etc/shadow create mode 100644 tests/log/lastlog/10_lastlog-u_open_range/data/lastlog.list create mode 100755 tests/log/lastlog/10_lastlog-u_open_range/lastlog.test create mode 100644 tests/log/lastlog/11_lastlog-u_range_open/config.txt create mode 100644 tests/log/lastlog/11_lastlog-u_range_open/config/etc/group create mode 100644 tests/log/lastlog/11_lastlog-u_range_open/config/etc/gshadow create mode 100644 tests/log/lastlog/11_lastlog-u_range_open/config/etc/passwd create mode 100644 tests/log/lastlog/11_lastlog-u_range_open/config/etc/shadow create mode 100644 tests/log/lastlog/11_lastlog-u_range_open/data/lastlog.list create mode 100755 tests/log/lastlog/11_lastlog-u_range_open/lastlog.test create mode 100644 tests/log/lastlog/12_lastlog-u_range_invalid1/config.txt create mode 100644 tests/log/lastlog/12_lastlog-u_range_invalid1/config/etc/group create mode 100644 tests/log/lastlog/12_lastlog-u_range_invalid1/config/etc/gshadow create mode 100644 tests/log/lastlog/12_lastlog-u_range_invalid1/config/etc/passwd create mode 100644 tests/log/lastlog/12_lastlog-u_range_invalid1/config/etc/shadow create mode 100644 tests/log/lastlog/12_lastlog-u_range_invalid1/data/lastlog.err create mode 100755 tests/log/lastlog/12_lastlog-u_range_invalid1/lastlog.test create mode 100644 tests/log/lastlog/13_lastlog-u_range_invalid2/config.txt create mode 100644 tests/log/lastlog/13_lastlog-u_range_invalid2/config/etc/group create mode 100644 tests/log/lastlog/13_lastlog-u_range_invalid2/config/etc/gshadow create mode 100644 tests/log/lastlog/13_lastlog-u_range_invalid2/config/etc/passwd create mode 100644 tests/log/lastlog/13_lastlog-u_range_invalid2/config/etc/shadow create mode 100644 tests/log/lastlog/13_lastlog-u_range_invalid2/data/lastlog.err create mode 100755 tests/log/lastlog/13_lastlog-u_range_invalid2/lastlog.test create mode 100644 tests/log/lastlog/14_lastlog-u_range_invalid3/config.txt create mode 100644 tests/log/lastlog/14_lastlog-u_range_invalid3/config/etc/group create mode 100644 tests/log/lastlog/14_lastlog-u_range_invalid3/config/etc/gshadow create mode 100644 tests/log/lastlog/14_lastlog-u_range_invalid3/config/etc/passwd create mode 100644 tests/log/lastlog/14_lastlog-u_range_invalid3/config/etc/shadow create mode 100644 tests/log/lastlog/14_lastlog-u_range_invalid3/data/lastlog.err create mode 100755 tests/log/lastlog/14_lastlog-u_range_invalid3/lastlog.test create mode 100644 tests/log/lastlog/15_lastlog_bad_option/config.txt create mode 100644 tests/log/lastlog/15_lastlog_bad_option/config/etc/group create mode 100644 tests/log/lastlog/15_lastlog_bad_option/config/etc/gshadow create mode 100644 tests/log/lastlog/15_lastlog_bad_option/config/etc/passwd create mode 100644 tests/log/lastlog/15_lastlog_bad_option/config/etc/shadow create mode 100644 tests/log/lastlog/15_lastlog_bad_option/data/usage.out create mode 100755 tests/log/lastlog/15_lastlog_bad_option/lastlog.test create mode 100644 tests/log/lastlog/16_lastlog_extra_arg/config.txt create mode 100644 tests/log/lastlog/16_lastlog_extra_arg/config/etc/group create mode 100644 tests/log/lastlog/16_lastlog_extra_arg/config/etc/gshadow create mode 100644 tests/log/lastlog/16_lastlog_extra_arg/config/etc/passwd create mode 100644 tests/log/lastlog/16_lastlog_extra_arg/config/etc/shadow create mode 100644 tests/log/lastlog/16_lastlog_extra_arg/data/usage.out create mode 100755 tests/log/lastlog/16_lastlog_extra_arg/lastlog.test create mode 100644 tests/log/lastlog/17_lastlog-t/config.txt create mode 100644 tests/log/lastlog/17_lastlog-t/config/etc/group create mode 100644 tests/log/lastlog/17_lastlog-t/config/etc/gshadow create mode 100644 tests/log/lastlog/17_lastlog-t/config/etc/passwd create mode 100644 tests/log/lastlog/17_lastlog-t/config/etc/shadow create mode 100644 tests/log/lastlog/17_lastlog-t/data/lastlog.list create mode 100755 tests/log/lastlog/17_lastlog-t/lastlog.test create mode 100755 tests/log/lastlog/17_lastlog-t/login.exp create mode 100644 tests/log/lastlog/18_lastlog-b/config.txt create mode 100644 tests/log/lastlog/18_lastlog-b/config/etc/group create mode 100644 tests/log/lastlog/18_lastlog-b/config/etc/gshadow create mode 100644 tests/log/lastlog/18_lastlog-b/config/etc/passwd create mode 100644 tests/log/lastlog/18_lastlog-b/config/etc/shadow create mode 100644 tests/log/lastlog/18_lastlog-b/data/lastlog.list create mode 100755 tests/log/lastlog/18_lastlog-b/lastlog.test create mode 100755 tests/log/lastlog/18_lastlog-b/login.exp create mode 100644 tests/log/lastlog/19_lastlog-t_invalid/config.txt create mode 100644 tests/log/lastlog/19_lastlog-t_invalid/config/etc/group create mode 100644 tests/log/lastlog/19_lastlog-t_invalid/config/etc/gshadow create mode 100644 tests/log/lastlog/19_lastlog-t_invalid/config/etc/passwd create mode 100644 tests/log/lastlog/19_lastlog-t_invalid/config/etc/shadow create mode 100644 tests/log/lastlog/19_lastlog-t_invalid/data/lastlog.err create mode 100755 tests/log/lastlog/19_lastlog-t_invalid/lastlog.test create mode 100644 tests/log/lastlog/20_lastlog-b_invalid/config.txt create mode 100644 tests/log/lastlog/20_lastlog-b_invalid/config/etc/group create mode 100644 tests/log/lastlog/20_lastlog-b_invalid/config/etc/gshadow create mode 100644 tests/log/lastlog/20_lastlog-b_invalid/config/etc/passwd create mode 100644 tests/log/lastlog/20_lastlog-b_invalid/config/etc/shadow create mode 100644 tests/log/lastlog/20_lastlog-b_invalid/data/lastlog.err create mode 100755 tests/log/lastlog/20_lastlog-b_invalid/lastlog.test create mode 100644 tests/login/01_login_prompt/config.txt create mode 100644 tests/login/01_login_prompt/config/etc/group create mode 100644 tests/login/01_login_prompt/config/etc/gshadow create mode 100644 tests/login/01_login_prompt/config/etc/login.defs create mode 100644 tests/login/01_login_prompt/config/etc/passwd create mode 100644 tests/login/01_login_prompt/config/etc/shadow create mode 100755 tests/login/01_login_prompt/login.exp create mode 100755 tests/login/01_login_prompt/login.test create mode 100644 tests/login/02_login_user/config.txt create mode 100644 tests/login/02_login_user/config/etc/group create mode 100644 tests/login/02_login_user/config/etc/gshadow create mode 100644 tests/login/02_login_user/config/etc/login.defs create mode 100644 tests/login/02_login_user/config/etc/passwd create mode 100644 tests/login/02_login_user/config/etc/shadow create mode 100755 tests/login/02_login_user/login.exp create mode 100755 tests/login/02_login_user/login.test create mode 100644 tests/login/03_login_check_tty/config.txt create mode 100644 tests/login/03_login_check_tty/config/etc/group create mode 100644 tests/login/03_login_check_tty/config/etc/gshadow create mode 100644 tests/login/03_login_check_tty/config/etc/login.defs create mode 100644 tests/login/03_login_check_tty/config/etc/passwd create mode 100644 tests/login/03_login_check_tty/config/etc/shadow create mode 100755 tests/login/03_login_check_tty/login.exp create mode 100755 tests/login/03_login_check_tty/login.test create mode 100644 tests/newusers/01_create_user/config.txt create mode 100644 tests/newusers/01_create_user/config/etc/group create mode 100644 tests/newusers/01_create_user/config/etc/gshadow create mode 100644 tests/newusers/01_create_user/config/etc/pam.d/common-password create mode 100644 tests/newusers/01_create_user/config/etc/pam.d/newusers create mode 100644 tests/newusers/01_create_user/config/etc/passwd create mode 100644 tests/newusers/01_create_user/config/etc/shadow create mode 100644 tests/newusers/01_create_user/data/group create mode 100644 tests/newusers/01_create_user/data/gshadow create mode 100644 tests/newusers/01_create_user/data/newusers.list create mode 100644 tests/newusers/01_create_user/data/passwd create mode 100644 tests/newusers/01_create_user/data/shadow create mode 100755 tests/newusers/01_create_user/newusers.test create mode 100644 tests/newusers/02_update_password/config.txt create mode 100644 tests/newusers/02_update_password/config/etc/group create mode 100644 tests/newusers/02_update_password/config/etc/gshadow create mode 100644 tests/newusers/02_update_password/config/etc/pam.d/common-password create mode 100644 tests/newusers/02_update_password/config/etc/pam.d/newusers create mode 100644 tests/newusers/02_update_password/config/etc/passwd create mode 100644 tests/newusers/02_update_password/config/etc/shadow create mode 100644 tests/newusers/02_update_password/data/newusers.list create mode 100644 tests/newusers/02_update_password/data/shadow create mode 100755 tests/newusers/02_update_password/newusers.test create mode 100644 tests/newusers/03_no_update_pid/config.txt create mode 100644 tests/newusers/03_no_update_pid/config/etc/group create mode 100644 tests/newusers/03_no_update_pid/config/etc/gshadow create mode 100644 tests/newusers/03_no_update_pid/config/etc/pam.d/common-password create mode 100644 tests/newusers/03_no_update_pid/config/etc/pam.d/newusers create mode 100644 tests/newusers/03_no_update_pid/config/etc/passwd create mode 100644 tests/newusers/03_no_update_pid/config/etc/shadow create mode 100644 tests/newusers/03_no_update_pid/data/newusers.list create mode 100644 tests/newusers/03_no_update_pid/data/shadow create mode 100755 tests/newusers/03_no_update_pid/newusers.test create mode 100644 tests/newusers/04_no_update_gid/config.txt create mode 100644 tests/newusers/04_no_update_gid/config/etc/group create mode 100644 tests/newusers/04_no_update_gid/config/etc/gshadow create mode 100644 tests/newusers/04_no_update_gid/config/etc/pam.d/common-password create mode 100644 tests/newusers/04_no_update_gid/config/etc/pam.d/newusers create mode 100644 tests/newusers/04_no_update_gid/config/etc/passwd create mode 100644 tests/newusers/04_no_update_gid/config/etc/shadow create mode 100644 tests/newusers/04_no_update_gid/data/newusers.list create mode 100644 tests/newusers/04_no_update_gid/data/shadow create mode 100755 tests/newusers/04_no_update_gid/newusers.test create mode 100644 tests/newusers/05_create_user_pid/config.txt create mode 100644 tests/newusers/05_create_user_pid/config/etc/group create mode 100644 tests/newusers/05_create_user_pid/config/etc/gshadow create mode 100644 tests/newusers/05_create_user_pid/config/etc/pam.d/common-password create mode 100644 tests/newusers/05_create_user_pid/config/etc/pam.d/newusers create mode 100644 tests/newusers/05_create_user_pid/config/etc/passwd create mode 100644 tests/newusers/05_create_user_pid/config/etc/shadow create mode 100644 tests/newusers/05_create_user_pid/data/group create mode 100644 tests/newusers/05_create_user_pid/data/gshadow create mode 100644 tests/newusers/05_create_user_pid/data/newusers.list create mode 100644 tests/newusers/05_create_user_pid/data/passwd create mode 100644 tests/newusers/05_create_user_pid/data/shadow create mode 100755 tests/newusers/05_create_user_pid/newusers.test create mode 100644 tests/newusers/06_create_user_gid/config.txt create mode 100644 tests/newusers/06_create_user_gid/config/etc/group create mode 100644 tests/newusers/06_create_user_gid/config/etc/gshadow create mode 100644 tests/newusers/06_create_user_gid/config/etc/pam.d/common-password create mode 100644 tests/newusers/06_create_user_gid/config/etc/pam.d/newusers create mode 100644 tests/newusers/06_create_user_gid/config/etc/passwd create mode 100644 tests/newusers/06_create_user_gid/config/etc/shadow create mode 100644 tests/newusers/06_create_user_gid/data/group create mode 100644 tests/newusers/06_create_user_gid/data/gshadow create mode 100644 tests/newusers/06_create_user_gid/data/newusers.list create mode 100644 tests/newusers/06_create_user_gid/data/passwd create mode 100644 tests/newusers/06_create_user_gid/data/shadow create mode 100755 tests/newusers/06_create_user_gid/newusers.test create mode 100644 tests/newusers/07_create_user_pid_gid/config.txt create mode 100644 tests/newusers/07_create_user_pid_gid/config/etc/group create mode 100644 tests/newusers/07_create_user_pid_gid/config/etc/gshadow create mode 100644 tests/newusers/07_create_user_pid_gid/config/etc/pam.d/common-password create mode 100644 tests/newusers/07_create_user_pid_gid/config/etc/pam.d/newusers create mode 100644 tests/newusers/07_create_user_pid_gid/config/etc/passwd create mode 100644 tests/newusers/07_create_user_pid_gid/config/etc/shadow create mode 100644 tests/newusers/07_create_user_pid_gid/data/group create mode 100644 tests/newusers/07_create_user_pid_gid/data/gshadow create mode 100644 tests/newusers/07_create_user_pid_gid/data/newusers.list create mode 100644 tests/newusers/07_create_user_pid_gid/data/passwd create mode 100644 tests/newusers/07_create_user_pid_gid/data/shadow create mode 100755 tests/newusers/07_create_user_pid_gid/newusers.test create mode 100644 tests/newusers/08_create_user_pid_other-gid/config.txt create mode 100644 tests/newusers/08_create_user_pid_other-gid/config/etc/group create mode 100644 tests/newusers/08_create_user_pid_other-gid/config/etc/gshadow create mode 100644 tests/newusers/08_create_user_pid_other-gid/config/etc/pam.d/common-password create mode 100644 tests/newusers/08_create_user_pid_other-gid/config/etc/pam.d/newusers create mode 100644 tests/newusers/08_create_user_pid_other-gid/config/etc/passwd create mode 100644 tests/newusers/08_create_user_pid_other-gid/config/etc/shadow create mode 100644 tests/newusers/08_create_user_pid_other-gid/data/group create mode 100644 tests/newusers/08_create_user_pid_other-gid/data/gshadow create mode 100644 tests/newusers/08_create_user_pid_other-gid/data/newusers.list create mode 100644 tests/newusers/08_create_user_pid_other-gid/data/passwd create mode 100644 tests/newusers/08_create_user_pid_other-gid/data/shadow create mode 100755 tests/newusers/08_create_user_pid_other-gid/newusers.test create mode 100644 tests/newusers/09_create_user_pid-as-user-bar/config.txt create mode 100644 tests/newusers/09_create_user_pid-as-user-bar/config/etc/group create mode 100644 tests/newusers/09_create_user_pid-as-user-bar/config/etc/gshadow create mode 100644 tests/newusers/09_create_user_pid-as-user-bar/config/etc/pam.d/common-password create mode 100644 tests/newusers/09_create_user_pid-as-user-bar/config/etc/pam.d/newusers create mode 100644 tests/newusers/09_create_user_pid-as-user-bar/config/etc/passwd create mode 100644 tests/newusers/09_create_user_pid-as-user-bar/config/etc/shadow create mode 100644 tests/newusers/09_create_user_pid-as-user-bar/data/group create mode 100644 tests/newusers/09_create_user_pid-as-user-bar/data/gshadow create mode 100644 tests/newusers/09_create_user_pid-as-user-bar/data/newusers.list create mode 100644 tests/newusers/09_create_user_pid-as-user-bar/data/passwd create mode 100644 tests/newusers/09_create_user_pid-as-user-bar/data/shadow create mode 100755 tests/newusers/09_create_user_pid-as-user-bar/newusers.test create mode 100644 tests/newusers/10_create_user_gid-as-group-bar/config.txt create mode 100644 tests/newusers/10_create_user_gid-as-group-bar/config/etc/group create mode 100644 tests/newusers/10_create_user_gid-as-group-bar/config/etc/gshadow create mode 100644 tests/newusers/10_create_user_gid-as-group-bar/config/etc/pam.d/common-password create mode 100644 tests/newusers/10_create_user_gid-as-group-bar/config/etc/pam.d/newusers create mode 100644 tests/newusers/10_create_user_gid-as-group-bar/config/etc/passwd create mode 100644 tests/newusers/10_create_user_gid-as-group-bar/config/etc/shadow create mode 100644 tests/newusers/10_create_user_gid-as-group-bar/data/newusers.list create mode 100644 tests/newusers/10_create_user_gid-as-group-bar/data/passwd create mode 100644 tests/newusers/10_create_user_gid-as-group-bar/data/shadow create mode 100755 tests/newusers/10_create_user_gid-as-group-bar/newusers.test create mode 100644 tests/newusers/11_update_gecos/config.txt create mode 100644 tests/newusers/11_update_gecos/config/etc/group create mode 100644 tests/newusers/11_update_gecos/config/etc/gshadow create mode 100644 tests/newusers/11_update_gecos/config/etc/pam.d/common-password create mode 100644 tests/newusers/11_update_gecos/config/etc/pam.d/newusers create mode 100644 tests/newusers/11_update_gecos/config/etc/passwd create mode 100644 tests/newusers/11_update_gecos/config/etc/shadow create mode 100644 tests/newusers/11_update_gecos/data/newusers.list create mode 100644 tests/newusers/11_update_gecos/data/passwd create mode 100644 tests/newusers/11_update_gecos/data/shadow create mode 100755 tests/newusers/11_update_gecos/newusers.test create mode 100644 tests/newusers/12_update_shell/config.txt create mode 100644 tests/newusers/12_update_shell/config/etc/group create mode 100644 tests/newusers/12_update_shell/config/etc/gshadow create mode 100644 tests/newusers/12_update_shell/config/etc/pam.d/common-password create mode 100644 tests/newusers/12_update_shell/config/etc/pam.d/newusers create mode 100644 tests/newusers/12_update_shell/config/etc/passwd create mode 100644 tests/newusers/12_update_shell/config/etc/shadow create mode 100644 tests/newusers/12_update_shell/data/newusers.list create mode 100644 tests/newusers/12_update_shell/data/passwd create mode 100644 tests/newusers/12_update_shell/data/shadow create mode 100755 tests/newusers/12_update_shell/newusers.test create mode 100644 tests/newusers/13_create_user_new-home/config.txt create mode 100644 tests/newusers/13_create_user_new-home/config/etc/group create mode 100644 tests/newusers/13_create_user_new-home/config/etc/gshadow create mode 100644 tests/newusers/13_create_user_new-home/config/etc/pam.d/common-password create mode 100644 tests/newusers/13_create_user_new-home/config/etc/pam.d/newusers create mode 100644 tests/newusers/13_create_user_new-home/config/etc/passwd create mode 100644 tests/newusers/13_create_user_new-home/config/etc/shadow create mode 100644 tests/newusers/13_create_user_new-home/data/group create mode 100644 tests/newusers/13_create_user_new-home/data/gshadow create mode 100644 tests/newusers/13_create_user_new-home/data/home_ls-a create mode 100644 tests/newusers/13_create_user_new-home/data/newusers.list create mode 100644 tests/newusers/13_create_user_new-home/data/passwd create mode 100644 tests/newusers/13_create_user_new-home/data/shadow create mode 100755 tests/newusers/13_create_user_new-home/newusers.test create mode 100644 tests/newusers/14_create_user_existing-home/config.txt create mode 100644 tests/newusers/14_create_user_existing-home/config/etc/group create mode 100644 tests/newusers/14_create_user_existing-home/config/etc/gshadow create mode 100644 tests/newusers/14_create_user_existing-home/config/etc/pam.d/common-password create mode 100644 tests/newusers/14_create_user_existing-home/config/etc/pam.d/newusers create mode 100644 tests/newusers/14_create_user_existing-home/config/etc/passwd create mode 100644 tests/newusers/14_create_user_existing-home/config/etc/shadow create mode 100644 tests/newusers/14_create_user_existing-home/data/group create mode 100644 tests/newusers/14_create_user_existing-home/data/gshadow create mode 100644 tests/newusers/14_create_user_existing-home/data/home_ls-a create mode 100644 tests/newusers/14_create_user_existing-home/data/newusers.list create mode 100644 tests/newusers/14_create_user_existing-home/data/passwd create mode 100644 tests/newusers/14_create_user_existing-home/data/shadow create mode 100755 tests/newusers/14_create_user_existing-home/newusers.test create mode 100644 tests/newusers/15_update_new-home/config.txt create mode 100644 tests/newusers/15_update_new-home/config/etc/group create mode 100644 tests/newusers/15_update_new-home/config/etc/gshadow create mode 100644 tests/newusers/15_update_new-home/config/etc/pam.d/common-password create mode 100644 tests/newusers/15_update_new-home/config/etc/pam.d/newusers create mode 100644 tests/newusers/15_update_new-home/config/etc/passwd create mode 100644 tests/newusers/15_update_new-home/config/etc/shadow create mode 100644 tests/newusers/15_update_new-home/data/home_ls-a create mode 100644 tests/newusers/15_update_new-home/data/newusers.list create mode 100644 tests/newusers/15_update_new-home/data/passwd create mode 100644 tests/newusers/15_update_new-home/data/shadow create mode 100755 tests/newusers/15_update_new-home/newusers.test create mode 100644 tests/newusers/16_update_existing-home/config.txt create mode 100644 tests/newusers/16_update_existing-home/config/etc/group create mode 100644 tests/newusers/16_update_existing-home/config/etc/gshadow create mode 100644 tests/newusers/16_update_existing-home/config/etc/pam.d/common-password create mode 100644 tests/newusers/16_update_existing-home/config/etc/pam.d/newusers create mode 100644 tests/newusers/16_update_existing-home/config/etc/passwd create mode 100644 tests/newusers/16_update_existing-home/config/etc/shadow create mode 100644 tests/newusers/16_update_existing-home/data/home_ls-a create mode 100644 tests/newusers/16_update_existing-home/data/newusers.list create mode 100644 tests/newusers/16_update_existing-home/data/passwd create mode 100644 tests/newusers/16_update_existing-home/data/shadow create mode 100755 tests/newusers/16_update_existing-home/newusers.test create mode 100644 tests/newusers/17_create_user_pid-already-used/config.txt create mode 100644 tests/newusers/17_create_user_pid-already-used/config/etc/group create mode 100644 tests/newusers/17_create_user_pid-already-used/config/etc/gshadow create mode 100644 tests/newusers/17_create_user_pid-already-used/config/etc/pam.d/common-password create mode 100644 tests/newusers/17_create_user_pid-already-used/config/etc/pam.d/newusers create mode 100644 tests/newusers/17_create_user_pid-already-used/config/etc/passwd create mode 100644 tests/newusers/17_create_user_pid-already-used/config/etc/shadow create mode 100644 tests/newusers/17_create_user_pid-already-used/data/group create mode 100644 tests/newusers/17_create_user_pid-already-used/data/gshadow create mode 100644 tests/newusers/17_create_user_pid-already-used/data/newusers.list create mode 100644 tests/newusers/17_create_user_pid-already-used/data/passwd create mode 100644 tests/newusers/17_create_user_pid-already-used/data/shadow create mode 100755 tests/newusers/17_create_user_pid-already-used/newusers.test create mode 100644 tests/newusers/18_create_user_gid-already-used/config.txt create mode 100644 tests/newusers/18_create_user_gid-already-used/config/etc/group create mode 100644 tests/newusers/18_create_user_gid-already-used/config/etc/gshadow create mode 100644 tests/newusers/18_create_user_gid-already-used/config/etc/pam.d/common-password create mode 100644 tests/newusers/18_create_user_gid-already-used/config/etc/pam.d/newusers create mode 100644 tests/newusers/18_create_user_gid-already-used/config/etc/passwd create mode 100644 tests/newusers/18_create_user_gid-already-used/config/etc/shadow create mode 100644 tests/newusers/18_create_user_gid-already-used/data/newusers.list create mode 100644 tests/newusers/18_create_user_gid-already-used/data/passwd create mode 100644 tests/newusers/18_create_user_gid-already-used/data/shadow create mode 100755 tests/newusers/18_create_user_gid-already-used/newusers.test create mode 100644 tests/newusers/19_update_keep-old-home/config.txt create mode 100644 tests/newusers/19_update_keep-old-home/config/etc/group create mode 100644 tests/newusers/19_update_keep-old-home/config/etc/gshadow create mode 100644 tests/newusers/19_update_keep-old-home/config/etc/pam.d/common-password create mode 100644 tests/newusers/19_update_keep-old-home/config/etc/pam.d/newusers create mode 100644 tests/newusers/19_update_keep-old-home/config/etc/passwd create mode 100644 tests/newusers/19_update_keep-old-home/config/etc/shadow create mode 100644 tests/newusers/19_update_keep-old-home/data/home_ls-a create mode 100644 tests/newusers/19_update_keep-old-home/data/home_ls-a.old create mode 100644 tests/newusers/19_update_keep-old-home/data/newusers.list create mode 100644 tests/newusers/19_update_keep-old-home/data/passwd create mode 100644 tests/newusers/19_update_keep-old-home/data/shadow create mode 100755 tests/newusers/19_update_keep-old-home/newusers.test create mode 100644 tests/newusers/20_multiple_users/config.txt create mode 100644 tests/newusers/20_multiple_users/config/etc/group create mode 100644 tests/newusers/20_multiple_users/config/etc/gshadow create mode 100644 tests/newusers/20_multiple_users/config/etc/pam.d/common-password create mode 100644 tests/newusers/20_multiple_users/config/etc/pam.d/newusers create mode 100644 tests/newusers/20_multiple_users/config/etc/passwd create mode 100644 tests/newusers/20_multiple_users/config/etc/shadow create mode 100644 tests/newusers/20_multiple_users/data/group create mode 100644 tests/newusers/20_multiple_users/data/gshadow create mode 100644 tests/newusers/20_multiple_users/data/newusers.list create mode 100644 tests/newusers/20_multiple_users/data/passwd create mode 100644 tests/newusers/20_multiple_users/data/shadow create mode 100755 tests/newusers/20_multiple_users/newusers.test create mode 100644 tests/newusers/21_create_user_UID_MAX/config.txt create mode 100644 tests/newusers/21_create_user_UID_MAX/config/etc/group create mode 100644 tests/newusers/21_create_user_UID_MAX/config/etc/gshadow create mode 100644 tests/newusers/21_create_user_UID_MAX/config/etc/pam.d/common-password create mode 100644 tests/newusers/21_create_user_UID_MAX/config/etc/pam.d/newusers create mode 100644 tests/newusers/21_create_user_UID_MAX/config/etc/passwd create mode 100644 tests/newusers/21_create_user_UID_MAX/config/etc/shadow create mode 100644 tests/newusers/21_create_user_UID_MAX/data/group create mode 100644 tests/newusers/21_create_user_UID_MAX/data/gshadow create mode 100644 tests/newusers/21_create_user_UID_MAX/data/newusers.list create mode 100644 tests/newusers/21_create_user_UID_MAX/data/passwd create mode 100644 tests/newusers/21_create_user_UID_MAX/data/shadow create mode 100755 tests/newusers/21_create_user_UID_MAX/newusers.test create mode 100644 tests/newusers/22_create_user_GID_MAX/config.txt create mode 100644 tests/newusers/22_create_user_GID_MAX/config/etc/group create mode 100644 tests/newusers/22_create_user_GID_MAX/config/etc/gshadow create mode 100644 tests/newusers/22_create_user_GID_MAX/config/etc/pam.d/common-password create mode 100644 tests/newusers/22_create_user_GID_MAX/config/etc/pam.d/newusers create mode 100644 tests/newusers/22_create_user_GID_MAX/config/etc/passwd create mode 100644 tests/newusers/22_create_user_GID_MAX/config/etc/shadow create mode 100644 tests/newusers/22_create_user_GID_MAX/data/group create mode 100644 tests/newusers/22_create_user_GID_MAX/data/gshadow create mode 100644 tests/newusers/22_create_user_GID_MAX/data/newusers.list create mode 100644 tests/newusers/22_create_user_GID_MAX/data/passwd create mode 100644 tests/newusers/22_create_user_GID_MAX/data/shadow create mode 100755 tests/newusers/22_create_user_GID_MAX/newusers.test create mode 100644 tests/newusers/23_create_user_error_negativ_UID/config.txt create mode 100644 tests/newusers/23_create_user_error_negativ_UID/config/etc/group create mode 100644 tests/newusers/23_create_user_error_negativ_UID/config/etc/gshadow create mode 100644 tests/newusers/23_create_user_error_negativ_UID/config/etc/passwd create mode 100644 tests/newusers/23_create_user_error_negativ_UID/config/etc/shadow create mode 100644 tests/newusers/23_create_user_error_negativ_UID/data/newusers.err create mode 100644 tests/newusers/23_create_user_error_negativ_UID/data/newusers.list create mode 100755 tests/newusers/23_create_user_error_negativ_UID/newusers.test create mode 100644 tests/newusers/24_create_user_error_invalid_UID/config.txt create mode 100644 tests/newusers/24_create_user_error_invalid_UID/config/etc/group create mode 100644 tests/newusers/24_create_user_error_invalid_UID/config/etc/gshadow create mode 100644 tests/newusers/24_create_user_error_invalid_UID/config/etc/passwd create mode 100644 tests/newusers/24_create_user_error_invalid_UID/config/etc/shadow create mode 100644 tests/newusers/24_create_user_error_invalid_UID/data/newusers.err create mode 100644 tests/newusers/24_create_user_error_invalid_UID/data/newusers.list create mode 100755 tests/newusers/24_create_user_error_invalid_UID/newusers.test create mode 100644 tests/newusers/25_create_user_error_no_remaining_UID/config.txt create mode 100644 tests/newusers/25_create_user_error_no_remaining_UID/config/etc/group create mode 100644 tests/newusers/25_create_user_error_no_remaining_UID/config/etc/gshadow create mode 100644 tests/newusers/25_create_user_error_no_remaining_UID/config/etc/login.defs create mode 100644 tests/newusers/25_create_user_error_no_remaining_UID/config/etc/passwd create mode 100644 tests/newusers/25_create_user_error_no_remaining_UID/config/etc/shadow create mode 100644 tests/newusers/25_create_user_error_no_remaining_UID/data/newusers.err create mode 100644 tests/newusers/25_create_user_error_no_remaining_UID/data/newusers.list create mode 100755 tests/newusers/25_create_user_error_no_remaining_UID/newusers.test create mode 100644 tests/newusers/26_create_user_error_no_remaining_GID/config.txt create mode 100644 tests/newusers/26_create_user_error_no_remaining_GID/config/etc/group create mode 100644 tests/newusers/26_create_user_error_no_remaining_GID/config/etc/gshadow create mode 100644 tests/newusers/26_create_user_error_no_remaining_GID/config/etc/login.defs create mode 100644 tests/newusers/26_create_user_error_no_remaining_GID/config/etc/passwd create mode 100644 tests/newusers/26_create_user_error_no_remaining_GID/config/etc/shadow create mode 100644 tests/newusers/26_create_user_error_no_remaining_GID/data/newusers.err create mode 100644 tests/newusers/26_create_user_error_no_remaining_GID/data/newusers.list create mode 100755 tests/newusers/26_create_user_error_no_remaining_GID/newusers.test create mode 100644 tests/newusers/27_create_user_error_invalid_username/config.txt create mode 100644 tests/newusers/27_create_user_error_invalid_username/config/etc/group create mode 100644 tests/newusers/27_create_user_error_invalid_username/config/etc/gshadow create mode 100644 tests/newusers/27_create_user_error_invalid_username/config/etc/passwd create mode 100644 tests/newusers/27_create_user_error_invalid_username/config/etc/shadow create mode 100644 tests/newusers/27_create_user_error_invalid_username/data/newusers.err create mode 100644 tests/newusers/27_create_user_error_invalid_username/data/newusers.list create mode 100755 tests/newusers/27_create_user_error_invalid_username/newusers.test create mode 100644 tests/newusers/28_create_user_error_invalid_groupname/config.txt create mode 100644 tests/newusers/28_create_user_error_invalid_groupname/config/etc/group create mode 100644 tests/newusers/28_create_user_error_invalid_groupname/config/etc/gshadow create mode 100644 tests/newusers/28_create_user_error_invalid_groupname/config/etc/passwd create mode 100644 tests/newusers/28_create_user_error_invalid_groupname/config/etc/shadow create mode 100644 tests/newusers/28_create_user_error_invalid_groupname/data/newusers.err create mode 100644 tests/newusers/28_create_user_error_invalid_groupname/data/newusers.list create mode 100755 tests/newusers/28_create_user_error_invalid_groupname/newusers.test create mode 100644 tests/newusers/29_create_user_error_invalid_username_valid_groupname/config.txt create mode 100644 tests/newusers/29_create_user_error_invalid_username_valid_groupname/config/etc/group create mode 100644 tests/newusers/29_create_user_error_invalid_username_valid_groupname/config/etc/gshadow create mode 100644 tests/newusers/29_create_user_error_invalid_username_valid_groupname/config/etc/passwd create mode 100644 tests/newusers/29_create_user_error_invalid_username_valid_groupname/config/etc/shadow create mode 100644 tests/newusers/29_create_user_error_invalid_username_valid_groupname/data/newusers.err create mode 100644 tests/newusers/29_create_user_error_invalid_username_valid_groupname/data/newusers.list create mode 100755 tests/newusers/29_create_user_error_invalid_username_valid_groupname/newusers.test create mode 100644 tests/newusers/30_create_user_different_groupname/config.txt create mode 100644 tests/newusers/30_create_user_different_groupname/config/etc/group create mode 100644 tests/newusers/30_create_user_different_groupname/config/etc/gshadow create mode 100644 tests/newusers/30_create_user_different_groupname/config/etc/pam.d/common-password create mode 100644 tests/newusers/30_create_user_different_groupname/config/etc/pam.d/newusers create mode 100644 tests/newusers/30_create_user_different_groupname/config/etc/passwd create mode 100644 tests/newusers/30_create_user_different_groupname/config/etc/shadow create mode 100644 tests/newusers/30_create_user_different_groupname/data/group create mode 100644 tests/newusers/30_create_user_different_groupname/data/gshadow create mode 100644 tests/newusers/30_create_user_different_groupname/data/newusers.list create mode 100644 tests/newusers/30_create_user_different_groupname/data/passwd create mode 100644 tests/newusers/30_create_user_different_groupname/data/shadow create mode 100755 tests/newusers/30_create_user_different_groupname/newusers.test create mode 100644 tests/newusers/31_create_user_error_invalid_GID/config.txt create mode 100644 tests/newusers/31_create_user_error_invalid_GID/config/etc/group create mode 100644 tests/newusers/31_create_user_error_invalid_GID/config/etc/gshadow create mode 100644 tests/newusers/31_create_user_error_invalid_GID/config/etc/passwd create mode 100644 tests/newusers/31_create_user_error_invalid_GID/config/etc/shadow create mode 100644 tests/newusers/31_create_user_error_invalid_GID/data/newusers.err create mode 100644 tests/newusers/31_create_user_error_invalid_GID/data/newusers.list create mode 100755 tests/newusers/31_create_user_error_invalid_GID/newusers.test create mode 100644 tests/newusers/32_create_user_error_gshadow_group_exists/config.txt create mode 100644 tests/newusers/32_create_user_error_gshadow_group_exists/config/etc/group create mode 100644 tests/newusers/32_create_user_error_gshadow_group_exists/config/etc/gshadow create mode 100644 tests/newusers/32_create_user_error_gshadow_group_exists/config/etc/passwd create mode 100644 tests/newusers/32_create_user_error_gshadow_group_exists/config/etc/shadow create mode 100644 tests/newusers/32_create_user_error_gshadow_group_exists/data/newusers.err create mode 100644 tests/newusers/32_create_user_error_gshadow_group_exists/data/newusers.list create mode 100755 tests/newusers/32_create_user_error_gshadow_group_exists/newusers.test create mode 100644 tests/newusers/33_update_password_no_shadow_password/config.txt create mode 100644 tests/newusers/33_update_password_no_shadow_password/config/etc/group create mode 100644 tests/newusers/33_update_password_no_shadow_password/config/etc/gshadow create mode 100644 tests/newusers/33_update_password_no_shadow_password/config/etc/pam.d/common-password create mode 100644 tests/newusers/33_update_password_no_shadow_password/config/etc/pam.d/newusers create mode 100644 tests/newusers/33_update_password_no_shadow_password/config/etc/passwd create mode 100644 tests/newusers/33_update_password_no_shadow_password/config/etc/shadow create mode 100644 tests/newusers/33_update_password_no_shadow_password/data/newusers.list create mode 100644 tests/newusers/33_update_password_no_shadow_password/data/passwd create mode 100755 tests/newusers/33_update_password_no_shadow_password/newusers.test create mode 100644 tests/newusers/34_update_password_no_shadow/config.txt create mode 100644 tests/newusers/34_update_password_no_shadow/config/etc/group create mode 100644 tests/newusers/34_update_password_no_shadow/config/etc/gshadow create mode 100644 tests/newusers/34_update_password_no_shadow/config/etc/pam.d/common-password create mode 100644 tests/newusers/34_update_password_no_shadow/config/etc/pam.d/newusers create mode 100644 tests/newusers/34_update_password_no_shadow/config/etc/passwd create mode 100644 tests/newusers/34_update_password_no_shadow/config/etc/shadow create mode 100644 tests/newusers/34_update_password_no_shadow/data/newusers.list create mode 100644 tests/newusers/34_update_password_no_shadow/data/passwd create mode 100755 tests/newusers/34_update_password_no_shadow/newusers.test create mode 100644 tests/newusers/35_read_from_stdin/config.txt create mode 100644 tests/newusers/35_read_from_stdin/config/etc/group create mode 100644 tests/newusers/35_read_from_stdin/config/etc/gshadow create mode 100644 tests/newusers/35_read_from_stdin/config/etc/pam.d/common-password create mode 100644 tests/newusers/35_read_from_stdin/config/etc/pam.d/newusers create mode 100644 tests/newusers/35_read_from_stdin/config/etc/passwd create mode 100644 tests/newusers/35_read_from_stdin/config/etc/shadow create mode 100644 tests/newusers/35_read_from_stdin/data/group create mode 100644 tests/newusers/35_read_from_stdin/data/gshadow create mode 100644 tests/newusers/35_read_from_stdin/data/newusers.list create mode 100644 tests/newusers/35_read_from_stdin/data/passwd create mode 100644 tests/newusers/35_read_from_stdin/data/shadow create mode 100755 tests/newusers/35_read_from_stdin/newusers.test create mode 100644 tests/newusers/36_create_user_encrypted/config.txt create mode 100644 tests/newusers/36_create_user_encrypted/config/etc/group create mode 100644 tests/newusers/36_create_user_encrypted/config/etc/gshadow create mode 100644 tests/newusers/36_create_user_encrypted/config/etc/passwd create mode 100644 tests/newusers/36_create_user_encrypted/config/etc/shadow create mode 100644 tests/newusers/36_create_user_encrypted/data/group create mode 100644 tests/newusers/36_create_user_encrypted/data/gshadow create mode 100644 tests/newusers/36_create_user_encrypted/data/newusers.list create mode 100644 tests/newusers/36_create_user_encrypted/data/passwd create mode 100644 tests/newusers/36_create_user_encrypted/data/shadow create mode 100755 tests/newusers/36_create_user_encrypted/newusers.test create mode 100644 tests/newusers/37_create_user_encrypt_MD5-PAM/config.txt create mode 100644 tests/newusers/37_create_user_encrypt_MD5-PAM/config/etc/group create mode 100644 tests/newusers/37_create_user_encrypt_MD5-PAM/config/etc/gshadow create mode 100644 tests/newusers/37_create_user_encrypt_MD5-PAM/config/etc/pam.d/common-password create mode 100644 tests/newusers/37_create_user_encrypt_MD5-PAM/config/etc/pam.d/newusers create mode 100644 tests/newusers/37_create_user_encrypt_MD5-PAM/config/etc/passwd create mode 100644 tests/newusers/37_create_user_encrypt_MD5-PAM/config/etc/shadow create mode 100644 tests/newusers/37_create_user_encrypt_MD5-PAM/data/group create mode 100644 tests/newusers/37_create_user_encrypt_MD5-PAM/data/gshadow create mode 100644 tests/newusers/37_create_user_encrypt_MD5-PAM/data/newusers.list create mode 100644 tests/newusers/37_create_user_encrypt_MD5-PAM/data/passwd create mode 100644 tests/newusers/37_create_user_encrypt_MD5-PAM/data/shadow create mode 100755 tests/newusers/37_create_user_encrypt_MD5-PAM/newusers.test create mode 100644 tests/newusers/37_create_user_encrypt_MD5/config.txt create mode 100644 tests/newusers/37_create_user_encrypt_MD5/config/etc/group create mode 100644 tests/newusers/37_create_user_encrypt_MD5/config/etc/gshadow create mode 100644 tests/newusers/37_create_user_encrypt_MD5/config/etc/passwd create mode 100644 tests/newusers/37_create_user_encrypt_MD5/config/etc/shadow create mode 100644 tests/newusers/37_create_user_encrypt_MD5/data/group create mode 100644 tests/newusers/37_create_user_encrypt_MD5/data/gshadow create mode 100644 tests/newusers/37_create_user_encrypt_MD5/data/newusers.list create mode 100644 tests/newusers/37_create_user_encrypt_MD5/data/passwd create mode 100644 tests/newusers/37_create_user_encrypt_MD5/data/shadow create mode 100755 tests/newusers/37_create_user_encrypt_MD5/newusers.test create mode 100644 tests/newusers/38_update_password_no_shadow_encrypted/config.txt create mode 100644 tests/newusers/38_update_password_no_shadow_encrypted/config/etc/group create mode 100644 tests/newusers/38_update_password_no_shadow_encrypted/config/etc/gshadow create mode 100644 tests/newusers/38_update_password_no_shadow_encrypted/config/etc/passwd create mode 100644 tests/newusers/38_update_password_no_shadow_encrypted/config/etc/shadow create mode 100644 tests/newusers/38_update_password_no_shadow_encrypted/data/newusers.list create mode 100644 tests/newusers/38_update_password_no_shadow_encrypted/data/passwd create mode 100755 tests/newusers/38_update_password_no_shadow_encrypted/newusers.test create mode 100644 tests/newusers/39_update_password_no_shadow_password_encrypted/config.txt create mode 100644 tests/newusers/39_update_password_no_shadow_password_encrypted/config/etc/group create mode 100644 tests/newusers/39_update_password_no_shadow_password_encrypted/config/etc/gshadow create mode 100644 tests/newusers/39_update_password_no_shadow_password_encrypted/config/etc/passwd create mode 100644 tests/newusers/39_update_password_no_shadow_password_encrypted/config/etc/shadow create mode 100644 tests/newusers/39_update_password_no_shadow_password_encrypted/data/newusers.list create mode 100644 tests/newusers/39_update_password_no_shadow_password_encrypted/data/passwd create mode 100755 tests/newusers/39_update_password_no_shadow_password_encrypted/newusers.test create mode 100644 tests/newusers/40_update_password_encrypted/config.txt create mode 100644 tests/newusers/40_update_password_encrypted/config/etc/group create mode 100644 tests/newusers/40_update_password_encrypted/config/etc/gshadow create mode 100644 tests/newusers/40_update_password_encrypted/config/etc/passwd create mode 100644 tests/newusers/40_update_password_encrypted/config/etc/shadow create mode 100644 tests/newusers/40_update_password_encrypted/data/newusers.list create mode 100644 tests/newusers/40_update_password_encrypted/data/shadow create mode 100755 tests/newusers/40_update_password_encrypted/newusers.test create mode 100644 tests/newusers/41_create_user_encrypt_SHA256-PAM/config.txt create mode 100644 tests/newusers/41_create_user_encrypt_SHA256-PAM/config/etc/group create mode 100644 tests/newusers/41_create_user_encrypt_SHA256-PAM/config/etc/gshadow create mode 100644 tests/newusers/41_create_user_encrypt_SHA256-PAM/config/etc/pam.d/common-password create mode 100644 tests/newusers/41_create_user_encrypt_SHA256-PAM/config/etc/pam.d/newusers create mode 100644 tests/newusers/41_create_user_encrypt_SHA256-PAM/config/etc/passwd create mode 100644 tests/newusers/41_create_user_encrypt_SHA256-PAM/config/etc/shadow create mode 100644 tests/newusers/41_create_user_encrypt_SHA256-PAM/data/group create mode 100644 tests/newusers/41_create_user_encrypt_SHA256-PAM/data/gshadow create mode 100644 tests/newusers/41_create_user_encrypt_SHA256-PAM/data/newusers.list create mode 100644 tests/newusers/41_create_user_encrypt_SHA256-PAM/data/passwd create mode 100644 tests/newusers/41_create_user_encrypt_SHA256-PAM/data/shadow create mode 100755 tests/newusers/41_create_user_encrypt_SHA256-PAM/newusers.test create mode 100644 tests/newusers/41_create_user_encrypt_SHA256/config.txt create mode 100644 tests/newusers/41_create_user_encrypt_SHA256/config/etc/group create mode 100644 tests/newusers/41_create_user_encrypt_SHA256/config/etc/gshadow create mode 100644 tests/newusers/41_create_user_encrypt_SHA256/config/etc/passwd create mode 100644 tests/newusers/41_create_user_encrypt_SHA256/config/etc/shadow create mode 100644 tests/newusers/41_create_user_encrypt_SHA256/data/group create mode 100644 tests/newusers/41_create_user_encrypt_SHA256/data/gshadow create mode 100644 tests/newusers/41_create_user_encrypt_SHA256/data/newusers.list create mode 100644 tests/newusers/41_create_user_encrypt_SHA256/data/passwd create mode 100644 tests/newusers/41_create_user_encrypt_SHA256/data/shadow create mode 100755 tests/newusers/41_create_user_encrypt_SHA256/newusers.test create mode 100644 tests/newusers/42_create_user_encrypt_SHA512-PAM/config.txt create mode 100644 tests/newusers/42_create_user_encrypt_SHA512-PAM/config/etc/group create mode 100644 tests/newusers/42_create_user_encrypt_SHA512-PAM/config/etc/gshadow create mode 100644 tests/newusers/42_create_user_encrypt_SHA512-PAM/config/etc/pam.d/common-password create mode 100644 tests/newusers/42_create_user_encrypt_SHA512-PAM/config/etc/pam.d/newusers create mode 100644 tests/newusers/42_create_user_encrypt_SHA512-PAM/config/etc/passwd create mode 100644 tests/newusers/42_create_user_encrypt_SHA512-PAM/config/etc/shadow create mode 100644 tests/newusers/42_create_user_encrypt_SHA512-PAM/data/group create mode 100644 tests/newusers/42_create_user_encrypt_SHA512-PAM/data/gshadow create mode 100644 tests/newusers/42_create_user_encrypt_SHA512-PAM/data/newusers.list create mode 100644 tests/newusers/42_create_user_encrypt_SHA512-PAM/data/passwd create mode 100644 tests/newusers/42_create_user_encrypt_SHA512-PAM/data/shadow create mode 100755 tests/newusers/42_create_user_encrypt_SHA512-PAM/newusers.test create mode 100644 tests/newusers/42_create_user_encrypt_SHA512/config.txt create mode 100644 tests/newusers/42_create_user_encrypt_SHA512/config/etc/group create mode 100644 tests/newusers/42_create_user_encrypt_SHA512/config/etc/gshadow create mode 100644 tests/newusers/42_create_user_encrypt_SHA512/config/etc/passwd create mode 100644 tests/newusers/42_create_user_encrypt_SHA512/config/etc/shadow create mode 100644 tests/newusers/42_create_user_encrypt_SHA512/data/group create mode 100644 tests/newusers/42_create_user_encrypt_SHA512/data/gshadow create mode 100644 tests/newusers/42_create_user_encrypt_SHA512/data/newusers.list create mode 100644 tests/newusers/42_create_user_encrypt_SHA512/data/passwd create mode 100644 tests/newusers/42_create_user_encrypt_SHA512/data/shadow create mode 100755 tests/newusers/42_create_user_encrypt_SHA512/newusers.test create mode 100644 tests/newusers/43_create_user_encrypt_SHA256_rounds_3000-PAM/config.txt create mode 100644 tests/newusers/43_create_user_encrypt_SHA256_rounds_3000-PAM/config/etc/group create mode 100644 tests/newusers/43_create_user_encrypt_SHA256_rounds_3000-PAM/config/etc/gshadow create mode 100644 tests/newusers/43_create_user_encrypt_SHA256_rounds_3000-PAM/config/etc/pam.d/common-password create mode 100644 tests/newusers/43_create_user_encrypt_SHA256_rounds_3000-PAM/config/etc/pam.d/newusers create mode 100644 tests/newusers/43_create_user_encrypt_SHA256_rounds_3000-PAM/config/etc/passwd create mode 100644 tests/newusers/43_create_user_encrypt_SHA256_rounds_3000-PAM/config/etc/shadow create mode 100644 tests/newusers/43_create_user_encrypt_SHA256_rounds_3000-PAM/data/group create mode 100644 tests/newusers/43_create_user_encrypt_SHA256_rounds_3000-PAM/data/gshadow create mode 100644 tests/newusers/43_create_user_encrypt_SHA256_rounds_3000-PAM/data/newusers.list create mode 100644 tests/newusers/43_create_user_encrypt_SHA256_rounds_3000-PAM/data/passwd create mode 100644 tests/newusers/43_create_user_encrypt_SHA256_rounds_3000-PAM/data/shadow create mode 100755 tests/newusers/43_create_user_encrypt_SHA256_rounds_3000-PAM/newusers.test create mode 100644 tests/newusers/43_create_user_encrypt_SHA256_rounds_3000/config.txt create mode 100644 tests/newusers/43_create_user_encrypt_SHA256_rounds_3000/config/etc/group create mode 100644 tests/newusers/43_create_user_encrypt_SHA256_rounds_3000/config/etc/gshadow create mode 100644 tests/newusers/43_create_user_encrypt_SHA256_rounds_3000/config/etc/passwd create mode 100644 tests/newusers/43_create_user_encrypt_SHA256_rounds_3000/config/etc/shadow create mode 100644 tests/newusers/43_create_user_encrypt_SHA256_rounds_3000/data/group create mode 100644 tests/newusers/43_create_user_encrypt_SHA256_rounds_3000/data/gshadow create mode 100644 tests/newusers/43_create_user_encrypt_SHA256_rounds_3000/data/newusers.list create mode 100644 tests/newusers/43_create_user_encrypt_SHA256_rounds_3000/data/passwd create mode 100644 tests/newusers/43_create_user_encrypt_SHA256_rounds_3000/data/shadow create mode 100755 tests/newusers/43_create_user_encrypt_SHA256_rounds_3000/newusers.test create mode 100644 tests/newusers/44_create_user_encrypt_SHA256_rounds_300-PAM/config.txt create mode 100644 tests/newusers/44_create_user_encrypt_SHA256_rounds_300-PAM/config/etc/group create mode 100644 tests/newusers/44_create_user_encrypt_SHA256_rounds_300-PAM/config/etc/gshadow create mode 100644 tests/newusers/44_create_user_encrypt_SHA256_rounds_300-PAM/config/etc/pam.d/common-password create mode 100644 tests/newusers/44_create_user_encrypt_SHA256_rounds_300-PAM/config/etc/pam.d/newusers create mode 100644 tests/newusers/44_create_user_encrypt_SHA256_rounds_300-PAM/config/etc/passwd create mode 100644 tests/newusers/44_create_user_encrypt_SHA256_rounds_300-PAM/config/etc/shadow create mode 100644 tests/newusers/44_create_user_encrypt_SHA256_rounds_300-PAM/data/group create mode 100644 tests/newusers/44_create_user_encrypt_SHA256_rounds_300-PAM/data/gshadow create mode 100644 tests/newusers/44_create_user_encrypt_SHA256_rounds_300-PAM/data/newusers.list create mode 100644 tests/newusers/44_create_user_encrypt_SHA256_rounds_300-PAM/data/passwd create mode 100644 tests/newusers/44_create_user_encrypt_SHA256_rounds_300-PAM/data/shadow create mode 100755 tests/newusers/44_create_user_encrypt_SHA256_rounds_300-PAM/newusers.test create mode 100644 tests/newusers/44_create_user_encrypt_SHA256_rounds_300/config.txt create mode 100644 tests/newusers/44_create_user_encrypt_SHA256_rounds_300/config/etc/group create mode 100644 tests/newusers/44_create_user_encrypt_SHA256_rounds_300/config/etc/gshadow create mode 100644 tests/newusers/44_create_user_encrypt_SHA256_rounds_300/config/etc/passwd create mode 100644 tests/newusers/44_create_user_encrypt_SHA256_rounds_300/config/etc/shadow create mode 100644 tests/newusers/44_create_user_encrypt_SHA256_rounds_300/data/group create mode 100644 tests/newusers/44_create_user_encrypt_SHA256_rounds_300/data/gshadow create mode 100644 tests/newusers/44_create_user_encrypt_SHA256_rounds_300/data/newusers.list create mode 100644 tests/newusers/44_create_user_encrypt_SHA256_rounds_300/data/passwd create mode 100644 tests/newusers/44_create_user_encrypt_SHA256_rounds_300/data/shadow create mode 100755 tests/newusers/44_create_user_encrypt_SHA256_rounds_300/newusers.test create mode 100644 tests/newusers/45_create_user_encrypt_rounds_3000/config.txt create mode 100644 tests/newusers/45_create_user_encrypt_rounds_3000/config/etc/group create mode 100644 tests/newusers/45_create_user_encrypt_rounds_3000/config/etc/gshadow create mode 100644 tests/newusers/45_create_user_encrypt_rounds_3000/config/etc/passwd create mode 100644 tests/newusers/45_create_user_encrypt_rounds_3000/config/etc/shadow create mode 100644 tests/newusers/45_create_user_encrypt_rounds_3000/data/newusers.err create mode 100644 tests/newusers/45_create_user_encrypt_rounds_3000/data/newusers.list create mode 100755 tests/newusers/45_create_user_encrypt_rounds_3000/newusers.test create mode 100644 tests/newusers/46_create_user_encrypt_MD5_ignore_rounds_3000/config.txt create mode 100644 tests/newusers/46_create_user_encrypt_MD5_ignore_rounds_3000/config/etc/group create mode 100644 tests/newusers/46_create_user_encrypt_MD5_ignore_rounds_3000/config/etc/gshadow create mode 100644 tests/newusers/46_create_user_encrypt_MD5_ignore_rounds_3000/config/etc/passwd create mode 100644 tests/newusers/46_create_user_encrypt_MD5_ignore_rounds_3000/config/etc/shadow create mode 100644 tests/newusers/46_create_user_encrypt_MD5_ignore_rounds_3000/data/group create mode 100644 tests/newusers/46_create_user_encrypt_MD5_ignore_rounds_3000/data/gshadow create mode 100644 tests/newusers/46_create_user_encrypt_MD5_ignore_rounds_3000/data/newusers.list create mode 100644 tests/newusers/46_create_user_encrypt_MD5_ignore_rounds_3000/data/passwd create mode 100644 tests/newusers/46_create_user_encrypt_MD5_ignore_rounds_3000/data/shadow create mode 100755 tests/newusers/46_create_user_encrypt_MD5_ignore_rounds_3000/newusers.test create mode 100644 tests/newusers/47_create_user_error_UID_4294967295/config.txt create mode 100644 tests/newusers/47_create_user_error_UID_4294967295/config/etc/group create mode 100644 tests/newusers/47_create_user_error_UID_4294967295/config/etc/gshadow create mode 100644 tests/newusers/47_create_user_error_UID_4294967295/config/etc/passwd create mode 100644 tests/newusers/47_create_user_error_UID_4294967295/config/etc/shadow create mode 100644 tests/newusers/47_create_user_error_UID_4294967295/data/newusers.err create mode 100644 tests/newusers/47_create_user_error_UID_4294967295/data/newusers.list create mode 100755 tests/newusers/47_create_user_error_UID_4294967295/newusers.test create mode 100644 tests/newusers/48_create_user_error_GID_4294967295/config.txt create mode 100644 tests/newusers/48_create_user_error_GID_4294967295/config/etc/group create mode 100644 tests/newusers/48_create_user_error_GID_4294967295/config/etc/gshadow create mode 100644 tests/newusers/48_create_user_error_GID_4294967295/config/etc/passwd create mode 100644 tests/newusers/48_create_user_error_GID_4294967295/config/etc/shadow create mode 100644 tests/newusers/48_create_user_error_GID_4294967295/data/newusers.err create mode 100644 tests/newusers/48_create_user_error_GID_4294967295/data/newusers.list create mode 100755 tests/newusers/48_create_user_error_GID_4294967295/newusers.test create mode 100644 tests/newusers/49_multiple_system_users/config.txt create mode 100644 tests/newusers/49_multiple_system_users/config/etc/group create mode 100644 tests/newusers/49_multiple_system_users/config/etc/gshadow create mode 100644 tests/newusers/49_multiple_system_users/config/etc/pam.d/common-password create mode 100644 tests/newusers/49_multiple_system_users/config/etc/pam.d/newusers create mode 100644 tests/newusers/49_multiple_system_users/config/etc/passwd create mode 100644 tests/newusers/49_multiple_system_users/config/etc/shadow create mode 100644 tests/newusers/49_multiple_system_users/data/group create mode 100644 tests/newusers/49_multiple_system_users/data/gshadow create mode 100644 tests/newusers/49_multiple_system_users/data/newusers.list create mode 100644 tests/newusers/49_multiple_system_users/data/passwd create mode 100644 tests/newusers/49_multiple_system_users/data/shadow create mode 100755 tests/newusers/49_multiple_system_users/newusers.test create mode 100644 tests/newusers/50_usage/config.txt create mode 100644 tests/newusers/50_usage/config/etc/group create mode 100644 tests/newusers/50_usage/config/etc/gshadow create mode 100644 tests/newusers/50_usage/config/etc/passwd create mode 100644 tests/newusers/50_usage/config/etc/shadow create mode 100644 tests/newusers/50_usage/data/usage.out create mode 100755 tests/newusers/50_usage/newusers.test create mode 100644 tests/newusers/51_usage_invalid_option/config.txt create mode 100644 tests/newusers/51_usage_invalid_option/config/etc/group create mode 100644 tests/newusers/51_usage_invalid_option/config/etc/gshadow create mode 100644 tests/newusers/51_usage_invalid_option/config/etc/passwd create mode 100644 tests/newusers/51_usage_invalid_option/config/etc/shadow create mode 100644 tests/newusers/51_usage_invalid_option/data/usage.out create mode 100755 tests/newusers/51_usage_invalid_option/newusers.test create mode 100644 tests/newusers/52_usage_2_input_files/config.txt create mode 100644 tests/newusers/52_usage_2_input_files/config/etc/group create mode 100644 tests/newusers/52_usage_2_input_files/config/etc/gshadow create mode 100644 tests/newusers/52_usage_2_input_files/config/etc/passwd create mode 100644 tests/newusers/52_usage_2_input_files/config/etc/shadow create mode 100644 tests/newusers/52_usage_2_input_files/data/usage.out create mode 100755 tests/newusers/52_usage_2_input_files/newusers.test create mode 100644 tests/newusers/53_locked_passwd/config.txt create mode 100644 tests/newusers/53_locked_passwd/config/etc/group create mode 100644 tests/newusers/53_locked_passwd/config/etc/gshadow create mode 100644 tests/newusers/53_locked_passwd/config/etc/passwd create mode 100644 tests/newusers/53_locked_passwd/config/etc/shadow create mode 100644 tests/newusers/53_locked_passwd/data/newusers.list create mode 100644 tests/newusers/53_locked_passwd/data/usage.out create mode 100755 tests/newusers/53_locked_passwd/newusers.test create mode 100644 tests/newusers/54_locked_shadow/config.txt create mode 100644 tests/newusers/54_locked_shadow/config/etc/group create mode 100644 tests/newusers/54_locked_shadow/config/etc/gshadow create mode 100644 tests/newusers/54_locked_shadow/config/etc/passwd create mode 100644 tests/newusers/54_locked_shadow/config/etc/shadow create mode 100644 tests/newusers/54_locked_shadow/data/newusers.list create mode 100644 tests/newusers/54_locked_shadow/data/usage.out create mode 100755 tests/newusers/54_locked_shadow/newusers.test create mode 100644 tests/newusers/55_locked_group/config.txt create mode 100644 tests/newusers/55_locked_group/config/etc/group create mode 100644 tests/newusers/55_locked_group/config/etc/gshadow create mode 100644 tests/newusers/55_locked_group/config/etc/passwd create mode 100644 tests/newusers/55_locked_group/config/etc/shadow create mode 100644 tests/newusers/55_locked_group/data/newusers.list create mode 100644 tests/newusers/55_locked_group/data/usage.out create mode 100755 tests/newusers/55_locked_group/newusers.test create mode 100644 tests/newusers/56_locked_gshadow/config.txt create mode 100644 tests/newusers/56_locked_gshadow/config/etc/group create mode 100644 tests/newusers/56_locked_gshadow/config/etc/gshadow create mode 100644 tests/newusers/56_locked_gshadow/config/etc/passwd create mode 100644 tests/newusers/56_locked_gshadow/config/etc/shadow create mode 100644 tests/newusers/56_locked_gshadow/data/newusers.list create mode 100644 tests/newusers/56_locked_gshadow/data/usage.out create mode 100755 tests/newusers/56_locked_gshadow/newusers.test create mode 100644 tests/newusers/57_missing_input_file/config.txt create mode 100644 tests/newusers/57_missing_input_file/config/etc/group create mode 100644 tests/newusers/57_missing_input_file/config/etc/gshadow create mode 100644 tests/newusers/57_missing_input_file/config/etc/passwd create mode 100644 tests/newusers/57_missing_input_file/config/etc/shadow create mode 100644 tests/newusers/57_missing_input_file/data/usage.out create mode 100755 tests/newusers/57_missing_input_file/newusers.test create mode 100644 tests/newusers/58_invalid_input_file/config.txt create mode 100644 tests/newusers/58_invalid_input_file/config/etc/group create mode 100644 tests/newusers/58_invalid_input_file/config/etc/gshadow create mode 100644 tests/newusers/58_invalid_input_file/config/etc/passwd create mode 100644 tests/newusers/58_invalid_input_file/config/etc/shadow create mode 100644 tests/newusers/58_invalid_input_file/data/newusers.err create mode 100644 tests/newusers/58_invalid_input_file/data/newusers.list create mode 100755 tests/newusers/58_invalid_input_file/newusers.test create mode 100644 tests/newusers/59_no_gshadow_file/config.txt create mode 100644 tests/newusers/59_no_gshadow_file/config/etc/group create mode 100644 tests/newusers/59_no_gshadow_file/config/etc/gshadow create mode 100644 tests/newusers/59_no_gshadow_file/config/etc/pam.d/common-password create mode 100644 tests/newusers/59_no_gshadow_file/config/etc/pam.d/newusers create mode 100644 tests/newusers/59_no_gshadow_file/config/etc/passwd create mode 100644 tests/newusers/59_no_gshadow_file/config/etc/shadow create mode 100644 tests/newusers/59_no_gshadow_file/data/group create mode 100644 tests/newusers/59_no_gshadow_file/data/newusers.list create mode 100644 tests/newusers/59_no_gshadow_file/data/passwd create mode 100644 tests/newusers/59_no_gshadow_file/data/shadow create mode 100755 tests/newusers/59_no_gshadow_file/newusers.test create mode 100644 tests/newusers/60_update_no_gecos/config.txt create mode 100644 tests/newusers/60_update_no_gecos/config/etc/group create mode 100644 tests/newusers/60_update_no_gecos/config/etc/gshadow create mode 100644 tests/newusers/60_update_no_gecos/config/etc/pam.d/common-password create mode 100644 tests/newusers/60_update_no_gecos/config/etc/pam.d/newusers create mode 100644 tests/newusers/60_update_no_gecos/config/etc/passwd create mode 100644 tests/newusers/60_update_no_gecos/config/etc/shadow create mode 100644 tests/newusers/60_update_no_gecos/data/newusers.list create mode 100644 tests/newusers/60_update_no_gecos/data/passwd create mode 100644 tests/newusers/60_update_no_gecos/data/shadow create mode 100755 tests/newusers/60_update_no_gecos/newusers.test create mode 100644 tests/newusers/61_update_no_shell/config.txt create mode 100644 tests/newusers/61_update_no_shell/config/etc/group create mode 100644 tests/newusers/61_update_no_shell/config/etc/gshadow create mode 100644 tests/newusers/61_update_no_shell/config/etc/pam.d/common-password create mode 100644 tests/newusers/61_update_no_shell/config/etc/pam.d/newusers create mode 100644 tests/newusers/61_update_no_shell/config/etc/passwd create mode 100644 tests/newusers/61_update_no_shell/config/etc/shadow create mode 100644 tests/newusers/61_update_no_shell/data/newusers.list create mode 100644 tests/newusers/61_update_no_shell/data/passwd create mode 100644 tests/newusers/61_update_no_shell/data/shadow create mode 100755 tests/newusers/61_update_no_shell/newusers.test create mode 100644 tests/passwd/01_passwd_-S_root_locked_account/config/etc/group create mode 100644 tests/passwd/01_passwd_-S_root_locked_account/config/etc/gshadow create mode 100644 tests/passwd/01_passwd_-S_root_locked_account/config/etc/passwd create mode 100644 tests/passwd/01_passwd_-S_root_locked_account/config/etc/shadow create mode 100644 tests/passwd/01_passwd_-S_root_locked_account/data/passwd.out create mode 100755 tests/passwd/01_passwd_-S_root_locked_account/passwd.test create mode 100644 tests/passwd/02_passwd_-S_root_valid_account/config/etc/group create mode 100644 tests/passwd/02_passwd_-S_root_valid_account/config/etc/gshadow create mode 100644 tests/passwd/02_passwd_-S_root_valid_account/config/etc/passwd create mode 100644 tests/passwd/02_passwd_-S_root_valid_account/config/etc/shadow create mode 100644 tests/passwd/02_passwd_-S_root_valid_account/data/passwd.out create mode 100755 tests/passwd/02_passwd_-S_root_valid_account/passwd.test create mode 100644 tests/passwd/03_passwd_-S_root_empty_password/config/etc/group create mode 100644 tests/passwd/03_passwd_-S_root_empty_password/config/etc/gshadow create mode 100644 tests/passwd/03_passwd_-S_root_empty_password/config/etc/passwd create mode 100644 tests/passwd/03_passwd_-S_root_empty_password/config/etc/shadow create mode 100644 tests/passwd/03_passwd_-S_root_empty_password/data/passwd.out create mode 100755 tests/passwd/03_passwd_-S_root_empty_password/passwd.test create mode 100644 tests/passwd/04_passwd_-S_root_valid_account_no_shadow_file/config/etc/group create mode 100644 tests/passwd/04_passwd_-S_root_valid_account_no_shadow_file/config/etc/gshadow create mode 100644 tests/passwd/04_passwd_-S_root_valid_account_no_shadow_file/config/etc/passwd create mode 100644 tests/passwd/04_passwd_-S_root_valid_account_no_shadow_file/config/etc/shadow create mode 100644 tests/passwd/04_passwd_-S_root_valid_account_no_shadow_file/data/passwd.out create mode 100755 tests/passwd/04_passwd_-S_root_valid_account_no_shadow_file/passwd.test create mode 100644 tests/passwd/05_passwd_-S_root_valid_account_no_shadow_entry/config/etc/group create mode 100644 tests/passwd/05_passwd_-S_root_valid_account_no_shadow_entry/config/etc/gshadow create mode 100644 tests/passwd/05_passwd_-S_root_valid_account_no_shadow_entry/config/etc/passwd create mode 100644 tests/passwd/05_passwd_-S_root_valid_account_no_shadow_entry/config/etc/shadow create mode 100644 tests/passwd/05_passwd_-S_root_valid_account_no_shadow_entry/data/passwd.out create mode 100755 tests/passwd/05_passwd_-S_root_valid_account_no_shadow_entry/passwd.test create mode 100644 tests/passwd/06_passwd_-l_root_lock_account/config/etc/group create mode 100644 tests/passwd/06_passwd_-l_root_lock_account/config/etc/gshadow create mode 100644 tests/passwd/06_passwd_-l_root_lock_account/config/etc/passwd create mode 100644 tests/passwd/06_passwd_-l_root_lock_account/config/etc/shadow create mode 100644 tests/passwd/06_passwd_-l_root_lock_account/data/passwd.out create mode 100644 tests/passwd/06_passwd_-l_root_lock_account/data/shadow create mode 100755 tests/passwd/06_passwd_-l_root_lock_account/passwd.test create mode 100644 tests/passwd/07_passwd_-l_root_lock_account_no_shadow_entry/config/etc/group create mode 100644 tests/passwd/07_passwd_-l_root_lock_account_no_shadow_entry/config/etc/gshadow create mode 100644 tests/passwd/07_passwd_-l_root_lock_account_no_shadow_entry/config/etc/passwd create mode 100644 tests/passwd/07_passwd_-l_root_lock_account_no_shadow_entry/config/etc/shadow create mode 100644 tests/passwd/07_passwd_-l_root_lock_account_no_shadow_entry/data/passwd create mode 100644 tests/passwd/07_passwd_-l_root_lock_account_no_shadow_entry/data/passwd.out create mode 100755 tests/passwd/07_passwd_-l_root_lock_account_no_shadow_entry/passwd.test create mode 100644 tests/passwd/08_passwd_-u_root_unlock_account/config/etc/group create mode 100644 tests/passwd/08_passwd_-u_root_unlock_account/config/etc/gshadow create mode 100644 tests/passwd/08_passwd_-u_root_unlock_account/config/etc/passwd create mode 100644 tests/passwd/08_passwd_-u_root_unlock_account/config/etc/shadow create mode 100644 tests/passwd/08_passwd_-u_root_unlock_account/data/passwd.out create mode 100644 tests/passwd/08_passwd_-u_root_unlock_account/data/shadow create mode 100755 tests/passwd/08_passwd_-u_root_unlock_account/passwd.test create mode 100644 tests/passwd/09_passwd_-u_root_unlock_to_empty/config/etc/group create mode 100644 tests/passwd/09_passwd_-u_root_unlock_to_empty/config/etc/gshadow create mode 100644 tests/passwd/09_passwd_-u_root_unlock_to_empty/config/etc/passwd create mode 100644 tests/passwd/09_passwd_-u_root_unlock_to_empty/config/etc/shadow create mode 100644 tests/passwd/09_passwd_-u_root_unlock_to_empty/data/passwd.err create mode 100755 tests/passwd/09_passwd_-u_root_unlock_to_empty/passwd.test create mode 100644 tests/passwd/10_passwd_-d_root/config/etc/group create mode 100644 tests/passwd/10_passwd_-d_root/config/etc/gshadow create mode 100644 tests/passwd/10_passwd_-d_root/config/etc/passwd create mode 100644 tests/passwd/10_passwd_-d_root/config/etc/shadow create mode 100644 tests/passwd/10_passwd_-d_root/data/passwd.out create mode 100644 tests/passwd/10_passwd_-d_root/data/shadow create mode 100755 tests/passwd/10_passwd_-d_root/passwd.test create mode 100644 tests/passwd/11_passwd_--mindays_root/config/etc/group create mode 100644 tests/passwd/11_passwd_--mindays_root/config/etc/gshadow create mode 100644 tests/passwd/11_passwd_--mindays_root/config/etc/passwd create mode 100644 tests/passwd/11_passwd_--mindays_root/config/etc/shadow create mode 100644 tests/passwd/11_passwd_--mindays_root/data/passwd.out create mode 100644 tests/passwd/11_passwd_--mindays_root/data/shadow create mode 100755 tests/passwd/11_passwd_--mindays_root/passwd.test create mode 100644 tests/passwd/12_passwd_--maxdays_root/config/etc/group create mode 100644 tests/passwd/12_passwd_--maxdays_root/config/etc/gshadow create mode 100644 tests/passwd/12_passwd_--maxdays_root/config/etc/passwd create mode 100644 tests/passwd/12_passwd_--maxdays_root/config/etc/shadow create mode 100644 tests/passwd/12_passwd_--maxdays_root/data/passwd.out create mode 100644 tests/passwd/12_passwd_--maxdays_root/data/shadow create mode 100755 tests/passwd/12_passwd_--maxdays_root/passwd.test create mode 100644 tests/passwd/13_passwd_--warndays_root/config/etc/group create mode 100644 tests/passwd/13_passwd_--warndays_root/config/etc/gshadow create mode 100644 tests/passwd/13_passwd_--warndays_root/config/etc/passwd create mode 100644 tests/passwd/13_passwd_--warndays_root/config/etc/shadow create mode 100644 tests/passwd/13_passwd_--warndays_root/data/passwd.out create mode 100644 tests/passwd/13_passwd_--warndays_root/data/shadow create mode 100755 tests/passwd/13_passwd_--warndays_root/passwd.test create mode 100644 tests/passwd/14_passwd_--inactive_root/config/etc/group create mode 100644 tests/passwd/14_passwd_--inactive_root/config/etc/gshadow create mode 100644 tests/passwd/14_passwd_--inactive_root/config/etc/passwd create mode 100644 tests/passwd/14_passwd_--inactive_root/config/etc/shadow create mode 100644 tests/passwd/14_passwd_--inactive_root/data/passwd.out create mode 100644 tests/passwd/14_passwd_--inactive_root/data/shadow create mode 100755 tests/passwd/14_passwd_--inactive_root/passwd.test create mode 100644 tests/passwd/15_passwd_--expire_root/config/etc/group create mode 100644 tests/passwd/15_passwd_--expire_root/config/etc/gshadow create mode 100644 tests/passwd/15_passwd_--expire_root/config/etc/passwd create mode 100644 tests/passwd/15_passwd_--expire_root/config/etc/shadow create mode 100644 tests/passwd/15_passwd_--expire_root/data/passwd.out create mode 100644 tests/passwd/15_passwd_--expire_root/data/shadow create mode 100755 tests/passwd/15_passwd_--expire_root/passwd.test create mode 100644 tests/passwd/16_passwd_-S-a_root/config/etc/group create mode 100644 tests/passwd/16_passwd_-S-a_root/config/etc/gshadow create mode 100644 tests/passwd/16_passwd_-S-a_root/config/etc/passwd create mode 100644 tests/passwd/16_passwd_-S-a_root/config/etc/shadow create mode 100644 tests/passwd/16_passwd_-S-a_root/data/passwd.out create mode 100755 tests/passwd/16_passwd_-S-a_root/passwd.test create mode 100644 tests/passwd/17_passwd_root_change_password/config/etc/group create mode 100644 tests/passwd/17_passwd_root_change_password/config/etc/gshadow create mode 100644 tests/passwd/17_passwd_root_change_password/config/etc/pam.d/common-password create mode 100644 tests/passwd/17_passwd_root_change_password/config/etc/passwd create mode 100644 tests/passwd/17_passwd_root_change_password/config/etc/shadow create mode 100644 tests/passwd/17_passwd_root_change_password/data/shadow create mode 100755 tests/passwd/17_passwd_root_change_password/passwd.exp create mode 100755 tests/passwd/17_passwd_root_change_password/passwd.test create mode 100644 tests/passwd/18_passwd_root_change_password_user/config/etc/group create mode 100644 tests/passwd/18_passwd_root_change_password_user/config/etc/gshadow create mode 100644 tests/passwd/18_passwd_root_change_password_user/config/etc/pam.d/common-password create mode 100644 tests/passwd/18_passwd_root_change_password_user/config/etc/passwd create mode 100644 tests/passwd/18_passwd_root_change_password_user/config/etc/shadow create mode 100644 tests/passwd/18_passwd_root_change_password_user/data/shadow create mode 100755 tests/passwd/18_passwd_root_change_password_user/passwd.exp create mode 100755 tests/passwd/18_passwd_root_change_password_user/passwd.test create mode 100644 tests/passwd/19_passwd_user_change_password/config/etc/group create mode 100644 tests/passwd/19_passwd_user_change_password/config/etc/gshadow create mode 100644 tests/passwd/19_passwd_user_change_password/config/etc/pam.d/common-password create mode 100644 tests/passwd/19_passwd_user_change_password/config/etc/passwd create mode 100644 tests/passwd/19_passwd_user_change_password/config/etc/shadow create mode 100644 tests/passwd/19_passwd_user_change_password/data/shadow create mode 100755 tests/passwd/19_passwd_user_change_password/passwd.exp create mode 100755 tests/passwd/19_passwd_user_change_password/passwd.test create mode 100644 tests/passwd/20_passwd_user_change_password_same_user/config/etc/group create mode 100644 tests/passwd/20_passwd_user_change_password_same_user/config/etc/gshadow create mode 100644 tests/passwd/20_passwd_user_change_password_same_user/config/etc/pam.d/common-password create mode 100644 tests/passwd/20_passwd_user_change_password_same_user/config/etc/passwd create mode 100644 tests/passwd/20_passwd_user_change_password_same_user/config/etc/shadow create mode 100644 tests/passwd/20_passwd_user_change_password_same_user/data/shadow create mode 100755 tests/passwd/20_passwd_user_change_password_same_user/passwd.exp create mode 100755 tests/passwd/20_passwd_user_change_password_same_user/passwd.test create mode 100644 tests/passwd/21_passwd_user_change_password_other_user/config/etc/group create mode 100644 tests/passwd/21_passwd_user_change_password_other_user/config/etc/gshadow create mode 100644 tests/passwd/21_passwd_user_change_password_other_user/config/etc/passwd create mode 100644 tests/passwd/21_passwd_user_change_password_other_user/config/etc/shadow create mode 100644 tests/passwd/21_passwd_user_change_password_other_user/data/passwd.err create mode 100755 tests/passwd/21_passwd_user_change_password_other_user/passwd.test create mode 100644 tests/passwd/22_passwd_usage/config.txt create mode 100644 tests/passwd/22_passwd_usage/config/etc/group create mode 100644 tests/passwd/22_passwd_usage/config/etc/gshadow create mode 100644 tests/passwd/22_passwd_usage/config/etc/passwd create mode 100644 tests/passwd/22_passwd_usage/config/etc/shadow create mode 100644 tests/passwd/22_passwd_usage/data/usage.out create mode 100755 tests/passwd/22_passwd_usage/passwd.test create mode 100755 tests/run_all create mode 100644 tests/split_groups/01_useradd_split_group/config.txt create mode 100644 tests/split_groups/01_useradd_split_group/config/etc/default/useradd create mode 100644 tests/split_groups/01_useradd_split_group/config/etc/group create mode 100644 tests/split_groups/01_useradd_split_group/config/etc/gshadow create mode 100644 tests/split_groups/01_useradd_split_group/config/etc/login.defs create mode 100644 tests/split_groups/01_useradd_split_group/config/etc/passwd create mode 100644 tests/split_groups/01_useradd_split_group/config/etc/shadow create mode 100644 tests/split_groups/01_useradd_split_group/data/group create mode 100644 tests/split_groups/01_useradd_split_group/data/gshadow create mode 100644 tests/split_groups/01_useradd_split_group/data/passwd create mode 100644 tests/split_groups/01_useradd_split_group/data/shadow create mode 100755 tests/split_groups/01_useradd_split_group/useradd.test create mode 100644 tests/split_groups/02_useradd_no_split_group/config.txt create mode 100644 tests/split_groups/02_useradd_no_split_group/config/etc/default/useradd create mode 100644 tests/split_groups/02_useradd_no_split_group/config/etc/group create mode 100644 tests/split_groups/02_useradd_no_split_group/config/etc/gshadow create mode 100644 tests/split_groups/02_useradd_no_split_group/config/etc/login.defs create mode 100644 tests/split_groups/02_useradd_no_split_group/config/etc/passwd create mode 100644 tests/split_groups/02_useradd_no_split_group/config/etc/shadow create mode 100644 tests/split_groups/02_useradd_no_split_group/data/group create mode 100644 tests/split_groups/02_useradd_no_split_group/data/gshadow create mode 100644 tests/split_groups/02_useradd_no_split_group/data/passwd create mode 100644 tests/split_groups/02_useradd_no_split_group/data/shadow create mode 100755 tests/split_groups/02_useradd_no_split_group/useradd.test create mode 100644 tests/split_groups/03_useradd_split_group_already_split/config.txt create mode 100644 tests/split_groups/03_useradd_split_group_already_split/config/etc/default/useradd create mode 100644 tests/split_groups/03_useradd_split_group_already_split/config/etc/group create mode 100644 tests/split_groups/03_useradd_split_group_already_split/config/etc/gshadow create mode 100644 tests/split_groups/03_useradd_split_group_already_split/config/etc/login.defs create mode 100644 tests/split_groups/03_useradd_split_group_already_split/config/etc/passwd create mode 100644 tests/split_groups/03_useradd_split_group_already_split/config/etc/shadow create mode 100644 tests/split_groups/03_useradd_split_group_already_split/data/group create mode 100644 tests/split_groups/03_useradd_split_group_already_split/data/gshadow create mode 100644 tests/split_groups/03_useradd_split_group_already_split/data/passwd create mode 100644 tests/split_groups/03_useradd_split_group_already_split/data/shadow create mode 100755 tests/split_groups/03_useradd_split_group_already_split/useradd.test create mode 100644 tests/split_groups/04_useradd_split_group_already_full/config.txt create mode 100644 tests/split_groups/04_useradd_split_group_already_full/config/etc/default/useradd create mode 100644 tests/split_groups/04_useradd_split_group_already_full/config/etc/group create mode 100644 tests/split_groups/04_useradd_split_group_already_full/config/etc/gshadow create mode 100644 tests/split_groups/04_useradd_split_group_already_full/config/etc/login.defs create mode 100644 tests/split_groups/04_useradd_split_group_already_full/config/etc/passwd create mode 100644 tests/split_groups/04_useradd_split_group_already_full/config/etc/shadow create mode 100644 tests/split_groups/04_useradd_split_group_already_full/data/group create mode 100644 tests/split_groups/04_useradd_split_group_already_full/data/gshadow create mode 100644 tests/split_groups/04_useradd_split_group_already_full/data/passwd create mode 100644 tests/split_groups/04_useradd_split_group_already_full/data/shadow create mode 100755 tests/split_groups/04_useradd_split_group_already_full/useradd.test create mode 100644 tests/split_groups/05_useradd_split_group_already_split_passwd_differ/config.txt create mode 100644 tests/split_groups/05_useradd_split_group_already_split_passwd_differ/config/etc/group create mode 100644 tests/split_groups/05_useradd_split_group_already_split_passwd_differ/config/etc/gshadow create mode 100644 tests/split_groups/05_useradd_split_group_already_split_passwd_differ/config/etc/login.defs create mode 100644 tests/split_groups/05_useradd_split_group_already_split_passwd_differ/config/etc/passwd create mode 100644 tests/split_groups/05_useradd_split_group_already_split_passwd_differ/config/etc/shadow create mode 100644 tests/split_groups/05_useradd_split_group_already_split_passwd_differ/data/useradd.err create mode 100755 tests/split_groups/05_useradd_split_group_already_split_passwd_differ/useradd.test create mode 100644 tests/split_groups/06_useradd_split_group_already_split_GID_differ/config.txt create mode 100644 tests/split_groups/06_useradd_split_group_already_split_GID_differ/config/etc/group create mode 100644 tests/split_groups/06_useradd_split_group_already_split_GID_differ/config/etc/gshadow create mode 100644 tests/split_groups/06_useradd_split_group_already_split_GID_differ/config/etc/login.defs create mode 100644 tests/split_groups/06_useradd_split_group_already_split_GID_differ/config/etc/passwd create mode 100644 tests/split_groups/06_useradd_split_group_already_split_GID_differ/config/etc/shadow create mode 100644 tests/split_groups/06_useradd_split_group_already_split_GID_differ/data/useradd.err create mode 100755 tests/split_groups/06_useradd_split_group_already_split_GID_differ/useradd.test create mode 100644 tests/split_groups/07_useradd_split_group_already_split_user_in_both_lines/config.txt create mode 100644 tests/split_groups/07_useradd_split_group_already_split_user_in_both_lines/config/etc/default/useradd create mode 100644 tests/split_groups/07_useradd_split_group_already_split_user_in_both_lines/config/etc/group create mode 100644 tests/split_groups/07_useradd_split_group_already_split_user_in_both_lines/config/etc/gshadow create mode 100644 tests/split_groups/07_useradd_split_group_already_split_user_in_both_lines/config/etc/login.defs create mode 100644 tests/split_groups/07_useradd_split_group_already_split_user_in_both_lines/config/etc/passwd create mode 100644 tests/split_groups/07_useradd_split_group_already_split_user_in_both_lines/config/etc/shadow create mode 100644 tests/split_groups/07_useradd_split_group_already_split_user_in_both_lines/data/group create mode 100644 tests/split_groups/07_useradd_split_group_already_split_user_in_both_lines/data/gshadow create mode 100644 tests/split_groups/07_useradd_split_group_already_split_user_in_both_lines/data/passwd create mode 100644 tests/split_groups/07_useradd_split_group_already_split_user_in_both_lines/data/shadow create mode 100755 tests/split_groups/07_useradd_split_group_already_split_user_in_both_lines/useradd.test create mode 100644 tests/split_groups/08_useradd_no_split_group_already_split/config.txt create mode 100644 tests/split_groups/08_useradd_no_split_group_already_split/config/etc/group create mode 100644 tests/split_groups/08_useradd_no_split_group_already_split/config/etc/gshadow create mode 100644 tests/split_groups/08_useradd_no_split_group_already_split/config/etc/login.defs create mode 100644 tests/split_groups/08_useradd_no_split_group_already_split/config/etc/passwd create mode 100644 tests/split_groups/08_useradd_no_split_group_already_split/config/etc/shadow create mode 100644 tests/split_groups/08_useradd_no_split_group_already_split/data/useradd.err create mode 100755 tests/split_groups/08_useradd_no_split_group_already_split/useradd.test create mode 100644 tests/split_groups/09_groupdel_split_group_already_split/config.txt create mode 100644 tests/split_groups/09_groupdel_split_group_already_split/config/etc/group create mode 100644 tests/split_groups/09_groupdel_split_group_already_split/config/etc/gshadow create mode 100644 tests/split_groups/09_groupdel_split_group_already_split/config/etc/login.defs create mode 100644 tests/split_groups/09_groupdel_split_group_already_split/config/etc/passwd create mode 100644 tests/split_groups/09_groupdel_split_group_already_split/config/etc/shadow create mode 100644 tests/split_groups/09_groupdel_split_group_already_split/data/group create mode 100644 tests/split_groups/09_groupdel_split_group_already_split/data/gshadow create mode 100755 tests/split_groups/09_groupdel_split_group_already_split/groupdel.test create mode 100644 tests/split_groups/10_groupdel_no_split_group_already_split/config.txt create mode 100644 tests/split_groups/10_groupdel_no_split_group_already_split/config/etc/group create mode 100644 tests/split_groups/10_groupdel_no_split_group_already_split/config/etc/gshadow create mode 100644 tests/split_groups/10_groupdel_no_split_group_already_split/config/etc/login.defs create mode 100644 tests/split_groups/10_groupdel_no_split_group_already_split/config/etc/passwd create mode 100644 tests/split_groups/10_groupdel_no_split_group_already_split/config/etc/shadow create mode 100644 tests/split_groups/10_groupdel_no_split_group_already_split/data/groupdel.err create mode 100755 tests/split_groups/10_groupdel_no_split_group_already_split/groupdel.test create mode 100644 tests/su/01/config.txt create mode 100644 tests/su/01/config/etc/group create mode 100644 tests/su/01/config/etc/gshadow create mode 100644 tests/su/01/config/etc/passwd create mode 100644 tests/su/01/config/etc/shadow create mode 100755 tests/su/01/run_su.exp create mode 100755 tests/su/01/su_root.test create mode 100755 tests/su/01/su_user.test create mode 100644 tests/su/02/config.txt create mode 100644 tests/su/02/config/etc/group create mode 100644 tests/su/02/config/etc/gshadow create mode 100644 tests/su/02/config/etc/passwd create mode 100644 tests/su/02/config/etc/profile create mode 100644 tests/su/02/config/etc/shadow create mode 120000 tests/su/02/env_FOO-options_ create mode 120000 tests/su/02/env_FOO-options_- create mode 120000 tests/su/02/env_FOO-options_--login create mode 100755 tests/su/02/env_FOO-options_--login.exp create mode 120000 tests/su/02/env_FOO-options_--login_bash create mode 120000 tests/su/02/env_FOO-options_--preserve-environment create mode 100755 tests/su/02/env_FOO-options_--preserve-environment.exp create mode 120000 tests/su/02/env_FOO-options_--preserve-environment_bash create mode 100755 tests/su/02/env_FOO-options_-.exp create mode 120000 tests/su/02/env_FOO-options_-_bash create mode 120000 tests/su/02/env_FOO-options_-l create mode 120000 tests/su/02/env_FOO-options_-l-m create mode 100755 tests/su/02/env_FOO-options_-l-m.exp create mode 120000 tests/su/02/env_FOO-options_-l-m_bash create mode 100755 tests/su/02/env_FOO-options_-l.exp create mode 120000 tests/su/02/env_FOO-options_-l_bash create mode 120000 tests/su/02/env_FOO-options_-m create mode 100755 tests/su/02/env_FOO-options_-m.exp create mode 120000 tests/su/02/env_FOO-options_-m_bash create mode 120000 tests/su/02/env_FOO-options_-p create mode 120000 tests/su/02/env_FOO-options_-p- create mode 100755 tests/su/02/env_FOO-options_-p-.exp create mode 120000 tests/su/02/env_FOO-options_-p-_bash create mode 100755 tests/su/02/env_FOO-options_-p.exp create mode 120000 tests/su/02/env_FOO-options_-p_bash create mode 100755 tests/su/02/env_FOO-options_.exp create mode 120000 tests/su/02/env_FOO-options__bash create mode 120000 tests/su/02/env_special-options_ create mode 120000 tests/su/02/env_special-options_-l create mode 120000 tests/su/02/env_special-options_-l-p create mode 100755 tests/su/02/env_special-options_-l-p.exp create mode 120000 tests/su/02/env_special-options_-l-p_bash create mode 100755 tests/su/02/env_special-options_-l.exp create mode 120000 tests/su/02/env_special-options_-l_bash create mode 120000 tests/su/02/env_special-options_-p create mode 100755 tests/su/02/env_special-options_-p.exp create mode 120000 tests/su/02/env_special-options_-p_bash create mode 100755 tests/su/02/env_special-options_.exp create mode 120000 tests/su/02/env_special-options__bash create mode 120000 tests/su/02/env_special_root-options_ create mode 120000 tests/su/02/env_special_root-options_-l create mode 120000 tests/su/02/env_special_root-options_-l-p create mode 100755 tests/su/02/env_special_root-options_-l-p.exp create mode 120000 tests/su/02/env_special_root-options_-l-p_bash create mode 100755 tests/su/02/env_special_root-options_-l.exp create mode 120000 tests/su/02/env_special_root-options_-l_bash create mode 120000 tests/su/02/env_special_root-options_-p create mode 100755 tests/su/02/env_special_root-options_-p.exp create mode 120000 tests/su/02/env_special_root-options_-p_bash create mode 100755 tests/su/02/env_special_root-options_.exp create mode 120000 tests/su/02/env_special_root-options__bash create mode 100755 tests/su/02/run_env_test.sh create mode 100644 tests/su/03/config/etc/group create mode 100644 tests/su/03/config/etc/gshadow create mode 100644 tests/su/03/config/etc/passwd create mode 100644 tests/su/03/config/etc/shadow create mode 100644 tests/su/03/data/ls.out create mode 100755 tests/su/03/su_run_command01.test create mode 100755 tests/su/03/su_run_command02.test create mode 100755 tests/su/03/su_run_command03.test create mode 100755 tests/su/03/su_run_command04.test create mode 100755 tests/su/03/su_run_command05.test create mode 100755 tests/su/03/su_run_command06.test create mode 100755 tests/su/03/su_run_command07.test create mode 100755 tests/su/03/su_run_command08.test create mode 100755 tests/su/03/su_run_command09.test create mode 100755 tests/su/03/su_run_command10.test create mode 100755 tests/su/03/su_run_command11.test create mode 100755 tests/su/03/su_run_command12.test create mode 100755 tests/su/03/su_run_command13.test create mode 100755 tests/su/03/su_run_command14.test create mode 100755 tests/su/03/su_run_command15.test create mode 100755 tests/su/03/su_run_command16.test create mode 100755 tests/su/03/su_run_command17.test create mode 100644 tests/su/04/config.txt create mode 100644 tests/su/04/config/etc/group create mode 100644 tests/su/04/config/etc/gshadow create mode 100644 tests/su/04/config/etc/login.defs create mode 100644 tests/su/04/config/etc/passwd create mode 100644 tests/su/04/config/etc/shadow create mode 100644 tests/su/04/config/var/log/auth.log create mode 100644 tests/su/04/data/wrong_user.err create mode 100755 tests/su/04/run_su_failed.exp create mode 100755 tests/su/04/su_user_wrong_passwd.test create mode 100755 tests/su/04/su_user_wrong_passwd_syslog.test create mode 100755 tests/su/04/su_wrong_user.test create mode 100644 tests/su/05/config.txt create mode 100644 tests/su/05/config/etc/group create mode 100644 tests/su/05/config/etc/gshadow create mode 100644 tests/su/05/config/etc/login.defs create mode 100644 tests/su/05/config/etc/passwd create mode 100644 tests/su/05/config/etc/shadow create mode 100644 tests/su/05/config/var/log/auth.log create mode 100755 tests/su/05/run_su_failed.exp create mode 100755 tests/su/05/su_user_wrong_passwd_syslog.test create mode 100644 tests/su/06/config.txt create mode 100644 tests/su/06/config/etc/group create mode 100644 tests/su/06/config/etc/gshadow create mode 100644 tests/su/06/config/etc/login.defs create mode 100644 tests/su/06/config/etc/passwd create mode 100644 tests/su/06/config/etc/shadow create mode 100644 tests/su/06/config/var/log/auth.log create mode 100755 tests/su/06/run_su.exp create mode 100755 tests/su/06/su_user_syslog.test create mode 100644 tests/su/07/config.txt create mode 100644 tests/su/07/config/etc/group create mode 100644 tests/su/07/config/etc/gshadow create mode 100644 tests/su/07/config/etc/login.defs create mode 100644 tests/su/07/config/etc/passwd create mode 100644 tests/su/07/config/etc/shadow create mode 100644 tests/su/07/config/var/log/auth.log create mode 100755 tests/su/07/run_su.exp create mode 100755 tests/su/07/su_user_syslog.test create mode 100644 tests/su/08/config.txt create mode 100644 tests/su/08/config/etc/group create mode 100644 tests/su/08/config/etc/gshadow create mode 100644 tests/su/08/config/etc/login.defs create mode 100644 tests/su/08/config/etc/passwd create mode 100644 tests/su/08/config/etc/shadow create mode 120000 tests/su/08/env_special-options_ create mode 120000 tests/su/08/env_special-options_.exp create mode 120000 tests/su/08/env_special_root-options_ create mode 120000 tests/su/08/env_special_root-options_.exp create mode 100644 tests/su/09/config.txt create mode 100644 tests/su/09/config/etc/group create mode 100644 tests/su/09/config/etc/gshadow create mode 100644 tests/su/09/config/etc/login.defs create mode 100644 tests/su/09/config/etc/passwd create mode 100644 tests/su/09/config/etc/shadow create mode 120000 tests/su/09/env_special-options_ create mode 100755 tests/su/09/env_special-options_.exp create mode 120000 tests/su/09/env_special_root-options_ create mode 100755 tests/su/09/env_special_root-options_.exp create mode 100644 tests/su/10_su_sulog_success/config.txt create mode 100644 tests/su/10_su_sulog_success/config/etc/group create mode 100644 tests/su/10_su_sulog_success/config/etc/gshadow create mode 100644 tests/su/10_su_sulog_success/config/etc/login.defs create mode 100644 tests/su/10_su_sulog_success/config/etc/passwd create mode 100644 tests/su/10_su_sulog_success/config/etc/shadow create mode 100644 tests/su/10_su_sulog_success/config/var/log/sulog create mode 100644 tests/su/10_su_sulog_success/data/sulog create mode 100755 tests/su/10_su_sulog_success/run_su.exp create mode 100755 tests/su/10_su_sulog_success/su.test create mode 100644 tests/su/11_su_sulog_failure/config.txt create mode 100644 tests/su/11_su_sulog_failure/config/etc/group create mode 100644 tests/su/11_su_sulog_failure/config/etc/gshadow create mode 100644 tests/su/11_su_sulog_failure/config/etc/login.defs create mode 100644 tests/su/11_su_sulog_failure/config/etc/passwd create mode 100644 tests/su/11_su_sulog_failure/config/etc/shadow create mode 100644 tests/su/11_su_sulog_failure/config/var/log/sulog create mode 100644 tests/su/11_su_sulog_failure/data/sulog create mode 100755 tests/su/11_su_sulog_failure/run_su.exp create mode 100755 tests/su/11_su_sulog_failure/su.test create mode 100644 tests/su/12_su_child_failure/config.txt create mode 100644 tests/su/12_su_child_failure/config/etc/group create mode 100644 tests/su/12_su_child_failure/config/etc/gshadow create mode 100644 tests/su/12_su_child_failure/config/etc/login.defs create mode 100644 tests/su/12_su_child_failure/config/etc/passwd create mode 100644 tests/su/12_su_child_failure/config/etc/shadow create mode 100644 tests/su/12_su_child_failure/config/var/log/sulog create mode 100755 tests/su/12_su_child_failure/su.test create mode 100644 tests/su/13_su_child_success/config.txt create mode 100644 tests/su/13_su_child_success/config/etc/group create mode 100644 tests/su/13_su_child_success/config/etc/gshadow create mode 100644 tests/su/13_su_child_success/config/etc/login.defs create mode 100644 tests/su/13_su_child_success/config/etc/passwd create mode 100644 tests/su/13_su_child_success/config/etc/shadow create mode 100644 tests/su/13_su_child_success/config/var/log/sulog create mode 100755 tests/su/13_su_child_success/su.test create mode 100755 tests/usertools/01/01_useradd_add_user.test create mode 100644 tests/usertools/01/01_useradd_add_user/group create mode 100644 tests/usertools/01/01_useradd_add_user/gshadow create mode 100644 tests/usertools/01/01_useradd_add_user/passwd create mode 100644 tests/usertools/01/01_useradd_add_user/shadow create mode 100755 tests/usertools/01/01_userdel_delete_user.test create mode 100755 tests/usertools/01/02_useradd_recreate_deleted_user.test create mode 100644 tests/usertools/01/02_useradd_recreate_deleted_user/group create mode 100644 tests/usertools/01/02_useradd_recreate_deleted_user/gshadow create mode 100644 tests/usertools/01/02_useradd_recreate_deleted_user/passwd create mode 100644 tests/usertools/01/02_useradd_recreate_deleted_user/shadow create mode 100755 tests/usertools/01/03_useradd_additional_options.test create mode 100644 tests/usertools/01/03_useradd_additional_options/group create mode 100644 tests/usertools/01/03_useradd_additional_options/gshadow create mode 100644 tests/usertools/01/03_useradd_additional_options/passwd create mode 100644 tests/usertools/01/03_useradd_additional_options/shadow create mode 100755 tests/usertools/01/04_useradd_add_user_with_existing_UID_fail.test create mode 100644 tests/usertools/01/04_useradd_add_user_with_existing_UID_fail/group create mode 100644 tests/usertools/01/04_useradd_add_user_with_existing_UID_fail/gshadow create mode 100644 tests/usertools/01/04_useradd_add_user_with_existing_UID_fail/passwd create mode 100644 tests/usertools/01/04_useradd_add_user_with_existing_UID_fail/shadow create mode 100644 tests/usertools/01/04_useradd_add_user_with_existing_UID_fail/useradd.err create mode 100755 tests/usertools/01/04_useradd_add_user_with_existing_UID_with_-o.test create mode 100644 tests/usertools/01/04_useradd_add_user_with_existing_UID_with_-o/group create mode 100644 tests/usertools/01/04_useradd_add_user_with_existing_UID_with_-o/gshadow create mode 100644 tests/usertools/01/04_useradd_add_user_with_existing_UID_with_-o/passwd create mode 100644 tests/usertools/01/04_useradd_add_user_with_existing_UID_with_-o/shadow create mode 100755 tests/usertools/01/04_useradd_specified_UID.test create mode 100644 tests/usertools/01/04_useradd_specified_UID/group create mode 100644 tests/usertools/01/04_useradd_specified_UID/gshadow create mode 100644 tests/usertools/01/04_useradd_specified_UID/passwd create mode 100644 tests/usertools/01/04_useradd_specified_UID/shadow create mode 100755 tests/usertools/01/04_useradd_specified_UID_and_GID.test create mode 100644 tests/usertools/01/04_useradd_specified_UID_and_GID/group create mode 100644 tests/usertools/01/04_useradd_specified_UID_and_GID/gshadow create mode 100644 tests/usertools/01/04_useradd_specified_UID_and_GID/passwd create mode 100644 tests/usertools/01/04_useradd_specified_UID_and_GID/shadow create mode 100755 tests/usertools/01/04_userdel_delete_user_with_non_unique_UID.test create mode 100644 tests/usertools/01/04_userdel_delete_user_with_non_unique_UID/group create mode 100644 tests/usertools/01/04_userdel_delete_user_with_non_unique_UID/gshadow create mode 100644 tests/usertools/01/04_userdel_delete_user_with_non_unique_UID/passwd create mode 100644 tests/usertools/01/04_userdel_delete_user_with_non_unique_UID/shadow create mode 100755 tests/usertools/01/05_useradd_invalid_numeric_primary_group.test create mode 100644 tests/usertools/01/05_useradd_invalid_numeric_primary_group/useradd.err create mode 100755 tests/usertools/01/06_useradd_invalid_named_primary_group.test create mode 100644 tests/usertools/01/06_useradd_invalid_named_primary_group/useradd.err create mode 100755 tests/usertools/01/07_useradd_numerical_primary_group.test create mode 100644 tests/usertools/01/07_useradd_numerical_primary_group/group create mode 100644 tests/usertools/01/07_useradd_numerical_primary_group/gshadow create mode 100644 tests/usertools/01/07_useradd_numerical_primary_group/passwd create mode 100644 tests/usertools/01/07_useradd_numerical_primary_group/shadow create mode 100755 tests/usertools/01/08_useradd_named_primary_group.test create mode 100644 tests/usertools/01/08_useradd_named_primary_group/group create mode 100644 tests/usertools/01/08_useradd_named_primary_group/gshadow create mode 100644 tests/usertools/01/08_useradd_named_primary_group/passwd create mode 100644 tests/usertools/01/08_useradd_named_primary_group/shadow create mode 100755 tests/usertools/01/09_usermod_change_user_info.test create mode 100644 tests/usertools/01/09_usermod_change_user_info/group create mode 100644 tests/usertools/01/09_usermod_change_user_info/gshadow create mode 100644 tests/usertools/01/09_usermod_change_user_info/passwd create mode 100644 tests/usertools/01/09_usermod_change_user_info/shadow create mode 100755 tests/usertools/01/10_usermod_rename_user.test create mode 100644 tests/usertools/01/10_usermod_rename_user/group create mode 100644 tests/usertools/01/10_usermod_rename_user/gshadow create mode 100644 tests/usertools/01/10_usermod_rename_user/passwd create mode 100644 tests/usertools/01/10_usermod_rename_user/shadow create mode 100755 tests/usertools/01/10_usermod_rename_user_in_group.test create mode 100644 tests/usertools/01/10_usermod_rename_user_in_group/group create mode 100644 tests/usertools/01/10_usermod_rename_user_in_group/gshadow create mode 100644 tests/usertools/01/10_usermod_rename_user_in_group/passwd create mode 100644 tests/usertools/01/10_usermod_rename_user_in_group/shadow create mode 100755 tests/usertools/01/11_usermod_change_password.test create mode 100644 tests/usertools/01/11_usermod_change_password/group create mode 100644 tests/usertools/01/11_usermod_change_password/gshadow create mode 100644 tests/usertools/01/11_usermod_change_password/passwd create mode 100644 tests/usertools/01/11_usermod_change_password/shadow create mode 100755 tests/usertools/01/11_usermod_lock_password.test create mode 100644 tests/usertools/01/11_usermod_lock_password/group create mode 100644 tests/usertools/01/11_usermod_lock_password/gshadow create mode 100644 tests/usertools/01/11_usermod_lock_password/passwd create mode 100644 tests/usertools/01/11_usermod_lock_password/shadow create mode 100755 tests/usertools/01/11_usermod_unlock_empty_password.test create mode 100644 tests/usertools/01/11_usermod_unlock_empty_password/group create mode 100644 tests/usertools/01/11_usermod_unlock_empty_password/gshadow create mode 100644 tests/usertools/01/11_usermod_unlock_empty_password/passwd create mode 100644 tests/usertools/01/11_usermod_unlock_empty_password/shadow create mode 100644 tests/usertools/01/11_usermod_unlock_empty_password/usermod.err create mode 100755 tests/usertools/01/11_usermod_unlock_password.test create mode 100644 tests/usertools/01/11_usermod_unlock_password/group create mode 100644 tests/usertools/01/11_usermod_unlock_password/gshadow create mode 100644 tests/usertools/01/11_usermod_unlock_password/passwd create mode 100644 tests/usertools/01/11_usermod_unlock_password/shadow create mode 100755 tests/usertools/01/12_usermod_change_gid_name.test create mode 100644 tests/usertools/01/12_usermod_change_gid_name/group create mode 100644 tests/usertools/01/12_usermod_change_gid_name/gshadow create mode 100644 tests/usertools/01/12_usermod_change_gid_name/passwd create mode 100644 tests/usertools/01/12_usermod_change_gid_name/shadow create mode 100755 tests/usertools/01/12_usermod_change_gid_number.test create mode 100644 tests/usertools/01/12_usermod_change_gid_number/group create mode 100644 tests/usertools/01/12_usermod_change_gid_number/gshadow create mode 100644 tests/usertools/01/12_usermod_change_gid_number/passwd create mode 100644 tests/usertools/01/12_usermod_change_gid_number/shadow create mode 100755 tests/usertools/01/13_useradd_negative_UID.test create mode 100644 tests/usertools/01/13_useradd_negative_UID/group create mode 100644 tests/usertools/01/13_useradd_negative_UID/gshadow create mode 100644 tests/usertools/01/13_useradd_negative_UID/passwd create mode 100644 tests/usertools/01/13_useradd_negative_UID/shadow create mode 100755 tests/usertools/01/14_useradd_out_of_range_UID.test create mode 100644 tests/usertools/01/14_useradd_out_of_range_UID/group create mode 100644 tests/usertools/01/14_useradd_out_of_range_UID/gshadow create mode 100644 tests/usertools/01/14_useradd_out_of_range_UID/passwd create mode 100644 tests/usertools/01/14_useradd_out_of_range_UID/shadow create mode 100755 tests/usertools/01/15_useradd_specified_large_UID.test create mode 100644 tests/usertools/01/15_useradd_specified_large_UID/group create mode 100644 tests/usertools/01/15_useradd_specified_large_UID/gshadow create mode 100644 tests/usertools/01/15_useradd_specified_large_UID/passwd create mode 100644 tests/usertools/01/15_useradd_specified_large_UID/shadow create mode 100755 tests/usertools/01/16_useradd_add_user_to_multiple_groups.test create mode 100644 tests/usertools/01/16_useradd_add_user_to_multiple_groups/group create mode 100644 tests/usertools/01/16_useradd_add_user_to_multiple_groups/gshadow create mode 100644 tests/usertools/01/16_useradd_add_user_to_multiple_groups/passwd create mode 100644 tests/usertools/01/16_useradd_add_user_to_multiple_groups/shadow create mode 100755 tests/usertools/01/16_useradd_add_user_to_one_group.test create mode 100644 tests/usertools/01/16_useradd_add_user_to_one_group/group create mode 100644 tests/usertools/01/16_useradd_add_user_to_one_group/gshadow create mode 100644 tests/usertools/01/16_useradd_add_user_to_one_group/passwd create mode 100644 tests/usertools/01/16_useradd_add_user_to_one_group/shadow create mode 100755 tests/usertools/01/17_useradd_create_homedir.test create mode 100644 tests/usertools/01/17_useradd_create_homedir/group create mode 100644 tests/usertools/01/17_useradd_create_homedir/gshadow create mode 100644 tests/usertools/01/17_useradd_create_homedir/passwd create mode 100644 tests/usertools/01/17_useradd_create_homedir/shadow create mode 100755 tests/usertools/01/18_userdel_remove_homedir.test create mode 100644 tests/usertools/01/18_userdel_remove_homedir/group create mode 100644 tests/usertools/01/18_userdel_remove_homedir/gshadow create mode 100644 tests/usertools/01/18_userdel_remove_homedir/passwd create mode 100644 tests/usertools/01/18_userdel_remove_homedir/shadow create mode 100644 tests/usertools/01/18_userdel_remove_homedir/userdel.err create mode 100755 tests/usertools/01/19_userdel_delete_user_in_group.test create mode 100755 tests/usertools/01/20_usermod_change_homedir.test create mode 100755 tests/usertools/01/21_usermod_change_and_move_homedir.test create mode 100755 tests/usertools/01/22_usermod_new_groups.test create mode 100644 tests/usertools/01/22_usermod_new_groups/group create mode 100644 tests/usertools/01/22_usermod_new_groups/gshadow create mode 100644 tests/usertools/01/22_usermod_new_groups/passwd create mode 100644 tests/usertools/01/22_usermod_new_groups/shadow create mode 100755 tests/usertools/01/23_usermod_add_groups.test create mode 100644 tests/usertools/01/23_usermod_add_groups/group create mode 100644 tests/usertools/01/23_usermod_add_groups/gshadow create mode 100644 tests/usertools/01/23_usermod_add_groups/passwd create mode 100644 tests/usertools/01/23_usermod_add_groups/shadow create mode 100755 tests/usertools/01/24_usermod_new_groups_remove_old_groups.test create mode 100644 tests/usertools/01/24_usermod_new_groups_remove_old_groups/group create mode 100644 tests/usertools/01/24_usermod_new_groups_remove_old_groups/gshadow create mode 100644 tests/usertools/01/24_usermod_new_groups_remove_old_groups/passwd create mode 100644 tests/usertools/01/24_usermod_new_groups_remove_old_groups/shadow create mode 100755 tests/usertools/01/25_useradd_specified_large_UID2.test create mode 100644 tests/usertools/01/25_useradd_specified_large_UID2/group create mode 100644 tests/usertools/01/25_useradd_specified_large_UID2/gshadow create mode 100644 tests/usertools/01/25_useradd_specified_large_UID2/passwd create mode 100644 tests/usertools/01/25_useradd_specified_large_UID2/shadow create mode 100755 tests/usertools/01/26_useradd_UID_-1.test create mode 100644 tests/usertools/01/26_useradd_UID_-1/group create mode 100644 tests/usertools/01/26_useradd_UID_-1/gshadow create mode 100644 tests/usertools/01/26_useradd_UID_-1/passwd create mode 100644 tests/usertools/01/26_useradd_UID_-1/shadow create mode 100644 tests/usertools/01/config/etc/default/useradd create mode 100644 tests/usertools/01/config/etc/group create mode 100644 tests/usertools/01/config/etc/gshadow create mode 100644 tests/usertools/01/config/etc/passwd create mode 100644 tests/usertools/01/config/etc/shadow create mode 100644 tests/usertools/02/config.txt create mode 100644 tests/usertools/02/config/etc/default/useradd create mode 100644 tests/usertools/02/config/etc/group create mode 100644 tests/usertools/02/config/etc/gshadow create mode 100644 tests/usertools/02/config/etc/passwd create mode 100644 tests/usertools/02/config/etc/shadow create mode 100644 tests/usertools/02/data/useradd-D.out create mode 100644 tests/usertools/02/data/useradd-D_default_values.out create mode 100755 tests/usertools/02/useradd_change_default_EXPIRE.test create mode 100644 tests/usertools/02/useradd_change_default_EXPIRE/useradd.default create mode 100755 tests/usertools/02/useradd_change_default_GROUP.test create mode 100644 tests/usertools/02/useradd_change_default_GROUP/useradd.default create mode 100755 tests/usertools/02/useradd_change_default_HOME.test create mode 100644 tests/usertools/02/useradd_change_default_HOME/useradd.default create mode 100755 tests/usertools/02/useradd_change_default_INACTIVE.test create mode 100644 tests/usertools/02/useradd_change_default_INACTIVE/useradd.default create mode 100755 tests/usertools/02/useradd_change_default_SHELL.test create mode 100644 tests/usertools/02/useradd_change_default_SHELL/useradd.default create mode 100755 tests/usertools/02/useradd_change_defaults.test create mode 100644 tests/usertools/02/useradd_change_defaults/useradd.default create mode 100755 tests/usertools/02/useradd_default_default_values.test create mode 100755 tests/usertools/02/useradd_get_default_values.test create mode 100644 tests/usertools/03/config.txt create mode 100644 tests/usertools/03/config/etc/default/useradd create mode 100644 tests/usertools/03/config/etc/group create mode 100644 tests/usertools/03/config/etc/gshadow create mode 100644 tests/usertools/03/config/etc/passwd create mode 100644 tests/usertools/03/config/etc/shadow create mode 100755 tests/usertools/03/useradd_change_defaults.test create mode 100644 tests/usertools/03/useradd_change_defaults/useradd.default create mode 100755 tests/usertools/04/01_useradd_add_user.test create mode 100644 tests/usertools/04/01_useradd_add_user/group create mode 100644 tests/usertools/04/01_useradd_add_user/gshadow create mode 100644 tests/usertools/04/01_useradd_add_user/passwd create mode 100644 tests/usertools/04/01_useradd_add_user/shadow create mode 100644 tests/usertools/04/config.txt create mode 100644 tests/usertools/04/config/etc/default/useradd create mode 100644 tests/usertools/04/config/etc/group create mode 100644 tests/usertools/04/config/etc/gshadow create mode 100644 tests/usertools/04/config/etc/passwd create mode 100644 tests/usertools/04/config/etc/shadow create mode 100644 tests/usertools/05_userdel_del_from_group_members/config.txt create mode 100644 tests/usertools/05_userdel_del_from_group_members/config/etc/default/useradd create mode 100644 tests/usertools/05_userdel_del_from_group_members/config/etc/group create mode 100644 tests/usertools/05_userdel_del_from_group_members/config/etc/gshadow create mode 100644 tests/usertools/05_userdel_del_from_group_members/config/etc/passwd create mode 100644 tests/usertools/05_userdel_del_from_group_members/config/etc/shadow create mode 100644 tests/usertools/05_userdel_del_from_group_members/data/group create mode 100644 tests/usertools/05_userdel_del_from_group_members/data/gshadow create mode 100644 tests/usertools/05_userdel_del_from_group_members/data/passwd create mode 100644 tests/usertools/05_userdel_del_from_group_members/data/shadow create mode 100755 tests/usertools/05_userdel_del_from_group_members/userdel.test create mode 100644 tests/usertools/06_userdel_del_from_gshadow_members/config.txt create mode 100644 tests/usertools/06_userdel_del_from_gshadow_members/config/etc/default/useradd create mode 100644 tests/usertools/06_userdel_del_from_gshadow_members/config/etc/group create mode 100644 tests/usertools/06_userdel_del_from_gshadow_members/config/etc/gshadow create mode 100644 tests/usertools/06_userdel_del_from_gshadow_members/config/etc/passwd create mode 100644 tests/usertools/06_userdel_del_from_gshadow_members/config/etc/shadow create mode 100644 tests/usertools/06_userdel_del_from_gshadow_members/data/group create mode 100644 tests/usertools/06_userdel_del_from_gshadow_members/data/gshadow create mode 100644 tests/usertools/06_userdel_del_from_gshadow_members/data/passwd create mode 100644 tests/usertools/06_userdel_del_from_gshadow_members/data/shadow create mode 100755 tests/usertools/06_userdel_del_from_gshadow_members/userdel.test create mode 100644 tests/usertools/07_userdel_del_from_gshadow_admins/config.txt create mode 100644 tests/usertools/07_userdel_del_from_gshadow_admins/config/etc/default/useradd create mode 100644 tests/usertools/07_userdel_del_from_gshadow_admins/config/etc/group create mode 100644 tests/usertools/07_userdel_del_from_gshadow_admins/config/etc/gshadow create mode 100644 tests/usertools/07_userdel_del_from_gshadow_admins/config/etc/passwd create mode 100644 tests/usertools/07_userdel_del_from_gshadow_admins/config/etc/shadow create mode 100644 tests/usertools/07_userdel_del_from_gshadow_admins/data/group create mode 100644 tests/usertools/07_userdel_del_from_gshadow_admins/data/gshadow create mode 100644 tests/usertools/07_userdel_del_from_gshadow_admins/data/passwd create mode 100644 tests/usertools/07_userdel_del_from_gshadow_admins/data/shadow create mode 100755 tests/usertools/07_userdel_del_from_gshadow_admins/userdel.test create mode 100644 tests/usertools/08_userdel_del_from_group_and_gshadow/config.txt create mode 100644 tests/usertools/08_userdel_del_from_group_and_gshadow/config/etc/default/useradd create mode 100644 tests/usertools/08_userdel_del_from_group_and_gshadow/config/etc/group create mode 100644 tests/usertools/08_userdel_del_from_group_and_gshadow/config/etc/gshadow create mode 100644 tests/usertools/08_userdel_del_from_group_and_gshadow/config/etc/passwd create mode 100644 tests/usertools/08_userdel_del_from_group_and_gshadow/config/etc/shadow create mode 100644 tests/usertools/08_userdel_del_from_group_and_gshadow/data/group create mode 100644 tests/usertools/08_userdel_del_from_group_and_gshadow/data/gshadow create mode 100644 tests/usertools/08_userdel_del_from_group_and_gshadow/data/passwd create mode 100644 tests/usertools/08_userdel_del_from_group_and_gshadow/data/shadow create mode 100755 tests/usertools/08_userdel_del_from_group_and_gshadow/userdel.test create mode 100644 tests/usertools/09_userdel_del_homedir/config.txt create mode 100644 tests/usertools/09_userdel_del_homedir/config/etc/default/useradd create mode 100644 tests/usertools/09_userdel_del_homedir/config/etc/group create mode 100644 tests/usertools/09_userdel_del_homedir/config/etc/gshadow create mode 100644 tests/usertools/09_userdel_del_homedir/config/etc/passwd create mode 100644 tests/usertools/09_userdel_del_homedir/config/etc/shadow create mode 100644 tests/usertools/09_userdel_del_homedir/data/group create mode 100644 tests/usertools/09_userdel_del_homedir/data/gshadow create mode 100644 tests/usertools/09_userdel_del_homedir/data/passwd create mode 100644 tests/usertools/09_userdel_del_homedir/data/shadow create mode 100755 tests/usertools/09_userdel_del_homedir/userdel.test create mode 100644 tests/usertools/10_userdel_del_homedir_wrong_owner/config.txt create mode 100644 tests/usertools/10_userdel_del_homedir_wrong_owner/config/etc/default/useradd create mode 100644 tests/usertools/10_userdel_del_homedir_wrong_owner/config/etc/group create mode 100644 tests/usertools/10_userdel_del_homedir_wrong_owner/config/etc/gshadow create mode 100644 tests/usertools/10_userdel_del_homedir_wrong_owner/config/etc/passwd create mode 100644 tests/usertools/10_userdel_del_homedir_wrong_owner/config/etc/shadow create mode 100644 tests/usertools/10_userdel_del_homedir_wrong_owner/data/group create mode 100644 tests/usertools/10_userdel_del_homedir_wrong_owner/data/gshadow create mode 100644 tests/usertools/10_userdel_del_homedir_wrong_owner/data/passwd create mode 100644 tests/usertools/10_userdel_del_homedir_wrong_owner/data/shadow create mode 100644 tests/usertools/10_userdel_del_homedir_wrong_owner/data/userdel.err create mode 100755 tests/usertools/10_userdel_del_homedir_wrong_owner/userdel.test create mode 100644 tests/usertools/11_usermod_move_homedir/config.txt create mode 100644 tests/usertools/11_usermod_move_homedir/config/etc/default/useradd create mode 100644 tests/usertools/11_usermod_move_homedir/config/etc/group create mode 100644 tests/usertools/11_usermod_move_homedir/config/etc/gshadow create mode 100644 tests/usertools/11_usermod_move_homedir/config/etc/passwd create mode 100644 tests/usertools/11_usermod_move_homedir/config/etc/shadow create mode 100644 tests/usertools/11_usermod_move_homedir/data/home_ls-a create mode 100644 tests/usertools/11_usermod_move_homedir/data/passwd create mode 100755 tests/usertools/11_usermod_move_homedir/usermod.test create mode 100644 tests/usertools/12_usermod_move_homedir_dev_null/config.txt create mode 100644 tests/usertools/12_usermod_move_homedir_dev_null/config/etc/default/useradd create mode 100644 tests/usertools/12_usermod_move_homedir_dev_null/config/etc/group create mode 100644 tests/usertools/12_usermod_move_homedir_dev_null/config/etc/gshadow create mode 100644 tests/usertools/12_usermod_move_homedir_dev_null/config/etc/passwd create mode 100644 tests/usertools/12_usermod_move_homedir_dev_null/config/etc/shadow create mode 100644 tests/usertools/12_usermod_move_homedir_dev_null/data/passwd create mode 100644 tests/usertools/12_usermod_move_homedir_dev_null/data/usermod.err create mode 100755 tests/usertools/12_usermod_move_homedir_dev_null/usermod.test create mode 100644 tests/usertools/13_usermod_move_homedir_file/config.txt create mode 100644 tests/usertools/13_usermod_move_homedir_file/config/etc/default/useradd create mode 100644 tests/usertools/13_usermod_move_homedir_file/config/etc/group create mode 100644 tests/usertools/13_usermod_move_homedir_file/config/etc/gshadow create mode 100644 tests/usertools/13_usermod_move_homedir_file/config/etc/passwd create mode 100644 tests/usertools/13_usermod_move_homedir_file/config/etc/shadow create mode 100644 tests/usertools/13_usermod_move_homedir_file/data/passwd create mode 100644 tests/usertools/13_usermod_move_homedir_file/data/usermod.err create mode 100755 tests/usertools/13_usermod_move_homedir_file/usermod.test create mode 100644 tests/usertools/14_usermod_move_homedir_other_device/config.txt create mode 100644 tests/usertools/14_usermod_move_homedir_other_device/config/etc/default/useradd create mode 100644 tests/usertools/14_usermod_move_homedir_other_device/config/etc/group create mode 100644 tests/usertools/14_usermod_move_homedir_other_device/config/etc/gshadow create mode 100644 tests/usertools/14_usermod_move_homedir_other_device/config/etc/passwd create mode 100644 tests/usertools/14_usermod_move_homedir_other_device/config/etc/shadow create mode 100644 tests/usertools/14_usermod_move_homedir_other_device/data/home_ls-a create mode 100644 tests/usertools/14_usermod_move_homedir_other_device/data/passwd create mode 100755 tests/usertools/14_usermod_move_homedir_other_device/usermod.test create mode 100644 tests/usertools/15_usermod_change_supplementary_groups/config.txt create mode 100644 tests/usertools/15_usermod_change_supplementary_groups/config/etc/default/useradd create mode 100644 tests/usertools/15_usermod_change_supplementary_groups/config/etc/group create mode 100644 tests/usertools/15_usermod_change_supplementary_groups/config/etc/gshadow create mode 100644 tests/usertools/15_usermod_change_supplementary_groups/config/etc/passwd create mode 100644 tests/usertools/15_usermod_change_supplementary_groups/config/etc/shadow create mode 100644 tests/usertools/15_usermod_change_supplementary_groups/data/group create mode 100644 tests/usertools/15_usermod_change_supplementary_groups/data/gshadow create mode 100755 tests/usertools/15_usermod_change_supplementary_groups/usermod.test create mode 100644 tests/usertools/16_usermod_remove_supplementary_groups/config.txt create mode 100644 tests/usertools/16_usermod_remove_supplementary_groups/config/etc/default/useradd create mode 100644 tests/usertools/16_usermod_remove_supplementary_groups/config/etc/group create mode 100644 tests/usertools/16_usermod_remove_supplementary_groups/config/etc/gshadow create mode 100644 tests/usertools/16_usermod_remove_supplementary_groups/config/etc/passwd create mode 100644 tests/usertools/16_usermod_remove_supplementary_groups/config/etc/shadow create mode 100644 tests/usertools/16_usermod_remove_supplementary_groups/data/group create mode 100644 tests/usertools/16_usermod_remove_supplementary_groups/data/gshadow create mode 100755 tests/usertools/16_usermod_remove_supplementary_groups/usermod.test create mode 100644 tests/usertools/17_usermod_change_supplementary_groups_numerical/config.txt create mode 100644 tests/usertools/17_usermod_change_supplementary_groups_numerical/config/etc/default/useradd create mode 100644 tests/usertools/17_usermod_change_supplementary_groups_numerical/config/etc/group create mode 100644 tests/usertools/17_usermod_change_supplementary_groups_numerical/config/etc/gshadow create mode 100644 tests/usertools/17_usermod_change_supplementary_groups_numerical/config/etc/passwd create mode 100644 tests/usertools/17_usermod_change_supplementary_groups_numerical/config/etc/shadow create mode 100644 tests/usertools/17_usermod_change_supplementary_groups_numerical/data/group create mode 100644 tests/usertools/17_usermod_change_supplementary_groups_numerical/data/gshadow create mode 100755 tests/usertools/17_usermod_change_supplementary_groups_numerical/usermod.test create mode 100644 tests/usertools/18_usermod_change_supplementary_groups-unknown_group/config.txt create mode 100644 tests/usertools/18_usermod_change_supplementary_groups-unknown_group/config/etc/default/useradd create mode 100644 tests/usertools/18_usermod_change_supplementary_groups-unknown_group/config/etc/group create mode 100644 tests/usertools/18_usermod_change_supplementary_groups-unknown_group/config/etc/gshadow create mode 100644 tests/usertools/18_usermod_change_supplementary_groups-unknown_group/config/etc/passwd create mode 100644 tests/usertools/18_usermod_change_supplementary_groups-unknown_group/config/etc/shadow create mode 100644 tests/usertools/18_usermod_change_supplementary_groups-unknown_group/data/usermod.err create mode 100755 tests/usertools/18_usermod_change_supplementary_groups-unknown_group/usermod.test create mode 100644 tests/usertools/19_usermod_change_supplementary_groups-unknown_numerical_group/config.txt create mode 100644 tests/usertools/19_usermod_change_supplementary_groups-unknown_numerical_group/config/etc/default/useradd create mode 100644 tests/usertools/19_usermod_change_supplementary_groups-unknown_numerical_group/config/etc/group create mode 100644 tests/usertools/19_usermod_change_supplementary_groups-unknown_numerical_group/config/etc/gshadow create mode 100644 tests/usertools/19_usermod_change_supplementary_groups-unknown_numerical_group/config/etc/passwd create mode 100644 tests/usertools/19_usermod_change_supplementary_groups-unknown_numerical_group/config/etc/shadow create mode 100644 tests/usertools/19_usermod_change_supplementary_groups-unknown_numerical_group/data/usermod.err create mode 100755 tests/usertools/19_usermod_change_supplementary_groups-unknown_numerical_group/usermod.test create mode 100644 tests/usertools/20_usermod_rename_user_in_member_lists/config.txt create mode 100644 tests/usertools/20_usermod_rename_user_in_member_lists/config/etc/default/useradd create mode 100644 tests/usertools/20_usermod_rename_user_in_member_lists/config/etc/group create mode 100644 tests/usertools/20_usermod_rename_user_in_member_lists/config/etc/gshadow create mode 100644 tests/usertools/20_usermod_rename_user_in_member_lists/config/etc/passwd create mode 100644 tests/usertools/20_usermod_rename_user_in_member_lists/config/etc/shadow create mode 100644 tests/usertools/20_usermod_rename_user_in_member_lists/data/group create mode 100644 tests/usertools/20_usermod_rename_user_in_member_lists/data/gshadow create mode 100644 tests/usertools/20_usermod_rename_user_in_member_lists/data/passwd create mode 100644 tests/usertools/20_usermod_rename_user_in_member_lists/data/shadow create mode 100755 tests/usertools/20_usermod_rename_user_in_member_lists/usermod.test create mode 100644 tests/usertools/21_usermod_rename_user_in_member_lists-and-add_supplementary_groups/config.txt create mode 100644 tests/usertools/21_usermod_rename_user_in_member_lists-and-add_supplementary_groups/config/etc/default/useradd create mode 100644 tests/usertools/21_usermod_rename_user_in_member_lists-and-add_supplementary_groups/config/etc/group create mode 100644 tests/usertools/21_usermod_rename_user_in_member_lists-and-add_supplementary_groups/config/etc/gshadow create mode 100644 tests/usertools/21_usermod_rename_user_in_member_lists-and-add_supplementary_groups/config/etc/passwd create mode 100644 tests/usertools/21_usermod_rename_user_in_member_lists-and-add_supplementary_groups/config/etc/shadow create mode 100644 tests/usertools/21_usermod_rename_user_in_member_lists-and-add_supplementary_groups/data/group create mode 100644 tests/usertools/21_usermod_rename_user_in_member_lists-and-add_supplementary_groups/data/gshadow create mode 100644 tests/usertools/21_usermod_rename_user_in_member_lists-and-add_supplementary_groups/data/passwd create mode 100644 tests/usertools/21_usermod_rename_user_in_member_lists-and-add_supplementary_groups/data/shadow create mode 100755 tests/usertools/21_usermod_rename_user_in_member_lists-and-add_supplementary_groups/usermod.test create mode 100644 tests/usertools/22_usermod-a_existing_supplementary_group/config.txt create mode 100644 tests/usertools/22_usermod-a_existing_supplementary_group/config/etc/default/useradd create mode 100644 tests/usertools/22_usermod-a_existing_supplementary_group/config/etc/group create mode 100644 tests/usertools/22_usermod-a_existing_supplementary_group/config/etc/gshadow create mode 100644 tests/usertools/22_usermod-a_existing_supplementary_group/config/etc/passwd create mode 100644 tests/usertools/22_usermod-a_existing_supplementary_group/config/etc/shadow create mode 100644 tests/usertools/22_usermod-a_existing_supplementary_group/data/group create mode 100644 tests/usertools/22_usermod-a_existing_supplementary_group/data/gshadow create mode 100755 tests/usertools/22_usermod-a_existing_supplementary_group/usermod.test create mode 100644 tests/usertools/23_usermod-a_existing_supplementary_group+rename/config.txt create mode 100644 tests/usertools/23_usermod-a_existing_supplementary_group+rename/config/etc/default/useradd create mode 100644 tests/usertools/23_usermod-a_existing_supplementary_group+rename/config/etc/group create mode 100644 tests/usertools/23_usermod-a_existing_supplementary_group+rename/config/etc/gshadow create mode 100644 tests/usertools/23_usermod-a_existing_supplementary_group+rename/config/etc/passwd create mode 100644 tests/usertools/23_usermod-a_existing_supplementary_group+rename/config/etc/shadow create mode 100644 tests/usertools/23_usermod-a_existing_supplementary_group+rename/data/group create mode 100644 tests/usertools/23_usermod-a_existing_supplementary_group+rename/data/gshadow create mode 100644 tests/usertools/23_usermod-a_existing_supplementary_group+rename/data/passwd create mode 100644 tests/usertools/23_usermod-a_existing_supplementary_group+rename/data/shadow create mode 100755 tests/usertools/23_usermod-a_existing_supplementary_group+rename/usermod.test create mode 100644 tests/usertools/24_usermod_locked_passwd/config.txt create mode 100644 tests/usertools/24_usermod_locked_passwd/config/etc/default/useradd create mode 100644 tests/usertools/24_usermod_locked_passwd/config/etc/group create mode 100644 tests/usertools/24_usermod_locked_passwd/config/etc/gshadow create mode 100644 tests/usertools/24_usermod_locked_passwd/config/etc/passwd create mode 100644 tests/usertools/24_usermod_locked_passwd/config/etc/shadow create mode 100644 tests/usertools/24_usermod_locked_passwd/data/usermod.err create mode 100755 tests/usertools/24_usermod_locked_passwd/usermod.test create mode 100644 tests/usertools/25_usermod-G_locked_group/config.txt create mode 100644 tests/usertools/25_usermod-G_locked_group/config/etc/default/useradd create mode 100644 tests/usertools/25_usermod-G_locked_group/config/etc/group create mode 100644 tests/usertools/25_usermod-G_locked_group/config/etc/gshadow create mode 100644 tests/usertools/25_usermod-G_locked_group/config/etc/passwd create mode 100644 tests/usertools/25_usermod-G_locked_group/config/etc/shadow create mode 100644 tests/usertools/25_usermod-G_locked_group/data/usermod.err create mode 100755 tests/usertools/25_usermod-G_locked_group/usermod.test create mode 100644 tests/usertools/26_usermod_locked_shadow/config.txt create mode 100644 tests/usertools/26_usermod_locked_shadow/config/etc/default/useradd create mode 100644 tests/usertools/26_usermod_locked_shadow/config/etc/group create mode 100644 tests/usertools/26_usermod_locked_shadow/config/etc/gshadow create mode 100644 tests/usertools/26_usermod_locked_shadow/config/etc/passwd create mode 100644 tests/usertools/26_usermod_locked_shadow/config/etc/shadow create mode 100644 tests/usertools/26_usermod_locked_shadow/data/usermod.err create mode 100755 tests/usertools/26_usermod_locked_shadow/usermod.test create mode 100644 tests/usertools/27_usermod-G_locked_gshadow/config.txt create mode 100644 tests/usertools/27_usermod-G_locked_gshadow/config/etc/default/useradd create mode 100644 tests/usertools/27_usermod-G_locked_gshadow/config/etc/group create mode 100644 tests/usertools/27_usermod-G_locked_gshadow/config/etc/gshadow create mode 100644 tests/usertools/27_usermod-G_locked_gshadow/config/etc/passwd create mode 100644 tests/usertools/27_usermod-G_locked_gshadow/config/etc/shadow create mode 100644 tests/usertools/27_usermod-G_locked_gshadow/data/usermod.err create mode 100755 tests/usertools/27_usermod-G_locked_gshadow/usermod.test create mode 100644 tests/usertools/28_usermod-c_locked_group/config.txt create mode 100644 tests/usertools/28_usermod-c_locked_group/config/etc/default/useradd create mode 100644 tests/usertools/28_usermod-c_locked_group/config/etc/group create mode 100644 tests/usertools/28_usermod-c_locked_group/config/etc/gshadow create mode 100644 tests/usertools/28_usermod-c_locked_group/config/etc/passwd create mode 100644 tests/usertools/28_usermod-c_locked_group/config/etc/shadow create mode 100644 tests/usertools/28_usermod-c_locked_group/data/passwd create mode 100755 tests/usertools/28_usermod-c_locked_group/usermod.test create mode 100644 tests/usertools/29_usermod-c_locked_gshadow/config.txt create mode 100644 tests/usertools/29_usermod-c_locked_gshadow/config/etc/default/useradd create mode 100644 tests/usertools/29_usermod-c_locked_gshadow/config/etc/group create mode 100644 tests/usertools/29_usermod-c_locked_gshadow/config/etc/gshadow create mode 100644 tests/usertools/29_usermod-c_locked_gshadow/config/etc/passwd create mode 100644 tests/usertools/29_usermod-c_locked_gshadow/config/etc/shadow create mode 100644 tests/usertools/29_usermod-c_locked_gshadow/data/passwd create mode 100755 tests/usertools/29_usermod-c_locked_gshadow/usermod.test create mode 100644 tests/usertools/30_usermod-l_locked_group/config.txt create mode 100644 tests/usertools/30_usermod-l_locked_group/config/etc/default/useradd create mode 100644 tests/usertools/30_usermod-l_locked_group/config/etc/group create mode 100644 tests/usertools/30_usermod-l_locked_group/config/etc/gshadow create mode 100644 tests/usertools/30_usermod-l_locked_group/config/etc/passwd create mode 100644 tests/usertools/30_usermod-l_locked_group/config/etc/shadow create mode 100644 tests/usertools/30_usermod-l_locked_group/data/usermod.err create mode 100755 tests/usertools/30_usermod-l_locked_group/usermod.test create mode 100644 tests/usertools/31_usermod-l_locked_gshadow/config.txt create mode 100644 tests/usertools/31_usermod-l_locked_gshadow/config/etc/default/useradd create mode 100644 tests/usertools/31_usermod-l_locked_gshadow/config/etc/group create mode 100644 tests/usertools/31_usermod-l_locked_gshadow/config/etc/gshadow create mode 100644 tests/usertools/31_usermod-l_locked_gshadow/config/etc/passwd create mode 100644 tests/usertools/31_usermod-l_locked_gshadow/config/etc/shadow create mode 100644 tests/usertools/31_usermod-l_locked_gshadow/data/usermod.err create mode 100755 tests/usertools/31_usermod-l_locked_gshadow/usermod.test create mode 100644 tests/usertools/32_usermod-u_new_UID/config.txt create mode 100644 tests/usertools/32_usermod-u_new_UID/config/etc/default/useradd create mode 100644 tests/usertools/32_usermod-u_new_UID/config/etc/group create mode 100644 tests/usertools/32_usermod-u_new_UID/config/etc/gshadow create mode 100644 tests/usertools/32_usermod-u_new_UID/config/etc/passwd create mode 100644 tests/usertools/32_usermod-u_new_UID/config/etc/shadow create mode 100644 tests/usertools/32_usermod-u_new_UID/data/passwd create mode 100755 tests/usertools/32_usermod-u_new_UID/usermod.test create mode 100644 tests/usertools/33_usermod-u_existing_UID/config.txt create mode 100644 tests/usertools/33_usermod-u_existing_UID/config/etc/default/useradd create mode 100644 tests/usertools/33_usermod-u_existing_UID/config/etc/group create mode 100644 tests/usertools/33_usermod-u_existing_UID/config/etc/gshadow create mode 100644 tests/usertools/33_usermod-u_existing_UID/config/etc/passwd create mode 100644 tests/usertools/33_usermod-u_existing_UID/config/etc/shadow create mode 100644 tests/usertools/33_usermod-u_existing_UID/data/usermod.err create mode 100755 tests/usertools/33_usermod-u_existing_UID/usermod.test create mode 100644 tests/usertools/34_usermod-u-o_existing_UID/config.txt create mode 100644 tests/usertools/34_usermod-u-o_existing_UID/config/etc/default/useradd create mode 100644 tests/usertools/34_usermod-u-o_existing_UID/config/etc/group create mode 100644 tests/usertools/34_usermod-u-o_existing_UID/config/etc/gshadow create mode 100644 tests/usertools/34_usermod-u-o_existing_UID/config/etc/passwd create mode 100644 tests/usertools/34_usermod-u-o_existing_UID/config/etc/shadow create mode 100644 tests/usertools/34_usermod-u-o_existing_UID/data/passwd create mode 100755 tests/usertools/34_usermod-u-o_existing_UID/usermod.test create mode 100644 tests/usertools/35_usermod-u_invalid_UID/config.txt create mode 100644 tests/usertools/35_usermod-u_invalid_UID/config/etc/default/useradd create mode 100644 tests/usertools/35_usermod-u_invalid_UID/config/etc/group create mode 100644 tests/usertools/35_usermod-u_invalid_UID/config/etc/gshadow create mode 100644 tests/usertools/35_usermod-u_invalid_UID/config/etc/passwd create mode 100644 tests/usertools/35_usermod-u_invalid_UID/config/etc/shadow create mode 100644 tests/usertools/35_usermod-u_invalid_UID/data/usermod.err create mode 100755 tests/usertools/35_usermod-u_invalid_UID/usermod.test create mode 100644 tests/usertools/36_usermod_change_uid+move_homedir_other_device/config.txt create mode 100644 tests/usertools/36_usermod_change_uid+move_homedir_other_device/config/etc/default/useradd create mode 100644 tests/usertools/36_usermod_change_uid+move_homedir_other_device/config/etc/group create mode 100644 tests/usertools/36_usermod_change_uid+move_homedir_other_device/config/etc/gshadow create mode 100644 tests/usertools/36_usermod_change_uid+move_homedir_other_device/config/etc/passwd create mode 100644 tests/usertools/36_usermod_change_uid+move_homedir_other_device/config/etc/shadow create mode 100644 tests/usertools/36_usermod_change_uid+move_homedir_other_device/data/home_ls-a create mode 100644 tests/usertools/36_usermod_change_uid+move_homedir_other_device/data/passwd create mode 100755 tests/usertools/36_usermod_change_uid+move_homedir_other_device/usermod.test create mode 100644 tests/usertools/37_Debian_Bug_470745/config.txt create mode 100644 tests/usertools/37_Debian_Bug_470745/config/etc/default/useradd create mode 100644 tests/usertools/37_Debian_Bug_470745/config/etc/group create mode 100644 tests/usertools/37_Debian_Bug_470745/config/etc/gshadow create mode 100644 tests/usertools/37_Debian_Bug_470745/config/etc/passwd create mode 100644 tests/usertools/37_Debian_Bug_470745/config/etc/shadow create mode 100644 tests/usertools/37_Debian_Bug_470745/data/group create mode 100644 tests/usertools/37_Debian_Bug_470745/data/gshadow create mode 100644 tests/usertools/37_Debian_Bug_470745/data/passwd create mode 100644 tests/usertools/37_Debian_Bug_470745/data/shadow create mode 100644 tests/usertools/37_Debian_Bug_470745/data/usermod.err create mode 100755 tests/usertools/37_Debian_Bug_470745/usermod.test create mode 100644 tests/usertools/38_usermod_invalid_user/config.txt create mode 100644 tests/usertools/38_usermod_invalid_user/config/etc/default/useradd create mode 100644 tests/usertools/38_usermod_invalid_user/config/etc/group create mode 100644 tests/usertools/38_usermod_invalid_user/config/etc/gshadow create mode 100644 tests/usertools/38_usermod_invalid_user/config/etc/passwd create mode 100644 tests/usertools/38_usermod_invalid_user/config/etc/shadow create mode 100644 tests/usertools/38_usermod_invalid_user/data/usermod.err create mode 100755 tests/usertools/38_usermod_invalid_user/usermod.test create mode 100644 tests/usertools/39_usermod_-c_invalid_comment/config.txt create mode 100644 tests/usertools/39_usermod_-c_invalid_comment/config/etc/default/useradd create mode 100644 tests/usertools/39_usermod_-c_invalid_comment/config/etc/group create mode 100644 tests/usertools/39_usermod_-c_invalid_comment/config/etc/gshadow create mode 100644 tests/usertools/39_usermod_-c_invalid_comment/config/etc/passwd create mode 100644 tests/usertools/39_usermod_-c_invalid_comment/config/etc/shadow create mode 100644 tests/usertools/39_usermod_-c_invalid_comment/data/usermod.err create mode 100755 tests/usertools/39_usermod_-c_invalid_comment/usermod.test create mode 100644 tests/usertools/40_usermod_-d_invalid_homedir/config.txt create mode 100644 tests/usertools/40_usermod_-d_invalid_homedir/config/etc/default/useradd create mode 100644 tests/usertools/40_usermod_-d_invalid_homedir/config/etc/group create mode 100644 tests/usertools/40_usermod_-d_invalid_homedir/config/etc/gshadow create mode 100644 tests/usertools/40_usermod_-d_invalid_homedir/config/etc/passwd create mode 100644 tests/usertools/40_usermod_-d_invalid_homedir/config/etc/shadow create mode 100644 tests/usertools/40_usermod_-d_invalid_homedir/data/usermod.err create mode 100755 tests/usertools/40_usermod_-d_invalid_homedir/usermod.test create mode 100644 tests/usertools/41_usermod_-d_invalid_shell/config.txt create mode 100644 tests/usertools/41_usermod_-d_invalid_shell/config/etc/default/useradd create mode 100644 tests/usertools/41_usermod_-d_invalid_shell/config/etc/group create mode 100644 tests/usertools/41_usermod_-d_invalid_shell/config/etc/gshadow create mode 100644 tests/usertools/41_usermod_-d_invalid_shell/config/etc/passwd create mode 100644 tests/usertools/41_usermod_-d_invalid_shell/config/etc/shadow create mode 100644 tests/usertools/41_usermod_-d_invalid_shell/data/usermod.err create mode 100755 tests/usertools/41_usermod_-d_invalid_shell/usermod.test create mode 100644 tests/usertools/42_usermod_-g_invalid_group_name/config.txt create mode 100644 tests/usertools/42_usermod_-g_invalid_group_name/config/etc/default/useradd create mode 100644 tests/usertools/42_usermod_-g_invalid_group_name/config/etc/group create mode 100644 tests/usertools/42_usermod_-g_invalid_group_name/config/etc/gshadow create mode 100644 tests/usertools/42_usermod_-g_invalid_group_name/config/etc/passwd create mode 100644 tests/usertools/42_usermod_-g_invalid_group_name/config/etc/shadow create mode 100644 tests/usertools/42_usermod_-g_invalid_group_name/data/usermod.err create mode 100755 tests/usertools/42_usermod_-g_invalid_group_name/usermod.test create mode 100644 tests/usertools/43_usermod_-g_invalid_group_ID/config.txt create mode 100644 tests/usertools/43_usermod_-g_invalid_group_ID/config/etc/default/useradd create mode 100644 tests/usertools/43_usermod_-g_invalid_group_ID/config/etc/group create mode 100644 tests/usertools/43_usermod_-g_invalid_group_ID/config/etc/gshadow create mode 100644 tests/usertools/43_usermod_-g_invalid_group_ID/config/etc/passwd create mode 100644 tests/usertools/43_usermod_-g_invalid_group_ID/config/etc/shadow create mode 100644 tests/usertools/43_usermod_-g_invalid_group_ID/data/usermod.err create mode 100755 tests/usertools/43_usermod_-g_invalid_group_ID/usermod.test create mode 100644 tests/usertools/44_usermod-l_existing_username/config.txt create mode 100644 tests/usertools/44_usermod-l_existing_username/config/etc/default/useradd create mode 100644 tests/usertools/44_usermod-l_existing_username/config/etc/group create mode 100644 tests/usertools/44_usermod-l_existing_username/config/etc/gshadow create mode 100644 tests/usertools/44_usermod-l_existing_username/config/etc/passwd create mode 100644 tests/usertools/44_usermod-l_existing_username/config/etc/shadow create mode 100644 tests/usertools/44_usermod-l_existing_username/data/usermod.err create mode 100755 tests/usertools/44_usermod-l_existing_username/usermod.test create mode 100644 tests/usertools/45_usermod-l_existing_username_passwd/config.txt create mode 100644 tests/usertools/45_usermod-l_existing_username_passwd/config/etc/default/useradd create mode 100644 tests/usertools/45_usermod-l_existing_username_passwd/config/etc/group create mode 100644 tests/usertools/45_usermod-l_existing_username_passwd/config/etc/gshadow create mode 100644 tests/usertools/45_usermod-l_existing_username_passwd/config/etc/passwd create mode 100644 tests/usertools/45_usermod-l_existing_username_passwd/config/etc/shadow create mode 100644 tests/usertools/45_usermod-l_existing_username_passwd/data/usermod.err create mode 100755 tests/usertools/45_usermod-l_existing_username_passwd/usermod.test create mode 100644 tests/usertools/46_usermod-l_existing_username_shadow/config.txt create mode 100644 tests/usertools/46_usermod-l_existing_username_shadow/config/etc/default/useradd create mode 100644 tests/usertools/46_usermod-l_existing_username_shadow/config/etc/group create mode 100644 tests/usertools/46_usermod-l_existing_username_shadow/config/etc/gshadow create mode 100644 tests/usertools/46_usermod-l_existing_username_shadow/config/etc/passwd create mode 100644 tests/usertools/46_usermod-l_existing_username_shadow/config/etc/shadow create mode 100644 tests/usertools/46_usermod-l_existing_username_shadow/data/usermod.err create mode 100755 tests/usertools/46_usermod-l_existing_username_shadow/usermod.test create mode 100644 tests/usertools/47_usermod-l_no_shadow_file/config.txt create mode 100644 tests/usertools/47_usermod-l_no_shadow_file/config/etc/default/useradd create mode 100644 tests/usertools/47_usermod-l_no_shadow_file/config/etc/group create mode 100644 tests/usertools/47_usermod-l_no_shadow_file/config/etc/gshadow create mode 100644 tests/usertools/47_usermod-l_no_shadow_file/config/etc/passwd create mode 100644 tests/usertools/47_usermod-l_no_shadow_file/config/etc/shadow create mode 100644 tests/usertools/47_usermod-l_no_shadow_file/data/group create mode 100644 tests/usertools/47_usermod-l_no_shadow_file/data/gshadow create mode 100644 tests/usertools/47_usermod-l_no_shadow_file/data/passwd create mode 100755 tests/usertools/47_usermod-l_no_shadow_file/usermod.test create mode 100644 tests/usertools/48_userdel_keep_group_if_primary_other_user/config.txt create mode 100644 tests/usertools/48_userdel_keep_group_if_primary_other_user/config/etc/default/useradd create mode 100644 tests/usertools/48_userdel_keep_group_if_primary_other_user/config/etc/group create mode 100644 tests/usertools/48_userdel_keep_group_if_primary_other_user/config/etc/gshadow create mode 100644 tests/usertools/48_userdel_keep_group_if_primary_other_user/config/etc/passwd create mode 100644 tests/usertools/48_userdel_keep_group_if_primary_other_user/config/etc/shadow create mode 100644 tests/usertools/48_userdel_keep_group_if_primary_other_user/data/group create mode 100644 tests/usertools/48_userdel_keep_group_if_primary_other_user/data/passwd create mode 100644 tests/usertools/48_userdel_keep_group_if_primary_other_user/data/shadow create mode 100644 tests/usertools/48_userdel_keep_group_if_primary_other_user/data/userdel.err create mode 100755 tests/usertools/48_userdel_keep_group_if_primary_other_user/userdel.test create mode 100644 tests/usertools/49_userdel_delete_users_group/config.txt create mode 100644 tests/usertools/49_userdel_delete_users_group/config/etc/default/useradd create mode 100644 tests/usertools/49_userdel_delete_users_group/config/etc/group create mode 100644 tests/usertools/49_userdel_delete_users_group/config/etc/gshadow create mode 100644 tests/usertools/49_userdel_delete_users_group/config/etc/passwd create mode 100644 tests/usertools/49_userdel_delete_users_group/config/etc/shadow create mode 100644 tests/usertools/49_userdel_delete_users_group/data/group create mode 100644 tests/usertools/49_userdel_delete_users_group/data/gshadow create mode 100644 tests/usertools/49_userdel_delete_users_group/data/passwd create mode 100644 tests/usertools/49_userdel_delete_users_group/data/shadow create mode 100755 tests/usertools/49_userdel_delete_users_group/userdel.test create mode 100644 tests/usertools/50_userdel_delete_users_group_no_gshadow_group/config.txt create mode 100644 tests/usertools/50_userdel_delete_users_group_no_gshadow_group/config/etc/default/useradd create mode 100644 tests/usertools/50_userdel_delete_users_group_no_gshadow_group/config/etc/group create mode 100644 tests/usertools/50_userdel_delete_users_group_no_gshadow_group/config/etc/gshadow create mode 100644 tests/usertools/50_userdel_delete_users_group_no_gshadow_group/config/etc/passwd create mode 100644 tests/usertools/50_userdel_delete_users_group_no_gshadow_group/config/etc/shadow create mode 100644 tests/usertools/50_userdel_delete_users_group_no_gshadow_group/data/group create mode 100644 tests/usertools/50_userdel_delete_users_group_no_gshadow_group/data/passwd create mode 100644 tests/usertools/50_userdel_delete_users_group_no_gshadow_group/data/shadow create mode 100755 tests/usertools/50_userdel_delete_users_group_no_gshadow_group/userdel.test create mode 100644 tests/usertools/51_userdel_delete_users_group_no_gshadow_file/config.txt create mode 100644 tests/usertools/51_userdel_delete_users_group_no_gshadow_file/config/etc/default/useradd create mode 100644 tests/usertools/51_userdel_delete_users_group_no_gshadow_file/config/etc/group create mode 100644 tests/usertools/51_userdel_delete_users_group_no_gshadow_file/config/etc/gshadow create mode 100644 tests/usertools/51_userdel_delete_users_group_no_gshadow_file/config/etc/passwd create mode 100644 tests/usertools/51_userdel_delete_users_group_no_gshadow_file/config/etc/shadow create mode 100644 tests/usertools/51_userdel_delete_users_group_no_gshadow_file/data/group create mode 100644 tests/usertools/51_userdel_delete_users_group_no_gshadow_file/data/passwd create mode 100644 tests/usertools/51_userdel_delete_users_group_no_gshadow_file/data/shadow create mode 100755 tests/usertools/51_userdel_delete_users_group_no_gshadow_file/userdel.test create mode 100644 tests/usertools/52_userdel_delete_user_no_shadow_entry/config.txt create mode 100644 tests/usertools/52_userdel_delete_user_no_shadow_entry/config/etc/default/useradd create mode 100644 tests/usertools/52_userdel_delete_user_no_shadow_entry/config/etc/group create mode 100644 tests/usertools/52_userdel_delete_user_no_shadow_entry/config/etc/gshadow create mode 100644 tests/usertools/52_userdel_delete_user_no_shadow_entry/config/etc/passwd create mode 100644 tests/usertools/52_userdel_delete_user_no_shadow_entry/config/etc/shadow create mode 100644 tests/usertools/52_userdel_delete_user_no_shadow_entry/data/group create mode 100644 tests/usertools/52_userdel_delete_user_no_shadow_entry/data/gshadow create mode 100644 tests/usertools/52_userdel_delete_user_no_shadow_entry/data/passwd create mode 100755 tests/usertools/52_userdel_delete_user_no_shadow_entry/userdel.test create mode 100644 tests/usertools/53_userdel_delete_user_no_shadow_file/config.txt create mode 100644 tests/usertools/53_userdel_delete_user_no_shadow_file/config/etc/default/useradd create mode 100644 tests/usertools/53_userdel_delete_user_no_shadow_file/config/etc/group create mode 100644 tests/usertools/53_userdel_delete_user_no_shadow_file/config/etc/gshadow create mode 100644 tests/usertools/53_userdel_delete_user_no_shadow_file/config/etc/passwd create mode 100644 tests/usertools/53_userdel_delete_user_no_shadow_file/config/etc/shadow create mode 100644 tests/usertools/53_userdel_delete_user_no_shadow_file/data/group create mode 100644 tests/usertools/53_userdel_delete_user_no_shadow_file/data/gshadow create mode 100644 tests/usertools/53_userdel_delete_user_no_shadow_file/data/passwd create mode 100755 tests/usertools/53_userdel_delete_user_no_shadow_file/userdel.test create mode 100644 tests/usertools/54_usermod-u_invalid_UID_4294967295/config.txt create mode 100644 tests/usertools/54_usermod-u_invalid_UID_4294967295/config/etc/default/useradd create mode 100644 tests/usertools/54_usermod-u_invalid_UID_4294967295/config/etc/group create mode 100644 tests/usertools/54_usermod-u_invalid_UID_4294967295/config/etc/gshadow create mode 100644 tests/usertools/54_usermod-u_invalid_UID_4294967295/config/etc/passwd create mode 100644 tests/usertools/54_usermod-u_invalid_UID_4294967295/config/etc/shadow create mode 100644 tests/usertools/54_usermod-u_invalid_UID_4294967295/data/usermod.err create mode 100755 tests/usertools/54_usermod-u_invalid_UID_4294967295/usermod.test create mode 100644 tests/usertools/55_userdel_busy_user/config.txt create mode 100644 tests/usertools/55_userdel_busy_user/config/etc/default/useradd create mode 100644 tests/usertools/55_userdel_busy_user/config/etc/group create mode 100644 tests/usertools/55_userdel_busy_user/config/etc/gshadow create mode 100644 tests/usertools/55_userdel_busy_user/config/etc/passwd create mode 100644 tests/usertools/55_userdel_busy_user/config/etc/shadow create mode 100644 tests/usertools/55_userdel_busy_user/data/userdel.err create mode 100755 tests/usertools/55_userdel_busy_user/userdel.test create mode 100644 tests/usertools/56_userdel_locked_passwd/config.txt create mode 100644 tests/usertools/56_userdel_locked_passwd/config/etc/default/useradd create mode 100644 tests/usertools/56_userdel_locked_passwd/config/etc/group create mode 100644 tests/usertools/56_userdel_locked_passwd/config/etc/gshadow create mode 100644 tests/usertools/56_userdel_locked_passwd/config/etc/passwd create mode 100644 tests/usertools/56_userdel_locked_passwd/config/etc/shadow create mode 100644 tests/usertools/56_userdel_locked_passwd/data/userdel.err create mode 100755 tests/usertools/56_userdel_locked_passwd/userdel.test create mode 100644 tests/usertools/57_userdel_locked_group/config.txt create mode 100644 tests/usertools/57_userdel_locked_group/config/etc/default/useradd create mode 100644 tests/usertools/57_userdel_locked_group/config/etc/group create mode 100644 tests/usertools/57_userdel_locked_group/config/etc/gshadow create mode 100644 tests/usertools/57_userdel_locked_group/config/etc/passwd create mode 100644 tests/usertools/57_userdel_locked_group/config/etc/shadow create mode 100644 tests/usertools/57_userdel_locked_group/data/userdel.err create mode 100755 tests/usertools/57_userdel_locked_group/userdel.test create mode 100644 tests/usertools/58_userdel_locked_shadow/config.txt create mode 100644 tests/usertools/58_userdel_locked_shadow/config/etc/default/useradd create mode 100644 tests/usertools/58_userdel_locked_shadow/config/etc/group create mode 100644 tests/usertools/58_userdel_locked_shadow/config/etc/gshadow create mode 100644 tests/usertools/58_userdel_locked_shadow/config/etc/passwd create mode 100644 tests/usertools/58_userdel_locked_shadow/config/etc/shadow create mode 100644 tests/usertools/58_userdel_locked_shadow/data/userdel.err create mode 100755 tests/usertools/58_userdel_locked_shadow/userdel.test create mode 100644 tests/usertools/59_userdel_locked_gshadow/config.txt create mode 100644 tests/usertools/59_userdel_locked_gshadow/config/etc/default/useradd create mode 100644 tests/usertools/59_userdel_locked_gshadow/config/etc/group create mode 100644 tests/usertools/59_userdel_locked_gshadow/config/etc/gshadow create mode 100644 tests/usertools/59_userdel_locked_gshadow/config/etc/passwd create mode 100644 tests/usertools/59_userdel_locked_gshadow/config/etc/shadow create mode 100644 tests/usertools/59_userdel_locked_gshadow/data/userdel.err create mode 100755 tests/usertools/59_userdel_locked_gshadow/userdel.test create mode 100644 tests/usertools/60_userdel_invalid_user/config.txt create mode 100644 tests/usertools/60_userdel_invalid_user/config/etc/default/useradd create mode 100644 tests/usertools/60_userdel_invalid_user/config/etc/group create mode 100644 tests/usertools/60_userdel_invalid_user/config/etc/gshadow create mode 100644 tests/usertools/60_userdel_invalid_user/config/etc/passwd create mode 100644 tests/usertools/60_userdel_invalid_user/config/etc/shadow create mode 100644 tests/usertools/60_userdel_invalid_user/data/userdel.err create mode 100755 tests/usertools/60_userdel_invalid_user/userdel.test create mode 100644 tests/usertools/61_userdel_del_homedir_with_symlinks/config.txt create mode 100644 tests/usertools/61_userdel_del_homedir_with_symlinks/config/etc/default/useradd create mode 100644 tests/usertools/61_userdel_del_homedir_with_symlinks/config/etc/group create mode 100644 tests/usertools/61_userdel_del_homedir_with_symlinks/config/etc/gshadow create mode 100644 tests/usertools/61_userdel_del_homedir_with_symlinks/config/etc/passwd create mode 100644 tests/usertools/61_userdel_del_homedir_with_symlinks/config/etc/shadow create mode 100644 tests/usertools/61_userdel_del_homedir_with_symlinks/data/group create mode 100644 tests/usertools/61_userdel_del_homedir_with_symlinks/data/gshadow create mode 100644 tests/usertools/61_userdel_del_homedir_with_symlinks/data/passwd create mode 100644 tests/usertools/61_userdel_del_homedir_with_symlinks/data/shadow create mode 100644 tests/usertools/61_userdel_del_homedir_with_symlinks/data/userdel.err create mode 100755 tests/usertools/61_userdel_del_homedir_with_symlinks/userdel.test create mode 100755 tests/usertools/chpasswd-PAM/01_chpasswd_invalid_user/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/01_chpasswd_invalid_user/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/01_chpasswd_invalid_user/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/01_chpasswd_invalid_user/config/etc/pam.d/chpasswd create mode 100644 tests/usertools/chpasswd-PAM/01_chpasswd_invalid_user/config/etc/pam.d/common-password create mode 100644 tests/usertools/chpasswd-PAM/01_chpasswd_invalid_user/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/01_chpasswd_invalid_user/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/01_chpasswd_invalid_user/data/chpasswd.err create mode 100644 tests/usertools/chpasswd-PAM/01_chpasswd_invalid_user/data/shadow create mode 100755 tests/usertools/chpasswd-PAM/02_chpasswd_multiple_users/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/02_chpasswd_multiple_users/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/02_chpasswd_multiple_users/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/02_chpasswd_multiple_users/config/etc/pam.d/chpasswd create mode 100644 tests/usertools/chpasswd-PAM/02_chpasswd_multiple_users/config/etc/pam.d/common-password create mode 100644 tests/usertools/chpasswd-PAM/02_chpasswd_multiple_users/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/02_chpasswd_multiple_users/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/02_chpasswd_multiple_users/data/shadow create mode 100755 tests/usertools/chpasswd-PAM/03_chpasswd_no_shadow_file/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/03_chpasswd_no_shadow_file/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/03_chpasswd_no_shadow_file/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/03_chpasswd_no_shadow_file/config/etc/pam.d/chpasswd create mode 100644 tests/usertools/chpasswd-PAM/03_chpasswd_no_shadow_file/config/etc/pam.d/common-password create mode 100644 tests/usertools/chpasswd-PAM/03_chpasswd_no_shadow_file/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/03_chpasswd_no_shadow_file/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/03_chpasswd_no_shadow_file/data/passwd create mode 100755 tests/usertools/chpasswd-PAM/04_chpasswd_no_shadow_entry/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/04_chpasswd_no_shadow_entry/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/04_chpasswd_no_shadow_entry/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/04_chpasswd_no_shadow_entry/config/etc/pam.d/chpasswd create mode 100644 tests/usertools/chpasswd-PAM/04_chpasswd_no_shadow_entry/config/etc/pam.d/common-password create mode 100644 tests/usertools/chpasswd-PAM/04_chpasswd_no_shadow_entry/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/04_chpasswd_no_shadow_entry/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/04_chpasswd_no_shadow_entry/data/shadow create mode 100755 tests/usertools/chpasswd-PAM/05_chpasswd_error_no_password/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/05_chpasswd_error_no_password/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/05_chpasswd_error_no_password/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/05_chpasswd_error_no_password/config/etc/pam.d/chpasswd create mode 100644 tests/usertools/chpasswd-PAM/05_chpasswd_error_no_password/config/etc/pam.d/common-password create mode 100644 tests/usertools/chpasswd-PAM/05_chpasswd_error_no_password/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/05_chpasswd_error_no_password/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/05_chpasswd_error_no_password/data/chpasswd.err create mode 100644 tests/usertools/chpasswd-PAM/05_chpasswd_error_no_password/data/shadow create mode 100755 tests/usertools/chpasswd-PAM/06_chpasswd_usage/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/06_chpasswd_usage/config.txt create mode 100644 tests/usertools/chpasswd-PAM/06_chpasswd_usage/config/etc/default/useradd create mode 100644 tests/usertools/chpasswd-PAM/06_chpasswd_usage/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/06_chpasswd_usage/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/06_chpasswd_usage/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/06_chpasswd_usage/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/06_chpasswd_usage/data/usage.out create mode 100755 tests/usertools/chpasswd-PAM/07_chpasswd_usage_bad_option/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/07_chpasswd_usage_bad_option/config.txt create mode 100644 tests/usertools/chpasswd-PAM/07_chpasswd_usage_bad_option/config/etc/default/useradd create mode 100644 tests/usertools/chpasswd-PAM/07_chpasswd_usage_bad_option/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/07_chpasswd_usage_bad_option/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/07_chpasswd_usage_bad_option/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/07_chpasswd_usage_bad_option/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/07_chpasswd_usage_bad_option/data/usage.out create mode 100755 tests/usertools/chpasswd-PAM/08_chpasswd_usage-e-m_exclusive/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/08_chpasswd_usage-e-m_exclusive/config.txt create mode 100644 tests/usertools/chpasswd-PAM/08_chpasswd_usage-e-m_exclusive/config/etc/default/useradd create mode 100644 tests/usertools/chpasswd-PAM/08_chpasswd_usage-e-m_exclusive/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/08_chpasswd_usage-e-m_exclusive/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/08_chpasswd_usage-e-m_exclusive/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/08_chpasswd_usage-e-m_exclusive/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/08_chpasswd_usage-e-m_exclusive/data/usage.out create mode 100755 tests/usertools/chpasswd-PAM/09_chpasswd_usage-e-c_exclusive/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/09_chpasswd_usage-e-c_exclusive/config.txt create mode 100644 tests/usertools/chpasswd-PAM/09_chpasswd_usage-e-c_exclusive/config/etc/default/useradd create mode 100644 tests/usertools/chpasswd-PAM/09_chpasswd_usage-e-c_exclusive/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/09_chpasswd_usage-e-c_exclusive/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/09_chpasswd_usage-e-c_exclusive/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/09_chpasswd_usage-e-c_exclusive/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/09_chpasswd_usage-e-c_exclusive/data/usage.out create mode 100755 tests/usertools/chpasswd-PAM/10_chpasswd_usage-m-c_exclusive/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/10_chpasswd_usage-m-c_exclusive/config.txt create mode 100644 tests/usertools/chpasswd-PAM/10_chpasswd_usage-m-c_exclusive/config/etc/default/useradd create mode 100644 tests/usertools/chpasswd-PAM/10_chpasswd_usage-m-c_exclusive/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/10_chpasswd_usage-m-c_exclusive/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/10_chpasswd_usage-m-c_exclusive/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/10_chpasswd_usage-m-c_exclusive/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/10_chpasswd_usage-m-c_exclusive/data/usage.out create mode 100755 tests/usertools/chpasswd-PAM/11_chpasswd_usage-s_without-c/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/11_chpasswd_usage-s_without-c/config.txt create mode 100644 tests/usertools/chpasswd-PAM/11_chpasswd_usage-s_without-c/config/etc/default/useradd create mode 100644 tests/usertools/chpasswd-PAM/11_chpasswd_usage-s_without-c/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/11_chpasswd_usage-s_without-c/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/11_chpasswd_usage-s_without-c/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/11_chpasswd_usage-s_without-c/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/11_chpasswd_usage-s_without-c/data/usage.out create mode 100755 tests/usertools/chpasswd-PAM/12_chpasswd_usage-s_invalid/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/12_chpasswd_usage-s_invalid/config.txt create mode 100644 tests/usertools/chpasswd-PAM/12_chpasswd_usage-s_invalid/config/etc/default/useradd create mode 100644 tests/usertools/chpasswd-PAM/12_chpasswd_usage-s_invalid/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/12_chpasswd_usage-s_invalid/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/12_chpasswd_usage-s_invalid/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/12_chpasswd_usage-s_invalid/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/12_chpasswd_usage-s_invalid/data/usage.out create mode 100755 tests/usertools/chpasswd-PAM/13_chpasswd_usage-c_invalid/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/13_chpasswd_usage-c_invalid/config.txt create mode 100644 tests/usertools/chpasswd-PAM/13_chpasswd_usage-c_invalid/config/etc/default/useradd create mode 100644 tests/usertools/chpasswd-PAM/13_chpasswd_usage-c_invalid/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/13_chpasswd_usage-c_invalid/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/13_chpasswd_usage-c_invalid/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/13_chpasswd_usage-c_invalid/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/13_chpasswd_usage-c_invalid/data/usage.out create mode 100755 tests/usertools/chpasswd-PAM/14_chpasswd_password_encrypted/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/14_chpasswd_password_encrypted/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/14_chpasswd_password_encrypted/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/14_chpasswd_password_encrypted/config/etc/pam.d/chpasswd create mode 100644 tests/usertools/chpasswd-PAM/14_chpasswd_password_encrypted/config/etc/pam.d/common-password create mode 100644 tests/usertools/chpasswd-PAM/14_chpasswd_password_encrypted/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/14_chpasswd_password_encrypted/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/14_chpasswd_password_encrypted/data/shadow create mode 100755 tests/usertools/chpasswd-PAM/15_chpasswd_password_md5/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/15_chpasswd_password_md5/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/15_chpasswd_password_md5/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/15_chpasswd_password_md5/config/etc/pam.d/chpasswd create mode 100644 tests/usertools/chpasswd-PAM/15_chpasswd_password_md5/config/etc/pam.d/common-password create mode 100644 tests/usertools/chpasswd-PAM/15_chpasswd_password_md5/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/15_chpasswd_password_md5/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/15_chpasswd_password_md5/data/shadow create mode 100755 tests/usertools/chpasswd-PAM/16_chpasswd_password_NONE/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/16_chpasswd_password_NONE/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/16_chpasswd_password_NONE/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/16_chpasswd_password_NONE/config/etc/pam.d/chpasswd create mode 100644 tests/usertools/chpasswd-PAM/16_chpasswd_password_NONE/config/etc/pam.d/common-password create mode 100644 tests/usertools/chpasswd-PAM/16_chpasswd_password_NONE/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/16_chpasswd_password_NONE/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/16_chpasswd_password_NONE/data/shadow create mode 100755 tests/usertools/chpasswd-PAM/17_chpasswd_password_MD5/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/17_chpasswd_password_MD5/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/17_chpasswd_password_MD5/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/17_chpasswd_password_MD5/config/etc/pam.d/chpasswd create mode 100644 tests/usertools/chpasswd-PAM/17_chpasswd_password_MD5/config/etc/pam.d/common-password create mode 100644 tests/usertools/chpasswd-PAM/17_chpasswd_password_MD5/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/17_chpasswd_password_MD5/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/17_chpasswd_password_MD5/data/shadow create mode 100755 tests/usertools/chpasswd-PAM/18_chpasswd_password_DES/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/18_chpasswd_password_DES/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/18_chpasswd_password_DES/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/18_chpasswd_password_DES/config/etc/pam.d/chpasswd create mode 100644 tests/usertools/chpasswd-PAM/18_chpasswd_password_DES/config/etc/pam.d/common-password create mode 100644 tests/usertools/chpasswd-PAM/18_chpasswd_password_DES/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/18_chpasswd_password_DES/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/18_chpasswd_password_DES/data/shadow create mode 100755 tests/usertools/chpasswd-PAM/19_chpasswd_password_SHA256/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/19_chpasswd_password_SHA256/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/19_chpasswd_password_SHA256/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/19_chpasswd_password_SHA256/config/etc/pam.d/chpasswd create mode 100644 tests/usertools/chpasswd-PAM/19_chpasswd_password_SHA256/config/etc/pam.d/common-password create mode 100644 tests/usertools/chpasswd-PAM/19_chpasswd_password_SHA256/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/19_chpasswd_password_SHA256/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/19_chpasswd_password_SHA256/data/shadow create mode 100755 tests/usertools/chpasswd-PAM/20_chpasswd_password_SHA256_rounds_900/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/20_chpasswd_password_SHA256_rounds_900/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/20_chpasswd_password_SHA256_rounds_900/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/20_chpasswd_password_SHA256_rounds_900/config/etc/pam.d/chpasswd create mode 100644 tests/usertools/chpasswd-PAM/20_chpasswd_password_SHA256_rounds_900/config/etc/pam.d/common-password create mode 100644 tests/usertools/chpasswd-PAM/20_chpasswd_password_SHA256_rounds_900/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/20_chpasswd_password_SHA256_rounds_900/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/20_chpasswd_password_SHA256_rounds_900/data/shadow create mode 100755 tests/usertools/chpasswd-PAM/21_chpasswd_password_SHA256_rounds_9000/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/21_chpasswd_password_SHA256_rounds_9000/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/21_chpasswd_password_SHA256_rounds_9000/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/21_chpasswd_password_SHA256_rounds_9000/config/etc/pam.d/chpasswd create mode 100644 tests/usertools/chpasswd-PAM/21_chpasswd_password_SHA256_rounds_9000/config/etc/pam.d/common-password create mode 100644 tests/usertools/chpasswd-PAM/21_chpasswd_password_SHA256_rounds_9000/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/21_chpasswd_password_SHA256_rounds_9000/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/21_chpasswd_password_SHA256_rounds_9000/data/shadow create mode 100755 tests/usertools/chpasswd-PAM/22_chpasswd_password_SHA512/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/22_chpasswd_password_SHA512/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/22_chpasswd_password_SHA512/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/22_chpasswd_password_SHA512/config/etc/pam.d/chpasswd create mode 100644 tests/usertools/chpasswd-PAM/22_chpasswd_password_SHA512/config/etc/pam.d/common-password create mode 100644 tests/usertools/chpasswd-PAM/22_chpasswd_password_SHA512/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/22_chpasswd_password_SHA512/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/22_chpasswd_password_SHA512/data/shadow create mode 100755 tests/usertools/chpasswd-PAM/23_chpasswd_password_SHA512_rounds_900/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/23_chpasswd_password_SHA512_rounds_900/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/23_chpasswd_password_SHA512_rounds_900/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/23_chpasswd_password_SHA512_rounds_900/config/etc/pam.d/chpasswd create mode 100644 tests/usertools/chpasswd-PAM/23_chpasswd_password_SHA512_rounds_900/config/etc/pam.d/common-password create mode 100644 tests/usertools/chpasswd-PAM/23_chpasswd_password_SHA512_rounds_900/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/23_chpasswd_password_SHA512_rounds_900/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/23_chpasswd_password_SHA512_rounds_900/data/shadow create mode 100755 tests/usertools/chpasswd-PAM/24_chpasswd_password_SHA512_rounds_9000/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/24_chpasswd_password_SHA512_rounds_9000/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/24_chpasswd_password_SHA512_rounds_9000/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/24_chpasswd_password_SHA512_rounds_9000/config/etc/pam.d/chpasswd create mode 100644 tests/usertools/chpasswd-PAM/24_chpasswd_password_SHA512_rounds_9000/config/etc/pam.d/common-password create mode 100644 tests/usertools/chpasswd-PAM/24_chpasswd_password_SHA512_rounds_9000/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/24_chpasswd_password_SHA512_rounds_9000/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/24_chpasswd_password_SHA512_rounds_9000/data/shadow create mode 100755 tests/usertools/chpasswd-PAM/25_chpasswd-e_no_shadow_file/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/25_chpasswd-e_no_shadow_file/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/25_chpasswd-e_no_shadow_file/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/25_chpasswd-e_no_shadow_file/config/etc/pam.d/chpasswd create mode 100644 tests/usertools/chpasswd-PAM/25_chpasswd-e_no_shadow_file/config/etc/pam.d/common-password create mode 100644 tests/usertools/chpasswd-PAM/25_chpasswd-e_no_shadow_file/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/25_chpasswd-e_no_shadow_file/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/25_chpasswd-e_no_shadow_file/data/passwd create mode 100755 tests/usertools/chpasswd-PAM/26_chpasswd_no_shadow_file_invalid_passwd/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/26_chpasswd_no_shadow_file_invalid_passwd/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/26_chpasswd_no_shadow_file_invalid_passwd/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/26_chpasswd_no_shadow_file_invalid_passwd/config/etc/pam.d/chpasswd create mode 100644 tests/usertools/chpasswd-PAM/26_chpasswd_no_shadow_file_invalid_passwd/config/etc/pam.d/common-password create mode 100644 tests/usertools/chpasswd-PAM/26_chpasswd_no_shadow_file_invalid_passwd/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/26_chpasswd_no_shadow_file_invalid_passwd/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/26_chpasswd_no_shadow_file_invalid_passwd/data/chpasswd.err create mode 100755 tests/usertools/chpasswd-PAM/27_chpasswd_no_shadow_file_1st_invalid_passwd_entry/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/27_chpasswd_no_shadow_file_1st_invalid_passwd_entry/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/27_chpasswd_no_shadow_file_1st_invalid_passwd_entry/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/27_chpasswd_no_shadow_file_1st_invalid_passwd_entry/config/etc/pam.d/chpasswd create mode 100644 tests/usertools/chpasswd-PAM/27_chpasswd_no_shadow_file_1st_invalid_passwd_entry/config/etc/pam.d/common-password create mode 100644 tests/usertools/chpasswd-PAM/27_chpasswd_no_shadow_file_1st_invalid_passwd_entry/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/27_chpasswd_no_shadow_file_1st_invalid_passwd_entry/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/27_chpasswd_no_shadow_file_1st_invalid_passwd_entry/data/chpasswd.err create mode 100644 tests/usertools/chpasswd-PAM/27_chpasswd_no_shadow_file_1st_invalid_passwd_entry/data/passwd create mode 100755 tests/usertools/chpasswd-PAM/28_chpasswd_no_shadow_file_2nd_invalid_passwd_entry/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/28_chpasswd_no_shadow_file_2nd_invalid_passwd_entry/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/28_chpasswd_no_shadow_file_2nd_invalid_passwd_entry/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/28_chpasswd_no_shadow_file_2nd_invalid_passwd_entry/config/etc/pam.d/chpasswd create mode 100644 tests/usertools/chpasswd-PAM/28_chpasswd_no_shadow_file_2nd_invalid_passwd_entry/config/etc/pam.d/common-password create mode 100644 tests/usertools/chpasswd-PAM/28_chpasswd_no_shadow_file_2nd_invalid_passwd_entry/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/28_chpasswd_no_shadow_file_2nd_invalid_passwd_entry/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/28_chpasswd_no_shadow_file_2nd_invalid_passwd_entry/data/chpasswd.err create mode 100644 tests/usertools/chpasswd-PAM/28_chpasswd_no_shadow_file_2nd_invalid_passwd_entry/data/passwd create mode 100755 tests/usertools/chpasswd-PAM/29_chpasswd-e_no_shadow_entry/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/29_chpasswd-e_no_shadow_entry/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/29_chpasswd-e_no_shadow_entry/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/29_chpasswd-e_no_shadow_entry/config/etc/pam.d/chpasswd create mode 100644 tests/usertools/chpasswd-PAM/29_chpasswd-e_no_shadow_entry/config/etc/pam.d/common-password create mode 100644 tests/usertools/chpasswd-PAM/29_chpasswd-e_no_shadow_entry/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/29_chpasswd-e_no_shadow_entry/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/29_chpasswd-e_no_shadow_entry/data/passwd create mode 100644 tests/usertools/chpasswd-PAM/29_chpasswd-e_no_shadow_entry/data/shadow create mode 100755 tests/usertools/chpasswd-PAM/30_chpasswd_locked_passwd/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/30_chpasswd_locked_passwd/config.txt create mode 100644 tests/usertools/chpasswd-PAM/30_chpasswd_locked_passwd/config/etc/default/useradd create mode 100644 tests/usertools/chpasswd-PAM/30_chpasswd_locked_passwd/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/30_chpasswd_locked_passwd/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/30_chpasswd_locked_passwd/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/30_chpasswd_locked_passwd/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/30_chpasswd_locked_passwd/data/chpasswd.err create mode 100755 tests/usertools/chpasswd-PAM/31_chpasswd_locked_shadow/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/31_chpasswd_locked_shadow/config.txt create mode 100644 tests/usertools/chpasswd-PAM/31_chpasswd_locked_shadow/config/etc/default/useradd create mode 100644 tests/usertools/chpasswd-PAM/31_chpasswd_locked_shadow/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/31_chpasswd_locked_shadow/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/31_chpasswd_locked_shadow/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/31_chpasswd_locked_shadow/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/31_chpasswd_locked_shadow/data/chpasswd.err create mode 100755 tests/usertools/chpasswd-PAM/32_chpasswd_invalid_user/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/32_chpasswd_invalid_user/config.txt create mode 100644 tests/usertools/chpasswd-PAM/32_chpasswd_invalid_user/config/etc/default/useradd create mode 100644 tests/usertools/chpasswd-PAM/32_chpasswd_invalid_user/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/32_chpasswd_invalid_user/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/32_chpasswd_invalid_user/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/32_chpasswd_invalid_user/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/32_chpasswd_invalid_user/data/chpasswd.err create mode 100644 tests/usertools/chpasswd-PAM/32_chpasswd_invalid_user/data/shadow create mode 100755 tests/usertools/chpasswd-PAM/33_chpasswd-e_invalid_user/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/33_chpasswd-e_invalid_user/config.txt create mode 100644 tests/usertools/chpasswd-PAM/33_chpasswd-e_invalid_user/config/etc/default/useradd create mode 100644 tests/usertools/chpasswd-PAM/33_chpasswd-e_invalid_user/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/33_chpasswd-e_invalid_user/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/33_chpasswd-e_invalid_user/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/33_chpasswd-e_invalid_user/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/33_chpasswd-e_invalid_user/data/chpasswd.err create mode 100755 tests/usertools/chpasswd-PAM/34_chpasswd-e_password_shadow_and_passwd/chpasswd.test create mode 100644 tests/usertools/chpasswd-PAM/34_chpasswd-e_password_shadow_and_passwd/config/etc/group create mode 100644 tests/usertools/chpasswd-PAM/34_chpasswd-e_password_shadow_and_passwd/config/etc/gshadow create mode 100644 tests/usertools/chpasswd-PAM/34_chpasswd-e_password_shadow_and_passwd/config/etc/pam.d/chpasswd create mode 100644 tests/usertools/chpasswd-PAM/34_chpasswd-e_password_shadow_and_passwd/config/etc/pam.d/common-password create mode 100644 tests/usertools/chpasswd-PAM/34_chpasswd-e_password_shadow_and_passwd/config/etc/passwd create mode 100644 tests/usertools/chpasswd-PAM/34_chpasswd-e_password_shadow_and_passwd/config/etc/shadow create mode 100644 tests/usertools/chpasswd-PAM/34_chpasswd-e_password_shadow_and_passwd/data/passwd create mode 100644 tests/usertools/chpasswd-PAM/34_chpasswd-e_password_shadow_and_passwd/data/shadow create mode 100755 tests/usertools/chpasswd/01_chpasswd_invalid_user/chpasswd.test create mode 100644 tests/usertools/chpasswd/01_chpasswd_invalid_user/config/etc/group create mode 100644 tests/usertools/chpasswd/01_chpasswd_invalid_user/config/etc/gshadow create mode 100644 tests/usertools/chpasswd/01_chpasswd_invalid_user/config/etc/login.defs create mode 100644 tests/usertools/chpasswd/01_chpasswd_invalid_user/config/etc/passwd create mode 100644 tests/usertools/chpasswd/01_chpasswd_invalid_user/config/etc/shadow create mode 100644 tests/usertools/chpasswd/01_chpasswd_invalid_user/data/chpasswd.err create mode 100755 tests/usertools/chpasswd/02_chpasswd_multiple_users/chpasswd.test create mode 100644 tests/usertools/chpasswd/02_chpasswd_multiple_users/config/etc/group create mode 100644 tests/usertools/chpasswd/02_chpasswd_multiple_users/config/etc/gshadow create mode 100644 tests/usertools/chpasswd/02_chpasswd_multiple_users/config/etc/login.defs create mode 100644 tests/usertools/chpasswd/02_chpasswd_multiple_users/config/etc/passwd create mode 100644 tests/usertools/chpasswd/02_chpasswd_multiple_users/config/etc/shadow create mode 100644 tests/usertools/chpasswd/02_chpasswd_multiple_users/data/shadow create mode 100755 tests/usertools/chpasswd/03_chpasswd_no_shadow_file/chpasswd.test create mode 100644 tests/usertools/chpasswd/03_chpasswd_no_shadow_file/config/etc/group create mode 100644 tests/usertools/chpasswd/03_chpasswd_no_shadow_file/config/etc/gshadow create mode 100644 tests/usertools/chpasswd/03_chpasswd_no_shadow_file/config/etc/login.defs create mode 100644 tests/usertools/chpasswd/03_chpasswd_no_shadow_file/config/etc/passwd create mode 100644 tests/usertools/chpasswd/03_chpasswd_no_shadow_file/config/etc/shadow create mode 100644 tests/usertools/chpasswd/03_chpasswd_no_shadow_file/data/passwd create mode 100755 tests/usertools/chpasswd/04_chpasswd_no_shadow_entry/chpasswd.test create mode 100644 tests/usertools/chpasswd/04_chpasswd_no_shadow_entry/config/etc/group create mode 100644 tests/usertools/chpasswd/04_chpasswd_no_shadow_entry/config/etc/gshadow create mode 100644 tests/usertools/chpasswd/04_chpasswd_no_shadow_entry/config/etc/login.defs create mode 100644 tests/usertools/chpasswd/04_chpasswd_no_shadow_entry/config/etc/passwd create mode 100644 tests/usertools/chpasswd/04_chpasswd_no_shadow_entry/config/etc/shadow create mode 100644 tests/usertools/chpasswd/04_chpasswd_no_shadow_entry/data/passwd create mode 100644 tests/usertools/chpasswd/04_chpasswd_no_shadow_entry/data/shadow create mode 100755 tests/usertools/chpasswd/05_chpasswd_error_no_password/chpasswd.test create mode 100644 tests/usertools/chpasswd/05_chpasswd_error_no_password/config/etc/group create mode 100644 tests/usertools/chpasswd/05_chpasswd_error_no_password/config/etc/gshadow create mode 100644 tests/usertools/chpasswd/05_chpasswd_error_no_password/config/etc/login.defs create mode 100644 tests/usertools/chpasswd/05_chpasswd_error_no_password/config/etc/passwd create mode 100644 tests/usertools/chpasswd/05_chpasswd_error_no_password/config/etc/shadow create mode 100644 tests/usertools/chpasswd/05_chpasswd_error_no_password/data/chpasswd.err create mode 100644 tests/usertools/useradd/01_useradd_usage/config.txt create mode 100644 tests/usertools/useradd/01_useradd_usage/config/etc/default/useradd create mode 100644 tests/usertools/useradd/01_useradd_usage/config/etc/group create mode 100644 tests/usertools/useradd/01_useradd_usage/config/etc/gshadow create mode 100644 tests/usertools/useradd/01_useradd_usage/config/etc/passwd create mode 100644 tests/usertools/useradd/01_useradd_usage/config/etc/shadow create mode 100644 tests/usertools/useradd/01_useradd_usage/data/usage.out create mode 100755 tests/usertools/useradd/01_useradd_usage/useradd.test create mode 100644 tests/usertools/useradd/02_useradd_usage_invalid_option/config.txt create mode 100644 tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/default/useradd create mode 100644 tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/group create mode 100644 tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/gshadow create mode 100644 tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/passwd create mode 100644 tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/shadow create mode 100644 tests/usertools/useradd/02_useradd_usage_invalid_option/data/usage.out create mode 100755 tests/usertools/useradd/02_useradd_usage_invalid_option/useradd.test create mode 100644 tests/usertools/useradd/03_useradd_usage_no_users/config.txt create mode 100644 tests/usertools/useradd/03_useradd_usage_no_users/config/etc/default/useradd create mode 100644 tests/usertools/useradd/03_useradd_usage_no_users/config/etc/group create mode 100644 tests/usertools/useradd/03_useradd_usage_no_users/config/etc/gshadow create mode 100644 tests/usertools/useradd/03_useradd_usage_no_users/config/etc/passwd create mode 100644 tests/usertools/useradd/03_useradd_usage_no_users/config/etc/shadow create mode 100644 tests/usertools/useradd/03_useradd_usage_no_users/data/usage.out create mode 100755 tests/usertools/useradd/03_useradd_usage_no_users/useradd.test create mode 100644 tests/usertools/useradd/04_useradd_usage_2_users/config.txt create mode 100644 tests/usertools/useradd/04_useradd_usage_2_users/config/etc/default/useradd create mode 100644 tests/usertools/useradd/04_useradd_usage_2_users/config/etc/group create mode 100644 tests/usertools/useradd/04_useradd_usage_2_users/config/etc/gshadow create mode 100644 tests/usertools/useradd/04_useradd_usage_2_users/config/etc/passwd create mode 100644 tests/usertools/useradd/04_useradd_usage_2_users/config/etc/shadow create mode 100644 tests/usertools/useradd/04_useradd_usage_2_users/data/usage.out create mode 100755 tests/usertools/useradd/04_useradd_usage_2_users/useradd.test create mode 100644 tests/usertools/useradd/05_useradd_usage-b_invalid1/config.txt create mode 100644 tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/default/useradd create mode 100644 tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/group create mode 100644 tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/gshadow create mode 100644 tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/passwd create mode 100644 tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/shadow create mode 100644 tests/usertools/useradd/05_useradd_usage-b_invalid1/data/usage.out create mode 100755 tests/usertools/useradd/05_useradd_usage-b_invalid1/useradd.test create mode 100644 tests/usertools/useradd/06_useradd_usage-b_invalid2/config.txt create mode 100644 tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/default/useradd create mode 100644 tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/group create mode 100644 tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/gshadow create mode 100644 tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/passwd create mode 100644 tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/shadow create mode 100644 tests/usertools/useradd/06_useradd_usage-b_invalid2/data/usage.out create mode 100755 tests/usertools/useradd/06_useradd_usage-b_invalid2/useradd.test create mode 100644 tests/usertools/useradd/07_useradd_usage-b_invalid3/config.txt create mode 100644 tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/default/useradd create mode 100644 tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/group create mode 100644 tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/gshadow create mode 100644 tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/passwd create mode 100644 tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/shadow create mode 100644 tests/usertools/useradd/07_useradd_usage-b_invalid3/data/usage.out create mode 100755 tests/usertools/useradd/07_useradd_usage-b_invalid3/useradd.test create mode 100644 tests/usertools/useradd/08_useradd_usage-c_invalid1/config.txt create mode 100644 tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/default/useradd create mode 100644 tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/group create mode 100644 tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/gshadow create mode 100644 tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/passwd create mode 100644 tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/shadow create mode 100644 tests/usertools/useradd/08_useradd_usage-c_invalid1/data/usage.out create mode 100755 tests/usertools/useradd/08_useradd_usage-c_invalid1/useradd.test create mode 100644 tests/usertools/useradd/09_useradd_usage-c_invalid2/config.txt create mode 100644 tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/default/useradd create mode 100644 tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/group create mode 100644 tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/gshadow create mode 100644 tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/passwd create mode 100644 tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/shadow create mode 100644 tests/usertools/useradd/09_useradd_usage-c_invalid2/data/usage.out create mode 100755 tests/usertools/useradd/09_useradd_usage-c_invalid2/useradd.test create mode 100644 tests/usertools/useradd/10_useradd_usage-d_invalid1/config.txt create mode 100644 tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/default/useradd create mode 100644 tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/group create mode 100644 tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/gshadow create mode 100644 tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/passwd create mode 100644 tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/shadow create mode 100644 tests/usertools/useradd/10_useradd_usage-d_invalid1/data/usage.out create mode 100755 tests/usertools/useradd/10_useradd_usage-d_invalid1/useradd.test create mode 100644 tests/usertools/useradd/11_useradd_usage-d_invalid2/config.txt create mode 100644 tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/default/useradd create mode 100644 tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/group create mode 100644 tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/gshadow create mode 100644 tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/passwd create mode 100644 tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/shadow create mode 100644 tests/usertools/useradd/11_useradd_usage-d_invalid2/data/usage.out create mode 100755 tests/usertools/useradd/11_useradd_usage-d_invalid2/useradd.test create mode 100644 tests/usertools/useradd/12_useradd_usage-d_invalid3/config.txt create mode 100644 tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/default/useradd create mode 100644 tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/group create mode 100644 tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/gshadow create mode 100644 tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/passwd create mode 100644 tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/shadow create mode 100644 tests/usertools/useradd/12_useradd_usage-d_invalid3/data/usage.out create mode 100755 tests/usertools/useradd/12_useradd_usage-d_invalid3/useradd.test create mode 100644 tests/usertools/useradd/13_useradd_usage-e_invalid1/config.txt create mode 100644 tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/default/useradd create mode 100644 tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/group create mode 100644 tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/gshadow create mode 100644 tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/passwd create mode 100644 tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/shadow create mode 100644 tests/usertools/useradd/13_useradd_usage-e_invalid1/data/usage.out create mode 100755 tests/usertools/useradd/13_useradd_usage-e_invalid1/useradd.test create mode 100644 tests/usertools/useradd/14_useradd_usage-e_invalid2/config.txt create mode 100644 tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/default/useradd create mode 100644 tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/group create mode 100644 tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/gshadow create mode 100644 tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/passwd create mode 100644 tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/shadow create mode 100644 tests/usertools/useradd/14_useradd_usage-e_invalid2/data/usage.out create mode 100755 tests/usertools/useradd/14_useradd_usage-e_invalid2/useradd.test create mode 100644 tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config.txt create mode 100644 tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/default/useradd create mode 100644 tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/group create mode 100644 tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/gshadow create mode 100644 tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/passwd create mode 100644 tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/shadow create mode 100644 tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/data/usage.out create mode 100755 tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/useradd.test create mode 100644 tests/usertools/useradd/16_useradd_usage-f_invalid1/config.txt create mode 100644 tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/default/useradd create mode 100644 tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/group create mode 100644 tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/gshadow create mode 100644 tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/passwd create mode 100644 tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/shadow create mode 100644 tests/usertools/useradd/16_useradd_usage-f_invalid1/data/usage.out create mode 100755 tests/usertools/useradd/16_useradd_usage-f_invalid1/useradd.test create mode 100644 tests/usertools/useradd/17_useradd_usage-f_invalid2/config.txt create mode 100644 tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/default/useradd create mode 100644 tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/group create mode 100644 tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/gshadow create mode 100644 tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/passwd create mode 100644 tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/shadow create mode 100644 tests/usertools/useradd/17_useradd_usage-f_invalid2/data/usage.out create mode 100755 tests/usertools/useradd/17_useradd_usage-f_invalid2/useradd.test create mode 100644 tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config.txt create mode 100644 tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/default/useradd create mode 100644 tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/group create mode 100644 tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/gshadow create mode 100644 tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/passwd create mode 100644 tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/shadow create mode 100644 tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/data/usage.out create mode 100755 tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/useradd.test create mode 100644 tests/usertools/useradd/19_useradd_usage-K_invalid1/config.txt create mode 100644 tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/default/useradd create mode 100644 tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/group create mode 100644 tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/gshadow create mode 100644 tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/passwd create mode 100644 tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/shadow create mode 100644 tests/usertools/useradd/19_useradd_usage-K_invalid1/data/usage.out create mode 100755 tests/usertools/useradd/19_useradd_usage-K_invalid1/useradd.test create mode 100644 tests/usertools/useradd/20_useradd_usage-O_invalid2/config.txt create mode 100644 tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/default/useradd create mode 100644 tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/group create mode 100644 tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/gshadow create mode 100644 tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/passwd create mode 100644 tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/shadow create mode 100644 tests/usertools/useradd/20_useradd_usage-O_invalid2/data/usage.out create mode 100755 tests/usertools/useradd/20_useradd_usage-O_invalid2/useradd.test create mode 100644 tests/usertools/useradd/21_useradd_usage-p_invalid1/config.txt create mode 100644 tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/default/useradd create mode 100644 tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/group create mode 100644 tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/gshadow create mode 100644 tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/passwd create mode 100644 tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/shadow create mode 100644 tests/usertools/useradd/21_useradd_usage-p_invalid1/data/usage.out create mode 100755 tests/usertools/useradd/21_useradd_usage-p_invalid1/useradd.test create mode 100644 tests/usertools/useradd/22_useradd_usage-p_invalid2/config.txt create mode 100644 tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/default/useradd create mode 100644 tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/group create mode 100644 tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/gshadow create mode 100644 tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/passwd create mode 100644 tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/shadow create mode 100644 tests/usertools/useradd/22_useradd_usage-p_invalid2/data/usage.out create mode 100755 tests/usertools/useradd/22_useradd_usage-p_invalid2/useradd.test create mode 100644 tests/usertools/useradd/23_useradd_usage-s_invalid1/config.txt create mode 100644 tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/default/useradd create mode 100644 tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/group create mode 100644 tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/gshadow create mode 100644 tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/passwd create mode 100644 tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/shadow create mode 100644 tests/usertools/useradd/23_useradd_usage-s_invalid1/data/usage.out create mode 100755 tests/usertools/useradd/23_useradd_usage-s_invalid1/useradd.test create mode 100644 tests/usertools/useradd/24_useradd_usage-s_invalid2/config.txt create mode 100644 tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/default/useradd create mode 100644 tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/group create mode 100644 tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/gshadow create mode 100644 tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/passwd create mode 100644 tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/shadow create mode 100644 tests/usertools/useradd/24_useradd_usage-s_invalid2/data/usage.out create mode 100755 tests/usertools/useradd/24_useradd_usage-s_invalid2/useradd.test create mode 100644 tests/usertools/useradd/25_useradd_usage-s_invalid3/config.txt create mode 100644 tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/default/useradd create mode 100644 tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/group create mode 100644 tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/gshadow create mode 100644 tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/passwd create mode 100644 tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/shadow create mode 100644 tests/usertools/useradd/25_useradd_usage-s_invalid3/data/usage.out create mode 100755 tests/usertools/useradd/25_useradd_usage-s_invalid3/useradd.test create mode 100644 tests/usertools/useradd/26_useradd_usage-o_without-u/config.txt create mode 100644 tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/default/useradd create mode 100644 tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/group create mode 100644 tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/gshadow create mode 100644 tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/passwd create mode 100644 tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/shadow create mode 100644 tests/usertools/useradd/26_useradd_usage-o_without-u/data/usage.out create mode 100755 tests/usertools/useradd/26_useradd_usage-o_without-u/useradd.test create mode 100644 tests/usertools/useradd/27_useradd_usage-k_without-m/config.txt create mode 100644 tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/default/useradd create mode 100644 tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/group create mode 100644 tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/gshadow create mode 100644 tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/passwd create mode 100644 tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/shadow create mode 100644 tests/usertools/useradd/27_useradd_usage-k_without-m/data/usage.out create mode 100755 tests/usertools/useradd/27_useradd_usage-k_without-m/useradd.test create mode 100644 tests/usertools/useradd/28_useradd_usage-U_with-g/config.txt create mode 100644 tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/default/useradd create mode 100644 tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/group create mode 100644 tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/gshadow create mode 100644 tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/passwd create mode 100644 tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/shadow create mode 100644 tests/usertools/useradd/28_useradd_usage-U_with-g/data/usage.out create mode 100755 tests/usertools/useradd/28_useradd_usage-U_with-g/useradd.test create mode 100644 tests/usertools/useradd/29_useradd_usage-U_with-N/config.txt create mode 100644 tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/default/useradd create mode 100644 tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/group create mode 100644 tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/gshadow create mode 100644 tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/passwd create mode 100644 tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/shadow create mode 100644 tests/usertools/useradd/29_useradd_usage-U_with-N/data/usage.out create mode 100755 tests/usertools/useradd/29_useradd_usage-U_with-N/useradd.test create mode 100644 tests/usertools/useradd/30_useradd_usage-m_with-M/config.txt create mode 100644 tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/default/useradd create mode 100644 tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/group create mode 100644 tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/gshadow create mode 100644 tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/passwd create mode 100644 tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/shadow create mode 100644 tests/usertools/useradd/30_useradd_usage-m_with-M/data/usage.out create mode 100755 tests/usertools/useradd/30_useradd_usage-m_with-M/useradd.test create mode 100644 tests/usertools/useradd/31_useradd_usage_user_with-D/config.txt create mode 100644 tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/default/useradd create mode 100644 tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/group create mode 100644 tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/gshadow create mode 100644 tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/passwd create mode 100644 tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/shadow create mode 100644 tests/usertools/useradd/31_useradd_usage_user_with-D/data/usage.out create mode 100755 tests/usertools/useradd/31_useradd_usage_user_with-D/useradd.test create mode 100644 tests/usertools/useradd/32_useradd_usage-D_with_other/config.txt create mode 100644 tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/default/useradd create mode 100644 tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/group create mode 100644 tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/gshadow create mode 100644 tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/passwd create mode 100644 tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/shadow create mode 100644 tests/usertools/useradd/32_useradd_usage-D_with_other/data/usage.out create mode 100755 tests/usertools/useradd/32_useradd_usage-D_with_other/useradd.test create mode 100644 tests/usertools/useradd/33_useradd_usage_invalid_username/config.txt create mode 100644 tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/default/useradd create mode 100644 tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/group create mode 100644 tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/gshadow create mode 100644 tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/passwd create mode 100644 tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/shadow create mode 100644 tests/usertools/useradd/33_useradd_usage_invalid_username/data/usage.out create mode 100755 tests/usertools/useradd/33_useradd_usage_invalid_username/useradd.test create mode 100644 tests/usertools/useradd/34_useradd_default_GROUP_GID/config.txt create mode 100644 tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/default/useradd create mode 100644 tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/group create mode 100644 tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/gshadow create mode 100644 tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/passwd create mode 100644 tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/shadow create mode 100644 tests/usertools/useradd/34_useradd_default_GROUP_GID/data/passwd create mode 100644 tests/usertools/useradd/34_useradd_default_GROUP_GID/data/shadow create mode 100755 tests/usertools/useradd/34_useradd_default_GROUP_GID/useradd.test create mode 100644 tests/usertools/useradd/35_useradd_default_GROUP_name/config.txt create mode 100644 tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/default/useradd create mode 100644 tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/group create mode 100644 tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/gshadow create mode 100644 tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/passwd create mode 100644 tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/shadow create mode 100644 tests/usertools/useradd/35_useradd_default_GROUP_name/data/passwd create mode 100644 tests/usertools/useradd/35_useradd_default_GROUP_name/data/shadow create mode 100755 tests/usertools/useradd/35_useradd_default_GROUP_name/useradd.test create mode 100644 tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config.txt create mode 100644 tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/default/useradd create mode 100644 tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/group create mode 100644 tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/gshadow create mode 100644 tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/passwd create mode 100644 tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/shadow create mode 100644 tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/data/passwd create mode 100644 tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/data/shadow create mode 100644 tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/data/usage.out create mode 100755 tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/useradd.test create mode 100644 tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config.txt create mode 100644 tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/default/useradd create mode 100644 tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/group create mode 100644 tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/gshadow create mode 100644 tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/passwd create mode 100644 tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/shadow create mode 100644 tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/data/passwd create mode 100644 tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/data/shadow create mode 100644 tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/data/usage.out create mode 100755 tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/useradd.test create mode 100644 tests/usertools/useradd/38_useradd_default_INACTIVE/config.txt create mode 100644 tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/default/useradd create mode 100644 tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/group create mode 100644 tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/gshadow create mode 100644 tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/passwd create mode 100644 tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/shadow create mode 100644 tests/usertools/useradd/38_useradd_default_INACTIVE/data/passwd create mode 100644 tests/usertools/useradd/38_useradd_default_INACTIVE/data/shadow create mode 100755 tests/usertools/useradd/38_useradd_default_INACTIVE/useradd.test create mode 100644 tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config.txt create mode 100644 tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/default/useradd create mode 100644 tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/group create mode 100644 tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/gshadow create mode 100644 tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/passwd create mode 100644 tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/shadow create mode 100644 tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/data/passwd create mode 100644 tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/data/shadow create mode 100644 tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/data/usage.out create mode 100755 tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/useradd.test create mode 100644 tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config.txt create mode 100644 tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/default/useradd create mode 100644 tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/group create mode 100644 tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/gshadow create mode 100644 tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/passwd create mode 100644 tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/shadow create mode 100644 tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/data/passwd create mode 100644 tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/data/shadow create mode 100644 tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/data/usage.out create mode 100755 tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/useradd.test create mode 100644 tests/usertools/useradd/41_useradd_default_default_SKEL/config.txt create mode 100644 tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/default/useradd create mode 100644 tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/group create mode 100644 tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/gshadow create mode 100644 tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/passwd create mode 100644 tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/shadow create mode 100644 tests/usertools/useradd/41_useradd_default_default_SKEL/data/defaults create mode 100755 tests/usertools/useradd/41_useradd_default_default_SKEL/useradd.test create mode 100644 tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config.txt create mode 100644 tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/default/useradd create mode 100644 tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/group create mode 100644 tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/gshadow create mode 100644 tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/passwd create mode 100644 tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/shadow create mode 100644 tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/data/defaults create mode 100755 tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/useradd.test create mode 100644 tests/usertools/useradd/43_useradd_default_no_final_eol/config.txt create mode 100644 tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/default/useradd create mode 100644 tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/group create mode 100644 tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/gshadow create mode 100644 tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/passwd create mode 100644 tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/shadow create mode 100644 tests/usertools/useradd/43_useradd_default_no_final_eol/data/useradd create mode 100755 tests/usertools/useradd/43_useradd_default_no_final_eol/useradd.test create mode 100644 tests/usertools/useradd/44_useradd_default_no_file/config.txt create mode 100644 tests/usertools/useradd/44_useradd_default_no_file/config/etc/default/useradd create mode 100644 tests/usertools/useradd/44_useradd_default_no_file/config/etc/group create mode 100644 tests/usertools/useradd/44_useradd_default_no_file/config/etc/gshadow create mode 100644 tests/usertools/useradd/44_useradd_default_no_file/config/etc/passwd create mode 100644 tests/usertools/useradd/44_useradd_default_no_file/config/etc/shadow create mode 100644 tests/usertools/useradd/44_useradd_default_no_file/data/useradd create mode 100755 tests/usertools/useradd/44_useradd_default_no_file/useradd.test create mode 100644 tests/usertools/useradd/45_useradd-G_UID_name/config.txt create mode 100644 tests/usertools/useradd/45_useradd-G_UID_name/config/etc/default/useradd create mode 100644 tests/usertools/useradd/45_useradd-G_UID_name/config/etc/group create mode 100644 tests/usertools/useradd/45_useradd-G_UID_name/config/etc/gshadow create mode 100644 tests/usertools/useradd/45_useradd-G_UID_name/config/etc/passwd create mode 100644 tests/usertools/useradd/45_useradd-G_UID_name/config/etc/shadow create mode 100644 tests/usertools/useradd/45_useradd-G_UID_name/data/group create mode 100644 tests/usertools/useradd/45_useradd-G_UID_name/data/gshadow create mode 100644 tests/usertools/useradd/45_useradd-G_UID_name/data/passwd create mode 100644 tests/usertools/useradd/45_useradd-G_UID_name/data/shadow create mode 100755 tests/usertools/useradd/45_useradd-G_UID_name/useradd.test create mode 100644 tests/usertools/useradd/46_useradd-G_UID_duplicate/config.txt create mode 100644 tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/default/useradd create mode 100644 tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/group create mode 100644 tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/gshadow create mode 100644 tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/passwd create mode 100644 tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/shadow create mode 100644 tests/usertools/useradd/46_useradd-G_UID_duplicate/data/group create mode 100644 tests/usertools/useradd/46_useradd-G_UID_duplicate/data/gshadow create mode 100644 tests/usertools/useradd/46_useradd-G_UID_duplicate/data/passwd create mode 100644 tests/usertools/useradd/46_useradd-G_UID_duplicate/data/shadow create mode 100755 tests/usertools/useradd/46_useradd-G_UID_duplicate/useradd.test create mode 100644 tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config.txt create mode 100644 tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/default/useradd create mode 100644 tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/group create mode 100644 tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/gshadow create mode 100644 tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/passwd create mode 100644 tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/shadow create mode 100644 tests/usertools/useradd/47_useradd-G_UID_name_duplicate/data/group create mode 100644 tests/usertools/useradd/47_useradd-G_UID_name_duplicate/data/gshadow create mode 100644 tests/usertools/useradd/47_useradd-G_UID_name_duplicate/data/passwd create mode 100644 tests/usertools/useradd/47_useradd-G_UID_name_duplicate/data/shadow create mode 100755 tests/usertools/useradd/47_useradd-G_UID_name_duplicate/useradd.test create mode 100644 tests/usertools/useradd/48_useradd-G_name_duplicate/config.txt create mode 100644 tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/default/useradd create mode 100644 tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/group create mode 100644 tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/gshadow create mode 100644 tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/passwd create mode 100644 tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/shadow create mode 100644 tests/usertools/useradd/48_useradd-G_name_duplicate/data/group create mode 100644 tests/usertools/useradd/48_useradd-G_name_duplicate/data/gshadow create mode 100644 tests/usertools/useradd/48_useradd-G_name_duplicate/data/passwd create mode 100644 tests/usertools/useradd/48_useradd-G_name_duplicate/data/shadow create mode 100755 tests/usertools/useradd/48_useradd-G_name_duplicate/useradd.test create mode 100644 tests/usertools/useradd/49_useradd-G_invalid_group/config.txt create mode 100644 tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/default/useradd create mode 100644 tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/group create mode 100644 tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/gshadow create mode 100644 tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/passwd create mode 100644 tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/shadow create mode 100644 tests/usertools/useradd/49_useradd-G_invalid_group/data/usage.out create mode 100755 tests/usertools/useradd/49_useradd-G_invalid_group/useradd.test create mode 100644 tests/usertools/useradd/50_useradd-r/config.txt create mode 100644 tests/usertools/useradd/50_useradd-r/config/etc/default/useradd create mode 100644 tests/usertools/useradd/50_useradd-r/config/etc/group create mode 100644 tests/usertools/useradd/50_useradd-r/config/etc/gshadow create mode 100644 tests/usertools/useradd/50_useradd-r/config/etc/passwd create mode 100644 tests/usertools/useradd/50_useradd-r/config/etc/shadow create mode 100644 tests/usertools/useradd/50_useradd-r/data/group create mode 100644 tests/usertools/useradd/50_useradd-r/data/gshadow create mode 100644 tests/usertools/useradd/50_useradd-r/data/passwd create mode 100644 tests/usertools/useradd/50_useradd-r/data/shadow create mode 100755 tests/usertools/useradd/50_useradd-r/useradd.test create mode 100644 tests/usertools/useradd/51_useradd_already_exist/config.txt create mode 100644 tests/usertools/useradd/51_useradd_already_exist/config/etc/default/useradd create mode 100644 tests/usertools/useradd/51_useradd_already_exist/config/etc/group create mode 100644 tests/usertools/useradd/51_useradd_already_exist/config/etc/gshadow create mode 100644 tests/usertools/useradd/51_useradd_already_exist/config/etc/passwd create mode 100644 tests/usertools/useradd/51_useradd_already_exist/config/etc/shadow create mode 100644 tests/usertools/useradd/51_useradd_already_exist/data/usage.out create mode 100755 tests/usertools/useradd/51_useradd_already_exist/useradd.test create mode 100644 tests/usertools/useradd/52_useradd-U_group_already_exist/config.txt create mode 100644 tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/default/useradd create mode 100644 tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/group create mode 100644 tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/gshadow create mode 100644 tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/passwd create mode 100644 tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/shadow create mode 100644 tests/usertools/useradd/52_useradd-U_group_already_exist/data/usage.out create mode 100755 tests/usertools/useradd/52_useradd-U_group_already_exist/useradd.test create mode 100644 tests/usertools/useradd/53_useradd-G_empty/config.txt create mode 100644 tests/usertools/useradd/53_useradd-G_empty/config/etc/default/useradd create mode 100644 tests/usertools/useradd/53_useradd-G_empty/config/etc/group create mode 100644 tests/usertools/useradd/53_useradd-G_empty/config/etc/gshadow create mode 100644 tests/usertools/useradd/53_useradd-G_empty/config/etc/passwd create mode 100644 tests/usertools/useradd/53_useradd-G_empty/config/etc/shadow create mode 100644 tests/usertools/useradd/53_useradd-G_empty/data/group create mode 100644 tests/usertools/useradd/53_useradd-G_empty/data/gshadow create mode 100644 tests/usertools/useradd/53_useradd-G_empty/data/passwd create mode 100644 tests/usertools/useradd/53_useradd-G_empty/data/shadow create mode 100755 tests/usertools/useradd/53_useradd-G_empty/useradd.test create mode 100644 tests/usertools/useradd/54_useradd_no_shadow_file/config.txt create mode 100644 tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/default/useradd create mode 100644 tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/group create mode 100644 tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/gshadow create mode 100644 tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/passwd create mode 100644 tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/shadow create mode 100644 tests/usertools/useradd/54_useradd_no_shadow_file/data/group create mode 100644 tests/usertools/useradd/54_useradd_no_shadow_file/data/gshadow create mode 100644 tests/usertools/useradd/54_useradd_no_shadow_file/data/passwd create mode 100755 tests/usertools/useradd/54_useradd_no_shadow_file/useradd.test create mode 100644 tests/usertools/useradd/55_useradd_no_gshadow_file/config.txt create mode 100644 tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/default/useradd create mode 100644 tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/group create mode 100644 tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/gshadow create mode 100644 tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/passwd create mode 100644 tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/shadow create mode 100644 tests/usertools/useradd/55_useradd_no_gshadow_file/data/group create mode 100644 tests/usertools/useradd/55_useradd_no_gshadow_file/data/passwd create mode 100644 tests/usertools/useradd/55_useradd_no_gshadow_file/data/shadow create mode 100755 tests/usertools/useradd/55_useradd_no_gshadow_file/useradd.test create mode 100644 tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config.txt create mode 100644 tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/default/useradd create mode 100644 tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/group create mode 100644 tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/gshadow create mode 100644 tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/passwd create mode 100644 tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/shadow create mode 100644 tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/data/group create mode 100644 tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/data/gshadow create mode 100644 tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/data/passwd create mode 100644 tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/data/shadow create mode 100755 tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/useradd.test create mode 100644 tests/usertools/useradd/57_useradd_usage-D_not_first_option/config.txt create mode 100644 tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/default/useradd create mode 100644 tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/group create mode 100644 tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/gshadow create mode 100644 tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/passwd create mode 100644 tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/shadow create mode 100644 tests/usertools/useradd/57_useradd_usage-D_not_first_option/data/usage.out create mode 100755 tests/usertools/useradd/57_useradd_usage-D_not_first_option/useradd.test create mode 100644 tests/usertools/useradd/58_useradd-e_empty/config.txt create mode 100644 tests/usertools/useradd/58_useradd-e_empty/config/etc/default/useradd create mode 100644 tests/usertools/useradd/58_useradd-e_empty/config/etc/group create mode 100644 tests/usertools/useradd/58_useradd-e_empty/config/etc/gshadow create mode 100644 tests/usertools/useradd/58_useradd-e_empty/config/etc/passwd create mode 100644 tests/usertools/useradd/58_useradd-e_empty/config/etc/shadow create mode 100644 tests/usertools/useradd/58_useradd-e_empty/data/group create mode 100644 tests/usertools/useradd/58_useradd-e_empty/data/gshadow create mode 100644 tests/usertools/useradd/58_useradd-e_empty/data/passwd create mode 100644 tests/usertools/useradd/58_useradd-e_empty/data/shadow create mode 100755 tests/usertools/useradd/58_useradd-e_empty/useradd.test create mode 100644 tests/usertools/useradd/59_useradd-e-1-f-1/config.txt create mode 100644 tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/default/useradd create mode 100644 tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/group create mode 100644 tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/gshadow create mode 100644 tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/passwd create mode 100644 tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/shadow create mode 100644 tests/usertools/useradd/59_useradd-e-1-f-1/data/group create mode 100644 tests/usertools/useradd/59_useradd-e-1-f-1/data/gshadow create mode 100644 tests/usertools/useradd/59_useradd-e-1-f-1/data/passwd create mode 100644 tests/usertools/useradd/59_useradd-e-1-f-1/data/shadow create mode 100755 tests/usertools/useradd/59_useradd-e-1-f-1/useradd.test create mode 100644 tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config.txt create mode 100644 tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/default/useradd create mode 100644 tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/group create mode 100644 tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/gshadow create mode 100644 tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/passwd create mode 100644 tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/shadow create mode 100644 tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/data/group create mode 100644 tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/data/gshadow create mode 100644 tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/data/passwd create mode 100755 tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/useradd.test create mode 100644 tests/usertools/useradd/61_useradd-K/config.txt create mode 100644 tests/usertools/useradd/61_useradd-K/config/etc/default/useradd create mode 100644 tests/usertools/useradd/61_useradd-K/config/etc/group create mode 100644 tests/usertools/useradd/61_useradd-K/config/etc/gshadow create mode 100644 tests/usertools/useradd/61_useradd-K/config/etc/passwd create mode 100644 tests/usertools/useradd/61_useradd-K/config/etc/shadow create mode 100644 tests/usertools/useradd/61_useradd-K/data/group create mode 100644 tests/usertools/useradd/61_useradd-K/data/gshadow create mode 100644 tests/usertools/useradd/61_useradd-K/data/passwd create mode 100644 tests/usertools/useradd/61_useradd-K/data/shadow create mode 100755 tests/usertools/useradd/61_useradd-K/useradd.test create mode 100644 tests/usertools/useradd/62_useradd-p/config.txt create mode 100644 tests/usertools/useradd/62_useradd-p/config/etc/default/useradd create mode 100644 tests/usertools/useradd/62_useradd-p/config/etc/group create mode 100644 tests/usertools/useradd/62_useradd-p/config/etc/gshadow create mode 100644 tests/usertools/useradd/62_useradd-p/config/etc/passwd create mode 100644 tests/usertools/useradd/62_useradd-p/config/etc/shadow create mode 100644 tests/usertools/useradd/62_useradd-p/data/group create mode 100644 tests/usertools/useradd/62_useradd-p/data/gshadow create mode 100644 tests/usertools/useradd/62_useradd-p/data/passwd create mode 100644 tests/usertools/useradd/62_useradd-p/data/shadow create mode 100755 tests/usertools/useradd/62_useradd-p/useradd.test create mode 100644 tests/usertools/useradd/63_useradd-s/config.txt create mode 100644 tests/usertools/useradd/63_useradd-s/config/etc/default/useradd create mode 100644 tests/usertools/useradd/63_useradd-s/config/etc/group create mode 100644 tests/usertools/useradd/63_useradd-s/config/etc/gshadow create mode 100644 tests/usertools/useradd/63_useradd-s/config/etc/passwd create mode 100644 tests/usertools/useradd/63_useradd-s/config/etc/shadow create mode 100644 tests/usertools/useradd/63_useradd-s/data/group create mode 100644 tests/usertools/useradd/63_useradd-s/data/gshadow create mode 100644 tests/usertools/useradd/63_useradd-s/data/passwd create mode 100644 tests/usertools/useradd/63_useradd-s/data/shadow create mode 100755 tests/usertools/useradd/63_useradd-s/useradd.test create mode 100644 tests/usertools/useradd/64_useradd_locked_passwd/config.txt create mode 100644 tests/usertools/useradd/64_useradd_locked_passwd/config/etc/default/useradd create mode 100644 tests/usertools/useradd/64_useradd_locked_passwd/config/etc/group create mode 100644 tests/usertools/useradd/64_useradd_locked_passwd/config/etc/gshadow create mode 100644 tests/usertools/useradd/64_useradd_locked_passwd/config/etc/passwd create mode 100644 tests/usertools/useradd/64_useradd_locked_passwd/config/etc/shadow create mode 100644 tests/usertools/useradd/64_useradd_locked_passwd/data/useradd.err create mode 100755 tests/usertools/useradd/64_useradd_locked_passwd/useradd.test create mode 100644 tests/usertools/useradd/65_useradd_locked_group/config.txt create mode 100644 tests/usertools/useradd/65_useradd_locked_group/config/etc/default/useradd create mode 100644 tests/usertools/useradd/65_useradd_locked_group/config/etc/group create mode 100644 tests/usertools/useradd/65_useradd_locked_group/config/etc/gshadow create mode 100644 tests/usertools/useradd/65_useradd_locked_group/config/etc/passwd create mode 100644 tests/usertools/useradd/65_useradd_locked_group/config/etc/shadow create mode 100644 tests/usertools/useradd/65_useradd_locked_group/data/useradd.err create mode 100755 tests/usertools/useradd/65_useradd_locked_group/useradd.test create mode 100644 tests/usertools/useradd/66_useradd_locked_shadow/config.txt create mode 100644 tests/usertools/useradd/66_useradd_locked_shadow/config/etc/default/useradd create mode 100644 tests/usertools/useradd/66_useradd_locked_shadow/config/etc/group create mode 100644 tests/usertools/useradd/66_useradd_locked_shadow/config/etc/gshadow create mode 100644 tests/usertools/useradd/66_useradd_locked_shadow/config/etc/passwd create mode 100644 tests/usertools/useradd/66_useradd_locked_shadow/config/etc/shadow create mode 100644 tests/usertools/useradd/66_useradd_locked_shadow/data/useradd.err create mode 100755 tests/usertools/useradd/66_useradd_locked_shadow/useradd.test create mode 100644 tests/usertools/useradd/67_useradd_locked_gshadow/config.txt create mode 100644 tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/default/useradd create mode 100644 tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/group create mode 100644 tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/gshadow create mode 100644 tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/passwd create mode 100644 tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/shadow create mode 100644 tests/usertools/useradd/67_useradd_locked_gshadow/data/useradd.err create mode 100755 tests/usertools/useradd/67_useradd_locked_gshadow/useradd.test create mode 100644 tests/usertools/useradd/68_useradd-s_empty/config.txt create mode 100644 tests/usertools/useradd/68_useradd-s_empty/config/etc/default/useradd create mode 100644 tests/usertools/useradd/68_useradd-s_empty/config/etc/group create mode 100644 tests/usertools/useradd/68_useradd-s_empty/config/etc/gshadow create mode 100644 tests/usertools/useradd/68_useradd-s_empty/config/etc/passwd create mode 100644 tests/usertools/useradd/68_useradd-s_empty/config/etc/shadow create mode 100644 tests/usertools/useradd/68_useradd-s_empty/data/group create mode 100644 tests/usertools/useradd/68_useradd-s_empty/data/gshadow create mode 100644 tests/usertools/useradd/68_useradd-s_empty/data/passwd create mode 100644 tests/usertools/useradd/68_useradd-s_empty/data/shadow create mode 100755 tests/usertools/useradd/68_useradd-s_empty/useradd.test create mode 100644 tests/usertools/userdel/01_userdel_usage/config.txt create mode 100644 tests/usertools/userdel/01_userdel_usage/config/etc/default/useradd create mode 100644 tests/usertools/userdel/01_userdel_usage/config/etc/group create mode 100644 tests/usertools/userdel/01_userdel_usage/config/etc/gshadow create mode 100644 tests/usertools/userdel/01_userdel_usage/config/etc/passwd create mode 100644 tests/usertools/userdel/01_userdel_usage/config/etc/shadow create mode 100644 tests/usertools/userdel/01_userdel_usage/data/usage.out create mode 100755 tests/usertools/userdel/01_userdel_usage/userdel.test create mode 100644 tests/usertools/userdel/02_userdel_usage_invalid_option/config.txt create mode 100644 tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/default/useradd create mode 100644 tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/group create mode 100644 tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/gshadow create mode 100644 tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/passwd create mode 100644 tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/shadow create mode 100644 tests/usertools/userdel/02_userdel_usage_invalid_option/data/usage.out create mode 100755 tests/usertools/userdel/02_userdel_usage_invalid_option/userdel.test create mode 100644 tests/usertools/userdel/03_userdel_usage_no_users/config.txt create mode 100644 tests/usertools/userdel/03_userdel_usage_no_users/config/etc/default/useradd create mode 100644 tests/usertools/userdel/03_userdel_usage_no_users/config/etc/group create mode 100644 tests/usertools/userdel/03_userdel_usage_no_users/config/etc/gshadow create mode 100644 tests/usertools/userdel/03_userdel_usage_no_users/config/etc/passwd create mode 100644 tests/usertools/userdel/03_userdel_usage_no_users/config/etc/shadow create mode 100644 tests/usertools/userdel/03_userdel_usage_no_users/data/usage.out create mode 100755 tests/usertools/userdel/03_userdel_usage_no_users/userdel.test create mode 100644 tests/usertools/userdel/04_userdel_usage_2_users/config.txt create mode 100644 tests/usertools/userdel/04_userdel_usage_2_users/config/etc/default/useradd create mode 100644 tests/usertools/userdel/04_userdel_usage_2_users/config/etc/group create mode 100644 tests/usertools/userdel/04_userdel_usage_2_users/config/etc/gshadow create mode 100644 tests/usertools/userdel/04_userdel_usage_2_users/config/etc/passwd create mode 100644 tests/usertools/userdel/04_userdel_usage_2_users/config/etc/shadow create mode 100644 tests/usertools/userdel/04_userdel_usage_2_users/data/usage.out create mode 100755 tests/usertools/userdel/04_userdel_usage_2_users/userdel.test create mode 100644 tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config.txt create mode 100644 tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/default/useradd create mode 100644 tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/group create mode 100644 tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/gshadow create mode 100644 tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/login.defs create mode 100644 tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/passwd create mode 100644 tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/shadow create mode 100644 tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/data/group create mode 100644 tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/data/gshadow create mode 100644 tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/data/passwd create mode 100644 tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/data/shadow create mode 100755 tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/userdel.test create mode 100644 tests/usertools/userdel/06_userdel_no_usergroup/config.txt create mode 100644 tests/usertools/userdel/06_userdel_no_usergroup/config/etc/default/useradd create mode 100644 tests/usertools/userdel/06_userdel_no_usergroup/config/etc/group create mode 100644 tests/usertools/userdel/06_userdel_no_usergroup/config/etc/gshadow create mode 100644 tests/usertools/userdel/06_userdel_no_usergroup/config/etc/login.defs create mode 100644 tests/usertools/userdel/06_userdel_no_usergroup/config/etc/passwd create mode 100644 tests/usertools/userdel/06_userdel_no_usergroup/config/etc/shadow create mode 100644 tests/usertools/userdel/06_userdel_no_usergroup/data/group create mode 100644 tests/usertools/userdel/06_userdel_no_usergroup/data/gshadow create mode 100644 tests/usertools/userdel/06_userdel_no_usergroup/data/passwd create mode 100644 tests/usertools/userdel/06_userdel_no_usergroup/data/shadow create mode 100755 tests/usertools/userdel/06_userdel_no_usergroup/userdel.test create mode 100644 tests/usertools/userdel/07_userdel_usergroup_not_primary/config.txt create mode 100644 tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/default/useradd create mode 100644 tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/group create mode 100644 tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/gshadow create mode 100644 tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/login.defs create mode 100644 tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/passwd create mode 100644 tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/shadow create mode 100644 tests/usertools/userdel/07_userdel_usergroup_not_primary/data/group create mode 100644 tests/usertools/userdel/07_userdel_usergroup_not_primary/data/gshadow create mode 100644 tests/usertools/userdel/07_userdel_usergroup_not_primary/data/passwd create mode 100644 tests/usertools/userdel/07_userdel_usergroup_not_primary/data/shadow create mode 100644 tests/usertools/userdel/07_userdel_usergroup_not_primary/data/userdel.out create mode 100755 tests/usertools/userdel/07_userdel_usergroup_not_primary/userdel.test create mode 100644 tests/usertools/userdel/08_userdel_usergroup_with_other_members/config.txt create mode 100644 tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/default/useradd create mode 100644 tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/group create mode 100644 tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/gshadow create mode 100644 tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/login.defs create mode 100644 tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/passwd create mode 100644 tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/shadow create mode 100644 tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/group create mode 100644 tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/gshadow create mode 100644 tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/passwd create mode 100644 tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/shadow create mode 100644 tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/userdel.out create mode 100755 tests/usertools/userdel/08_userdel_usergroup_with_other_members/userdel.test create mode 100644 tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config.txt create mode 100644 tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/default/useradd create mode 100644 tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/group create mode 100644 tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/gshadow create mode 100644 tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/login.defs create mode 100644 tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/passwd create mode 100644 tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/shadow create mode 100644 tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/group create mode 100644 tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/gshadow create mode 100644 tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/passwd create mode 100644 tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/shadow create mode 100644 tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/userdel.out create mode 100755 tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/userdel.test create mode 100644 tests/usertools/usermod/01_usermod-p_no_shadow_file/config.txt create mode 100644 tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/default/useradd create mode 100644 tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/group create mode 100644 tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/gshadow create mode 100644 tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/passwd create mode 100644 tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/shadow create mode 100644 tests/usertools/usermod/01_usermod-p_no_shadow_file/data/passwd create mode 100755 tests/usertools/usermod/01_usermod-p_no_shadow_file/usermod.test create mode 100644 tests/usertools/usermod/02_usermod-p_no_shadow_entry/config.txt create mode 100644 tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/default/useradd create mode 100644 tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/group create mode 100644 tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/gshadow create mode 100644 tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/passwd create mode 100644 tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/shadow create mode 100644 tests/usertools/usermod/02_usermod-p_no_shadow_entry/data/passwd create mode 100755 tests/usertools/usermod/02_usermod-p_no_shadow_entry/usermod.test create mode 100644 tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config.txt create mode 100644 tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/default/useradd create mode 100644 tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/group create mode 100644 tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/gshadow create mode 100644 tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/passwd create mode 100644 tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/shadow create mode 100644 tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/data/shadow create mode 100755 tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/usermod.test create mode 100644 tests/usertools/usermod/04_usermod_lock_already_locked_password1/config.txt create mode 100644 tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/default/useradd create mode 100644 tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/group create mode 100644 tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/gshadow create mode 100644 tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/passwd create mode 100644 tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/shadow create mode 100755 tests/usertools/usermod/04_usermod_lock_already_locked_password1/usermod.test create mode 100644 tests/usertools/usermod/05_usermod_lock_already_locked_password2/config.txt create mode 100644 tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/default/useradd create mode 100644 tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/group create mode 100644 tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/gshadow create mode 100644 tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/passwd create mode 100644 tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/shadow create mode 100644 tests/usertools/usermod/05_usermod_lock_already_locked_password2/data/shadow create mode 100755 tests/usertools/usermod/05_usermod_lock_already_locked_password2/usermod.test create mode 100644 tests/usertools/usermod/06_usermod_lock_already_locked_password3/config.txt create mode 100644 tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/default/useradd create mode 100644 tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/group create mode 100644 tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/gshadow create mode 100644 tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/passwd create mode 100644 tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/shadow create mode 100755 tests/usertools/usermod/06_usermod_lock_already_locked_password3/usermod.test create mode 100644 tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config.txt create mode 100644 tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/default/useradd create mode 100644 tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/group create mode 100644 tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/gshadow create mode 100644 tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/passwd create mode 100644 tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/shadow create mode 100755 tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/usermod.test create mode 100644 tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config.txt create mode 100644 tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/default/useradd create mode 100644 tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/group create mode 100644 tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/gshadow create mode 100644 tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/passwd create mode 100644 tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/shadow create mode 100644 tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/data/shadow create mode 100755 tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/usermod.test create mode 100644 tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config.txt create mode 100644 tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/default/useradd create mode 100644 tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/group create mode 100644 tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/gshadow create mode 100644 tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/passwd create mode 100644 tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/shadow create mode 100755 tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/usermod.test create mode 100644 tests/usertools/usermod/10_usermod_usage/config.txt create mode 100644 tests/usertools/usermod/10_usermod_usage/config/etc/default/useradd create mode 100644 tests/usertools/usermod/10_usermod_usage/config/etc/group create mode 100644 tests/usertools/usermod/10_usermod_usage/config/etc/gshadow create mode 100644 tests/usertools/usermod/10_usermod_usage/config/etc/passwd create mode 100644 tests/usertools/usermod/10_usermod_usage/config/etc/shadow create mode 100644 tests/usertools/usermod/10_usermod_usage/data/usage.out create mode 100755 tests/usertools/usermod/10_usermod_usage/usermod.test create mode 100644 tests/usertools/usermod/11_usermod_usage_bad_option/config.txt create mode 100644 tests/usertools/usermod/11_usermod_usage_bad_option/config/etc/default/useradd create mode 100644 tests/usertools/usermod/11_usermod_usage_bad_option/config/etc/group create mode 100644 tests/usertools/usermod/11_usermod_usage_bad_option/config/etc/gshadow create mode 100644 tests/usertools/usermod/11_usermod_usage_bad_option/config/etc/passwd create mode 100644 tests/usertools/usermod/11_usermod_usage_bad_option/config/etc/shadow create mode 100644 tests/usertools/usermod/11_usermod_usage_bad_option/data/usage.out create mode 100755 tests/usertools/usermod/11_usermod_usage_bad_option/usermod.test create mode 100644 tests/usertools/usermod/12_usermod_usage_bad-f/config.txt create mode 100644 tests/usertools/usermod/12_usermod_usage_bad-f/config/etc/default/useradd create mode 100644 tests/usertools/usermod/12_usermod_usage_bad-f/config/etc/group create mode 100644 tests/usertools/usermod/12_usermod_usage_bad-f/config/etc/gshadow create mode 100644 tests/usertools/usermod/12_usermod_usage_bad-f/config/etc/passwd create mode 100644 tests/usertools/usermod/12_usermod_usage_bad-f/config/etc/shadow create mode 100644 tests/usertools/usermod/12_usermod_usage_bad-f/data/usermod.err create mode 100755 tests/usertools/usermod/12_usermod_usage_bad-f/usermod.test create mode 100644 tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config.txt create mode 100644 tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config/etc/default/useradd create mode 100644 tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config/etc/group create mode 100644 tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config/etc/gshadow create mode 100644 tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config/etc/passwd create mode 100644 tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config/etc/shadow create mode 100644 tests/usertools/usermod/13_usermod_usage_bad-f_negativ/data/usermod.err create mode 100755 tests/usertools/usermod/13_usermod_usage_bad-f_negativ/usermod.test create mode 100644 tests/usertools/usermod/14_usermod_usage_no_options/config.txt create mode 100644 tests/usertools/usermod/14_usermod_usage_no_options/config/etc/default/useradd create mode 100644 tests/usertools/usermod/14_usermod_usage_no_options/config/etc/group create mode 100644 tests/usertools/usermod/14_usermod_usage_no_options/config/etc/gshadow create mode 100644 tests/usertools/usermod/14_usermod_usage_no_options/config/etc/passwd create mode 100644 tests/usertools/usermod/14_usermod_usage_no_options/config/etc/shadow create mode 100644 tests/usertools/usermod/14_usermod_usage_no_options/data/usage.out create mode 100755 tests/usertools/usermod/14_usermod_usage_no_options/usermod.test create mode 100644 tests/usertools/usermod/15_usermod_usage_no_user/config.txt create mode 100644 tests/usertools/usermod/15_usermod_usage_no_user/config/etc/default/useradd create mode 100644 tests/usertools/usermod/15_usermod_usage_no_user/config/etc/group create mode 100644 tests/usertools/usermod/15_usermod_usage_no_user/config/etc/gshadow create mode 100644 tests/usertools/usermod/15_usermod_usage_no_user/config/etc/passwd create mode 100644 tests/usertools/usermod/15_usermod_usage_no_user/config/etc/shadow create mode 100644 tests/usertools/usermod/15_usermod_usage_no_user/data/usage.out create mode 100755 tests/usertools/usermod/15_usermod_usage_no_user/usermod.test create mode 100644 tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config.txt create mode 100644 tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/default/useradd create mode 100644 tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/group create mode 100644 tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/gshadow create mode 100644 tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/passwd create mode 100644 tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/shadow create mode 100644 tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/data/usage.out create mode 100755 tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/usermod.test create mode 100644 tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config.txt create mode 100644 tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/default/useradd create mode 100644 tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/group create mode 100644 tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/gshadow create mode 100644 tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/passwd create mode 100644 tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/shadow create mode 100644 tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/data/usage.out create mode 100755 tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/usermod.test create mode 100644 tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config.txt create mode 100644 tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config/etc/default/useradd create mode 100644 tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config/etc/group create mode 100644 tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config/etc/gshadow create mode 100644 tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config/etc/passwd create mode 100644 tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config/etc/shadow create mode 100644 tests/usertools/usermod/18_usermod_usage-L-p_exclusive/data/usage.out create mode 100755 tests/usertools/usermod/18_usermod_usage-L-p_exclusive/usermod.test create mode 100644 tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config.txt create mode 100644 tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config/etc/default/useradd create mode 100644 tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config/etc/group create mode 100644 tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config/etc/gshadow create mode 100644 tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config/etc/passwd create mode 100644 tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config/etc/shadow create mode 100644 tests/usertools/usermod/19_usermod_usage-L-U_exclusive/data/usage.out create mode 100755 tests/usertools/usermod/19_usermod_usage-L-U_exclusive/usermod.test create mode 100644 tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config.txt create mode 100644 tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config/etc/default/useradd create mode 100644 tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config/etc/group create mode 100644 tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config/etc/gshadow create mode 100644 tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config/etc/passwd create mode 100644 tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config/etc/shadow create mode 100644 tests/usertools/usermod/20_usermod_usage-p-U_exclusive/data/usage.out create mode 100755 tests/usertools/usermod/20_usermod_usage-p-U_exclusive/usermod.test create mode 100644 tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config.txt create mode 100644 tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/default/useradd create mode 100644 tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/group create mode 100644 tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/gshadow create mode 100644 tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/passwd create mode 100644 tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/shadow create mode 100644 tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/data/group create mode 100644 tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/data/passwd create mode 100644 tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/data/shadow create mode 100755 tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/usermod.test create mode 100644 tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config.txt create mode 100644 tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config/etc/default/useradd create mode 100644 tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config/etc/group create mode 100644 tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config/etc/gshadow create mode 100644 tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config/etc/passwd create mode 100644 tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config/etc/shadow create mode 100644 tests/usertools/usermod/22_usermod_usage_rename_invalid_username/data/usage.out create mode 100755 tests/usertools/usermod/22_usermod_usage_rename_invalid_username/usermod.test create mode 100644 tests/usertools/usermod/23_usermod-e_date/config.txt create mode 100644 tests/usertools/usermod/23_usermod-e_date/config/etc/default/useradd create mode 100644 tests/usertools/usermod/23_usermod-e_date/config/etc/group create mode 100644 tests/usertools/usermod/23_usermod-e_date/config/etc/gshadow create mode 100644 tests/usertools/usermod/23_usermod-e_date/config/etc/passwd create mode 100644 tests/usertools/usermod/23_usermod-e_date/config/etc/shadow create mode 100644 tests/usertools/usermod/23_usermod-e_date/data/shadow create mode 100755 tests/usertools/usermod/23_usermod-e_date/usermod.test create mode 100644 tests/usertools/usermod/24_usermod-e_date/config.txt create mode 100644 tests/usertools/usermod/24_usermod-e_date/config/etc/default/useradd create mode 100644 tests/usertools/usermod/24_usermod-e_date/config/etc/group create mode 100644 tests/usertools/usermod/24_usermod-e_date/config/etc/gshadow create mode 100644 tests/usertools/usermod/24_usermod-e_date/config/etc/passwd create mode 100644 tests/usertools/usermod/24_usermod-e_date/config/etc/shadow create mode 100644 tests/usertools/usermod/24_usermod-e_date/data/shadow create mode 100755 tests/usertools/usermod/24_usermod-e_date/usermod.test create mode 100644 tests/usertools/usermod/25_usermod-e_empty_arg/config.txt create mode 100644 tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/default/useradd create mode 100644 tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/group create mode 100644 tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/gshadow create mode 100644 tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/passwd create mode 100644 tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/shadow create mode 100644 tests/usertools/usermod/25_usermod-e_empty_arg/data/shadow create mode 100755 tests/usertools/usermod/25_usermod-e_empty_arg/usermod.test create mode 100644 tests/usertools/usermod/26_usermod-e-1/config.txt create mode 100644 tests/usertools/usermod/26_usermod-e-1/config/etc/default/useradd create mode 100644 tests/usertools/usermod/26_usermod-e-1/config/etc/group create mode 100644 tests/usertools/usermod/26_usermod-e-1/config/etc/gshadow create mode 100644 tests/usertools/usermod/26_usermod-e-1/config/etc/passwd create mode 100644 tests/usertools/usermod/26_usermod-e-1/config/etc/shadow create mode 100644 tests/usertools/usermod/26_usermod-e-1/data/shadow create mode 100755 tests/usertools/usermod/26_usermod-e-1/usermod.test create mode 100644 tests/usertools/usermod/27_usermod-e_invalid1/config.txt create mode 100644 tests/usertools/usermod/27_usermod-e_invalid1/config/etc/default/useradd create mode 100644 tests/usertools/usermod/27_usermod-e_invalid1/config/etc/group create mode 100644 tests/usertools/usermod/27_usermod-e_invalid1/config/etc/gshadow create mode 100644 tests/usertools/usermod/27_usermod-e_invalid1/config/etc/passwd create mode 100644 tests/usertools/usermod/27_usermod-e_invalid1/config/etc/shadow create mode 100644 tests/usertools/usermod/27_usermod-e_invalid1/data/usermod.err create mode 100755 tests/usertools/usermod/27_usermod-e_invalid1/usermod.test create mode 100644 tests/usertools/usermod/28_usermod-e_invalid2/config.txt create mode 100644 tests/usertools/usermod/28_usermod-e_invalid2/config/etc/default/useradd create mode 100644 tests/usertools/usermod/28_usermod-e_invalid2/config/etc/group create mode 100644 tests/usertools/usermod/28_usermod-e_invalid2/config/etc/gshadow create mode 100644 tests/usertools/usermod/28_usermod-e_invalid2/config/etc/passwd create mode 100644 tests/usertools/usermod/28_usermod-e_invalid2/config/etc/shadow create mode 100644 tests/usertools/usermod/28_usermod-e_invalid2/data/usermod.err create mode 100755 tests/usertools/usermod/28_usermod-e_invalid2/usermod.test create mode 100644 tests/usertools/usermod/29_usermod_no_changes/config.txt create mode 100644 tests/usertools/usermod/29_usermod_no_changes/config/etc/default/useradd create mode 100644 tests/usertools/usermod/29_usermod_no_changes/config/etc/group create mode 100644 tests/usertools/usermod/29_usermod_no_changes/config/etc/gshadow create mode 100644 tests/usertools/usermod/29_usermod_no_changes/config/etc/passwd create mode 100644 tests/usertools/usermod/29_usermod_no_changes/config/etc/shadow create mode 100644 tests/usertools/usermod/29_usermod_no_changes/data/usermod.err create mode 100755 tests/usertools/usermod/29_usermod_no_changes/usermod.test create mode 100644 tests/usertools/usermod/30_usermod_usage-a_without-G/config.txt create mode 100644 tests/usertools/usermod/30_usermod_usage-a_without-G/config/etc/default/useradd create mode 100644 tests/usertools/usermod/30_usermod_usage-a_without-G/config/etc/group create mode 100644 tests/usertools/usermod/30_usermod_usage-a_without-G/config/etc/gshadow create mode 100644 tests/usertools/usermod/30_usermod_usage-a_without-G/config/etc/passwd create mode 100644 tests/usertools/usermod/30_usermod_usage-a_without-G/config/etc/shadow create mode 100644 tests/usertools/usermod/30_usermod_usage-a_without-G/data/usage.out create mode 100755 tests/usertools/usermod/30_usermod_usage-a_without-G/usermod.test create mode 100644 tests/usertools/usermod/31_usermod_usage-o_without-u/config.txt create mode 100644 tests/usertools/usermod/31_usermod_usage-o_without-u/config/etc/default/useradd create mode 100644 tests/usertools/usermod/31_usermod_usage-o_without-u/config/etc/group create mode 100644 tests/usertools/usermod/31_usermod_usage-o_without-u/config/etc/gshadow create mode 100644 tests/usertools/usermod/31_usermod_usage-o_without-u/config/etc/passwd create mode 100644 tests/usertools/usermod/31_usermod_usage-o_without-u/config/etc/shadow create mode 100644 tests/usertools/usermod/31_usermod_usage-o_without-u/data/usage.out create mode 100755 tests/usertools/usermod/31_usermod_usage-o_without-u/usermod.test create mode 100644 tests/usertools/usermod/32_usermod_usage-m_without-d/config.txt create mode 100644 tests/usertools/usermod/32_usermod_usage-m_without-d/config/etc/default/useradd create mode 100644 tests/usertools/usermod/32_usermod_usage-m_without-d/config/etc/group create mode 100644 tests/usertools/usermod/32_usermod_usage-m_without-d/config/etc/gshadow create mode 100644 tests/usertools/usermod/32_usermod_usage-m_without-d/config/etc/passwd create mode 100644 tests/usertools/usermod/32_usermod_usage-m_without-d/config/etc/shadow create mode 100644 tests/usertools/usermod/32_usermod_usage-m_without-d/data/usage.out create mode 100755 tests/usertools/usermod/32_usermod_usage-m_without-d/usermod.test create mode 100644 tests/usertools/usermod/33_usermod_change_shell/config.txt create mode 100644 tests/usertools/usermod/33_usermod_change_shell/config/etc/default/useradd create mode 100644 tests/usertools/usermod/33_usermod_change_shell/config/etc/group create mode 100644 tests/usertools/usermod/33_usermod_change_shell/config/etc/gshadow create mode 100644 tests/usertools/usermod/33_usermod_change_shell/config/etc/passwd create mode 100644 tests/usertools/usermod/33_usermod_change_shell/config/etc/shadow create mode 100644 tests/usertools/usermod/33_usermod_change_shell/data/passwd create mode 100755 tests/usertools/usermod/33_usermod_change_shell/usermod.test create mode 100644 tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config.txt create mode 100644 tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/default/useradd create mode 100644 tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/group create mode 100644 tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/gshadow create mode 100644 tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/passwd create mode 100644 tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/shadow create mode 100644 tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/data/shadow create mode 100755 tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/usermod.test create mode 100644 tests/usertools/usermod/35_usermod-f_no_shadow_entry/config.txt create mode 100644 tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/default/useradd create mode 100644 tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/group create mode 100644 tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/gshadow create mode 100644 tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/passwd create mode 100644 tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/shadow create mode 100644 tests/usertools/usermod/35_usermod-f_no_shadow_entry/data/shadow create mode 100755 tests/usertools/usermod/35_usermod-f_no_shadow_entry/usermod.test create mode 100644 tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config.txt create mode 100644 tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/default/useradd create mode 100644 tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/group create mode 100644 tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/gshadow create mode 100644 tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/passwd create mode 100644 tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/shadow create mode 100644 tests/usertools/usermod/36_usermod_move_homedir_existing_dir/data/home_ls-a create mode 100644 tests/usertools/usermod/36_usermod_move_homedir_existing_dir/data/home_ls-a2 create mode 100644 tests/usertools/usermod/36_usermod_move_homedir_existing_dir/data/passwd create mode 100644 tests/usertools/usermod/36_usermod_move_homedir_existing_dir/data/usermod.err create mode 100755 tests/usertools/usermod/36_usermod_move_homedir_existing_dir/usermod.test create mode 100644 tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config.txt create mode 100644 tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/default/useradd create mode 100644 tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/group create mode 100644 tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/gshadow create mode 100644 tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/passwd create mode 100644 tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/shadow create mode 100644 tests/usertools/usermod/37_usermod_move_nonexistent_homedir/data/passwd create mode 100755 tests/usertools/usermod/37_usermod_move_nonexistent_homedir/usermod.test create mode 100644 tests/usertools/usermod/38_usermod-u_lastlog_not_created/config.txt create mode 100644 tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/default/useradd create mode 100644 tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/group create mode 100644 tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/gshadow create mode 100644 tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/passwd create mode 100644 tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/shadow create mode 100644 tests/usertools/usermod/38_usermod-u_lastlog_not_created/data/passwd create mode 100755 tests/usertools/usermod/38_usermod-u_lastlog_not_created/usermod.test create mode 100644 tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config.txt create mode 100644 tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/default/useradd create mode 100644 tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/group create mode 100644 tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/gshadow create mode 100644 tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/passwd create mode 100644 tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/shadow create mode 100644 tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/data/passwd create mode 100755 tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/login.exp create mode 100755 tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/usermod.test create mode 100644 tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config.txt create mode 100644 tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/default/useradd create mode 100644 tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/group create mode 100644 tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/gshadow create mode 100644 tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/passwd create mode 100644 tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/shadow create mode 100644 tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/data/group create mode 100644 tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/data/passwd create mode 100644 tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/data/shadow create mode 100755 tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/login.exp create mode 100755 tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/usermod.test create mode 100644 tests/usertools/usermod/41_usermod-u_faillog_not_created/config.txt create mode 100644 tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/default/useradd create mode 100644 tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/group create mode 100644 tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/gshadow create mode 100644 tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/passwd create mode 100644 tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/shadow create mode 100644 tests/usertools/usermod/41_usermod-u_faillog_not_created/data/passwd create mode 100755 tests/usertools/usermod/41_usermod-u_faillog_not_created/usermod.test create mode 100644 tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config.txt create mode 100644 tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/default/useradd create mode 100644 tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/group create mode 100644 tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/gshadow create mode 100644 tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/pam.d/login create mode 100644 tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/passwd create mode 100644 tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/shadow create mode 100644 tests/usertools/usermod/42_usermod-u_copy_faillog_entry/data/passwd create mode 100755 tests/usertools/usermod/42_usermod-u_copy_faillog_entry/login.exp create mode 100755 tests/usertools/usermod/42_usermod-u_copy_faillog_entry/usermod.test create mode 100644 tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config.txt create mode 100644 tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/default/useradd create mode 100644 tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/group create mode 100644 tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/gshadow create mode 100644 tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/pam.d/login create mode 100644 tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/passwd create mode 100644 tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/shadow create mode 100644 tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/data/group create mode 100644 tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/data/passwd create mode 100644 tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/data/shadow create mode 100755 tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/login.exp create mode 100755 tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/usermod.test create mode 100644 tests/usertools/usermod/44_usermod-l_move_mailbox/config.txt create mode 100644 tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/default/useradd create mode 100644 tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/group create mode 100644 tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/gshadow create mode 100644 tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/passwd create mode 100644 tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/shadow create mode 100644 tests/usertools/usermod/44_usermod-l_move_mailbox/data/mailbox.perms create mode 100644 tests/usertools/usermod/44_usermod-l_move_mailbox/data/passwd create mode 100644 tests/usertools/usermod/44_usermod-l_move_mailbox/data/shadow create mode 100644 tests/usertools/usermod/44_usermod-l_move_mailbox/test create mode 100755 tests/usertools/usermod/44_usermod-l_move_mailbox/usermod.test create mode 100644 tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config.txt create mode 100644 tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/default/useradd create mode 100644 tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/group create mode 100644 tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/gshadow create mode 100644 tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/passwd create mode 100644 tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/shadow create mode 100644 tests/usertools/usermod/45_usermod-u_change_mailbox_owner/data/mailbox.perms create mode 100644 tests/usertools/usermod/45_usermod-u_change_mailbox_owner/data/passwd create mode 100755 tests/usertools/usermod/45_usermod-u_change_mailbox_owner/usermod.test create mode 100644 tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config.txt create mode 100644 tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/default/useradd create mode 100644 tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/group create mode 100644 tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/gshadow create mode 100644 tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/passwd create mode 100644 tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/shadow create mode 100644 tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/data/mailbox.perms create mode 100644 tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/data/passwd create mode 100644 tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/data/usermod.err create mode 100755 tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/usermod.test create mode 100644 tests/usertools/usermod/47_usermod-u_default_maildir/config.txt create mode 100644 tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/default/useradd create mode 100644 tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/group create mode 100644 tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/gshadow create mode 100644 tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/login.defs create mode 100644 tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/passwd create mode 100644 tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/shadow create mode 100644 tests/usertools/usermod/47_usermod-u_default_maildir/data/mailbox.perms create mode 100644 tests/usertools/usermod/47_usermod-u_default_maildir/data/passwd create mode 100755 tests/usertools/usermod/47_usermod-u_default_maildir/usermod.test create mode 100644 tests/usertools/usermod/48_usermod-u_MAIL_FILE/config.txt create mode 100644 tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/default/useradd create mode 100644 tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/group create mode 100644 tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/gshadow create mode 100644 tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/login.defs create mode 100644 tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/passwd create mode 100644 tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/shadow create mode 100644 tests/usertools/usermod/48_usermod-u_MAIL_FILE/data/mailbox.perms create mode 100644 tests/usertools/usermod/48_usermod-u_MAIL_FILE/data/passwd create mode 100755 tests/usertools/usermod/48_usermod-u_MAIL_FILE/usermod.test create mode 100644 tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config.txt create mode 100644 tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/default/useradd create mode 100644 tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/group create mode 100644 tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/gshadow create mode 100644 tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/passwd create mode 100644 tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/shadow create mode 100644 tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/data/home_ls-a create mode 100644 tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/data/passwd create mode 100755 tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/usermod.test create mode 100644 tests/usertools/usermod/50_usermod_change_uid+move_homedir/config.txt create mode 100644 tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/default/useradd create mode 100644 tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/group create mode 100644 tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/gshadow create mode 100644 tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/passwd create mode 100644 tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/shadow create mode 100644 tests/usertools/usermod/50_usermod_change_uid+move_homedir/data/home_ls-a create mode 100644 tests/usertools/usermod/50_usermod_change_uid+move_homedir/data/passwd create mode 100755 tests/usertools/usermod/50_usermod_change_uid+move_homedir/usermod.test create mode 100644 tests/usertools/usermod/51_usermod_change_gid+move_homedir/config.txt create mode 100644 tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/default/useradd create mode 100644 tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/group create mode 100644 tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/gshadow create mode 100644 tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/passwd create mode 100644 tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/shadow create mode 100644 tests/usertools/usermod/51_usermod_change_gid+move_homedir/data/home_ls-a create mode 100644 tests/usertools/usermod/51_usermod_change_gid+move_homedir/data/passwd create mode 100755 tests/usertools/usermod/51_usermod_change_gid+move_homedir/usermod.test diff --git a/tests/README b/tests/README new file mode 100644 index 00000000..54844a57 --- /dev/null +++ b/tests/README @@ -0,0 +1,21 @@ +This testsuite is NOT SECURE: it will temporarily change your passwords file +with known passwords. +You should run it on a chroot, or on a secured dedicated system. + + + +To test a Debian system: + $ mkdir sid-chroot + $ sudo debootstrap sid sid-chroot/ http://ftp.fr.debian.org/debian/ +edit or copy a sources.list + $ sudo cp /etc/apt/sources.list sid-chroot/etc/apt/ +edit or copy a resolv.conf + $ sudo cp /etc/resolv.conf sid-chroot/etc/ + $ su - root -c "chroot sid-chroot/ /bin/bash" + # mount -t proc proc /proc + # mount -t devpts devpts /dev/pts + # aptitude update + # aptitude install expect + # cd /dev ; mknod --mode=666 /dev/ptmx c 5 2 + + diff --git a/tests/bug332198-test.exp b/tests/bug332198-test.exp new file mode 100755 index 00000000..fd365bb6 --- /dev/null +++ b/tests/bug332198-test.exp @@ -0,0 +1,61 @@ +#!/usr/bin/expect -f + +# This is a script for repeatedly logging into the localhost +# using `rlogin` in order to apparently see a symptoms described +# in bug #332198. +# As described in the bug log, sometimes `rlogind` will fail to +# establish a connection, because it starts "login" process and +# the latter fails with "unable to determine TTY name, got /dev/pts/1" +# message. +# +# BUGS +# +# * the script rlogins to localhost +# * the script doesn't handle passwdord prompt, because it's intended +# to use .rhosts auth and expects shell prompt immediately after +# `rlogin` +# * the regexp for shell prompt is hardcoded + +log_user 0 +match_max 8192 + +while {1} { + set rlogin_spawn [spawn rlogin localhost] + if { $rlogin_spawn == 0 } { exit 1 } + expect { + -timeout 10 -re "^.*(Last login\[^\r\n\]*).*\n(\[^\r\n\]*\[#$\] )$" { + send_error "$expect_out(1,string)\n" + send_error "$expect_out(2,string)\n" +# send_error "$expect_out(0,string)\n" + } + timeout { + send_error "TIMEOUT/prompt\n" + send_error "$expect_out(buffer)\n" + send_error "RETRYING\n" + log_user 1 + send "tty /\r" + expect -timeout 2 -re "^.*\r?\n(\[^\r\n\]*# )$" {} + send "tty /\r" + expect -timeout 2 -re "^.*\r?\n(\[^\r\n\]*# )$" {} + send_error "\n" + exit 2 + } + } + send "tty\r" + expect { + -timeout 4 -re "tty\r?\n(\[^\r\n\]*)\r?\n(\[^\r\n\]*\[#$\] )$" { + send_error "$expect_out(2,string)$expect_out(1,string)\n" +# send_error "$expect_out(0,string)\n" + } + timeout { send_error "TIMEOUT/tty\n" ; exit 3 } + } + send "exit\r" + expect { + -timeout 2 eof { +# send_error "OK4: EOF\n" + } + timeout { send_error "TIMEOUT/eof\n" ; exit 4 } + } + wait +} +# vi: set sw=4: diff --git a/tests/bug334803-test.exp b/tests/bug334803-test.exp new file mode 100755 index 00000000..05c7a915 --- /dev/null +++ b/tests/bug334803-test.exp @@ -0,0 +1,83 @@ +#!/usr/bin/expect -- + +# This is a script for switching to another user and then +# suspending (`suspend -f`) and resuming (`fg`) his shell + +package require cmdline +set opts { + {s.arg "sudo su -" "user switching method"} + {u.arg "" "username to switch to"} +} +set usage ": \[options]\noptions:" +array set conf [::cmdline::getoptions argv $opts $usage] + +log_user 1 +match_max 8192 +expect_after { + timeout { send_error "TIMEOUT\n" ; exit 1 } + eof { send_error "EXITED\n" ; exit 2 } +} +set timeout 2 + +# user switching command, by default `sudo su -` +set swcmd $conf(s) +# ending of typicall shell prompt (zsh/sh): +set shpmt "(%|#|\\$) \\Z" +catch {set shpmt $env(EXPECT_PROMPT)} +# initial username: +set user0 [exec id -un] +# user we switch to (with $swcmd), by default initial user +if {$conf(u) != ""} {set swuser $conf(u)} else {set swuser $user0} + +# 1. start shell +spawn bash +expect -re "$shpmt" {} + +# 2. sudo-ing swuser's shell: +send "$swcmd $swuser\r" +expect { + -re "$swuser.*$shpmt" {} + -re "assword: ?\\Z" { + stty -echo + expect_user -timeout -1 -re "(.*)\n" {set swpwd $expect_out(1,string)} + stty echo + send "$swpwd\r" + expect -re "$swuser.*$shpmt" {} + } +} + +# 3. getting pid and ppid of swuser's shell (needed for 5b): +send "echo \$\$:\$PPID\r" +expect -re "(?n)^(\[\[:digit:\]\]*):(\[\[:digit:\]\]*)\r?\n(.*)$shpmt" {} +set swpid $expect_out(1,string) +set swppid $expect_out(2,string) + +#send_error "$user0:$swpid:$swppid\n" + +# 4. suspending swuser's shell (trying to return to parent shell): +send "suspend -f\r" +expect { + -re "$shpmt" { + # 5a. got to parent shell -- resuming swuser's shell by `fg`: + send "fg\r" + set hung no + } + timeout { + # 5b. `suspend -f` has hung -- resuming swuser's shell by SIGCONT: + send_error "kill $swppid\n" + send_error [exec kill -CONT $swppid] + set hung yes + } +} +expect -re "$shpmt" {} + +# 6. exiting [both] shells +#set swstat [wait -nowait] +#send_error [pid]:[exp_pid]:$swstat\n +send "exit\rexit\r" +expect eof {} +#send_error [wait -nowait]\n +#exec kill -KILL -[exp_pid] +if {$hung} {send_error "BUGGY\n" ; exit 3 } + +# vi:set sw=4: diff --git a/tests/chage/01/data/chage1 b/tests/chage/01/data/chage1 new file mode 100644 index 00000000..64754ca5 --- /dev/null +++ b/tests/chage/01/data/chage1 @@ -0,0 +1,7 @@ +Last password change : Jul 27, 2005 +Password expires : never +Password inactive : never +Account expires : never +Minimum number of days between password change : 0 +Maximum number of days between password change : 99999 +Number of days of warning before password expires : 7 diff --git a/tests/chage/01/data/chage2 b/tests/chage/01/data/chage2 new file mode 100644 index 00000000..7efdc0cd --- /dev/null +++ b/tests/chage/01/data/chage2 @@ -0,0 +1,7 @@ +Last password change : Jul 28, 2005 +Password expires : never +Password inactive : never +Account expires : never +Minimum number of days between password change : 1 +Maximum number of days between password change : 99996 +Number of days of warning before password expires : 5 diff --git a/tests/chage/01/data/chage3 b/tests/chage/01/data/chage3 new file mode 100644 index 00000000..a263db9d --- /dev/null +++ b/tests/chage/01/data/chage3 @@ -0,0 +1,7 @@ +Last password change : Jul 27, 2005 +Password expires : never +Password inactive : never +Account expires : Jan 01, 1970 +Minimum number of days between password change : 0 +Maximum number of days between password change : 99999 +Number of days of warning before password expires : 7 diff --git a/tests/chage/01/data/chage4 b/tests/chage/01/data/chage4 new file mode 100644 index 00000000..11e2f2d9 --- /dev/null +++ b/tests/chage/01/data/chage4 @@ -0,0 +1,7 @@ +Last password change : Jul 27, 2005 +Password expires : never +Password inactive : never +Account expires : Jan 02, 1970 +Minimum number of days between password change : 0 +Maximum number of days between password change : 99999 +Number of days of warning before password expires : 7 diff --git a/tests/chage/01/data/chage5 b/tests/chage/01/data/chage5 new file mode 100644 index 00000000..64754ca5 --- /dev/null +++ b/tests/chage/01/data/chage5 @@ -0,0 +1,7 @@ +Last password change : Jul 27, 2005 +Password expires : never +Password inactive : never +Account expires : never +Minimum number of days between password change : 0 +Maximum number of days between password change : 99999 +Number of days of warning before password expires : 7 diff --git a/tests/chage/01/data/chage6 b/tests/chage/01/data/chage6 new file mode 100644 index 00000000..64754ca5 --- /dev/null +++ b/tests/chage/01/data/chage6 @@ -0,0 +1,7 @@ +Last password change : Jul 27, 2005 +Password expires : never +Password inactive : never +Account expires : never +Minimum number of days between password change : 0 +Maximum number of days between password change : 99999 +Number of days of warning before password expires : 7 diff --git a/tests/chage/01/data/chage7 b/tests/chage/01/data/chage7 new file mode 100644 index 00000000..64754ca5 --- /dev/null +++ b/tests/chage/01/data/chage7 @@ -0,0 +1,7 @@ +Last password change : Jul 27, 2005 +Password expires : never +Password inactive : never +Account expires : never +Minimum number of days between password change : 0 +Maximum number of days between password change : 99999 +Number of days of warning before password expires : 7 diff --git a/tests/chage/01/data/chage7b b/tests/chage/01/data/chage7b new file mode 100644 index 00000000..0cea901f --- /dev/null +++ b/tests/chage/01/data/chage7b @@ -0,0 +1,7 @@ +Last password change : Jul 26, 2005 +Password expires : Aug 09, 2005 +Password inactive : Sep 13, 2005 +Account expires : Jul 27, 2012 +Minimum number of days between password change : 13 +Maximum number of days between password change : 14 +Number of days of warning before password expires : 9 diff --git a/tests/chage/01/data/chage8 b/tests/chage/01/data/chage8 new file mode 100644 index 00000000..25151a28 --- /dev/null +++ b/tests/chage/01/data/chage8 @@ -0,0 +1 @@ +chage: user 'myuser8' does not exist in /etc/passwd diff --git a/tests/chage/01/data/group b/tests/chage/01/data/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chage/01/data/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chage/01/data/gshadow b/tests/chage/01/data/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chage/01/data/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chage/01/data/passwd b/tests/chage/01/data/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/01/data/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/01/data/shadow b/tests/chage/01/data/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/01/data/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/01/data/usage b/tests/chage/01/data/usage new file mode 100644 index 00000000..31df15c1 --- /dev/null +++ b/tests/chage/01/data/usage @@ -0,0 +1,16 @@ +Usage: chage [options] LOGIN + +Options: + -d, --lastday LAST_DAY set date of last password change to LAST_DAY + -E, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE + -h, --help display this help message and exit + -I, --inactive INACTIVE set password inactive after expiration + to INACTIVE + -l, --list show account aging information + -m, --mindays MIN_DAYS set minimum number of days before password + change to MIN_DAYS + -M, --maxdays MAX_DAYS set maximim number of days before password + change to MAX_DAYS + -R, --root CHROOT_DIR directory to chroot into + -W, --warndays WARN_DAYS set expiration warning days to WARN_DAYS + diff --git a/tests/chage/01/run b/tests/chage/01/run new file mode 100755 index 00000000..df64325c --- /dev/null +++ b/tests/chage/01/run @@ -0,0 +1,206 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +# Rational: +# Test chage options + +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +save() +{ + [ ! -d tmp ] && mkdir tmp + for i in passwd group shadow gshadow + do + [ -f /etc/$i ] && cp /etc/$i tmp/$i + [ -f /etc/$i- ] && cp /etc/$i- tmp/$i- + done + + true +} + +restore() +{ + for i in passwd group shadow gshadow + do + [ -f tmp/$i ] && cp tmp/$i /etc/$i && rm tmp/$i + [ -f tmp/$i- ] && cp tmp/$i- /etc/$i- && rm tmp/$i- + done + rm -f tmp/out + rmdir tmp +} + +save + +# restore the files on exit +trap 'if [ "$?" != "0" ]; then echo "FAIL"; fi; restore' 0 + +for i in passwd group shadow gshadow +do + cp data/$i /etc +done + +echo -n "testing option -l" +chage -l myuser1 > tmp/out +diff -au data/chage1 tmp/out +echo -n . +chage -l myuser2 > tmp/out +diff -au data/chage2 tmp/out +echo -n . +chage -l myuser3 > tmp/out +diff -au data/chage3 tmp/out +echo -n . +chage -l myuser4 > tmp/out +diff -au data/chage4 tmp/out +echo -n . +chage -l myuser5 > tmp/out +diff -au data/chage5 tmp/out +echo -n . +chage -l myuser6 > tmp/out +diff -au data/chage6 tmp/out +echo -n . +chage --list myuser7 > tmp/out +diff -au data/chage7 tmp/out +echo -n . +msg=$(chage -l myuser8 2> tmp/out) || err=$? +[ "$err" = "1" ] && [ "$msg" = "" ] || exit 1 +diff -au data/chage8 tmp/out +echo . + +echo "testing option -d" +chage -d 2001-10-02 myuser7 +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:11597:0:99999:7:1::' ] || exit 1 +echo "testing option -d -1" +chage -d -1 myuser7 +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.::0:99999:7:1::' ] || exit 1 +echo "testing option -d 0" +chage -d 0 myuser7 +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:0:0:99999:7:1::' ] || exit 1 +echo "testing option --lastday" +chage --lastday 2011-11-02 myuser7 +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:15280:0:99999:7:1::' ] || exit 1 + +echo "testing option -E" +chage -E 2010-10-02 myuser7 +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:15280:0:99999:7:1:14884:' ] || exit 1 +echo "testing option -E -1" +chage -E -1 myuser7 +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:15280:0:99999:7:1::' ] || exit 1 +echo "testing option -E 0" +chage -E 0 myuser7 +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:15280:0:99999:7:1:0:' ] || exit 1 +echo "testing option --expiredate" +chage --expiredate 2020-02-02 myuser7 +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:15280:0:99999:7:1:18294:' ] || exit 1 + +echo "testing option -I" +# NOTE: I could pass a date to -I +chage -I 42 myuser7 +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:15280:0:99999:7:42:18294:' ] || exit 1 +echo "testing option -I -1" +# NOTE: this behavior is not documented +chage -I -1 myuser7 +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:15280:0:99999:7::18294:' ] || exit 1 +echo "testing option -I 0" +# NOTE: We should check that this is the expected behavior +chage -I 0 myuser7 +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:15280:0:99999:7:0:18294:' ] || exit 1 +echo "testing option --inactive" +chage --inactive 12 myuser7 +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:15280:0:99999:7:12:18294:' ] || exit 1 + +echo "testing option -m" +chage -m 24 myuser7 +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:15280:24:99999:7:12:18294:' ] || exit 1 +echo "testing option -m -1" +# NOTE: this behavior is not documented +chage -m -1 myuser7 +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:15280::99999:7:12:18294:' ] || exit 1 +echo "testing option -m 0" +chage -m 0 myuser7 +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:15280:0:99999:7:12:18294:' ] || exit 1 +echo "testing option --mindays" +chage --min 1 myuser7 +# NOTE: that shouldn't have work +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:15280:1:99999:7:12:18294:' ] || exit 1 + +echo "testing option -M" +chage -M 25 myuser7 +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:15280:1:25:7:12:18294:' ] || exit 1 +echo "testing option -M -1" +# NOTE: this behavior is not documented +chage -M -1 myuser7 +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:15280:1::7:12:18294:' ] || exit 1 +echo "testing option -M 0" +chage -M 0 myuser7 +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:15280:1:0:7:12:18294:' ] || exit 1 +echo "testing option --maxdays" +chage --max 2 myuser7 +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:15280:1:2:7:12:18294:' ] || exit 1 + +echo "testing option -W" +chage -W 26 myuser7 +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:15280:1:2:26:12:18294:' ] || exit 1 +echo "testing option -W -1" +# NOTE: this behavior is not documented +chage -W -1 myuser7 +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:15280:1:2::12:18294:' ] || exit 1 +echo "testing option -W 0" +chage -W 0 myuser7 +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:15280:1:2:0:12:18294:' ] || exit 1 +echo "testing option --warndays" +chage --warndays 3 myuser7 +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:15280:1:2:3:12:18294:' ] || exit 1 + +echo "testing with all options" +chage -d 2030-03-02 -E 1979-11-24 -I 10 -m 11 -M 12 --warndays 4 myuser7 +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:21975:11:12:4:10:3614:' ] || exit 1 + +echo "interractive test" +./run1.exp +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12990:13:14:9:35:15548:' ] || exit 1 + +echo "interractive test (default)" +./run2.exp +ent=$(getent shadow myuser7) +[ "$ent" = 'myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12990:13:14:9:35:15548:' ] || exit 1 +chage -l myuser7 > tmp/out +diff -au data/chage7b tmp/out + +echo "usage" +chage -h > tmp/out || { + if [ "$?" != "2" ]; then false; fi +} +diff -au data/usage tmp/out + +echo "OK" diff --git a/tests/chage/01/run1.exp b/tests/chage/01/run1.exp new file mode 100755 index 00000000..0160fb15 --- /dev/null +++ b/tests/chage/01/run1.exp @@ -0,0 +1,31 @@ +#!/usr/bin/expect + +set timeout 5 + +# I've not been able to put the opening bracket in the regular expressions +# If anyone knows... + +spawn /usr/bin/chage myuser7 +expect -re "Minimum Password Age .11\]: " +send "13\r" +expect -re "Maximum Password Age .12\]: " +send "14\r" +expect -re "Last Password Change \[(]YYYY-MM-DD\[)] .2030-03-02\]: " +send "2005-07-26\r" +expect -re "Password Expiration Warning .4\]: " +send "9\r" +expect -re "Password Inactive .10\]: " +send "35\r" +expect -re "Account Expiration Date \[(]YYYY-MM-DD\[)] .1979-11-24\]: " +send "2012-07-27\r" +expect { + eof { + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + diff --git a/tests/chage/01/run2.exp b/tests/chage/01/run2.exp new file mode 100755 index 00000000..f4f342fb --- /dev/null +++ b/tests/chage/01/run2.exp @@ -0,0 +1,31 @@ +#!/usr/bin/expect + +set timeout 5 + +# I've not been able to put the opening bracket in the regular expressions +# If anyone knows... + +spawn /usr/bin/chage myuser7 +expect -re "Minimum Password Age .13\]: " +send "\r" +expect -re "Maximum Password Age .14\]: " +send "\r" +expect -re "Last Password Change \[(]YYYY-MM-DD\[)] .2005-07-26\]: " +send "\r" +expect -re "Password Expiration Warning .9\]: " +send "\r" +expect -re "Password Inactive .35\]: " +send "\r" +expect -re "Account Expiration Date \[(]YYYY-MM-DD\[)] .2012-07-27\]: " +send "\r" +expect { + eof { + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + diff --git a/tests/chage/02/data/group b/tests/chage/02/data/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chage/02/data/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chage/02/data/gshadow b/tests/chage/02/data/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chage/02/data/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chage/02/data/passwd b/tests/chage/02/data/passwd new file mode 100644 index 00000000..5bec3749 --- /dev/null +++ b/tests/chage/02/data/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/02/data/shadow b/tests/chage/02/data/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chage/02/data/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chage/02/run b/tests/chage/02/run new file mode 100755 index 00000000..74ac2682 --- /dev/null +++ b/tests/chage/02/run @@ -0,0 +1,50 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +# Rational: +# Test chage with bogus inputs + +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +save() +{ + [ ! -d tmp ] && mkdir tmp + for i in passwd group shadow gshadow + do + [ -f /etc/$i ] && cp /etc/$i tmp/$i + [ -f /etc/$i- ] && cp /etc/$i- tmp/$i- + done + + true +} + +restore() +{ + for i in passwd group shadow gshadow + do + [ -f tmp/$i ] && cp tmp/$i /etc/$i && rm tmp/$i + [ -f tmp/$i- ] && cp tmp/$i- /etc/$i- && rm tmp/$i- + done + rm -f tmp/out + rmdir tmp +} + +save + +# restore the files on exit +trap 'if [ "$?" != "0" ]; then echo "FAIL"; fi; restore' 0 + +for i in passwd group shadow gshadow +do + cp data/$i /etc +done + +echo "interractive test" +./run.exp $(date "+%Y-%m-%d") + +echo "OK" diff --git a/tests/chage/02/run.exp b/tests/chage/02/run.exp new file mode 100755 index 00000000..0dbb27d0 --- /dev/null +++ b/tests/chage/02/run.exp @@ -0,0 +1,83 @@ +#!/usr/bin/expect + +set timeout 5 + +proc expect_error {} { + expect { + "chage: error changing fields" { + expect { + eof { + } default { + puts "\nFAIL" + exit 1 + } + } + } default { + puts "\nFAIL" + exit 1 + } + } +} + + +# I've not been able to put the opening bracket in the regular expressions +# If anyone knows... + +spawn /usr/bin/chage myuser +expect -re "Minimum Password Age .0\]: " +send -- "-2\r" +expect_error + +spawn /usr/bin/chage myuser +expect -re "Minimum Password Age .0\]: " +send "foo\r" +expect_error + +# chage accepts to be given only spaces +#spawn /usr/bin/chage myuser +#expect -re "Minimum Password Age .0\]: " +#send -- " \r" +#expect_error +# +#chage may not parse all the arguments. +#This may be a problem is a date is provided instead of just a number +#spawn /usr/bin/chage myuser +#expect -re "Minimum Password Age .0\]: " +#send -- "1 2\r" +#expect_error + +spawn /usr/bin/chage myuser +expect -re "Minimum Password Age .0\]: " +send "11\r" +expect -re "Maximum Password Age .99999\]: " +send -- "-2\r" +expect_error + +spawn /usr/bin/chage myuser +expect -re "Minimum Password Age .0\]: " +send "\r" +expect -re "Maximum Password Age .99999\]: " +send "foo\r" +expect_error + +# chage should verify the range of the arguments +#spawn /usr/bin/chage myuser +#expect -re "Minimum Password Age .0\]: " +#send "\r" +#expect -re "Maximum Password Age .99999\]: " +#send "100000\r" +#expect_error + +#spawn /usr/bin/chage myuser +#expect -re "Minimum Password Age .0\]: " +#send "\r" +#expect -re "Maximum Password Age .99999\]: " +#send "\r" +#expect -re "Last Password Change \[(]YYYY-MM-DD\[)] .2005-07-25]: " +#send "12\n" +#expect_error + + +puts "\nPASS" +exit 0 + diff --git a/tests/chage/03_chsh_usage/chage.test b/tests/chage/03_chsh_usage/chage.test new file mode 100755 index 00000000..db6200c5 --- /dev/null +++ b/tests/chage/03_chsh_usage/chage.test @@ -0,0 +1,48 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage can display its usage message" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Get chage usage (chage -h)..." +chage -h >tmp/usage.out +echo "OK" + +echo "chage reported:" +echo "=======================================================================" +cat tmp/usage.out +echo "=======================================================================" +echo -n "Check the usage message..." +diff -au data/usage.out tmp/usage.out +echo "usage message OK." +rm -f tmp/usage.out + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/03_chsh_usage/config.txt b/tests/chage/03_chsh_usage/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chage/03_chsh_usage/config/etc/group b/tests/chage/03_chsh_usage/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chage/03_chsh_usage/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chage/03_chsh_usage/config/etc/gshadow b/tests/chage/03_chsh_usage/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chage/03_chsh_usage/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chage/03_chsh_usage/config/etc/passwd b/tests/chage/03_chsh_usage/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/03_chsh_usage/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/03_chsh_usage/config/etc/shadow b/tests/chage/03_chsh_usage/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/03_chsh_usage/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/03_chsh_usage/data/usage.out b/tests/chage/03_chsh_usage/data/usage.out new file mode 100644 index 00000000..31df15c1 --- /dev/null +++ b/tests/chage/03_chsh_usage/data/usage.out @@ -0,0 +1,16 @@ +Usage: chage [options] LOGIN + +Options: + -d, --lastday LAST_DAY set date of last password change to LAST_DAY + -E, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE + -h, --help display this help message and exit + -I, --inactive INACTIVE set password inactive after expiration + to INACTIVE + -l, --list show account aging information + -m, --mindays MIN_DAYS set minimum number of days before password + change to MIN_DAYS + -M, --maxdays MAX_DAYS set maximim number of days before password + change to MAX_DAYS + -R, --root CHROOT_DIR directory to chroot into + -W, --warndays WARN_DAYS set expiration warning days to WARN_DAYS + diff --git a/tests/chage/04_chsh_usage_invalid_option/chage.test b/tests/chage/04_chsh_usage_invalid_option/chage.test new file mode 100755 index 00000000..1ba81630 --- /dev/null +++ b/tests/chage/04_chsh_usage_invalid_option/chage.test @@ -0,0 +1,54 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage displays its usage message when an invalid option is used" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Use chage with an invalid option (chage -Z bin)..." +chage -Z bin 2>tmp/usage.out && exit 1 || { + status=$? +} +echo "OK" + +echo -n "Check returned status ($status)..." +test "$status" = "2" +echo "OK" + +echo "chage reported:" +echo "=======================================================================" +cat tmp/usage.out +echo "=======================================================================" +echo -n "Check the usage message..." +diff -au data/usage.out tmp/usage.out +echo "usage message OK." +rm -f tmp/usage.out + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/04_chsh_usage_invalid_option/config.txt b/tests/chage/04_chsh_usage_invalid_option/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chage/04_chsh_usage_invalid_option/config/etc/group b/tests/chage/04_chsh_usage_invalid_option/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chage/04_chsh_usage_invalid_option/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chage/04_chsh_usage_invalid_option/config/etc/gshadow b/tests/chage/04_chsh_usage_invalid_option/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chage/04_chsh_usage_invalid_option/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chage/04_chsh_usage_invalid_option/config/etc/passwd b/tests/chage/04_chsh_usage_invalid_option/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/04_chsh_usage_invalid_option/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/04_chsh_usage_invalid_option/config/etc/shadow b/tests/chage/04_chsh_usage_invalid_option/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/04_chsh_usage_invalid_option/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/04_chsh_usage_invalid_option/data/usage.out b/tests/chage/04_chsh_usage_invalid_option/data/usage.out new file mode 100644 index 00000000..21f71d61 --- /dev/null +++ b/tests/chage/04_chsh_usage_invalid_option/data/usage.out @@ -0,0 +1,17 @@ +chage: invalid option -- 'Z' +Usage: chage [options] LOGIN + +Options: + -d, --lastday LAST_DAY set date of last password change to LAST_DAY + -E, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE + -h, --help display this help message and exit + -I, --inactive INACTIVE set password inactive after expiration + to INACTIVE + -l, --list show account aging information + -m, --mindays MIN_DAYS set minimum number of days before password + change to MIN_DAYS + -M, --maxdays MAX_DAYS set maximim number of days before password + change to MAX_DAYS + -R, --root CHROOT_DIR directory to chroot into + -W, --warndays WARN_DAYS set expiration warning days to WARN_DAYS + diff --git a/tests/chage/05_chsh_usage_2_users/chage.test b/tests/chage/05_chsh_usage_2_users/chage.test new file mode 100755 index 00000000..5860393c --- /dev/null +++ b/tests/chage/05_chsh_usage_2_users/chage.test @@ -0,0 +1,54 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage displays its usage message when 2 users are provided" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Use chage with 2 users (chage -I 12 bin nobody)..." +chage -I 12 bin nobody 2>tmp/usage.out && exit 1 || { + status=$? +} +echo "OK" + +echo -n "Check returned status ($status)..." +test "$status" = "2" +echo "OK" + +echo "chage reported:" +echo "=======================================================================" +cat tmp/usage.out +echo "=======================================================================" +echo -n "Check the usage message..." +diff -au data/usage.out tmp/usage.out +echo "usage message OK." +rm -f tmp/usage.out + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/05_chsh_usage_2_users/config.txt b/tests/chage/05_chsh_usage_2_users/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chage/05_chsh_usage_2_users/config/etc/group b/tests/chage/05_chsh_usage_2_users/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chage/05_chsh_usage_2_users/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chage/05_chsh_usage_2_users/config/etc/gshadow b/tests/chage/05_chsh_usage_2_users/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chage/05_chsh_usage_2_users/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chage/05_chsh_usage_2_users/config/etc/passwd b/tests/chage/05_chsh_usage_2_users/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/05_chsh_usage_2_users/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/05_chsh_usage_2_users/config/etc/shadow b/tests/chage/05_chsh_usage_2_users/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/05_chsh_usage_2_users/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/05_chsh_usage_2_users/data/usage.out b/tests/chage/05_chsh_usage_2_users/data/usage.out new file mode 100644 index 00000000..31df15c1 --- /dev/null +++ b/tests/chage/05_chsh_usage_2_users/data/usage.out @@ -0,0 +1,16 @@ +Usage: chage [options] LOGIN + +Options: + -d, --lastday LAST_DAY set date of last password change to LAST_DAY + -E, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE + -h, --help display this help message and exit + -I, --inactive INACTIVE set password inactive after expiration + to INACTIVE + -l, --list show account aging information + -m, --mindays MIN_DAYS set minimum number of days before password + change to MIN_DAYS + -M, --maxdays MAX_DAYS set maximim number of days before password + change to MAX_DAYS + -R, --root CHROOT_DIR directory to chroot into + -W, --warndays WARN_DAYS set expiration warning days to WARN_DAYS + diff --git a/tests/chage/06_chsh_usage_no_users/chage.test b/tests/chage/06_chsh_usage_no_users/chage.test new file mode 100755 index 00000000..0851d6e3 --- /dev/null +++ b/tests/chage/06_chsh_usage_no_users/chage.test @@ -0,0 +1,54 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage displays its usage message when no users are provided" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Use chage without an user (chage -I 12)..." +chage -I 12 2>tmp/usage.out && exit 1 || { + status=$? +} +echo "OK" + +echo -n "Check returned status ($status)..." +test "$status" = "2" +echo "OK" + +echo "chage reported:" +echo "=======================================================================" +cat tmp/usage.out +echo "=======================================================================" +echo -n "Check the usage message..." +diff -au data/usage.out tmp/usage.out +echo "usage message OK." +rm -f tmp/usage.out + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/06_chsh_usage_no_users/config.txt b/tests/chage/06_chsh_usage_no_users/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chage/06_chsh_usage_no_users/config/etc/group b/tests/chage/06_chsh_usage_no_users/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chage/06_chsh_usage_no_users/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chage/06_chsh_usage_no_users/config/etc/gshadow b/tests/chage/06_chsh_usage_no_users/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chage/06_chsh_usage_no_users/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chage/06_chsh_usage_no_users/config/etc/passwd b/tests/chage/06_chsh_usage_no_users/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/06_chsh_usage_no_users/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/06_chsh_usage_no_users/config/etc/shadow b/tests/chage/06_chsh_usage_no_users/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/06_chsh_usage_no_users/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/06_chsh_usage_no_users/data/usage.out b/tests/chage/06_chsh_usage_no_users/data/usage.out new file mode 100644 index 00000000..31df15c1 --- /dev/null +++ b/tests/chage/06_chsh_usage_no_users/data/usage.out @@ -0,0 +1,16 @@ +Usage: chage [options] LOGIN + +Options: + -d, --lastday LAST_DAY set date of last password change to LAST_DAY + -E, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE + -h, --help display this help message and exit + -I, --inactive INACTIVE set password inactive after expiration + to INACTIVE + -l, --list show account aging information + -m, --mindays MIN_DAYS set minimum number of days before password + change to MIN_DAYS + -M, --maxdays MAX_DAYS set maximim number of days before password + change to MAX_DAYS + -R, --root CHROOT_DIR directory to chroot into + -W, --warndays WARN_DAYS set expiration warning days to WARN_DAYS + diff --git a/tests/chage/07_chsh_usage-l_exclusive/chage.test b/tests/chage/07_chsh_usage-l_exclusive/chage.test new file mode 100755 index 00000000..9036f09c --- /dev/null +++ b/tests/chage/07_chsh_usage-l_exclusive/chage.test @@ -0,0 +1,57 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage displays its usage message when -l is used with another option" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +for opt in "-m 12" "-M 12" "-d 2011-09-11" "-W 12" "-I 12" "-E 2011-09-11" +do + echo -n "Use chage with -l and $opt (chage -l $opt bin)..." + chage -l $opt bin 2>tmp/usage.out && exit 1 || { + status=$? + } + echo "OK" + + echo -n "Check returned status ($status)..." + test "$status" = "2" + echo "OK" + + echo "chage reported:" + echo "=======================================================================" + cat tmp/usage.out + echo "=======================================================================" + echo -n "Check the usage message..." + diff -au data/usage.out tmp/usage.out + echo "usage message OK." + rm -f tmp/usage.out +done + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/07_chsh_usage-l_exclusive/config.txt b/tests/chage/07_chsh_usage-l_exclusive/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chage/07_chsh_usage-l_exclusive/config/etc/group b/tests/chage/07_chsh_usage-l_exclusive/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chage/07_chsh_usage-l_exclusive/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chage/07_chsh_usage-l_exclusive/config/etc/gshadow b/tests/chage/07_chsh_usage-l_exclusive/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chage/07_chsh_usage-l_exclusive/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chage/07_chsh_usage-l_exclusive/config/etc/passwd b/tests/chage/07_chsh_usage-l_exclusive/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/07_chsh_usage-l_exclusive/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/07_chsh_usage-l_exclusive/config/etc/shadow b/tests/chage/07_chsh_usage-l_exclusive/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/07_chsh_usage-l_exclusive/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/07_chsh_usage-l_exclusive/data/usage.out b/tests/chage/07_chsh_usage-l_exclusive/data/usage.out new file mode 100644 index 00000000..b006b608 --- /dev/null +++ b/tests/chage/07_chsh_usage-l_exclusive/data/usage.out @@ -0,0 +1,17 @@ +chage: do not include "l" with other flags +Usage: chage [options] LOGIN + +Options: + -d, --lastday LAST_DAY set date of last password change to LAST_DAY + -E, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE + -h, --help display this help message and exit + -I, --inactive INACTIVE set password inactive after expiration + to INACTIVE + -l, --list show account aging information + -m, --mindays MIN_DAYS set minimum number of days before password + change to MIN_DAYS + -M, --maxdays MAX_DAYS set maximim number of days before password + change to MAX_DAYS + -R, --root CHROOT_DIR directory to chroot into + -W, --warndays WARN_DAYS set expiration warning days to WARN_DAYS + diff --git a/tests/chage/08_chsh_usage_invalid_date/chage.test b/tests/chage/08_chsh_usage_invalid_date/chage.test new file mode 100755 index 00000000..90007fc7 --- /dev/null +++ b/tests/chage/08_chsh_usage_invalid_date/chage.test @@ -0,0 +1,59 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage displays its usage message when -l is used with another option" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +for opt in "-d 2011-09" "-E 2011-09-09-11" +do + echo -n "Use chage with an invalid date (chage $opt bin)..." + chage $opt bin 2>tmp/usage.out && exit 1 || { + status=$? + } + echo "OK" + + echo -n "Check returned status ($status)..." + test "$status" = "2" + echo "OK" + + echo "chage reported:" + echo "=======================================================================" + cat tmp/usage.out + echo "=======================================================================" + d=$(echo $opt | cut -d' ' -f2) + sed -e "s/'$d'/'DATE'/" -i tmp/usage.out + echo -n "Check the usage message..." + diff -au data/usage.out tmp/usage.out + echo "usage message OK." + rm -f tmp/usage.out +done + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/08_chsh_usage_invalid_date/config.txt b/tests/chage/08_chsh_usage_invalid_date/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chage/08_chsh_usage_invalid_date/config/etc/group b/tests/chage/08_chsh_usage_invalid_date/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chage/08_chsh_usage_invalid_date/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chage/08_chsh_usage_invalid_date/config/etc/gshadow b/tests/chage/08_chsh_usage_invalid_date/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chage/08_chsh_usage_invalid_date/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chage/08_chsh_usage_invalid_date/config/etc/passwd b/tests/chage/08_chsh_usage_invalid_date/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/08_chsh_usage_invalid_date/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/08_chsh_usage_invalid_date/config/etc/shadow b/tests/chage/08_chsh_usage_invalid_date/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/08_chsh_usage_invalid_date/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/08_chsh_usage_invalid_date/data/usage.out b/tests/chage/08_chsh_usage_invalid_date/data/usage.out new file mode 100644 index 00000000..cb49bf8f --- /dev/null +++ b/tests/chage/08_chsh_usage_invalid_date/data/usage.out @@ -0,0 +1,17 @@ +chage: invalid date 'DATE' +Usage: chage [options] LOGIN + +Options: + -d, --lastday LAST_DAY set date of last password change to LAST_DAY + -E, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE + -h, --help display this help message and exit + -I, --inactive INACTIVE set password inactive after expiration + to INACTIVE + -l, --list show account aging information + -m, --mindays MIN_DAYS set minimum number of days before password + change to MIN_DAYS + -M, --maxdays MAX_DAYS set maximim number of days before password + change to MAX_DAYS + -R, --root CHROOT_DIR directory to chroot into + -W, --warndays WARN_DAYS set expiration warning days to WARN_DAYS + diff --git a/tests/chage/09_chsh_usage_invalid_numeric_arg/chage.test b/tests/chage/09_chsh_usage_invalid_numeric_arg/chage.test new file mode 100755 index 00000000..36d11e59 --- /dev/null +++ b/tests/chage/09_chsh_usage_invalid_numeric_arg/chage.test @@ -0,0 +1,59 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage displays its usage message when -l is used with another option" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +for opt in "-I -12" "-m -12" "-M -12" "-W -12" "-I a" "-m 12.5" "-M 12a" "-W a12" +do + echo -n "Use chage with an invalid date (chage $opt bin)..." + chage $opt bin 2>tmp/usage.out && exit 1 || { + status=$? + } + echo "OK" + + echo -n "Check returned status ($status)..." + test "$status" = "2" + echo "OK" + + echo "chage reported:" + echo "=======================================================================" + cat tmp/usage.out + echo "=======================================================================" + v=$(echo $opt | cut -d' ' -f2) + sed -e "s/'$v'/'VAL'/" -i tmp/usage.out + echo -n "Check the usage message..." + diff -au data/usage.out tmp/usage.out + echo "usage message OK." + rm -f tmp/usage.out +done + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/09_chsh_usage_invalid_numeric_arg/config.txt b/tests/chage/09_chsh_usage_invalid_numeric_arg/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chage/09_chsh_usage_invalid_numeric_arg/config/etc/group b/tests/chage/09_chsh_usage_invalid_numeric_arg/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chage/09_chsh_usage_invalid_numeric_arg/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chage/09_chsh_usage_invalid_numeric_arg/config/etc/gshadow b/tests/chage/09_chsh_usage_invalid_numeric_arg/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chage/09_chsh_usage_invalid_numeric_arg/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chage/09_chsh_usage_invalid_numeric_arg/config/etc/passwd b/tests/chage/09_chsh_usage_invalid_numeric_arg/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/09_chsh_usage_invalid_numeric_arg/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/09_chsh_usage_invalid_numeric_arg/config/etc/shadow b/tests/chage/09_chsh_usage_invalid_numeric_arg/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/09_chsh_usage_invalid_numeric_arg/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/09_chsh_usage_invalid_numeric_arg/data/usage.out b/tests/chage/09_chsh_usage_invalid_numeric_arg/data/usage.out new file mode 100644 index 00000000..9fb70d60 --- /dev/null +++ b/tests/chage/09_chsh_usage_invalid_numeric_arg/data/usage.out @@ -0,0 +1,17 @@ +chage: invalid numeric argument 'VAL' +Usage: chage [options] LOGIN + +Options: + -d, --lastday LAST_DAY set date of last password change to LAST_DAY + -E, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE + -h, --help display this help message and exit + -I, --inactive INACTIVE set password inactive after expiration + to INACTIVE + -l, --list show account aging information + -m, --mindays MIN_DAYS set minimum number of days before password + change to MIN_DAYS + -M, --maxdays MAX_DAYS set maximim number of days before password + change to MAX_DAYS + -R, --root CHROOT_DIR directory to chroot into + -W, --warndays WARN_DAYS set expiration warning days to WARN_DAYS + diff --git a/tests/chage/10_chsh-l/chage.test b/tests/chage/10_chsh-l/chage.test new file mode 100755 index 00000000..394c9813 --- /dev/null +++ b/tests/chage/10_chsh-l/chage.test @@ -0,0 +1,51 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage displays its usage message when -l is used with another option" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +for user in $(ls data/) +do + echo -n "Get $user aging info (chage -l $user)..." + chage -l $user >tmp/$user + echo "OK" + + echo "chage reported:" + echo "=======================================================================" + cat tmp/$user + echo "=======================================================================" + echo -n "Compare with expected output..." + diff -au data/$user tmp/$user + echo "OK" + rm -f tmp/$user +done + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/10_chsh-l/config.txt b/tests/chage/10_chsh-l/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chage/10_chsh-l/config/etc/group b/tests/chage/10_chsh-l/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chage/10_chsh-l/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chage/10_chsh-l/config/etc/gshadow b/tests/chage/10_chsh-l/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chage/10_chsh-l/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chage/10_chsh-l/config/etc/passwd b/tests/chage/10_chsh-l/config/etc/passwd new file mode 100644 index 00000000..31046cf6 --- /dev/null +++ b/tests/chage/10_chsh-l/config/etc/passwd @@ -0,0 +1,32 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash +myuser8:x:424249:424242::/home:/bin/bash +myuser9:x:424250:424242::/home:/bin/bash +myuser10:x:424251:424242::/home:/bin/bash +myuser11:x:424252:424242::/home:/bin/bash +myuser12:x:424253:424242::/home:/bin/bash +myuser13:x:424254:424242::/home:/bin/bash diff --git a/tests/chage/10_chsh-l/config/etc/shadow b/tests/chage/10_chsh-l/config/etc/shadow new file mode 100644 index 00000000..4b81469b --- /dev/null +++ b/tests/chage/10_chsh-l/config/etc/shadow @@ -0,0 +1,30 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:9999:7:1:: +myuser8:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.::0:9999:7:1:: +myuser9:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:0:0:9999:7:1:: +myuser10:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0::7:1:: +#myuser11:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:9999:7:1:: diff --git a/tests/chage/10_chsh-l/data/myuser1 b/tests/chage/10_chsh-l/data/myuser1 new file mode 100644 index 00000000..64754ca5 --- /dev/null +++ b/tests/chage/10_chsh-l/data/myuser1 @@ -0,0 +1,7 @@ +Last password change : Jul 27, 2005 +Password expires : never +Password inactive : never +Account expires : never +Minimum number of days between password change : 0 +Maximum number of days between password change : 99999 +Number of days of warning before password expires : 7 diff --git a/tests/chage/10_chsh-l/data/myuser10 b/tests/chage/10_chsh-l/data/myuser10 new file mode 100644 index 00000000..8a9e5d12 --- /dev/null +++ b/tests/chage/10_chsh-l/data/myuser10 @@ -0,0 +1,7 @@ +Last password change : Jul 27, 2005 +Password expires : never +Password inactive : never +Account expires : never +Minimum number of days between password change : 0 +Maximum number of days between password change : -1 +Number of days of warning before password expires : 7 diff --git a/tests/chage/10_chsh-l/data/myuser11 b/tests/chage/10_chsh-l/data/myuser11 new file mode 100644 index 00000000..a54ec7a7 --- /dev/null +++ b/tests/chage/10_chsh-l/data/myuser11 @@ -0,0 +1,7 @@ +Last password change : never +Password expires : never +Password inactive : never +Account expires : never +Minimum number of days between password change : -1 +Maximum number of days between password change : -1 +Number of days of warning before password expires : -1 diff --git a/tests/chage/10_chsh-l/data/myuser2 b/tests/chage/10_chsh-l/data/myuser2 new file mode 100644 index 00000000..7efdc0cd --- /dev/null +++ b/tests/chage/10_chsh-l/data/myuser2 @@ -0,0 +1,7 @@ +Last password change : Jul 28, 2005 +Password expires : never +Password inactive : never +Account expires : never +Minimum number of days between password change : 1 +Maximum number of days between password change : 99996 +Number of days of warning before password expires : 5 diff --git a/tests/chage/10_chsh-l/data/myuser3 b/tests/chage/10_chsh-l/data/myuser3 new file mode 100644 index 00000000..a263db9d --- /dev/null +++ b/tests/chage/10_chsh-l/data/myuser3 @@ -0,0 +1,7 @@ +Last password change : Jul 27, 2005 +Password expires : never +Password inactive : never +Account expires : Jan 01, 1970 +Minimum number of days between password change : 0 +Maximum number of days between password change : 99999 +Number of days of warning before password expires : 7 diff --git a/tests/chage/10_chsh-l/data/myuser4 b/tests/chage/10_chsh-l/data/myuser4 new file mode 100644 index 00000000..11e2f2d9 --- /dev/null +++ b/tests/chage/10_chsh-l/data/myuser4 @@ -0,0 +1,7 @@ +Last password change : Jul 27, 2005 +Password expires : never +Password inactive : never +Account expires : Jan 02, 1970 +Minimum number of days between password change : 0 +Maximum number of days between password change : 99999 +Number of days of warning before password expires : 7 diff --git a/tests/chage/10_chsh-l/data/myuser5 b/tests/chage/10_chsh-l/data/myuser5 new file mode 100644 index 00000000..64754ca5 --- /dev/null +++ b/tests/chage/10_chsh-l/data/myuser5 @@ -0,0 +1,7 @@ +Last password change : Jul 27, 2005 +Password expires : never +Password inactive : never +Account expires : never +Minimum number of days between password change : 0 +Maximum number of days between password change : 99999 +Number of days of warning before password expires : 7 diff --git a/tests/chage/10_chsh-l/data/myuser6 b/tests/chage/10_chsh-l/data/myuser6 new file mode 100644 index 00000000..64754ca5 --- /dev/null +++ b/tests/chage/10_chsh-l/data/myuser6 @@ -0,0 +1,7 @@ +Last password change : Jul 27, 2005 +Password expires : never +Password inactive : never +Account expires : never +Minimum number of days between password change : 0 +Maximum number of days between password change : 99999 +Number of days of warning before password expires : 7 diff --git a/tests/chage/10_chsh-l/data/myuser7 b/tests/chage/10_chsh-l/data/myuser7 new file mode 100644 index 00000000..63debfb9 --- /dev/null +++ b/tests/chage/10_chsh-l/data/myuser7 @@ -0,0 +1,7 @@ +Last password change : Jul 27, 2005 +Password expires : Dec 11, 2032 +Password inactive : Dec 12, 2032 +Account expires : never +Minimum number of days between password change : 0 +Maximum number of days between password change : 9999 +Number of days of warning before password expires : 7 diff --git a/tests/chage/10_chsh-l/data/myuser8 b/tests/chage/10_chsh-l/data/myuser8 new file mode 100644 index 00000000..4a3f4bd3 --- /dev/null +++ b/tests/chage/10_chsh-l/data/myuser8 @@ -0,0 +1,7 @@ +Last password change : never +Password expires : never +Password inactive : never +Account expires : never +Minimum number of days between password change : 0 +Maximum number of days between password change : 9999 +Number of days of warning before password expires : 7 diff --git a/tests/chage/10_chsh-l/data/myuser9 b/tests/chage/10_chsh-l/data/myuser9 new file mode 100644 index 00000000..09f6fdca --- /dev/null +++ b/tests/chage/10_chsh-l/data/myuser9 @@ -0,0 +1,7 @@ +Last password change : password must be changed +Password expires : password must be changed +Password inactive : password must be changed +Account expires : never +Minimum number of days between password change : 0 +Maximum number of days between password change : 9999 +Number of days of warning before password expires : 7 diff --git a/tests/chage/11_chsh_usage_invalid_user/chage.test b/tests/chage/11_chsh_usage_invalid_user/chage.test new file mode 100755 index 00000000..46d9d656 --- /dev/null +++ b/tests/chage/11_chsh_usage_invalid_user/chage.test @@ -0,0 +1,54 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage warns in case of invalid user" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Use chage with an invalid user (chage -I 12 foo)..." +chage -I 12 foo 2>tmp/usage.out && exit 1 || { + status=$? +} +echo "OK" + +echo -n "Check returned status ($status)..." +test "$status" = "1" +echo "OK" + +echo "chage reported:" +echo "=======================================================================" +cat tmp/usage.out +echo "=======================================================================" +echo -n "Check the usage message..." +diff -au data/usage.out tmp/usage.out +echo "usage message OK." +rm -f tmp/usage.out + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/11_chsh_usage_invalid_user/config.txt b/tests/chage/11_chsh_usage_invalid_user/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chage/11_chsh_usage_invalid_user/config/etc/group b/tests/chage/11_chsh_usage_invalid_user/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chage/11_chsh_usage_invalid_user/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chage/11_chsh_usage_invalid_user/config/etc/gshadow b/tests/chage/11_chsh_usage_invalid_user/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chage/11_chsh_usage_invalid_user/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chage/11_chsh_usage_invalid_user/config/etc/passwd b/tests/chage/11_chsh_usage_invalid_user/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/11_chsh_usage_invalid_user/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/11_chsh_usage_invalid_user/config/etc/shadow b/tests/chage/11_chsh_usage_invalid_user/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/11_chsh_usage_invalid_user/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/11_chsh_usage_invalid_user/data/usage.out b/tests/chage/11_chsh_usage_invalid_user/data/usage.out new file mode 100644 index 00000000..cdc8a1fa --- /dev/null +++ b/tests/chage/11_chsh_usage_invalid_user/data/usage.out @@ -0,0 +1 @@ +chage: user 'foo' does not exist in /etc/passwd diff --git a/tests/chage/12_chsh_usage-l_invalid_user2/chage.test b/tests/chage/12_chsh_usage-l_invalid_user2/chage.test new file mode 100755 index 00000000..d3b5255c --- /dev/null +++ b/tests/chage/12_chsh_usage-l_invalid_user2/chage.test @@ -0,0 +1,54 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage warns in case of invalid user" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Use chage with an invalid user (chage -l foo)..." +chage -l foo 2>tmp/usage.out && exit 1 || { + status=$? +} +echo "OK" + +echo -n "Check returned status ($status)..." +test "$status" = "1" +echo "OK" + +echo "chage reported:" +echo "=======================================================================" +cat tmp/usage.out +echo "=======================================================================" +echo -n "Check the usage message..." +diff -au data/usage.out tmp/usage.out +echo "usage message OK." +rm -f tmp/usage.out + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/12_chsh_usage-l_invalid_user2/config.txt b/tests/chage/12_chsh_usage-l_invalid_user2/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chage/12_chsh_usage-l_invalid_user2/config/etc/group b/tests/chage/12_chsh_usage-l_invalid_user2/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chage/12_chsh_usage-l_invalid_user2/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chage/12_chsh_usage-l_invalid_user2/config/etc/gshadow b/tests/chage/12_chsh_usage-l_invalid_user2/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chage/12_chsh_usage-l_invalid_user2/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chage/12_chsh_usage-l_invalid_user2/config/etc/passwd b/tests/chage/12_chsh_usage-l_invalid_user2/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/12_chsh_usage-l_invalid_user2/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/12_chsh_usage-l_invalid_user2/config/etc/shadow b/tests/chage/12_chsh_usage-l_invalid_user2/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/12_chsh_usage-l_invalid_user2/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/12_chsh_usage-l_invalid_user2/data/usage.out b/tests/chage/12_chsh_usage-l_invalid_user2/data/usage.out new file mode 100644 index 00000000..cdc8a1fa --- /dev/null +++ b/tests/chage/12_chsh_usage-l_invalid_user2/data/usage.out @@ -0,0 +1 @@ +chage: user 'foo' does not exist in /etc/passwd diff --git a/tests/chage/13_chsh_locked_passwd/chage.test b/tests/chage/13_chsh_locked_passwd/chage.test new file mode 100755 index 00000000..aeeb412a --- /dev/null +++ b/tests/chage/13_chsh_locked_passwd/chage.test @@ -0,0 +1,59 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage warns when passwd is already locked" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config; rm -f /etc/passwd.lock' 0 + +change_config + +echo -n "Create lock file for /etc/passwd..." +touch /etc/passwd.lock +echo "done" + +echo -n "Use chage with an invalid user (chage -I 12 bin)..." +chage -I 12 bin 2>tmp/usage.out && exit 1 || { + status=$? +} +echo "OK" +rm -f /etc/passwd.lock + +echo -n "Check returned status ($status)..." +test "$status" = "1" +echo "OK" + +echo "chage reported:" +echo "=======================================================================" +cat tmp/usage.out +echo "=======================================================================" +echo -n "Check the usage message..." +diff -au data/usage.out tmp/usage.out +echo "usage message OK." +rm -f tmp/usage.out + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/13_chsh_locked_passwd/config.txt b/tests/chage/13_chsh_locked_passwd/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chage/13_chsh_locked_passwd/config/etc/group b/tests/chage/13_chsh_locked_passwd/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chage/13_chsh_locked_passwd/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chage/13_chsh_locked_passwd/config/etc/gshadow b/tests/chage/13_chsh_locked_passwd/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chage/13_chsh_locked_passwd/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chage/13_chsh_locked_passwd/config/etc/passwd b/tests/chage/13_chsh_locked_passwd/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/13_chsh_locked_passwd/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/13_chsh_locked_passwd/config/etc/shadow b/tests/chage/13_chsh_locked_passwd/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/13_chsh_locked_passwd/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/13_chsh_locked_passwd/data/usage.out b/tests/chage/13_chsh_locked_passwd/data/usage.out new file mode 100644 index 00000000..caa44b5f --- /dev/null +++ b/tests/chage/13_chsh_locked_passwd/data/usage.out @@ -0,0 +1,2 @@ +chage: existing lock file /etc/passwd.lock without a PID +chage: cannot lock /etc/passwd; try again later. diff --git a/tests/chage/14_chsh_locked_shadow/chage.test b/tests/chage/14_chsh_locked_shadow/chage.test new file mode 100755 index 00000000..3474d953 --- /dev/null +++ b/tests/chage/14_chsh_locked_shadow/chage.test @@ -0,0 +1,59 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage warns when shadow is already locked" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config; rm -f /etc/shadow.lock' 0 + +change_config + +echo -n "Create lock file for /etc/shadow..." +touch /etc/shadow.lock +echo "done" + +echo -n "Use chage with an invalid user (chage -I 12 bin)..." +chage -I 12 bin 2>tmp/usage.out && exit 1 || { + status=$? +} +echo "OK" +rm -f /etc/shadow.lock + +echo -n "Check returned status ($status)..." +test "$status" = "1" +echo "OK" + +echo "chage reported:" +echo "=======================================================================" +cat tmp/usage.out +echo "=======================================================================" +echo -n "Check the usage message..." +diff -au data/usage.out tmp/usage.out +echo "usage message OK." +rm -f tmp/usage.out + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/14_chsh_locked_shadow/config.txt b/tests/chage/14_chsh_locked_shadow/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chage/14_chsh_locked_shadow/config/etc/group b/tests/chage/14_chsh_locked_shadow/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chage/14_chsh_locked_shadow/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chage/14_chsh_locked_shadow/config/etc/gshadow b/tests/chage/14_chsh_locked_shadow/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chage/14_chsh_locked_shadow/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chage/14_chsh_locked_shadow/config/etc/passwd b/tests/chage/14_chsh_locked_shadow/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/14_chsh_locked_shadow/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/14_chsh_locked_shadow/config/etc/shadow b/tests/chage/14_chsh_locked_shadow/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/14_chsh_locked_shadow/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/14_chsh_locked_shadow/data/usage.out b/tests/chage/14_chsh_locked_shadow/data/usage.out new file mode 100644 index 00000000..f396f3ca --- /dev/null +++ b/tests/chage/14_chsh_locked_shadow/data/usage.out @@ -0,0 +1,2 @@ +chage: existing lock file /etc/shadow.lock without a PID +chage: cannot lock /etc/shadow; try again later. diff --git a/tests/chage/15_chage-I_no_shadow_entry/chage.test b/tests/chage/15_chage-I_no_shadow_entry/chage.test new file mode 100755 index 00000000..77a06a26 --- /dev/null +++ b/tests/chage/15_chage-I_no_shadow_entry/chage.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage creates a shadow entry if there were none" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Change bin's inactivity period (chage -I 12 bin)..." +chage -I 12 bin +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl data/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl data/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/15_chage-I_no_shadow_entry/config.txt b/tests/chage/15_chage-I_no_shadow_entry/config.txt new file mode 100644 index 00000000..e9e4bbed --- /dev/null +++ b/tests/chage/15_chage-I_no_shadow_entry/config.txt @@ -0,0 +1 @@ +group foo, GID 1000 diff --git a/tests/chage/15_chage-I_no_shadow_entry/config/etc/group b/tests/chage/15_chage-I_no_shadow_entry/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/chage/15_chage-I_no_shadow_entry/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/chage/15_chage-I_no_shadow_entry/config/etc/gshadow b/tests/chage/15_chage-I_no_shadow_entry/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/chage/15_chage-I_no_shadow_entry/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/chage/15_chage-I_no_shadow_entry/config/etc/login.defs b/tests/chage/15_chage-I_no_shadow_entry/config/etc/login.defs new file mode 100644 index 00000000..84fb3cce --- /dev/null +++ b/tests/chage/15_chage-I_no_shadow_entry/config/etc/login.defs @@ -0,0 +1,315 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK usage is discouraged because it catches only some classes of user +# entries to system, in fact only those made through login(1), while setting +# umask in shell rc file will catch also logins through su, cron, ssh etc. +# +# At the same time, using shell rc to set umask won't catch entries which use +# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" +# user and alike. +# +# Therefore the use of pam_umask is recommended (Debian package libpam-umask) +# as the solution which catches all these cases on PAM-enabled systems. +# +# This avoids the confusion created by having the umask set +# in two different places -- in login.defs and shell rc files (i.e. +# /etc/profile). +# +# For discussion, see #314539 and #248150 as well as the thread starting at +# http://lists.debian.org/debian-devel/2005/06/msg01598.html +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +# 022 is the "historical" value in Debian for UMASK when it was used +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +#UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 100 +GID_MAX 60000 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# This enables userdel to remove user groups if no members exist. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, thus in Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is used by chpasswd, gpasswd and newusers. +# +#MD5_CRYPT_ENAB no + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chage/15_chage-I_no_shadow_entry/config/etc/passwd b/tests/chage/15_chage-I_no_shadow_entry/config/etc/passwd new file mode 100644 index 00000000..8656be41 --- /dev/null +++ b/tests/chage/15_chage-I_no_shadow_entry/config/etc/passwd @@ -0,0 +1,20 @@ +root:*:0:0:root:/root:/bin/bash +daemon:*:1:1:daemon:/usr/sbin:/bin/sh +bin:*:2:2:bin:/bin:/bin/sh +sys:*:3:3:sys:/dev:/bin/sh +sync:*:4:65534:sync:/bin:/bin/sync +games:*:5:60:games:/usr/games:/bin/sh +man:*:6:12:man:/var/cache/man:/bin/sh +lp:*:7:7:lp:/var/spool/lpd:/bin/sh +mail:*:8:8:mail:/var/mail:/bin/sh +news:*:9:9:news:/var/spool/news:/bin/sh +uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:*:13:13:proxy:/bin:/bin/sh +www-data:*:33:33:www-data:/var/www:/bin/sh +backup:*:34:34:backup:/var/backups:/bin/sh +list:*:38:38:Mailing List Manager:/var/list:/bin/sh +irc:*:39:39:ircd:/var/run/ircd:/bin/sh +gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:*:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:*:102:102::/var/spool/exim4:/bin/false +foo:abc:1000:1000::/nonexistent:/bin/sh diff --git a/tests/chage/15_chage-I_no_shadow_entry/config/etc/shadow b/tests/chage/15_chage-I_no_shadow_entry/config/etc/shadow new file mode 100644 index 00000000..88faec23 --- /dev/null +++ b/tests/chage/15_chage-I_no_shadow_entry/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/chage/15_chage-I_no_shadow_entry/data/passwd b/tests/chage/15_chage-I_no_shadow_entry/data/passwd new file mode 100644 index 00000000..d9ad1e23 --- /dev/null +++ b/tests/chage/15_chage-I_no_shadow_entry/data/passwd @@ -0,0 +1,20 @@ +root:*:0:0:root:/root:/bin/bash +daemon:*:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:*:3:3:sys:/dev:/bin/sh +sync:*:4:65534:sync:/bin:/bin/sync +games:*:5:60:games:/usr/games:/bin/sh +man:*:6:12:man:/var/cache/man:/bin/sh +lp:*:7:7:lp:/var/spool/lpd:/bin/sh +mail:*:8:8:mail:/var/mail:/bin/sh +news:*:9:9:news:/var/spool/news:/bin/sh +uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:*:13:13:proxy:/bin:/bin/sh +www-data:*:33:33:www-data:/var/www:/bin/sh +backup:*:34:34:backup:/var/backups:/bin/sh +list:*:38:38:Mailing List Manager:/var/list:/bin/sh +irc:*:39:39:ircd:/var/run/ircd:/bin/sh +gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:*:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:*:102:102::/var/spool/exim4:/bin/false +foo:abc:1000:1000::/nonexistent:/bin/sh diff --git a/tests/chage/15_chage-I_no_shadow_entry/data/shadow b/tests/chage/15_chage-I_no_shadow_entry/data/shadow new file mode 100644 index 00000000..d32d937b --- /dev/null +++ b/tests/chage/15_chage-I_no_shadow_entry/data/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: +bin:*:::::12:: diff --git a/tests/chage/16_chage-m_no_shadow_entry/chage.test b/tests/chage/16_chage-m_no_shadow_entry/chage.test new file mode 100755 index 00000000..778a65aa --- /dev/null +++ b/tests/chage/16_chage-m_no_shadow_entry/chage.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage creates a shadow entry if there were none" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Change bin's mindays (chage -m 12 bin)..." +chage -m 12 bin +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl data/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl data/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/16_chage-m_no_shadow_entry/config.txt b/tests/chage/16_chage-m_no_shadow_entry/config.txt new file mode 100644 index 00000000..e9e4bbed --- /dev/null +++ b/tests/chage/16_chage-m_no_shadow_entry/config.txt @@ -0,0 +1 @@ +group foo, GID 1000 diff --git a/tests/chage/16_chage-m_no_shadow_entry/config/etc/group b/tests/chage/16_chage-m_no_shadow_entry/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/chage/16_chage-m_no_shadow_entry/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/chage/16_chage-m_no_shadow_entry/config/etc/gshadow b/tests/chage/16_chage-m_no_shadow_entry/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/chage/16_chage-m_no_shadow_entry/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/chage/16_chage-m_no_shadow_entry/config/etc/login.defs b/tests/chage/16_chage-m_no_shadow_entry/config/etc/login.defs new file mode 100644 index 00000000..84fb3cce --- /dev/null +++ b/tests/chage/16_chage-m_no_shadow_entry/config/etc/login.defs @@ -0,0 +1,315 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK usage is discouraged because it catches only some classes of user +# entries to system, in fact only those made through login(1), while setting +# umask in shell rc file will catch also logins through su, cron, ssh etc. +# +# At the same time, using shell rc to set umask won't catch entries which use +# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" +# user and alike. +# +# Therefore the use of pam_umask is recommended (Debian package libpam-umask) +# as the solution which catches all these cases on PAM-enabled systems. +# +# This avoids the confusion created by having the umask set +# in two different places -- in login.defs and shell rc files (i.e. +# /etc/profile). +# +# For discussion, see #314539 and #248150 as well as the thread starting at +# http://lists.debian.org/debian-devel/2005/06/msg01598.html +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +# 022 is the "historical" value in Debian for UMASK when it was used +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +#UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 100 +GID_MAX 60000 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# This enables userdel to remove user groups if no members exist. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, thus in Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is used by chpasswd, gpasswd and newusers. +# +#MD5_CRYPT_ENAB no + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chage/16_chage-m_no_shadow_entry/config/etc/passwd b/tests/chage/16_chage-m_no_shadow_entry/config/etc/passwd new file mode 100644 index 00000000..8656be41 --- /dev/null +++ b/tests/chage/16_chage-m_no_shadow_entry/config/etc/passwd @@ -0,0 +1,20 @@ +root:*:0:0:root:/root:/bin/bash +daemon:*:1:1:daemon:/usr/sbin:/bin/sh +bin:*:2:2:bin:/bin:/bin/sh +sys:*:3:3:sys:/dev:/bin/sh +sync:*:4:65534:sync:/bin:/bin/sync +games:*:5:60:games:/usr/games:/bin/sh +man:*:6:12:man:/var/cache/man:/bin/sh +lp:*:7:7:lp:/var/spool/lpd:/bin/sh +mail:*:8:8:mail:/var/mail:/bin/sh +news:*:9:9:news:/var/spool/news:/bin/sh +uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:*:13:13:proxy:/bin:/bin/sh +www-data:*:33:33:www-data:/var/www:/bin/sh +backup:*:34:34:backup:/var/backups:/bin/sh +list:*:38:38:Mailing List Manager:/var/list:/bin/sh +irc:*:39:39:ircd:/var/run/ircd:/bin/sh +gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:*:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:*:102:102::/var/spool/exim4:/bin/false +foo:abc:1000:1000::/nonexistent:/bin/sh diff --git a/tests/chage/16_chage-m_no_shadow_entry/config/etc/shadow b/tests/chage/16_chage-m_no_shadow_entry/config/etc/shadow new file mode 100644 index 00000000..88faec23 --- /dev/null +++ b/tests/chage/16_chage-m_no_shadow_entry/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/chage/16_chage-m_no_shadow_entry/data/passwd b/tests/chage/16_chage-m_no_shadow_entry/data/passwd new file mode 100644 index 00000000..d9ad1e23 --- /dev/null +++ b/tests/chage/16_chage-m_no_shadow_entry/data/passwd @@ -0,0 +1,20 @@ +root:*:0:0:root:/root:/bin/bash +daemon:*:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:*:3:3:sys:/dev:/bin/sh +sync:*:4:65534:sync:/bin:/bin/sync +games:*:5:60:games:/usr/games:/bin/sh +man:*:6:12:man:/var/cache/man:/bin/sh +lp:*:7:7:lp:/var/spool/lpd:/bin/sh +mail:*:8:8:mail:/var/mail:/bin/sh +news:*:9:9:news:/var/spool/news:/bin/sh +uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:*:13:13:proxy:/bin:/bin/sh +www-data:*:33:33:www-data:/var/www:/bin/sh +backup:*:34:34:backup:/var/backups:/bin/sh +list:*:38:38:Mailing List Manager:/var/list:/bin/sh +irc:*:39:39:ircd:/var/run/ircd:/bin/sh +gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:*:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:*:102:102::/var/spool/exim4:/bin/false +foo:abc:1000:1000::/nonexistent:/bin/sh diff --git a/tests/chage/16_chage-m_no_shadow_entry/data/shadow b/tests/chage/16_chage-m_no_shadow_entry/data/shadow new file mode 100644 index 00000000..dc6bc8bb --- /dev/null +++ b/tests/chage/16_chage-m_no_shadow_entry/data/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: +bin:*::12::::: diff --git a/tests/chage/17_chage-M_no_shadow_entry/chage.test b/tests/chage/17_chage-M_no_shadow_entry/chage.test new file mode 100755 index 00000000..6b70f066 --- /dev/null +++ b/tests/chage/17_chage-M_no_shadow_entry/chage.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage creates a shadow entry if there were none" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Change bin's mindays (chage -M 12 bin)..." +chage -M 12 bin +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl data/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl data/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/17_chage-M_no_shadow_entry/config.txt b/tests/chage/17_chage-M_no_shadow_entry/config.txt new file mode 100644 index 00000000..e9e4bbed --- /dev/null +++ b/tests/chage/17_chage-M_no_shadow_entry/config.txt @@ -0,0 +1 @@ +group foo, GID 1000 diff --git a/tests/chage/17_chage-M_no_shadow_entry/config/etc/group b/tests/chage/17_chage-M_no_shadow_entry/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/chage/17_chage-M_no_shadow_entry/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/chage/17_chage-M_no_shadow_entry/config/etc/gshadow b/tests/chage/17_chage-M_no_shadow_entry/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/chage/17_chage-M_no_shadow_entry/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/chage/17_chage-M_no_shadow_entry/config/etc/login.defs b/tests/chage/17_chage-M_no_shadow_entry/config/etc/login.defs new file mode 100644 index 00000000..84fb3cce --- /dev/null +++ b/tests/chage/17_chage-M_no_shadow_entry/config/etc/login.defs @@ -0,0 +1,315 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK usage is discouraged because it catches only some classes of user +# entries to system, in fact only those made through login(1), while setting +# umask in shell rc file will catch also logins through su, cron, ssh etc. +# +# At the same time, using shell rc to set umask won't catch entries which use +# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" +# user and alike. +# +# Therefore the use of pam_umask is recommended (Debian package libpam-umask) +# as the solution which catches all these cases on PAM-enabled systems. +# +# This avoids the confusion created by having the umask set +# in two different places -- in login.defs and shell rc files (i.e. +# /etc/profile). +# +# For discussion, see #314539 and #248150 as well as the thread starting at +# http://lists.debian.org/debian-devel/2005/06/msg01598.html +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +# 022 is the "historical" value in Debian for UMASK when it was used +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +#UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 100 +GID_MAX 60000 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# This enables userdel to remove user groups if no members exist. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, thus in Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is used by chpasswd, gpasswd and newusers. +# +#MD5_CRYPT_ENAB no + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chage/17_chage-M_no_shadow_entry/config/etc/passwd b/tests/chage/17_chage-M_no_shadow_entry/config/etc/passwd new file mode 100644 index 00000000..8656be41 --- /dev/null +++ b/tests/chage/17_chage-M_no_shadow_entry/config/etc/passwd @@ -0,0 +1,20 @@ +root:*:0:0:root:/root:/bin/bash +daemon:*:1:1:daemon:/usr/sbin:/bin/sh +bin:*:2:2:bin:/bin:/bin/sh +sys:*:3:3:sys:/dev:/bin/sh +sync:*:4:65534:sync:/bin:/bin/sync +games:*:5:60:games:/usr/games:/bin/sh +man:*:6:12:man:/var/cache/man:/bin/sh +lp:*:7:7:lp:/var/spool/lpd:/bin/sh +mail:*:8:8:mail:/var/mail:/bin/sh +news:*:9:9:news:/var/spool/news:/bin/sh +uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:*:13:13:proxy:/bin:/bin/sh +www-data:*:33:33:www-data:/var/www:/bin/sh +backup:*:34:34:backup:/var/backups:/bin/sh +list:*:38:38:Mailing List Manager:/var/list:/bin/sh +irc:*:39:39:ircd:/var/run/ircd:/bin/sh +gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:*:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:*:102:102::/var/spool/exim4:/bin/false +foo:abc:1000:1000::/nonexistent:/bin/sh diff --git a/tests/chage/17_chage-M_no_shadow_entry/config/etc/shadow b/tests/chage/17_chage-M_no_shadow_entry/config/etc/shadow new file mode 100644 index 00000000..88faec23 --- /dev/null +++ b/tests/chage/17_chage-M_no_shadow_entry/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/chage/17_chage-M_no_shadow_entry/data/passwd b/tests/chage/17_chage-M_no_shadow_entry/data/passwd new file mode 100644 index 00000000..d9ad1e23 --- /dev/null +++ b/tests/chage/17_chage-M_no_shadow_entry/data/passwd @@ -0,0 +1,20 @@ +root:*:0:0:root:/root:/bin/bash +daemon:*:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:*:3:3:sys:/dev:/bin/sh +sync:*:4:65534:sync:/bin:/bin/sync +games:*:5:60:games:/usr/games:/bin/sh +man:*:6:12:man:/var/cache/man:/bin/sh +lp:*:7:7:lp:/var/spool/lpd:/bin/sh +mail:*:8:8:mail:/var/mail:/bin/sh +news:*:9:9:news:/var/spool/news:/bin/sh +uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:*:13:13:proxy:/bin:/bin/sh +www-data:*:33:33:www-data:/var/www:/bin/sh +backup:*:34:34:backup:/var/backups:/bin/sh +list:*:38:38:Mailing List Manager:/var/list:/bin/sh +irc:*:39:39:ircd:/var/run/ircd:/bin/sh +gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:*:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:*:102:102::/var/spool/exim4:/bin/false +foo:abc:1000:1000::/nonexistent:/bin/sh diff --git a/tests/chage/17_chage-M_no_shadow_entry/data/shadow b/tests/chage/17_chage-M_no_shadow_entry/data/shadow new file mode 100644 index 00000000..fb623f7c --- /dev/null +++ b/tests/chage/17_chage-M_no_shadow_entry/data/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: +bin:*:::12:::: diff --git a/tests/chage/18_chage-d_no_shadow_entry/chage.test b/tests/chage/18_chage-d_no_shadow_entry/chage.test new file mode 100755 index 00000000..fb56cef8 --- /dev/null +++ b/tests/chage/18_chage-d_no_shadow_entry/chage.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage creates a shadow entry if there were none" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Change bin's mindays (chage -d 2011-09-11 bin)..." +chage -d 2011-09-11 bin +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl data/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl data/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/18_chage-d_no_shadow_entry/config.txt b/tests/chage/18_chage-d_no_shadow_entry/config.txt new file mode 100644 index 00000000..e9e4bbed --- /dev/null +++ b/tests/chage/18_chage-d_no_shadow_entry/config.txt @@ -0,0 +1 @@ +group foo, GID 1000 diff --git a/tests/chage/18_chage-d_no_shadow_entry/config/etc/group b/tests/chage/18_chage-d_no_shadow_entry/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/chage/18_chage-d_no_shadow_entry/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/chage/18_chage-d_no_shadow_entry/config/etc/gshadow b/tests/chage/18_chage-d_no_shadow_entry/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/chage/18_chage-d_no_shadow_entry/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/chage/18_chage-d_no_shadow_entry/config/etc/login.defs b/tests/chage/18_chage-d_no_shadow_entry/config/etc/login.defs new file mode 100644 index 00000000..84fb3cce --- /dev/null +++ b/tests/chage/18_chage-d_no_shadow_entry/config/etc/login.defs @@ -0,0 +1,315 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK usage is discouraged because it catches only some classes of user +# entries to system, in fact only those made through login(1), while setting +# umask in shell rc file will catch also logins through su, cron, ssh etc. +# +# At the same time, using shell rc to set umask won't catch entries which use +# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" +# user and alike. +# +# Therefore the use of pam_umask is recommended (Debian package libpam-umask) +# as the solution which catches all these cases on PAM-enabled systems. +# +# This avoids the confusion created by having the umask set +# in two different places -- in login.defs and shell rc files (i.e. +# /etc/profile). +# +# For discussion, see #314539 and #248150 as well as the thread starting at +# http://lists.debian.org/debian-devel/2005/06/msg01598.html +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +# 022 is the "historical" value in Debian for UMASK when it was used +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +#UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 100 +GID_MAX 60000 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# This enables userdel to remove user groups if no members exist. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, thus in Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is used by chpasswd, gpasswd and newusers. +# +#MD5_CRYPT_ENAB no + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chage/18_chage-d_no_shadow_entry/config/etc/passwd b/tests/chage/18_chage-d_no_shadow_entry/config/etc/passwd new file mode 100644 index 00000000..8656be41 --- /dev/null +++ b/tests/chage/18_chage-d_no_shadow_entry/config/etc/passwd @@ -0,0 +1,20 @@ +root:*:0:0:root:/root:/bin/bash +daemon:*:1:1:daemon:/usr/sbin:/bin/sh +bin:*:2:2:bin:/bin:/bin/sh +sys:*:3:3:sys:/dev:/bin/sh +sync:*:4:65534:sync:/bin:/bin/sync +games:*:5:60:games:/usr/games:/bin/sh +man:*:6:12:man:/var/cache/man:/bin/sh +lp:*:7:7:lp:/var/spool/lpd:/bin/sh +mail:*:8:8:mail:/var/mail:/bin/sh +news:*:9:9:news:/var/spool/news:/bin/sh +uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:*:13:13:proxy:/bin:/bin/sh +www-data:*:33:33:www-data:/var/www:/bin/sh +backup:*:34:34:backup:/var/backups:/bin/sh +list:*:38:38:Mailing List Manager:/var/list:/bin/sh +irc:*:39:39:ircd:/var/run/ircd:/bin/sh +gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:*:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:*:102:102::/var/spool/exim4:/bin/false +foo:abc:1000:1000::/nonexistent:/bin/sh diff --git a/tests/chage/18_chage-d_no_shadow_entry/config/etc/shadow b/tests/chage/18_chage-d_no_shadow_entry/config/etc/shadow new file mode 100644 index 00000000..88faec23 --- /dev/null +++ b/tests/chage/18_chage-d_no_shadow_entry/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/chage/18_chage-d_no_shadow_entry/data/passwd b/tests/chage/18_chage-d_no_shadow_entry/data/passwd new file mode 100644 index 00000000..d9ad1e23 --- /dev/null +++ b/tests/chage/18_chage-d_no_shadow_entry/data/passwd @@ -0,0 +1,20 @@ +root:*:0:0:root:/root:/bin/bash +daemon:*:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:*:3:3:sys:/dev:/bin/sh +sync:*:4:65534:sync:/bin:/bin/sync +games:*:5:60:games:/usr/games:/bin/sh +man:*:6:12:man:/var/cache/man:/bin/sh +lp:*:7:7:lp:/var/spool/lpd:/bin/sh +mail:*:8:8:mail:/var/mail:/bin/sh +news:*:9:9:news:/var/spool/news:/bin/sh +uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:*:13:13:proxy:/bin:/bin/sh +www-data:*:33:33:www-data:/var/www:/bin/sh +backup:*:34:34:backup:/var/backups:/bin/sh +list:*:38:38:Mailing List Manager:/var/list:/bin/sh +irc:*:39:39:ircd:/var/run/ircd:/bin/sh +gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:*:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:*:102:102::/var/spool/exim4:/bin/false +foo:abc:1000:1000::/nonexistent:/bin/sh diff --git a/tests/chage/18_chage-d_no_shadow_entry/data/shadow b/tests/chage/18_chage-d_no_shadow_entry/data/shadow new file mode 100644 index 00000000..df82e6ca --- /dev/null +++ b/tests/chage/18_chage-d_no_shadow_entry/data/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: +bin:*:15228:::::: diff --git a/tests/chage/19_chage-W_no_shadow_entry/chage.test b/tests/chage/19_chage-W_no_shadow_entry/chage.test new file mode 100755 index 00000000..410ccbb9 --- /dev/null +++ b/tests/chage/19_chage-W_no_shadow_entry/chage.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage creates a shadow entry if there were none" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Change bin's mindays (chage -W 12 bin)..." +chage -W 12 bin +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl data/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl data/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/19_chage-W_no_shadow_entry/config.txt b/tests/chage/19_chage-W_no_shadow_entry/config.txt new file mode 100644 index 00000000..e9e4bbed --- /dev/null +++ b/tests/chage/19_chage-W_no_shadow_entry/config.txt @@ -0,0 +1 @@ +group foo, GID 1000 diff --git a/tests/chage/19_chage-W_no_shadow_entry/config/etc/group b/tests/chage/19_chage-W_no_shadow_entry/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/chage/19_chage-W_no_shadow_entry/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/chage/19_chage-W_no_shadow_entry/config/etc/gshadow b/tests/chage/19_chage-W_no_shadow_entry/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/chage/19_chage-W_no_shadow_entry/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/chage/19_chage-W_no_shadow_entry/config/etc/login.defs b/tests/chage/19_chage-W_no_shadow_entry/config/etc/login.defs new file mode 100644 index 00000000..84fb3cce --- /dev/null +++ b/tests/chage/19_chage-W_no_shadow_entry/config/etc/login.defs @@ -0,0 +1,315 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK usage is discouraged because it catches only some classes of user +# entries to system, in fact only those made through login(1), while setting +# umask in shell rc file will catch also logins through su, cron, ssh etc. +# +# At the same time, using shell rc to set umask won't catch entries which use +# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" +# user and alike. +# +# Therefore the use of pam_umask is recommended (Debian package libpam-umask) +# as the solution which catches all these cases on PAM-enabled systems. +# +# This avoids the confusion created by having the umask set +# in two different places -- in login.defs and shell rc files (i.e. +# /etc/profile). +# +# For discussion, see #314539 and #248150 as well as the thread starting at +# http://lists.debian.org/debian-devel/2005/06/msg01598.html +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +# 022 is the "historical" value in Debian for UMASK when it was used +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +#UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 100 +GID_MAX 60000 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# This enables userdel to remove user groups if no members exist. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, thus in Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is used by chpasswd, gpasswd and newusers. +# +#MD5_CRYPT_ENAB no + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chage/19_chage-W_no_shadow_entry/config/etc/passwd b/tests/chage/19_chage-W_no_shadow_entry/config/etc/passwd new file mode 100644 index 00000000..8656be41 --- /dev/null +++ b/tests/chage/19_chage-W_no_shadow_entry/config/etc/passwd @@ -0,0 +1,20 @@ +root:*:0:0:root:/root:/bin/bash +daemon:*:1:1:daemon:/usr/sbin:/bin/sh +bin:*:2:2:bin:/bin:/bin/sh +sys:*:3:3:sys:/dev:/bin/sh +sync:*:4:65534:sync:/bin:/bin/sync +games:*:5:60:games:/usr/games:/bin/sh +man:*:6:12:man:/var/cache/man:/bin/sh +lp:*:7:7:lp:/var/spool/lpd:/bin/sh +mail:*:8:8:mail:/var/mail:/bin/sh +news:*:9:9:news:/var/spool/news:/bin/sh +uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:*:13:13:proxy:/bin:/bin/sh +www-data:*:33:33:www-data:/var/www:/bin/sh +backup:*:34:34:backup:/var/backups:/bin/sh +list:*:38:38:Mailing List Manager:/var/list:/bin/sh +irc:*:39:39:ircd:/var/run/ircd:/bin/sh +gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:*:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:*:102:102::/var/spool/exim4:/bin/false +foo:abc:1000:1000::/nonexistent:/bin/sh diff --git a/tests/chage/19_chage-W_no_shadow_entry/config/etc/shadow b/tests/chage/19_chage-W_no_shadow_entry/config/etc/shadow new file mode 100644 index 00000000..88faec23 --- /dev/null +++ b/tests/chage/19_chage-W_no_shadow_entry/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/chage/19_chage-W_no_shadow_entry/data/passwd b/tests/chage/19_chage-W_no_shadow_entry/data/passwd new file mode 100644 index 00000000..d9ad1e23 --- /dev/null +++ b/tests/chage/19_chage-W_no_shadow_entry/data/passwd @@ -0,0 +1,20 @@ +root:*:0:0:root:/root:/bin/bash +daemon:*:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:*:3:3:sys:/dev:/bin/sh +sync:*:4:65534:sync:/bin:/bin/sync +games:*:5:60:games:/usr/games:/bin/sh +man:*:6:12:man:/var/cache/man:/bin/sh +lp:*:7:7:lp:/var/spool/lpd:/bin/sh +mail:*:8:8:mail:/var/mail:/bin/sh +news:*:9:9:news:/var/spool/news:/bin/sh +uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:*:13:13:proxy:/bin:/bin/sh +www-data:*:33:33:www-data:/var/www:/bin/sh +backup:*:34:34:backup:/var/backups:/bin/sh +list:*:38:38:Mailing List Manager:/var/list:/bin/sh +irc:*:39:39:ircd:/var/run/ircd:/bin/sh +gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:*:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:*:102:102::/var/spool/exim4:/bin/false +foo:abc:1000:1000::/nonexistent:/bin/sh diff --git a/tests/chage/19_chage-W_no_shadow_entry/data/shadow b/tests/chage/19_chage-W_no_shadow_entry/data/shadow new file mode 100644 index 00000000..32654238 --- /dev/null +++ b/tests/chage/19_chage-W_no_shadow_entry/data/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: +bin:*::::12::: diff --git a/tests/chage/20_chage-E_no_shadow_entry/chage.test b/tests/chage/20_chage-E_no_shadow_entry/chage.test new file mode 100755 index 00000000..52079f7e --- /dev/null +++ b/tests/chage/20_chage-E_no_shadow_entry/chage.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage creates a shadow entry if there were none" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Change bin's mindays (chage -E 2011-09-11 bin)..." +chage -E 2011-09-11 bin +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl data/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl data/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/20_chage-E_no_shadow_entry/config.txt b/tests/chage/20_chage-E_no_shadow_entry/config.txt new file mode 100644 index 00000000..e9e4bbed --- /dev/null +++ b/tests/chage/20_chage-E_no_shadow_entry/config.txt @@ -0,0 +1 @@ +group foo, GID 1000 diff --git a/tests/chage/20_chage-E_no_shadow_entry/config/etc/group b/tests/chage/20_chage-E_no_shadow_entry/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/chage/20_chage-E_no_shadow_entry/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/chage/20_chage-E_no_shadow_entry/config/etc/gshadow b/tests/chage/20_chage-E_no_shadow_entry/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/chage/20_chage-E_no_shadow_entry/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/chage/20_chage-E_no_shadow_entry/config/etc/login.defs b/tests/chage/20_chage-E_no_shadow_entry/config/etc/login.defs new file mode 100644 index 00000000..84fb3cce --- /dev/null +++ b/tests/chage/20_chage-E_no_shadow_entry/config/etc/login.defs @@ -0,0 +1,315 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK usage is discouraged because it catches only some classes of user +# entries to system, in fact only those made through login(1), while setting +# umask in shell rc file will catch also logins through su, cron, ssh etc. +# +# At the same time, using shell rc to set umask won't catch entries which use +# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" +# user and alike. +# +# Therefore the use of pam_umask is recommended (Debian package libpam-umask) +# as the solution which catches all these cases on PAM-enabled systems. +# +# This avoids the confusion created by having the umask set +# in two different places -- in login.defs and shell rc files (i.e. +# /etc/profile). +# +# For discussion, see #314539 and #248150 as well as the thread starting at +# http://lists.debian.org/debian-devel/2005/06/msg01598.html +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +# 022 is the "historical" value in Debian for UMASK when it was used +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +#UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 100 +GID_MAX 60000 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# This enables userdel to remove user groups if no members exist. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, thus in Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is used by chpasswd, gpasswd and newusers. +# +#MD5_CRYPT_ENAB no + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chage/20_chage-E_no_shadow_entry/config/etc/passwd b/tests/chage/20_chage-E_no_shadow_entry/config/etc/passwd new file mode 100644 index 00000000..8656be41 --- /dev/null +++ b/tests/chage/20_chage-E_no_shadow_entry/config/etc/passwd @@ -0,0 +1,20 @@ +root:*:0:0:root:/root:/bin/bash +daemon:*:1:1:daemon:/usr/sbin:/bin/sh +bin:*:2:2:bin:/bin:/bin/sh +sys:*:3:3:sys:/dev:/bin/sh +sync:*:4:65534:sync:/bin:/bin/sync +games:*:5:60:games:/usr/games:/bin/sh +man:*:6:12:man:/var/cache/man:/bin/sh +lp:*:7:7:lp:/var/spool/lpd:/bin/sh +mail:*:8:8:mail:/var/mail:/bin/sh +news:*:9:9:news:/var/spool/news:/bin/sh +uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:*:13:13:proxy:/bin:/bin/sh +www-data:*:33:33:www-data:/var/www:/bin/sh +backup:*:34:34:backup:/var/backups:/bin/sh +list:*:38:38:Mailing List Manager:/var/list:/bin/sh +irc:*:39:39:ircd:/var/run/ircd:/bin/sh +gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:*:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:*:102:102::/var/spool/exim4:/bin/false +foo:abc:1000:1000::/nonexistent:/bin/sh diff --git a/tests/chage/20_chage-E_no_shadow_entry/config/etc/shadow b/tests/chage/20_chage-E_no_shadow_entry/config/etc/shadow new file mode 100644 index 00000000..88faec23 --- /dev/null +++ b/tests/chage/20_chage-E_no_shadow_entry/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/chage/20_chage-E_no_shadow_entry/data/passwd b/tests/chage/20_chage-E_no_shadow_entry/data/passwd new file mode 100644 index 00000000..d9ad1e23 --- /dev/null +++ b/tests/chage/20_chage-E_no_shadow_entry/data/passwd @@ -0,0 +1,20 @@ +root:*:0:0:root:/root:/bin/bash +daemon:*:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:*:3:3:sys:/dev:/bin/sh +sync:*:4:65534:sync:/bin:/bin/sync +games:*:5:60:games:/usr/games:/bin/sh +man:*:6:12:man:/var/cache/man:/bin/sh +lp:*:7:7:lp:/var/spool/lpd:/bin/sh +mail:*:8:8:mail:/var/mail:/bin/sh +news:*:9:9:news:/var/spool/news:/bin/sh +uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:*:13:13:proxy:/bin:/bin/sh +www-data:*:33:33:www-data:/var/www:/bin/sh +backup:*:34:34:backup:/var/backups:/bin/sh +list:*:38:38:Mailing List Manager:/var/list:/bin/sh +irc:*:39:39:ircd:/var/run/ircd:/bin/sh +gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:*:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:*:102:102::/var/spool/exim4:/bin/false +foo:abc:1000:1000::/nonexistent:/bin/sh diff --git a/tests/chage/20_chage-E_no_shadow_entry/data/shadow b/tests/chage/20_chage-E_no_shadow_entry/data/shadow new file mode 100644 index 00000000..752a49af --- /dev/null +++ b/tests/chage/20_chage-E_no_shadow_entry/data/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: +bin:*::::::15228: diff --git a/tests/chage/21_chage_no_shadow_file/chage.test b/tests/chage/21_chage_no_shadow_file/chage.test new file mode 100755 index 00000000..c2e8d0ed --- /dev/null +++ b/tests/chage/21_chage_no_shadow_file/chage.test @@ -0,0 +1,58 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage warns when shadow is not enabled" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Remove /etc/shadow..." +rm -f /etc/shadow +echo "OK" + +echo -n "Use chage with an invalid user (chage -I 12 bin)..." +chage -I 12 bin 2>tmp/usage.out && exit 1 || { + status=$? +} +echo "OK" + +echo -n "Check returned status ($status)..." +test "$status" = "15" +echo "OK" + +echo "chage reported:" +echo "=======================================================================" +cat tmp/usage.out +echo "=======================================================================" +echo -n "Check the usage message..." +diff -au data/usage.out tmp/usage.out +echo "usage message OK." +rm -f tmp/usage.out + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +test ! -f /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/21_chage_no_shadow_file/config.txt b/tests/chage/21_chage_no_shadow_file/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chage/21_chage_no_shadow_file/config/etc/group b/tests/chage/21_chage_no_shadow_file/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chage/21_chage_no_shadow_file/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chage/21_chage_no_shadow_file/config/etc/gshadow b/tests/chage/21_chage_no_shadow_file/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chage/21_chage_no_shadow_file/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chage/21_chage_no_shadow_file/config/etc/passwd b/tests/chage/21_chage_no_shadow_file/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/21_chage_no_shadow_file/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/21_chage_no_shadow_file/config/etc/shadow b/tests/chage/21_chage_no_shadow_file/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/21_chage_no_shadow_file/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/21_chage_no_shadow_file/data/usage.out b/tests/chage/21_chage_no_shadow_file/data/usage.out new file mode 100644 index 00000000..07d7a30e --- /dev/null +++ b/tests/chage/21_chage_no_shadow_file/data/usage.out @@ -0,0 +1 @@ +chage: the shadow password file is not present diff --git a/tests/chage/22_chage_myuser-l/chage.test b/tests/chage/22_chage_myuser-l/chage.test new file mode 100755 index 00000000..34ad36d2 --- /dev/null +++ b/tests/chage/22_chage_myuser-l/chage.test @@ -0,0 +1,51 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage can be used to show one's aging info" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +for user in $(ls data/) +do + echo -n "Get $user aging info (chage -l $user)..." + su myuser1 -c "chage -l $user" >tmp/$user + echo "OK" + + echo "chage reported:" + echo "=======================================================================" + cat tmp/$user + echo "=======================================================================" + echo -n "Compare with expected output..." + diff -au data/$user tmp/$user + echo "OK" + rm -f tmp/$user +done + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/22_chage_myuser-l/config.txt b/tests/chage/22_chage_myuser-l/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chage/22_chage_myuser-l/config/etc/group b/tests/chage/22_chage_myuser-l/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chage/22_chage_myuser-l/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chage/22_chage_myuser-l/config/etc/gshadow b/tests/chage/22_chage_myuser-l/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chage/22_chage_myuser-l/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chage/22_chage_myuser-l/config/etc/passwd b/tests/chage/22_chage_myuser-l/config/etc/passwd new file mode 100644 index 00000000..31046cf6 --- /dev/null +++ b/tests/chage/22_chage_myuser-l/config/etc/passwd @@ -0,0 +1,32 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash +myuser8:x:424249:424242::/home:/bin/bash +myuser9:x:424250:424242::/home:/bin/bash +myuser10:x:424251:424242::/home:/bin/bash +myuser11:x:424252:424242::/home:/bin/bash +myuser12:x:424253:424242::/home:/bin/bash +myuser13:x:424254:424242::/home:/bin/bash diff --git a/tests/chage/22_chage_myuser-l/config/etc/shadow b/tests/chage/22_chage_myuser-l/config/etc/shadow new file mode 100644 index 00000000..4b81469b --- /dev/null +++ b/tests/chage/22_chage_myuser-l/config/etc/shadow @@ -0,0 +1,30 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:9999:7:1:: +myuser8:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.::0:9999:7:1:: +myuser9:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:0:0:9999:7:1:: +myuser10:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0::7:1:: +#myuser11:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:9999:7:1:: diff --git a/tests/chage/22_chage_myuser-l/data/myuser1 b/tests/chage/22_chage_myuser-l/data/myuser1 new file mode 100644 index 00000000..64754ca5 --- /dev/null +++ b/tests/chage/22_chage_myuser-l/data/myuser1 @@ -0,0 +1,7 @@ +Last password change : Jul 27, 2005 +Password expires : never +Password inactive : never +Account expires : never +Minimum number of days between password change : 0 +Maximum number of days between password change : 99999 +Number of days of warning before password expires : 7 diff --git a/tests/chage/23_chage_myuser-I/chage.test b/tests/chage/23_chage_myuser-I/chage.test new file mode 100755 index 00000000..0bd70435 --- /dev/null +++ b/tests/chage/23_chage_myuser-I/chage.test @@ -0,0 +1,54 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage forbids to change aging info" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "myusers1 uses chage to change myuser1 aging info (chage -I 12 myuser2)..." +su myuser1 -c "chage -I 12 myuser1" 2>tmp/usage.out && exit 1 || { + status=$? +} +echo "OK" + +echo -n "Check returned status ($status)..." +test "$status" = "1" +echo "OK" + +echo "chage reported:" +echo "=======================================================================" +cat tmp/usage.out +echo "=======================================================================" +echo -n "Check the usage message..." +diff -au data/usage.out tmp/usage.out +echo "usage message OK." +rm -f tmp/usage.out + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/23_chage_myuser-I/config.txt b/tests/chage/23_chage_myuser-I/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chage/23_chage_myuser-I/config/etc/group b/tests/chage/23_chage_myuser-I/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chage/23_chage_myuser-I/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chage/23_chage_myuser-I/config/etc/gshadow b/tests/chage/23_chage_myuser-I/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chage/23_chage_myuser-I/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chage/23_chage_myuser-I/config/etc/passwd b/tests/chage/23_chage_myuser-I/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/23_chage_myuser-I/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/23_chage_myuser-I/config/etc/shadow b/tests/chage/23_chage_myuser-I/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/23_chage_myuser-I/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/23_chage_myuser-I/data/usage.out b/tests/chage/23_chage_myuser-I/data/usage.out new file mode 100644 index 00000000..dc0d6ca5 --- /dev/null +++ b/tests/chage/23_chage_myuser-I/data/usage.out @@ -0,0 +1 @@ +chage: Permission denied. diff --git a/tests/chage/24_chage_myuser-l_other/chage.test b/tests/chage/24_chage_myuser-l_other/chage.test new file mode 100755 index 00000000..ef2f8e23 --- /dev/null +++ b/tests/chage/24_chage_myuser-l_other/chage.test @@ -0,0 +1,54 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage forbids to get other accounts aging info" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "myusers1 uses chage to get myuser2 aging info (chage -l myuser2)..." +su myuser1 -c "chage -l myuser2" 2>tmp/usage.out && exit 1 || { + status=$? +} +echo "OK" + +echo -n "Check returned status ($status)..." +test "$status" = "1" +echo "OK" + +echo "chage reported:" +echo "=======================================================================" +cat tmp/usage.out +echo "=======================================================================" +echo -n "Check the usage message..." +diff -au data/usage.out tmp/usage.out +echo "usage message OK." +rm -f tmp/usage.out + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/24_chage_myuser-l_other/config.txt b/tests/chage/24_chage_myuser-l_other/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chage/24_chage_myuser-l_other/config/etc/group b/tests/chage/24_chage_myuser-l_other/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chage/24_chage_myuser-l_other/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chage/24_chage_myuser-l_other/config/etc/gshadow b/tests/chage/24_chage_myuser-l_other/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chage/24_chage_myuser-l_other/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chage/24_chage_myuser-l_other/config/etc/passwd b/tests/chage/24_chage_myuser-l_other/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/24_chage_myuser-l_other/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/24_chage_myuser-l_other/config/etc/shadow b/tests/chage/24_chage_myuser-l_other/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/24_chage_myuser-l_other/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/24_chage_myuser-l_other/data/usage.out b/tests/chage/24_chage_myuser-l_other/data/usage.out new file mode 100644 index 00000000..dc0d6ca5 --- /dev/null +++ b/tests/chage/24_chage_myuser-l_other/data/usage.out @@ -0,0 +1 @@ +chage: Permission denied. diff --git a/tests/chage/25_chage_interractive/chage.test b/tests/chage/25_chage_interractive/chage.test new file mode 100755 index 00000000..01f957f4 --- /dev/null +++ b/tests/chage/25_chage_interractive/chage.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage creates a shadow entry if there were none" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "chage interractive session as myuser1..." +./run.exp +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl data/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/25_chage_interractive/config.txt b/tests/chage/25_chage_interractive/config.txt new file mode 100644 index 00000000..e9e4bbed --- /dev/null +++ b/tests/chage/25_chage_interractive/config.txt @@ -0,0 +1 @@ +group foo, GID 1000 diff --git a/tests/chage/25_chage_interractive/config/etc/group b/tests/chage/25_chage_interractive/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/chage/25_chage_interractive/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/chage/25_chage_interractive/config/etc/gshadow b/tests/chage/25_chage_interractive/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/chage/25_chage_interractive/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/chage/25_chage_interractive/config/etc/login.defs b/tests/chage/25_chage_interractive/config/etc/login.defs new file mode 100644 index 00000000..84fb3cce --- /dev/null +++ b/tests/chage/25_chage_interractive/config/etc/login.defs @@ -0,0 +1,315 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK usage is discouraged because it catches only some classes of user +# entries to system, in fact only those made through login(1), while setting +# umask in shell rc file will catch also logins through su, cron, ssh etc. +# +# At the same time, using shell rc to set umask won't catch entries which use +# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" +# user and alike. +# +# Therefore the use of pam_umask is recommended (Debian package libpam-umask) +# as the solution which catches all these cases on PAM-enabled systems. +# +# This avoids the confusion created by having the umask set +# in two different places -- in login.defs and shell rc files (i.e. +# /etc/profile). +# +# For discussion, see #314539 and #248150 as well as the thread starting at +# http://lists.debian.org/debian-devel/2005/06/msg01598.html +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +# 022 is the "historical" value in Debian for UMASK when it was used +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +#UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 100 +GID_MAX 60000 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# This enables userdel to remove user groups if no members exist. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, thus in Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is used by chpasswd, gpasswd and newusers. +# +#MD5_CRYPT_ENAB no + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chage/25_chage_interractive/config/etc/passwd b/tests/chage/25_chage_interractive/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/25_chage_interractive/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/25_chage_interractive/config/etc/shadow b/tests/chage/25_chage_interractive/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/25_chage_interractive/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/25_chage_interractive/data/shadow b/tests/chage/25_chage_interractive/data/shadow new file mode 100644 index 00000000..334494ac --- /dev/null +++ b/tests/chage/25_chage_interractive/data/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12990:13:14:9:35:15548: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/25_chage_interractive/run.exp b/tests/chage/25_chage_interractive/run.exp new file mode 100755 index 00000000..5b4b1d0b --- /dev/null +++ b/tests/chage/25_chage_interractive/run.exp @@ -0,0 +1,31 @@ +#!/usr/bin/expect + +set timeout 5 + +# I've not been able to put the opening bracket in the regular expressions +# If anyone knows... + +spawn /usr/bin/chage myuser1 +expect -re "Minimum Password Age .0\]: " +send "13\r" +expect -re "Maximum Password Age .99999\]: " +send "14\r" +expect -re "Last Password Change \[(]YYYY-MM-DD\[)] .2005-07-27\]: " +send "2005-07-26\r" +expect -re "Password Expiration Warning .7\]: " +send "9\r" +expect -re "Password Inactive .-1\]: " +send "35\r" +expect -re "Account Expiration Date \[(]YYYY-MM-DD\[)] .-1\]: " +send "2012-07-27\r" +expect { + eof { + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + diff --git a/tests/chage/26_chage_interractive_date_0/chage.test b/tests/chage/26_chage_interractive_date_0/chage.test new file mode 100755 index 00000000..01f957f4 --- /dev/null +++ b/tests/chage/26_chage_interractive_date_0/chage.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage creates a shadow entry if there were none" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "chage interractive session as myuser1..." +./run.exp +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl data/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/26_chage_interractive_date_0/config.txt b/tests/chage/26_chage_interractive_date_0/config.txt new file mode 100644 index 00000000..e9e4bbed --- /dev/null +++ b/tests/chage/26_chage_interractive_date_0/config.txt @@ -0,0 +1 @@ +group foo, GID 1000 diff --git a/tests/chage/26_chage_interractive_date_0/config/etc/group b/tests/chage/26_chage_interractive_date_0/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/chage/26_chage_interractive_date_0/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/chage/26_chage_interractive_date_0/config/etc/gshadow b/tests/chage/26_chage_interractive_date_0/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/chage/26_chage_interractive_date_0/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/chage/26_chage_interractive_date_0/config/etc/login.defs b/tests/chage/26_chage_interractive_date_0/config/etc/login.defs new file mode 100644 index 00000000..84fb3cce --- /dev/null +++ b/tests/chage/26_chage_interractive_date_0/config/etc/login.defs @@ -0,0 +1,315 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK usage is discouraged because it catches only some classes of user +# entries to system, in fact only those made through login(1), while setting +# umask in shell rc file will catch also logins through su, cron, ssh etc. +# +# At the same time, using shell rc to set umask won't catch entries which use +# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" +# user and alike. +# +# Therefore the use of pam_umask is recommended (Debian package libpam-umask) +# as the solution which catches all these cases on PAM-enabled systems. +# +# This avoids the confusion created by having the umask set +# in two different places -- in login.defs and shell rc files (i.e. +# /etc/profile). +# +# For discussion, see #314539 and #248150 as well as the thread starting at +# http://lists.debian.org/debian-devel/2005/06/msg01598.html +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +# 022 is the "historical" value in Debian for UMASK when it was used +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +#UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 100 +GID_MAX 60000 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# This enables userdel to remove user groups if no members exist. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, thus in Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is used by chpasswd, gpasswd and newusers. +# +#MD5_CRYPT_ENAB no + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chage/26_chage_interractive_date_0/config/etc/passwd b/tests/chage/26_chage_interractive_date_0/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/26_chage_interractive_date_0/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/26_chage_interractive_date_0/config/etc/shadow b/tests/chage/26_chage_interractive_date_0/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/26_chage_interractive_date_0/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/26_chage_interractive_date_0/data/shadow b/tests/chage/26_chage_interractive_date_0/data/shadow new file mode 100644 index 00000000..293987c1 --- /dev/null +++ b/tests/chage/26_chage_interractive_date_0/data/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:0:13:14:9:35:0: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/26_chage_interractive_date_0/run.exp b/tests/chage/26_chage_interractive_date_0/run.exp new file mode 100755 index 00000000..2f97abbd --- /dev/null +++ b/tests/chage/26_chage_interractive_date_0/run.exp @@ -0,0 +1,31 @@ +#!/usr/bin/expect + +set timeout 5 + +# I've not been able to put the opening bracket in the regular expressions +# If anyone knows... + +spawn /usr/bin/chage myuser1 +expect -re "Minimum Password Age .0\]: " +send "13\r" +expect -re "Maximum Password Age .99999\]: " +send "14\r" +expect -re "Last Password Change \[(]YYYY-MM-DD\[)] .2005-07-27\]: " +send "0\r" +expect -re "Password Expiration Warning .7\]: " +send "9\r" +expect -re "Password Inactive .-1\]: " +send "35\r" +expect -re "Account Expiration Date \[(]YYYY-MM-DD\[)] .-1\]: " +send "0\r" +expect { + eof { + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + diff --git a/tests/chage/27_chage_interractive_date_-1/chage.test b/tests/chage/27_chage_interractive_date_-1/chage.test new file mode 100755 index 00000000..01f957f4 --- /dev/null +++ b/tests/chage/27_chage_interractive_date_-1/chage.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage creates a shadow entry if there were none" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "chage interractive session as myuser1..." +./run.exp +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl data/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/27_chage_interractive_date_-1/config.txt b/tests/chage/27_chage_interractive_date_-1/config.txt new file mode 100644 index 00000000..e9e4bbed --- /dev/null +++ b/tests/chage/27_chage_interractive_date_-1/config.txt @@ -0,0 +1 @@ +group foo, GID 1000 diff --git a/tests/chage/27_chage_interractive_date_-1/config/etc/group b/tests/chage/27_chage_interractive_date_-1/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/chage/27_chage_interractive_date_-1/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/chage/27_chage_interractive_date_-1/config/etc/gshadow b/tests/chage/27_chage_interractive_date_-1/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/chage/27_chage_interractive_date_-1/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/chage/27_chage_interractive_date_-1/config/etc/login.defs b/tests/chage/27_chage_interractive_date_-1/config/etc/login.defs new file mode 100644 index 00000000..84fb3cce --- /dev/null +++ b/tests/chage/27_chage_interractive_date_-1/config/etc/login.defs @@ -0,0 +1,315 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK usage is discouraged because it catches only some classes of user +# entries to system, in fact only those made through login(1), while setting +# umask in shell rc file will catch also logins through su, cron, ssh etc. +# +# At the same time, using shell rc to set umask won't catch entries which use +# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" +# user and alike. +# +# Therefore the use of pam_umask is recommended (Debian package libpam-umask) +# as the solution which catches all these cases on PAM-enabled systems. +# +# This avoids the confusion created by having the umask set +# in two different places -- in login.defs and shell rc files (i.e. +# /etc/profile). +# +# For discussion, see #314539 and #248150 as well as the thread starting at +# http://lists.debian.org/debian-devel/2005/06/msg01598.html +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +# 022 is the "historical" value in Debian for UMASK when it was used +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +#UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 100 +GID_MAX 60000 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# This enables userdel to remove user groups if no members exist. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, thus in Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is used by chpasswd, gpasswd and newusers. +# +#MD5_CRYPT_ENAB no + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chage/27_chage_interractive_date_-1/config/etc/passwd b/tests/chage/27_chage_interractive_date_-1/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/27_chage_interractive_date_-1/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/27_chage_interractive_date_-1/config/etc/shadow b/tests/chage/27_chage_interractive_date_-1/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/27_chage_interractive_date_-1/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/27_chage_interractive_date_-1/data/shadow b/tests/chage/27_chage_interractive_date_-1/data/shadow new file mode 100644 index 00000000..800f1a22 --- /dev/null +++ b/tests/chage/27_chage_interractive_date_-1/data/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.::13:14:9:35:: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/27_chage_interractive_date_-1/run.exp b/tests/chage/27_chage_interractive_date_-1/run.exp new file mode 100755 index 00000000..f4c20a1b --- /dev/null +++ b/tests/chage/27_chage_interractive_date_-1/run.exp @@ -0,0 +1,31 @@ +#!/usr/bin/expect + +set timeout 5 + +# I've not been able to put the opening bracket in the regular expressions +# If anyone knows... + +spawn /usr/bin/chage myuser1 +expect -re "Minimum Password Age .0\]: " +send "13\r" +expect -re "Maximum Password Age .99999\]: " +send "14\r" +expect -re "Last Password Change \[(]YYYY-MM-DD\[)] .2005-07-27\]: " +send -- "-1\r" +expect -re "Password Expiration Warning .7\]: " +send "9\r" +expect -re "Password Inactive .-1\]: " +send "35\r" +expect -re "Account Expiration Date \[(]YYYY-MM-DD\[)] .-1\]: " +send -- "-1\r" +expect { + eof { + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + diff --git a/tests/chage/28_chage_interractive_date_EPOCH/chage.test b/tests/chage/28_chage_interractive_date_EPOCH/chage.test new file mode 100755 index 00000000..01f957f4 --- /dev/null +++ b/tests/chage/28_chage_interractive_date_EPOCH/chage.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage creates a shadow entry if there were none" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "chage interractive session as myuser1..." +./run.exp +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl data/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/28_chage_interractive_date_EPOCH/config.txt b/tests/chage/28_chage_interractive_date_EPOCH/config.txt new file mode 100644 index 00000000..e9e4bbed --- /dev/null +++ b/tests/chage/28_chage_interractive_date_EPOCH/config.txt @@ -0,0 +1 @@ +group foo, GID 1000 diff --git a/tests/chage/28_chage_interractive_date_EPOCH/config/etc/group b/tests/chage/28_chage_interractive_date_EPOCH/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/chage/28_chage_interractive_date_EPOCH/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/chage/28_chage_interractive_date_EPOCH/config/etc/gshadow b/tests/chage/28_chage_interractive_date_EPOCH/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/chage/28_chage_interractive_date_EPOCH/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/chage/28_chage_interractive_date_EPOCH/config/etc/login.defs b/tests/chage/28_chage_interractive_date_EPOCH/config/etc/login.defs new file mode 100644 index 00000000..84fb3cce --- /dev/null +++ b/tests/chage/28_chage_interractive_date_EPOCH/config/etc/login.defs @@ -0,0 +1,315 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK usage is discouraged because it catches only some classes of user +# entries to system, in fact only those made through login(1), while setting +# umask in shell rc file will catch also logins through su, cron, ssh etc. +# +# At the same time, using shell rc to set umask won't catch entries which use +# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" +# user and alike. +# +# Therefore the use of pam_umask is recommended (Debian package libpam-umask) +# as the solution which catches all these cases on PAM-enabled systems. +# +# This avoids the confusion created by having the umask set +# in two different places -- in login.defs and shell rc files (i.e. +# /etc/profile). +# +# For discussion, see #314539 and #248150 as well as the thread starting at +# http://lists.debian.org/debian-devel/2005/06/msg01598.html +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +# 022 is the "historical" value in Debian for UMASK when it was used +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +#UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 100 +GID_MAX 60000 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# This enables userdel to remove user groups if no members exist. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, thus in Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is used by chpasswd, gpasswd and newusers. +# +#MD5_CRYPT_ENAB no + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chage/28_chage_interractive_date_EPOCH/config/etc/passwd b/tests/chage/28_chage_interractive_date_EPOCH/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/28_chage_interractive_date_EPOCH/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/28_chage_interractive_date_EPOCH/config/etc/shadow b/tests/chage/28_chage_interractive_date_EPOCH/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/28_chage_interractive_date_EPOCH/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/28_chage_interractive_date_EPOCH/data/shadow b/tests/chage/28_chage_interractive_date_EPOCH/data/shadow new file mode 100644 index 00000000..293987c1 --- /dev/null +++ b/tests/chage/28_chage_interractive_date_EPOCH/data/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:0:13:14:9:35:0: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/28_chage_interractive_date_EPOCH/run.exp b/tests/chage/28_chage_interractive_date_EPOCH/run.exp new file mode 100755 index 00000000..a93e8cc9 --- /dev/null +++ b/tests/chage/28_chage_interractive_date_EPOCH/run.exp @@ -0,0 +1,31 @@ +#!/usr/bin/expect + +set timeout 5 + +# I've not been able to put the opening bracket in the regular expressions +# If anyone knows... + +spawn /usr/bin/chage myuser1 +expect -re "Minimum Password Age .0\]: " +send "13\r" +expect -re "Maximum Password Age .99999\]: " +send "14\r" +expect -re "Last Password Change \[(]YYYY-MM-DD\[)] .2005-07-27\]: " +send "1970-01-01\r" +expect -re "Password Expiration Warning .7\]: " +send "9\r" +expect -re "Password Inactive .-1\]: " +send "35\r" +expect -re "Account Expiration Date \[(]YYYY-MM-DD\[)] .-1\]: " +send "1970-01-01\r" +expect { + eof { + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + diff --git a/tests/chage/29_chage_interractive_date_pre-EPOCH/chage.test b/tests/chage/29_chage_interractive_date_pre-EPOCH/chage.test new file mode 100755 index 00000000..99f2df4d --- /dev/null +++ b/tests/chage/29_chage_interractive_date_pre-EPOCH/chage.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage creates a shadow entry if there were none" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "chage interractive session as myuser1..." +./run.exp +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/29_chage_interractive_date_pre-EPOCH/config.txt b/tests/chage/29_chage_interractive_date_pre-EPOCH/config.txt new file mode 100644 index 00000000..e9e4bbed --- /dev/null +++ b/tests/chage/29_chage_interractive_date_pre-EPOCH/config.txt @@ -0,0 +1 @@ +group foo, GID 1000 diff --git a/tests/chage/29_chage_interractive_date_pre-EPOCH/config/etc/group b/tests/chage/29_chage_interractive_date_pre-EPOCH/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/chage/29_chage_interractive_date_pre-EPOCH/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/chage/29_chage_interractive_date_pre-EPOCH/config/etc/gshadow b/tests/chage/29_chage_interractive_date_pre-EPOCH/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/chage/29_chage_interractive_date_pre-EPOCH/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/chage/29_chage_interractive_date_pre-EPOCH/config/etc/login.defs b/tests/chage/29_chage_interractive_date_pre-EPOCH/config/etc/login.defs new file mode 100644 index 00000000..84fb3cce --- /dev/null +++ b/tests/chage/29_chage_interractive_date_pre-EPOCH/config/etc/login.defs @@ -0,0 +1,315 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK usage is discouraged because it catches only some classes of user +# entries to system, in fact only those made through login(1), while setting +# umask in shell rc file will catch also logins through su, cron, ssh etc. +# +# At the same time, using shell rc to set umask won't catch entries which use +# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" +# user and alike. +# +# Therefore the use of pam_umask is recommended (Debian package libpam-umask) +# as the solution which catches all these cases on PAM-enabled systems. +# +# This avoids the confusion created by having the umask set +# in two different places -- in login.defs and shell rc files (i.e. +# /etc/profile). +# +# For discussion, see #314539 and #248150 as well as the thread starting at +# http://lists.debian.org/debian-devel/2005/06/msg01598.html +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +# 022 is the "historical" value in Debian for UMASK when it was used +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +#UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 100 +GID_MAX 60000 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# This enables userdel to remove user groups if no members exist. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, thus in Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is used by chpasswd, gpasswd and newusers. +# +#MD5_CRYPT_ENAB no + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chage/29_chage_interractive_date_pre-EPOCH/config/etc/passwd b/tests/chage/29_chage_interractive_date_pre-EPOCH/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/29_chage_interractive_date_pre-EPOCH/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/29_chage_interractive_date_pre-EPOCH/config/etc/shadow b/tests/chage/29_chage_interractive_date_pre-EPOCH/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/29_chage_interractive_date_pre-EPOCH/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/29_chage_interractive_date_pre-EPOCH/run.exp b/tests/chage/29_chage_interractive_date_pre-EPOCH/run.exp new file mode 100755 index 00000000..a43fd042 --- /dev/null +++ b/tests/chage/29_chage_interractive_date_pre-EPOCH/run.exp @@ -0,0 +1,26 @@ +#!/usr/bin/expect + +set timeout 5 + +# I've not been able to put the opening bracket in the regular expressions +# If anyone knows... + +spawn /usr/bin/chage myuser1 +expect -re "Minimum Password Age .0\]: " +send "13\r" +expect -re "Maximum Password Age .99999\]: " +send "14\r" +expect -re "Last Password Change \[(]YYYY-MM-DD\[)] .2005-07-27\]: " +send "1900-01-01\r" +expect "chage: error changing fields\r\n" +expect { + eof { + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + diff --git a/tests/chage/30_chage_interractive_date_pre-EPOCH2/chage.test b/tests/chage/30_chage_interractive_date_pre-EPOCH2/chage.test new file mode 100755 index 00000000..99f2df4d --- /dev/null +++ b/tests/chage/30_chage_interractive_date_pre-EPOCH2/chage.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage creates a shadow entry if there were none" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "chage interractive session as myuser1..." +./run.exp +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/30_chage_interractive_date_pre-EPOCH2/config.txt b/tests/chage/30_chage_interractive_date_pre-EPOCH2/config.txt new file mode 100644 index 00000000..e9e4bbed --- /dev/null +++ b/tests/chage/30_chage_interractive_date_pre-EPOCH2/config.txt @@ -0,0 +1 @@ +group foo, GID 1000 diff --git a/tests/chage/30_chage_interractive_date_pre-EPOCH2/config/etc/group b/tests/chage/30_chage_interractive_date_pre-EPOCH2/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/chage/30_chage_interractive_date_pre-EPOCH2/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/chage/30_chage_interractive_date_pre-EPOCH2/config/etc/gshadow b/tests/chage/30_chage_interractive_date_pre-EPOCH2/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/chage/30_chage_interractive_date_pre-EPOCH2/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/chage/30_chage_interractive_date_pre-EPOCH2/config/etc/login.defs b/tests/chage/30_chage_interractive_date_pre-EPOCH2/config/etc/login.defs new file mode 100644 index 00000000..84fb3cce --- /dev/null +++ b/tests/chage/30_chage_interractive_date_pre-EPOCH2/config/etc/login.defs @@ -0,0 +1,315 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK usage is discouraged because it catches only some classes of user +# entries to system, in fact only those made through login(1), while setting +# umask in shell rc file will catch also logins through su, cron, ssh etc. +# +# At the same time, using shell rc to set umask won't catch entries which use +# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" +# user and alike. +# +# Therefore the use of pam_umask is recommended (Debian package libpam-umask) +# as the solution which catches all these cases on PAM-enabled systems. +# +# This avoids the confusion created by having the umask set +# in two different places -- in login.defs and shell rc files (i.e. +# /etc/profile). +# +# For discussion, see #314539 and #248150 as well as the thread starting at +# http://lists.debian.org/debian-devel/2005/06/msg01598.html +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +# 022 is the "historical" value in Debian for UMASK when it was used +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +#UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 100 +GID_MAX 60000 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# This enables userdel to remove user groups if no members exist. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, thus in Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is used by chpasswd, gpasswd and newusers. +# +#MD5_CRYPT_ENAB no + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chage/30_chage_interractive_date_pre-EPOCH2/config/etc/passwd b/tests/chage/30_chage_interractive_date_pre-EPOCH2/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/30_chage_interractive_date_pre-EPOCH2/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/30_chage_interractive_date_pre-EPOCH2/config/etc/shadow b/tests/chage/30_chage_interractive_date_pre-EPOCH2/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/30_chage_interractive_date_pre-EPOCH2/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/30_chage_interractive_date_pre-EPOCH2/run.exp b/tests/chage/30_chage_interractive_date_pre-EPOCH2/run.exp new file mode 100755 index 00000000..9c3c5db0 --- /dev/null +++ b/tests/chage/30_chage_interractive_date_pre-EPOCH2/run.exp @@ -0,0 +1,32 @@ +#!/usr/bin/expect + +set timeout 5 + +# I've not been able to put the opening bracket in the regular expressions +# If anyone knows... + +spawn /usr/bin/chage myuser1 +expect -re "Minimum Password Age .0\]: " +send "13\r" +expect -re "Maximum Password Age .99999\]: " +send "14\r" +expect -re "Last Password Change \[(]YYYY-MM-DD\[)] .2005-07-27\]: " +send "1970-01-01\r" +expect -re "Password Expiration Warning .7\]: " +send "9\r" +expect -re "Password Inactive .-1\]: " +send "35\r" +expect -re "Account Expiration Date \[(]YYYY-MM-DD\[)] .-1\]: " +send "1900-01-01\r" +expect "chage: error changing fields\r\n" +expect { + eof { + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + diff --git a/tests/chage/31_chage_interractive_date_invalid/chage.test b/tests/chage/31_chage_interractive_date_invalid/chage.test new file mode 100755 index 00000000..84e9390a --- /dev/null +++ b/tests/chage/31_chage_interractive_date_invalid/chage.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage creates a shadow entry if there were none" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config; rm -f /etc/passwd.lock /etc/shadow.lock' 0 + +change_config + +echo -n "chage interractive session as myuser1..." +./run.exp +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/31_chage_interractive_date_invalid/config.txt b/tests/chage/31_chage_interractive_date_invalid/config.txt new file mode 100644 index 00000000..e9e4bbed --- /dev/null +++ b/tests/chage/31_chage_interractive_date_invalid/config.txt @@ -0,0 +1 @@ +group foo, GID 1000 diff --git a/tests/chage/31_chage_interractive_date_invalid/config/etc/group b/tests/chage/31_chage_interractive_date_invalid/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/chage/31_chage_interractive_date_invalid/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/chage/31_chage_interractive_date_invalid/config/etc/gshadow b/tests/chage/31_chage_interractive_date_invalid/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/chage/31_chage_interractive_date_invalid/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/chage/31_chage_interractive_date_invalid/config/etc/login.defs b/tests/chage/31_chage_interractive_date_invalid/config/etc/login.defs new file mode 100644 index 00000000..84fb3cce --- /dev/null +++ b/tests/chage/31_chage_interractive_date_invalid/config/etc/login.defs @@ -0,0 +1,315 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK usage is discouraged because it catches only some classes of user +# entries to system, in fact only those made through login(1), while setting +# umask in shell rc file will catch also logins through su, cron, ssh etc. +# +# At the same time, using shell rc to set umask won't catch entries which use +# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" +# user and alike. +# +# Therefore the use of pam_umask is recommended (Debian package libpam-umask) +# as the solution which catches all these cases on PAM-enabled systems. +# +# This avoids the confusion created by having the umask set +# in two different places -- in login.defs and shell rc files (i.e. +# /etc/profile). +# +# For discussion, see #314539 and #248150 as well as the thread starting at +# http://lists.debian.org/debian-devel/2005/06/msg01598.html +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +# 022 is the "historical" value in Debian for UMASK when it was used +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +#UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 100 +GID_MAX 60000 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# This enables userdel to remove user groups if no members exist. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, thus in Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is used by chpasswd, gpasswd and newusers. +# +#MD5_CRYPT_ENAB no + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chage/31_chage_interractive_date_invalid/config/etc/passwd b/tests/chage/31_chage_interractive_date_invalid/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/31_chage_interractive_date_invalid/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/31_chage_interractive_date_invalid/config/etc/shadow b/tests/chage/31_chage_interractive_date_invalid/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/31_chage_interractive_date_invalid/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/31_chage_interractive_date_invalid/run.exp b/tests/chage/31_chage_interractive_date_invalid/run.exp new file mode 100755 index 00000000..91551d4a --- /dev/null +++ b/tests/chage/31_chage_interractive_date_invalid/run.exp @@ -0,0 +1,26 @@ +#!/usr/bin/expect + +set timeout 5 + +# I've not been able to put the opening bracket in the regular expressions +# If anyone knows... + +spawn /usr/bin/chage myuser1 +expect -re "Minimum Password Age .0\]: " +send "13\r" +expect -re "Maximum Password Age .99999\]: " +send "14\r" +expect -re "Last Password Change \[(]YYYY-MM-DD\[)] .2005-07-27\]: " +send "2000-13-42\r" +expect "chage: error changing fields\r\n" +expect { + eof { + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + diff --git a/tests/chage/32_chage_interractive_date_invalid2/chage.test b/tests/chage/32_chage_interractive_date_invalid2/chage.test new file mode 100755 index 00000000..99f2df4d --- /dev/null +++ b/tests/chage/32_chage_interractive_date_invalid2/chage.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage creates a shadow entry if there were none" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "chage interractive session as myuser1..." +./run.exp +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/32_chage_interractive_date_invalid2/config.txt b/tests/chage/32_chage_interractive_date_invalid2/config.txt new file mode 100644 index 00000000..e9e4bbed --- /dev/null +++ b/tests/chage/32_chage_interractive_date_invalid2/config.txt @@ -0,0 +1 @@ +group foo, GID 1000 diff --git a/tests/chage/32_chage_interractive_date_invalid2/config/etc/group b/tests/chage/32_chage_interractive_date_invalid2/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/chage/32_chage_interractive_date_invalid2/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/chage/32_chage_interractive_date_invalid2/config/etc/gshadow b/tests/chage/32_chage_interractive_date_invalid2/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/chage/32_chage_interractive_date_invalid2/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/chage/32_chage_interractive_date_invalid2/config/etc/login.defs b/tests/chage/32_chage_interractive_date_invalid2/config/etc/login.defs new file mode 100644 index 00000000..84fb3cce --- /dev/null +++ b/tests/chage/32_chage_interractive_date_invalid2/config/etc/login.defs @@ -0,0 +1,315 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK usage is discouraged because it catches only some classes of user +# entries to system, in fact only those made through login(1), while setting +# umask in shell rc file will catch also logins through su, cron, ssh etc. +# +# At the same time, using shell rc to set umask won't catch entries which use +# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" +# user and alike. +# +# Therefore the use of pam_umask is recommended (Debian package libpam-umask) +# as the solution which catches all these cases on PAM-enabled systems. +# +# This avoids the confusion created by having the umask set +# in two different places -- in login.defs and shell rc files (i.e. +# /etc/profile). +# +# For discussion, see #314539 and #248150 as well as the thread starting at +# http://lists.debian.org/debian-devel/2005/06/msg01598.html +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +# 022 is the "historical" value in Debian for UMASK when it was used +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +#UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 100 +GID_MAX 60000 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# This enables userdel to remove user groups if no members exist. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, thus in Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is used by chpasswd, gpasswd and newusers. +# +#MD5_CRYPT_ENAB no + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chage/32_chage_interractive_date_invalid2/config/etc/passwd b/tests/chage/32_chage_interractive_date_invalid2/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/32_chage_interractive_date_invalid2/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/32_chage_interractive_date_invalid2/config/etc/shadow b/tests/chage/32_chage_interractive_date_invalid2/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/32_chage_interractive_date_invalid2/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/32_chage_interractive_date_invalid2/run.exp b/tests/chage/32_chage_interractive_date_invalid2/run.exp new file mode 100755 index 00000000..edc3f78b --- /dev/null +++ b/tests/chage/32_chage_interractive_date_invalid2/run.exp @@ -0,0 +1,26 @@ +#!/usr/bin/expect + +set timeout 5 + +# I've not been able to put the opening bracket in the regular expressions +# If anyone knows... + +spawn /usr/bin/chage myuser1 +expect -re "Minimum Password Age .0\]: " +send "13\r" +expect -re "Maximum Password Age .99999\]: " +send "14\r" +expect -re "Last Password Change \[(]YYYY-MM-DD\[)] .2005-07-27\]: " +send "2000-mm-42\r" +expect "chage: error changing fields\r\n" +expect { + eof { + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + diff --git a/tests/chage/33_chage_interractive-W_invalid1/chage.test b/tests/chage/33_chage_interractive-W_invalid1/chage.test new file mode 100755 index 00000000..fc4dd9d2 --- /dev/null +++ b/tests/chage/33_chage_interractive-W_invalid1/chage.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage interractive session checks field validity" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "chage interractive session as myuser1..." +./run.exp +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/33_chage_interractive-W_invalid1/config.txt b/tests/chage/33_chage_interractive-W_invalid1/config.txt new file mode 100644 index 00000000..e9e4bbed --- /dev/null +++ b/tests/chage/33_chage_interractive-W_invalid1/config.txt @@ -0,0 +1 @@ +group foo, GID 1000 diff --git a/tests/chage/33_chage_interractive-W_invalid1/config/etc/group b/tests/chage/33_chage_interractive-W_invalid1/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/chage/33_chage_interractive-W_invalid1/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/chage/33_chage_interractive-W_invalid1/config/etc/gshadow b/tests/chage/33_chage_interractive-W_invalid1/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/chage/33_chage_interractive-W_invalid1/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/chage/33_chage_interractive-W_invalid1/config/etc/login.defs b/tests/chage/33_chage_interractive-W_invalid1/config/etc/login.defs new file mode 100644 index 00000000..84fb3cce --- /dev/null +++ b/tests/chage/33_chage_interractive-W_invalid1/config/etc/login.defs @@ -0,0 +1,315 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK usage is discouraged because it catches only some classes of user +# entries to system, in fact only those made through login(1), while setting +# umask in shell rc file will catch also logins through su, cron, ssh etc. +# +# At the same time, using shell rc to set umask won't catch entries which use +# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" +# user and alike. +# +# Therefore the use of pam_umask is recommended (Debian package libpam-umask) +# as the solution which catches all these cases on PAM-enabled systems. +# +# This avoids the confusion created by having the umask set +# in two different places -- in login.defs and shell rc files (i.e. +# /etc/profile). +# +# For discussion, see #314539 and #248150 as well as the thread starting at +# http://lists.debian.org/debian-devel/2005/06/msg01598.html +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +# 022 is the "historical" value in Debian for UMASK when it was used +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +#UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 100 +GID_MAX 60000 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# This enables userdel to remove user groups if no members exist. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, thus in Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is used by chpasswd, gpasswd and newusers. +# +#MD5_CRYPT_ENAB no + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chage/33_chage_interractive-W_invalid1/config/etc/passwd b/tests/chage/33_chage_interractive-W_invalid1/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/33_chage_interractive-W_invalid1/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/33_chage_interractive-W_invalid1/config/etc/shadow b/tests/chage/33_chage_interractive-W_invalid1/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/33_chage_interractive-W_invalid1/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/33_chage_interractive-W_invalid1/run.exp b/tests/chage/33_chage_interractive-W_invalid1/run.exp new file mode 100755 index 00000000..ac50231b --- /dev/null +++ b/tests/chage/33_chage_interractive-W_invalid1/run.exp @@ -0,0 +1,32 @@ +#!/usr/bin/expect + +set timeout 5 + +# I've not been able to put the opening bracket in the regular expressions +# If anyone knows... + +spawn /usr/bin/chage myuser1 +expect -re "Minimum Password Age .0\]: " +send "13\r" +expect -re "Maximum Password Age .99999\]: " +send "14\r" +expect -re "Last Password Change \[(]YYYY-MM-DD\[)] .2005-07-27\]: " +send "0\r" +expect -re "Password Expiration Warning .7\]: " +send "9a\r" +#expect -re "Password Inactive .-1\]: " +#send "35\r" +#expect -re "Account Expiration Date \[(]YYYY-MM-DD\[)] .-1\]: " +#send "0\r" +expect "chage: error changing fields\r\n" +expect { + eof { + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + diff --git a/tests/chage/34_chage_interractive-W_invalid2/chage.test b/tests/chage/34_chage_interractive-W_invalid2/chage.test new file mode 100755 index 00000000..fc4dd9d2 --- /dev/null +++ b/tests/chage/34_chage_interractive-W_invalid2/chage.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage interractive session checks field validity" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "chage interractive session as myuser1..." +./run.exp +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/34_chage_interractive-W_invalid2/config.txt b/tests/chage/34_chage_interractive-W_invalid2/config.txt new file mode 100644 index 00000000..e9e4bbed --- /dev/null +++ b/tests/chage/34_chage_interractive-W_invalid2/config.txt @@ -0,0 +1 @@ +group foo, GID 1000 diff --git a/tests/chage/34_chage_interractive-W_invalid2/config/etc/group b/tests/chage/34_chage_interractive-W_invalid2/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/chage/34_chage_interractive-W_invalid2/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/chage/34_chage_interractive-W_invalid2/config/etc/gshadow b/tests/chage/34_chage_interractive-W_invalid2/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/chage/34_chage_interractive-W_invalid2/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/chage/34_chage_interractive-W_invalid2/config/etc/login.defs b/tests/chage/34_chage_interractive-W_invalid2/config/etc/login.defs new file mode 100644 index 00000000..84fb3cce --- /dev/null +++ b/tests/chage/34_chage_interractive-W_invalid2/config/etc/login.defs @@ -0,0 +1,315 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK usage is discouraged because it catches only some classes of user +# entries to system, in fact only those made through login(1), while setting +# umask in shell rc file will catch also logins through su, cron, ssh etc. +# +# At the same time, using shell rc to set umask won't catch entries which use +# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" +# user and alike. +# +# Therefore the use of pam_umask is recommended (Debian package libpam-umask) +# as the solution which catches all these cases on PAM-enabled systems. +# +# This avoids the confusion created by having the umask set +# in two different places -- in login.defs and shell rc files (i.e. +# /etc/profile). +# +# For discussion, see #314539 and #248150 as well as the thread starting at +# http://lists.debian.org/debian-devel/2005/06/msg01598.html +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +# 022 is the "historical" value in Debian for UMASK when it was used +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +#UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 100 +GID_MAX 60000 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# This enables userdel to remove user groups if no members exist. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, thus in Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is used by chpasswd, gpasswd and newusers. +# +#MD5_CRYPT_ENAB no + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chage/34_chage_interractive-W_invalid2/config/etc/passwd b/tests/chage/34_chage_interractive-W_invalid2/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/34_chage_interractive-W_invalid2/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/34_chage_interractive-W_invalid2/config/etc/shadow b/tests/chage/34_chage_interractive-W_invalid2/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/34_chage_interractive-W_invalid2/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/34_chage_interractive-W_invalid2/run.exp b/tests/chage/34_chage_interractive-W_invalid2/run.exp new file mode 100755 index 00000000..04b6f57d --- /dev/null +++ b/tests/chage/34_chage_interractive-W_invalid2/run.exp @@ -0,0 +1,32 @@ +#!/usr/bin/expect + +set timeout 5 + +# I've not been able to put the opening bracket in the regular expressions +# If anyone knows... + +spawn /usr/bin/chage myuser1 +expect -re "Minimum Password Age .0\]: " +send "13\r" +expect -re "Maximum Password Age .99999\]: " +send "14\r" +expect -re "Last Password Change \[(]YYYY-MM-DD\[)] .2005-07-27\]: " +send "0\r" +expect -re "Password Expiration Warning .7\]: " +send -- "-2\r" +#expect -re "Password Inactive .-1\]: " +#send "35\r" +#expect -re "Account Expiration Date \[(]YYYY-MM-DD\[)] .-1\]: " +#send "0\r" +expect "chage: error changing fields\r\n" +expect { + eof { + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + diff --git a/tests/chage/35_chage_interractive-W-1/chage.test b/tests/chage/35_chage_interractive-W-1/chage.test new file mode 100755 index 00000000..01f957f4 --- /dev/null +++ b/tests/chage/35_chage_interractive-W-1/chage.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage creates a shadow entry if there were none" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "chage interractive session as myuser1..." +./run.exp +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl data/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/35_chage_interractive-W-1/config.txt b/tests/chage/35_chage_interractive-W-1/config.txt new file mode 100644 index 00000000..e9e4bbed --- /dev/null +++ b/tests/chage/35_chage_interractive-W-1/config.txt @@ -0,0 +1 @@ +group foo, GID 1000 diff --git a/tests/chage/35_chage_interractive-W-1/config/etc/group b/tests/chage/35_chage_interractive-W-1/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/chage/35_chage_interractive-W-1/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/chage/35_chage_interractive-W-1/config/etc/gshadow b/tests/chage/35_chage_interractive-W-1/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/chage/35_chage_interractive-W-1/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/chage/35_chage_interractive-W-1/config/etc/login.defs b/tests/chage/35_chage_interractive-W-1/config/etc/login.defs new file mode 100644 index 00000000..84fb3cce --- /dev/null +++ b/tests/chage/35_chage_interractive-W-1/config/etc/login.defs @@ -0,0 +1,315 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK usage is discouraged because it catches only some classes of user +# entries to system, in fact only those made through login(1), while setting +# umask in shell rc file will catch also logins through su, cron, ssh etc. +# +# At the same time, using shell rc to set umask won't catch entries which use +# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" +# user and alike. +# +# Therefore the use of pam_umask is recommended (Debian package libpam-umask) +# as the solution which catches all these cases on PAM-enabled systems. +# +# This avoids the confusion created by having the umask set +# in two different places -- in login.defs and shell rc files (i.e. +# /etc/profile). +# +# For discussion, see #314539 and #248150 as well as the thread starting at +# http://lists.debian.org/debian-devel/2005/06/msg01598.html +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +# 022 is the "historical" value in Debian for UMASK when it was used +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +#UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 100 +GID_MAX 60000 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# This enables userdel to remove user groups if no members exist. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, thus in Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is used by chpasswd, gpasswd and newusers. +# +#MD5_CRYPT_ENAB no + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chage/35_chage_interractive-W-1/config/etc/passwd b/tests/chage/35_chage_interractive-W-1/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/35_chage_interractive-W-1/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/35_chage_interractive-W-1/config/etc/shadow b/tests/chage/35_chage_interractive-W-1/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/35_chage_interractive-W-1/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/35_chage_interractive-W-1/data/shadow b/tests/chage/35_chage_interractive-W-1/data/shadow new file mode 100644 index 00000000..4b74f15d --- /dev/null +++ b/tests/chage/35_chage_interractive-W-1/data/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/35_chage_interractive-W-1/run.exp b/tests/chage/35_chage_interractive-W-1/run.exp new file mode 100755 index 00000000..84fd749c --- /dev/null +++ b/tests/chage/35_chage_interractive-W-1/run.exp @@ -0,0 +1,31 @@ +#!/usr/bin/expect + +set timeout 5 + +# I've not been able to put the opening bracket in the regular expressions +# If anyone knows... + +spawn /usr/bin/chage myuser1 +expect -re "Minimum Password Age .0\]: " +send "\r" +expect -re "Maximum Password Age .99999\]: " +send "\r" +expect -re "Last Password Change \[(]YYYY-MM-DD\[)] .2005-07-27\]: " +send "\r" +expect -re "Password Expiration Warning .7\]: " +send -- "-1\r" +expect -re "Password Inactive .-1\]: " +send "\r" +expect -re "Account Expiration Date \[(]YYYY-MM-DD\[)] .-1\]: " +send "\r" +expect { + eof { + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + diff --git a/tests/chage/36_chage_interractive-I_invalid1/chage.test b/tests/chage/36_chage_interractive-I_invalid1/chage.test new file mode 100755 index 00000000..fc4dd9d2 --- /dev/null +++ b/tests/chage/36_chage_interractive-I_invalid1/chage.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage interractive session checks field validity" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "chage interractive session as myuser1..." +./run.exp +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/36_chage_interractive-I_invalid1/config.txt b/tests/chage/36_chage_interractive-I_invalid1/config.txt new file mode 100644 index 00000000..e9e4bbed --- /dev/null +++ b/tests/chage/36_chage_interractive-I_invalid1/config.txt @@ -0,0 +1 @@ +group foo, GID 1000 diff --git a/tests/chage/36_chage_interractive-I_invalid1/config/etc/group b/tests/chage/36_chage_interractive-I_invalid1/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/chage/36_chage_interractive-I_invalid1/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/chage/36_chage_interractive-I_invalid1/config/etc/gshadow b/tests/chage/36_chage_interractive-I_invalid1/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/chage/36_chage_interractive-I_invalid1/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/chage/36_chage_interractive-I_invalid1/config/etc/login.defs b/tests/chage/36_chage_interractive-I_invalid1/config/etc/login.defs new file mode 100644 index 00000000..84fb3cce --- /dev/null +++ b/tests/chage/36_chage_interractive-I_invalid1/config/etc/login.defs @@ -0,0 +1,315 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK usage is discouraged because it catches only some classes of user +# entries to system, in fact only those made through login(1), while setting +# umask in shell rc file will catch also logins through su, cron, ssh etc. +# +# At the same time, using shell rc to set umask won't catch entries which use +# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" +# user and alike. +# +# Therefore the use of pam_umask is recommended (Debian package libpam-umask) +# as the solution which catches all these cases on PAM-enabled systems. +# +# This avoids the confusion created by having the umask set +# in two different places -- in login.defs and shell rc files (i.e. +# /etc/profile). +# +# For discussion, see #314539 and #248150 as well as the thread starting at +# http://lists.debian.org/debian-devel/2005/06/msg01598.html +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +# 022 is the "historical" value in Debian for UMASK when it was used +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +#UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 100 +GID_MAX 60000 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# This enables userdel to remove user groups if no members exist. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, thus in Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is used by chpasswd, gpasswd and newusers. +# +#MD5_CRYPT_ENAB no + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chage/36_chage_interractive-I_invalid1/config/etc/passwd b/tests/chage/36_chage_interractive-I_invalid1/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/36_chage_interractive-I_invalid1/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/36_chage_interractive-I_invalid1/config/etc/shadow b/tests/chage/36_chage_interractive-I_invalid1/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/36_chage_interractive-I_invalid1/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/36_chage_interractive-I_invalid1/run.exp b/tests/chage/36_chage_interractive-I_invalid1/run.exp new file mode 100755 index 00000000..1e3087b4 --- /dev/null +++ b/tests/chage/36_chage_interractive-I_invalid1/run.exp @@ -0,0 +1,32 @@ +#!/usr/bin/expect + +set timeout 5 + +# I've not been able to put the opening bracket in the regular expressions +# If anyone knows... + +spawn /usr/bin/chage myuser1 +expect -re "Minimum Password Age .0\]: " +send "\r" +expect -re "Maximum Password Age .99999\]: " +send "\r" +expect -re "Last Password Change \[(]YYYY-MM-DD\[)] .2005-07-27\]: " +send "\r" +expect -re "Password Expiration Warning .7\]: " +send "\r" +expect -re "Password Inactive .-1\]: " +send "9a\r" +#expect -re "Account Expiration Date \[(]YYYY-MM-DD\[)] .-1\]: " +#send "0\r" +expect "chage: error changing fields\r\n" +expect { + eof { + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + diff --git a/tests/chage/37_chage_interractive-I_invalid2/chage.test b/tests/chage/37_chage_interractive-I_invalid2/chage.test new file mode 100755 index 00000000..fc4dd9d2 --- /dev/null +++ b/tests/chage/37_chage_interractive-I_invalid2/chage.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage interractive session checks field validity" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "chage interractive session as myuser1..." +./run.exp +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/37_chage_interractive-I_invalid2/config.txt b/tests/chage/37_chage_interractive-I_invalid2/config.txt new file mode 100644 index 00000000..e9e4bbed --- /dev/null +++ b/tests/chage/37_chage_interractive-I_invalid2/config.txt @@ -0,0 +1 @@ +group foo, GID 1000 diff --git a/tests/chage/37_chage_interractive-I_invalid2/config/etc/group b/tests/chage/37_chage_interractive-I_invalid2/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/chage/37_chage_interractive-I_invalid2/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/chage/37_chage_interractive-I_invalid2/config/etc/gshadow b/tests/chage/37_chage_interractive-I_invalid2/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/chage/37_chage_interractive-I_invalid2/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/chage/37_chage_interractive-I_invalid2/config/etc/login.defs b/tests/chage/37_chage_interractive-I_invalid2/config/etc/login.defs new file mode 100644 index 00000000..84fb3cce --- /dev/null +++ b/tests/chage/37_chage_interractive-I_invalid2/config/etc/login.defs @@ -0,0 +1,315 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK usage is discouraged because it catches only some classes of user +# entries to system, in fact only those made through login(1), while setting +# umask in shell rc file will catch also logins through su, cron, ssh etc. +# +# At the same time, using shell rc to set umask won't catch entries which use +# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" +# user and alike. +# +# Therefore the use of pam_umask is recommended (Debian package libpam-umask) +# as the solution which catches all these cases on PAM-enabled systems. +# +# This avoids the confusion created by having the umask set +# in two different places -- in login.defs and shell rc files (i.e. +# /etc/profile). +# +# For discussion, see #314539 and #248150 as well as the thread starting at +# http://lists.debian.org/debian-devel/2005/06/msg01598.html +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +# 022 is the "historical" value in Debian for UMASK when it was used +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +#UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 100 +GID_MAX 60000 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# This enables userdel to remove user groups if no members exist. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, thus in Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is used by chpasswd, gpasswd and newusers. +# +#MD5_CRYPT_ENAB no + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chage/37_chage_interractive-I_invalid2/config/etc/passwd b/tests/chage/37_chage_interractive-I_invalid2/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/37_chage_interractive-I_invalid2/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/37_chage_interractive-I_invalid2/config/etc/shadow b/tests/chage/37_chage_interractive-I_invalid2/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/37_chage_interractive-I_invalid2/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/37_chage_interractive-I_invalid2/run.exp b/tests/chage/37_chage_interractive-I_invalid2/run.exp new file mode 100755 index 00000000..b059117a --- /dev/null +++ b/tests/chage/37_chage_interractive-I_invalid2/run.exp @@ -0,0 +1,32 @@ +#!/usr/bin/expect + +set timeout 5 + +# I've not been able to put the opening bracket in the regular expressions +# If anyone knows... + +spawn /usr/bin/chage myuser1 +expect -re "Minimum Password Age .0\]: " +send "\r" +expect -re "Maximum Password Age .99999\]: " +send "\r" +expect -re "Last Password Change \[(]YYYY-MM-DD\[)] .2005-07-27\]: " +send "\r" +expect -re "Password Expiration Warning .7\]: " +send "\r" +expect -re "Password Inactive .-1\]: " +send -- "-2\r" +#expect -re "Account Expiration Date \[(]YYYY-MM-DD\[)] .-1\]: " +#send "0\r" +expect "chage: error changing fields\r\n" +expect { + eof { + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + diff --git a/tests/chage/38_chage_interractive-I-1/chage.test b/tests/chage/38_chage_interractive-I-1/chage.test new file mode 100755 index 00000000..01f957f4 --- /dev/null +++ b/tests/chage/38_chage_interractive-I-1/chage.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage creates a shadow entry if there were none" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "chage interractive session as myuser1..." +./run.exp +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl data/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/38_chage_interractive-I-1/config.txt b/tests/chage/38_chage_interractive-I-1/config.txt new file mode 100644 index 00000000..e9e4bbed --- /dev/null +++ b/tests/chage/38_chage_interractive-I-1/config.txt @@ -0,0 +1 @@ +group foo, GID 1000 diff --git a/tests/chage/38_chage_interractive-I-1/config/etc/group b/tests/chage/38_chage_interractive-I-1/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/chage/38_chage_interractive-I-1/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/chage/38_chage_interractive-I-1/config/etc/gshadow b/tests/chage/38_chage_interractive-I-1/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/chage/38_chage_interractive-I-1/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/chage/38_chage_interractive-I-1/config/etc/login.defs b/tests/chage/38_chage_interractive-I-1/config/etc/login.defs new file mode 100644 index 00000000..84fb3cce --- /dev/null +++ b/tests/chage/38_chage_interractive-I-1/config/etc/login.defs @@ -0,0 +1,315 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK usage is discouraged because it catches only some classes of user +# entries to system, in fact only those made through login(1), while setting +# umask in shell rc file will catch also logins through su, cron, ssh etc. +# +# At the same time, using shell rc to set umask won't catch entries which use +# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" +# user and alike. +# +# Therefore the use of pam_umask is recommended (Debian package libpam-umask) +# as the solution which catches all these cases on PAM-enabled systems. +# +# This avoids the confusion created by having the umask set +# in two different places -- in login.defs and shell rc files (i.e. +# /etc/profile). +# +# For discussion, see #314539 and #248150 as well as the thread starting at +# http://lists.debian.org/debian-devel/2005/06/msg01598.html +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +# 022 is the "historical" value in Debian for UMASK when it was used +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +#UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 100 +GID_MAX 60000 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# This enables userdel to remove user groups if no members exist. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, thus in Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is used by chpasswd, gpasswd and newusers. +# +#MD5_CRYPT_ENAB no + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chage/38_chage_interractive-I-1/config/etc/passwd b/tests/chage/38_chage_interractive-I-1/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/38_chage_interractive-I-1/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/38_chage_interractive-I-1/config/etc/shadow b/tests/chage/38_chage_interractive-I-1/config/etc/shadow new file mode 100644 index 00000000..922d9551 --- /dev/null +++ b/tests/chage/38_chage_interractive-I-1/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:3:: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/38_chage_interractive-I-1/data/shadow b/tests/chage/38_chage_interractive-I-1/data/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chage/38_chage_interractive-I-1/data/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/38_chage_interractive-I-1/run.exp b/tests/chage/38_chage_interractive-I-1/run.exp new file mode 100755 index 00000000..94eb4630 --- /dev/null +++ b/tests/chage/38_chage_interractive-I-1/run.exp @@ -0,0 +1,31 @@ +#!/usr/bin/expect + +set timeout 5 + +# I've not been able to put the opening bracket in the regular expressions +# If anyone knows... + +spawn /usr/bin/chage myuser1 +expect -re "Minimum Password Age .0\]: " +send "\r" +expect -re "Maximum Password Age .99999\]: " +send "\r" +expect -re "Last Password Change \[(]YYYY-MM-DD\[)] .2005-07-27\]: " +send "\r" +expect -re "Password Expiration Warning .7\]: " +send "\r" +expect -re "Password Inactive .3\]: " +send -- "-1\r" +expect -re "Account Expiration Date \[(]YYYY-MM-DD\[)] .-1\]: " +send "\r" +expect { + eof { + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + diff --git a/tests/chage/39_chage_interractive-d-1/chage.test b/tests/chage/39_chage_interractive-d-1/chage.test new file mode 100755 index 00000000..01f957f4 --- /dev/null +++ b/tests/chage/39_chage_interractive-d-1/chage.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chage creates a shadow entry if there were none" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "chage interractive session as myuser1..." +./run.exp +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl data/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chage/39_chage_interractive-d-1/config.txt b/tests/chage/39_chage_interractive-d-1/config.txt new file mode 100644 index 00000000..e9e4bbed --- /dev/null +++ b/tests/chage/39_chage_interractive-d-1/config.txt @@ -0,0 +1 @@ +group foo, GID 1000 diff --git a/tests/chage/39_chage_interractive-d-1/config/etc/group b/tests/chage/39_chage_interractive-d-1/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/chage/39_chage_interractive-d-1/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/chage/39_chage_interractive-d-1/config/etc/gshadow b/tests/chage/39_chage_interractive-d-1/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/chage/39_chage_interractive-d-1/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/chage/39_chage_interractive-d-1/config/etc/login.defs b/tests/chage/39_chage_interractive-d-1/config/etc/login.defs new file mode 100644 index 00000000..84fb3cce --- /dev/null +++ b/tests/chage/39_chage_interractive-d-1/config/etc/login.defs @@ -0,0 +1,315 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK usage is discouraged because it catches only some classes of user +# entries to system, in fact only those made through login(1), while setting +# umask in shell rc file will catch also logins through su, cron, ssh etc. +# +# At the same time, using shell rc to set umask won't catch entries which use +# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" +# user and alike. +# +# Therefore the use of pam_umask is recommended (Debian package libpam-umask) +# as the solution which catches all these cases on PAM-enabled systems. +# +# This avoids the confusion created by having the umask set +# in two different places -- in login.defs and shell rc files (i.e. +# /etc/profile). +# +# For discussion, see #314539 and #248150 as well as the thread starting at +# http://lists.debian.org/debian-devel/2005/06/msg01598.html +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +# 022 is the "historical" value in Debian for UMASK when it was used +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +#UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 100 +GID_MAX 60000 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# This enables userdel to remove user groups if no members exist. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, thus in Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is used by chpasswd, gpasswd and newusers. +# +#MD5_CRYPT_ENAB no + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chage/39_chage_interractive-d-1/config/etc/passwd b/tests/chage/39_chage_interractive-d-1/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chage/39_chage_interractive-d-1/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chage/39_chage_interractive-d-1/config/etc/shadow b/tests/chage/39_chage_interractive-d-1/config/etc/shadow new file mode 100644 index 00000000..a1afc129 --- /dev/null +++ b/tests/chage/39_chage_interractive-d-1/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.::0:99999:7:3:: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/39_chage_interractive-d-1/data/shadow b/tests/chage/39_chage_interractive-d-1/data/shadow new file mode 100644 index 00000000..a1afc129 --- /dev/null +++ b/tests/chage/39_chage_interractive-d-1/data/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.::0:99999:7:3:: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chage/39_chage_interractive-d-1/run.exp b/tests/chage/39_chage_interractive-d-1/run.exp new file mode 100755 index 00000000..362436b6 --- /dev/null +++ b/tests/chage/39_chage_interractive-d-1/run.exp @@ -0,0 +1,31 @@ +#!/usr/bin/expect + +set timeout 5 + +# I've not been able to put the opening bracket in the regular expressions +# If anyone knows... + +spawn /usr/bin/chage myuser1 +expect -re "Minimum Password Age .0\]: " +send "\r" +expect -re "Maximum Password Age .99999\]: " +send "\r" +expect -re "Last Password Change \[(]YYYY-MM-DD\[)] .-1\]: " +send -- "-1\r" +expect -re "Password Expiration Warning .7\]: " +send "\r" +expect -re "Password Inactive .3\]: " +send "\r" +expect -re "Account Expiration Date \[(]YYYY-MM-DD\[)] .-1\]: " +send "\r" +expect { + eof { + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + diff --git a/tests/chroot/chage/01_chage--root/chage.test b/tests/chroot/chage/01_chage--root/chage.test new file mode 100755 index 00000000..df9aad55 --- /dev/null +++ b/tests/chroot/chage/01_chage--root/chage.test @@ -0,0 +1,52 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "chage can change user's data in a chroot" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; clean_chroot; restore_config' 0 + +change_config + +prepare_chroot + +echo -n "Change root's last day in chroot (chage --root $PWD/tmp/root -d 2012-12-12 root)..." +chage --root $PWD/tmp/root -d 2012-12-12 root +echo "OK" + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl config_chroot/etc/passwd tmp/root/etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl config_chroot/etc/group tmp/root/etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +../../../common/compare_file.pl data/shadow tmp/root/etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +../../../common/compare_file.pl config_chroot/etc/gshadow tmp/root/etc/gshadow +echo "OK" + +rm -f tmp/root/etc/.pwd.lock +rm -f tmp/root/etc/passwd- +rm -f tmp/root/etc/group- +rm -f tmp/root/etc/shadow- +rm -f tmp/root/etc/gshadow- +clean_chroot + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chroot/chage/01_chage--root/config.txt b/tests/chroot/chage/01_chage--root/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/chroot/chage/01_chage--root/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/chroot/chage/01_chage--root/config/etc/default/useradd b/tests/chroot/chage/01_chage--root/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/chroot/chage/01_chage--root/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/chage/01_chage--root/config/etc/group b/tests/chroot/chage/01_chage--root/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/chroot/chage/01_chage--root/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/chroot/chage/01_chage--root/config/etc/gshadow b/tests/chroot/chage/01_chage--root/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/chroot/chage/01_chage--root/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/chroot/chage/01_chage--root/config/etc/passwd b/tests/chroot/chage/01_chage--root/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/chroot/chage/01_chage--root/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/chroot/chage/01_chage--root/config/etc/shadow b/tests/chroot/chage/01_chage--root/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/chroot/chage/01_chage--root/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/chroot/chage/01_chage--root/config_chroot/etc/group b/tests/chroot/chage/01_chage--root/config_chroot/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chroot/chage/01_chage--root/config_chroot/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chroot/chage/01_chage--root/config_chroot/etc/gshadow b/tests/chroot/chage/01_chage--root/config_chroot/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chroot/chage/01_chage--root/config_chroot/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/chage/01_chage--root/config_chroot/etc/login.defs b/tests/chroot/chage/01_chage--root/config_chroot/etc/login.defs new file mode 100644 index 00000000..7b70c90e --- /dev/null +++ b/tests/chroot/chage/01_chage--root/config_chroot/etc/login.defs @@ -0,0 +1,335 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, such as Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/chage/01_chage--root/config_chroot/etc/passwd b/tests/chroot/chage/01_chage--root/config_chroot/etc/passwd new file mode 100644 index 00000000..9bdeb8ce --- /dev/null +++ b/tests/chroot/chage/01_chage--root/config_chroot/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/chage/01_chage--root/config_chroot/etc/shadow b/tests/chroot/chage/01_chage--root/config_chroot/etc/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chroot/chage/01_chage--root/config_chroot/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/chage/01_chage--root/data/shadow b/tests/chroot/chage/01_chage--root/data/shadow new file mode 100644 index 00000000..c9e698bc --- /dev/null +++ b/tests/chroot/chage/01_chage--root/data/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:15686:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/chgpasswd/01_chgpasswd--root/chgpasswd.test b/tests/chroot/chgpasswd/01_chgpasswd--root/chgpasswd.test new file mode 100755 index 00000000..afbdb4bb --- /dev/null +++ b/tests/chroot/chgpasswd/01_chgpasswd--root/chgpasswd.test @@ -0,0 +1,50 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "chgpasswd can change a group in a chroot" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; clean_chroot; restore_config' 0 + +change_config + +prepare_chroot + +echo -n "Change nobody and lp's password in chroot..." +echo 'nogroup:test +lp:test2' | chgpasswd --root $PWD/tmp/root -c SHA256 +echo "OK" + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl config_chroot/etc/passwd tmp/root/etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl config_chroot/etc/group tmp/root/etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +../../../common/compare_file.pl config_chroot/etc/shadow tmp/root/etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +../../../common/compare_file.pl data/gshadow tmp/root/etc/gshadow +echo "OK" + +rm -f tmp/root/etc/.pwd.lock +rm -f tmp/root/etc/gshadow- +clean_chroot + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chroot/chgpasswd/01_chgpasswd--root/config.txt b/tests/chroot/chgpasswd/01_chgpasswd--root/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/chroot/chgpasswd/01_chgpasswd--root/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/chroot/chgpasswd/01_chgpasswd--root/config/etc/default/useradd b/tests/chroot/chgpasswd/01_chgpasswd--root/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/chroot/chgpasswd/01_chgpasswd--root/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/chgpasswd/01_chgpasswd--root/config/etc/group b/tests/chroot/chgpasswd/01_chgpasswd--root/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/chroot/chgpasswd/01_chgpasswd--root/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/chroot/chgpasswd/01_chgpasswd--root/config/etc/gshadow b/tests/chroot/chgpasswd/01_chgpasswd--root/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/chroot/chgpasswd/01_chgpasswd--root/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/chroot/chgpasswd/01_chgpasswd--root/config/etc/passwd b/tests/chroot/chgpasswd/01_chgpasswd--root/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/chroot/chgpasswd/01_chgpasswd--root/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/chroot/chgpasswd/01_chgpasswd--root/config/etc/shadow b/tests/chroot/chgpasswd/01_chgpasswd--root/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/chroot/chgpasswd/01_chgpasswd--root/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/chroot/chgpasswd/01_chgpasswd--root/config_chroot/etc/group b/tests/chroot/chgpasswd/01_chgpasswd--root/config_chroot/etc/group new file mode 100644 index 00000000..d2a4b10a --- /dev/null +++ b/tests/chroot/chgpasswd/01_chgpasswd--root/config_chroot/etc/group @@ -0,0 +1,42 @@ +staff:x:50: +root:x:0: +tty:x:5: +daemon:x:1: +bin:x:2: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +sys:x:3: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +adm:x:4: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: +disk:x:6: diff --git a/tests/chroot/chgpasswd/01_chgpasswd--root/config_chroot/etc/gshadow b/tests/chroot/chgpasswd/01_chgpasswd--root/config_chroot/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chroot/chgpasswd/01_chgpasswd--root/config_chroot/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/chgpasswd/01_chgpasswd--root/config_chroot/etc/login.defs b/tests/chroot/chgpasswd/01_chgpasswd--root/config_chroot/etc/login.defs new file mode 100644 index 00000000..7b70c90e --- /dev/null +++ b/tests/chroot/chgpasswd/01_chgpasswd--root/config_chroot/etc/login.defs @@ -0,0 +1,335 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, such as Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/chgpasswd/01_chgpasswd--root/config_chroot/etc/passwd b/tests/chroot/chgpasswd/01_chgpasswd--root/config_chroot/etc/passwd new file mode 100644 index 00000000..9bdeb8ce --- /dev/null +++ b/tests/chroot/chgpasswd/01_chgpasswd--root/config_chroot/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/chgpasswd/01_chgpasswd--root/config_chroot/etc/shadow b/tests/chroot/chgpasswd/01_chgpasswd--root/config_chroot/etc/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chroot/chgpasswd/01_chgpasswd--root/config_chroot/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/chgpasswd/01_chgpasswd--root/data/gshadow b/tests/chroot/chgpasswd/01_chgpasswd--root/data/gshadow new file mode 100644 index 00000000..2ea5fcad --- /dev/null +++ b/tests/chroot/chgpasswd/01_chgpasswd--root/data/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:@PASS_SHA256 test2@:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:@PASS_SHA256 test@:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/chpasswd/01_chpasswd--root_nopam/chpasswd.test b/tests/chroot/chpasswd/01_chpasswd--root_nopam/chpasswd.test new file mode 100755 index 00000000..17282f90 --- /dev/null +++ b/tests/chroot/chpasswd/01_chpasswd--root_nopam/chpasswd.test @@ -0,0 +1,50 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "chpasswd can change a group in a chroot" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; clean_chroot; restore_config' 0 + +change_config + +prepare_chroot + +echo -n "Change nobody and lp's password in chroot..." +echo 'nobody:test +lp:test2' | chpasswd --root $PWD/tmp/root -c SHA256 +echo "OK" + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl config_chroot/etc/passwd tmp/root/etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl config_chroot/etc/group tmp/root/etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +../../../common/compare_file.pl data/shadow tmp/root/etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +../../../common/compare_file.pl config_chroot/etc/gshadow tmp/root/etc/gshadow +echo "OK" + +rm -f tmp/root/etc/.pwd.lock +rm -f tmp/root/etc/shadow- +clean_chroot + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chroot/chpasswd/01_chpasswd--root_nopam/config.txt b/tests/chroot/chpasswd/01_chpasswd--root_nopam/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/chroot/chpasswd/01_chpasswd--root_nopam/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/chroot/chpasswd/01_chpasswd--root_nopam/config/etc/default/useradd b/tests/chroot/chpasswd/01_chpasswd--root_nopam/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/chroot/chpasswd/01_chpasswd--root_nopam/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/chpasswd/01_chpasswd--root_nopam/config/etc/group b/tests/chroot/chpasswd/01_chpasswd--root_nopam/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/chroot/chpasswd/01_chpasswd--root_nopam/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/chroot/chpasswd/01_chpasswd--root_nopam/config/etc/gshadow b/tests/chroot/chpasswd/01_chpasswd--root_nopam/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/chroot/chpasswd/01_chpasswd--root_nopam/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/chroot/chpasswd/01_chpasswd--root_nopam/config/etc/passwd b/tests/chroot/chpasswd/01_chpasswd--root_nopam/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/chroot/chpasswd/01_chpasswd--root_nopam/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/chroot/chpasswd/01_chpasswd--root_nopam/config/etc/shadow b/tests/chroot/chpasswd/01_chpasswd--root_nopam/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/chroot/chpasswd/01_chpasswd--root_nopam/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/chroot/chpasswd/01_chpasswd--root_nopam/config_chroot/etc/group b/tests/chroot/chpasswd/01_chpasswd--root_nopam/config_chroot/etc/group new file mode 100644 index 00000000..d2a4b10a --- /dev/null +++ b/tests/chroot/chpasswd/01_chpasswd--root_nopam/config_chroot/etc/group @@ -0,0 +1,42 @@ +staff:x:50: +root:x:0: +tty:x:5: +daemon:x:1: +bin:x:2: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +sys:x:3: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +adm:x:4: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: +disk:x:6: diff --git a/tests/chroot/chpasswd/01_chpasswd--root_nopam/config_chroot/etc/gshadow b/tests/chroot/chpasswd/01_chpasswd--root_nopam/config_chroot/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chroot/chpasswd/01_chpasswd--root_nopam/config_chroot/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/chpasswd/01_chpasswd--root_nopam/config_chroot/etc/login.defs b/tests/chroot/chpasswd/01_chpasswd--root_nopam/config_chroot/etc/login.defs new file mode 100644 index 00000000..7b70c90e --- /dev/null +++ b/tests/chroot/chpasswd/01_chpasswd--root_nopam/config_chroot/etc/login.defs @@ -0,0 +1,335 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, such as Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/chpasswd/01_chpasswd--root_nopam/config_chroot/etc/passwd b/tests/chroot/chpasswd/01_chpasswd--root_nopam/config_chroot/etc/passwd new file mode 100644 index 00000000..9bdeb8ce --- /dev/null +++ b/tests/chroot/chpasswd/01_chpasswd--root_nopam/config_chroot/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/chpasswd/01_chpasswd--root_nopam/config_chroot/etc/shadow b/tests/chroot/chpasswd/01_chpasswd--root_nopam/config_chroot/etc/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chroot/chpasswd/01_chpasswd--root_nopam/config_chroot/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/chpasswd/01_chpasswd--root_nopam/data/shadow b/tests/chroot/chpasswd/01_chpasswd--root_nopam/data/shadow new file mode 100644 index 00000000..8a67bed3 --- /dev/null +++ b/tests/chroot/chpasswd/01_chpasswd--root_nopam/data/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:@PASS_SHA256 test2@:@TODAY@:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:@PASS_SHA256 test@:@TODAY@:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/chpasswd/02_chpasswd--root_pam/chpasswd.test b/tests/chroot/chpasswd/02_chpasswd--root_pam/chpasswd.test new file mode 100755 index 00000000..2e2f8952 --- /dev/null +++ b/tests/chroot/chpasswd/02_chpasswd--root_pam/chpasswd.test @@ -0,0 +1,50 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "chpasswd can change a group in a chroot" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; clean_chroot; restore_config' 0 + +change_config + +prepare_chroot + +echo -n "Change nobody and lp's password in chroot..." +echo 'nobody:test +lp:test2' | chpasswd --root $PWD/tmp/root +echo "OK" + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl config_chroot/etc/passwd tmp/root/etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl config_chroot/etc/group tmp/root/etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +../../../common/compare_file.pl data/shadow tmp/root/etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +../../../common/compare_file.pl config_chroot/etc/gshadow tmp/root/etc/gshadow +echo "OK" + +rm -f tmp/root/etc/.pwd.lock +rm -f tmp/root/etc/shadow- +clean_chroot + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chroot/chpasswd/02_chpasswd--root_pam/config.txt b/tests/chroot/chpasswd/02_chpasswd--root_pam/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/chroot/chpasswd/02_chpasswd--root_pam/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/chroot/chpasswd/02_chpasswd--root_pam/config/etc/default/useradd b/tests/chroot/chpasswd/02_chpasswd--root_pam/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/chroot/chpasswd/02_chpasswd--root_pam/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/chpasswd/02_chpasswd--root_pam/config/etc/group b/tests/chroot/chpasswd/02_chpasswd--root_pam/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/chroot/chpasswd/02_chpasswd--root_pam/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/chroot/chpasswd/02_chpasswd--root_pam/config/etc/gshadow b/tests/chroot/chpasswd/02_chpasswd--root_pam/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/chroot/chpasswd/02_chpasswd--root_pam/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/chroot/chpasswd/02_chpasswd--root_pam/config/etc/passwd b/tests/chroot/chpasswd/02_chpasswd--root_pam/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/chroot/chpasswd/02_chpasswd--root_pam/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/chroot/chpasswd/02_chpasswd--root_pam/config/etc/shadow b/tests/chroot/chpasswd/02_chpasswd--root_pam/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/chroot/chpasswd/02_chpasswd--root_pam/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/group b/tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/group new file mode 100644 index 00000000..d2a4b10a --- /dev/null +++ b/tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/group @@ -0,0 +1,42 @@ +staff:x:50: +root:x:0: +tty:x:5: +daemon:x:1: +bin:x:2: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +sys:x:3: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +adm:x:4: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: +disk:x:6: diff --git a/tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/gshadow b/tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/login.defs b/tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/login.defs new file mode 100644 index 00000000..7b70c90e --- /dev/null +++ b/tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/login.defs @@ -0,0 +1,335 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, such as Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/pam.d/chpasswd b/tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/pam.d/chpasswd new file mode 100644 index 00000000..da2adcc9 --- /dev/null +++ b/tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/pam.d/chpasswd @@ -0,0 +1,5 @@ +# The PAM configuration file for the Shadow 'chpasswd' service +# + +@include common-password + diff --git a/tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/pam.d/common-password b/tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/pam.d/common-password new file mode 100644 index 00000000..cb8c7b71 --- /dev/null +++ b/tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/pam.d/common-password @@ -0,0 +1,33 @@ +# +# /etc/pam.d/common-password - password-related modules common to all services +# +# This file is included from other service-specific PAM config files, +# and should contain a list of modules that define the services to be +# used to change user passwords. The default is pam_unix. + +# Explanation of pam_unix options: +# +# The "sha512" option enables salted SHA512 passwords. Without this option, +# the default is Unix crypt. Prior releases used the option "md5". +# +# The "obscure" option replaces the old `OBSCURE_CHECKS_ENAB' option in +# login.defs. +# +# See the pam_unix manpage for other options. + +# As of pam 1.0.1-6, this file is managed by pam-auth-update by default. +# To take advantage of this, it is recommended that you configure any +# local modules either before or after the default block, and use +# pam-auth-update to manage selection of other modules. See +# pam-auth-update(8) for details. + +# here are the per-package modules (the "Primary" block) +password [success=1 default=ignore] pam_unix.so obscure sha512 +# here's the fallback if no module succeeds +password requisite pam_deny.so +# prime the stack with a positive return value if there isn't one already; +# this avoids us returning an error just because nothing sets a success code +# since the modules above will each just jump around +password required pam_permit.so +# and here are more per-package modules (the "Additional" block) +# end of pam-auth-update config diff --git a/tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/passwd b/tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/passwd new file mode 100644 index 00000000..9bdeb8ce --- /dev/null +++ b/tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/shadow b/tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chroot/chpasswd/02_chpasswd--root_pam/config_chroot/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/chpasswd/02_chpasswd--root_pam/data/shadow b/tests/chroot/chpasswd/02_chpasswd--root_pam/data/shadow new file mode 100644 index 00000000..5839a29d --- /dev/null +++ b/tests/chroot/chpasswd/02_chpasswd--root_pam/data/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:@PASS_SHA512 test2@:@TODAY@:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:@PASS_SHA512 test@:@TODAY@:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/chsh/01_chsh--root/chsh.test b/tests/chroot/chsh/01_chsh--root/chsh.test new file mode 100755 index 00000000..b99cbb46 --- /dev/null +++ b/tests/chroot/chsh/01_chsh--root/chsh.test @@ -0,0 +1,52 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "chsh can change a user in a chroot" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; clean_chroot; restore_config' 0 + +change_config + +prepare_chroot + +echo -n "Change user in chroot (chsh --root $PWD/tmp/root -s /bin/dash root)..." +chsh --root $PWD/tmp/root -s /bin/dash root +echo "OK" + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl data/passwd tmp/root/etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl config_chroot/etc/group tmp/root/etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +../../../common/compare_file.pl config_chroot/etc/shadow tmp/root/etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +../../../common/compare_file.pl config_chroot/etc/gshadow tmp/root/etc/gshadow +echo "OK" + +rm -f tmp/root/etc/.pwd.lock +rm -f tmp/root/etc/passwd- +rm -f tmp/root/etc/group- +rm -f tmp/root/etc/shadow- +rm -f tmp/root/etc/gshadow- +clean_chroot + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chroot/chsh/01_chsh--root/config.txt b/tests/chroot/chsh/01_chsh--root/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/chroot/chsh/01_chsh--root/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/chroot/chsh/01_chsh--root/config/etc/default/useradd b/tests/chroot/chsh/01_chsh--root/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/chroot/chsh/01_chsh--root/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/chsh/01_chsh--root/config/etc/group b/tests/chroot/chsh/01_chsh--root/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/chroot/chsh/01_chsh--root/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/chroot/chsh/01_chsh--root/config/etc/gshadow b/tests/chroot/chsh/01_chsh--root/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/chroot/chsh/01_chsh--root/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/chroot/chsh/01_chsh--root/config/etc/passwd b/tests/chroot/chsh/01_chsh--root/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/chroot/chsh/01_chsh--root/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/chroot/chsh/01_chsh--root/config/etc/shadow b/tests/chroot/chsh/01_chsh--root/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/chroot/chsh/01_chsh--root/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/chroot/chsh/01_chsh--root/config_chroot.list b/tests/chroot/chsh/01_chsh--root/config_chroot.list new file mode 100644 index 00000000..166e5212 --- /dev/null +++ b/tests/chroot/chsh/01_chsh--root/config_chroot.list @@ -0,0 +1 @@ +/bin/dash diff --git a/tests/chroot/chsh/01_chsh--root/config_chroot/etc/group b/tests/chroot/chsh/01_chsh--root/config_chroot/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chroot/chsh/01_chsh--root/config_chroot/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chroot/chsh/01_chsh--root/config_chroot/etc/gshadow b/tests/chroot/chsh/01_chsh--root/config_chroot/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chroot/chsh/01_chsh--root/config_chroot/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/chsh/01_chsh--root/config_chroot/etc/login.defs b/tests/chroot/chsh/01_chsh--root/config_chroot/etc/login.defs new file mode 100644 index 00000000..7b70c90e --- /dev/null +++ b/tests/chroot/chsh/01_chsh--root/config_chroot/etc/login.defs @@ -0,0 +1,335 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, such as Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/chsh/01_chsh--root/config_chroot/etc/pam.d/chsh b/tests/chroot/chsh/01_chsh--root/config_chroot/etc/pam.d/chsh new file mode 100644 index 00000000..7eb604d7 --- /dev/null +++ b/tests/chroot/chsh/01_chsh--root/config_chroot/etc/pam.d/chsh @@ -0,0 +1,20 @@ +# +# The PAM configuration file for the Shadow `chsh' service +# + +# This will not allow a user to change their shell unless +# their current one is listed in /etc/shells. This keeps +# accounts with special shells from changing them. +auth required pam_shells.so + +# This allows root to change user shell without being +# prompted for a password +auth sufficient pam_rootok.so + +# The standard Unix authentication modules, used with +# NIS (man nsswitch) as well as normal /etc/passwd and +# /etc/shadow entries. +@include common-auth +@include common-account +@include common-session + diff --git a/tests/chroot/chsh/01_chsh--root/config_chroot/etc/pam.d/common-account b/tests/chroot/chsh/01_chsh--root/config_chroot/etc/pam.d/common-account new file mode 100644 index 00000000..316b1733 --- /dev/null +++ b/tests/chroot/chsh/01_chsh--root/config_chroot/etc/pam.d/common-account @@ -0,0 +1,25 @@ +# +# /etc/pam.d/common-account - authorization settings common to all services +# +# This file is included from other service-specific PAM config files, +# and should contain a list of the authorization modules that define +# the central access policy for use on the system. The default is to +# only deny service to users whose accounts are expired in /etc/shadow. +# +# As of pam 1.0.1-6, this file is managed by pam-auth-update by default. +# To take advantage of this, it is recommended that you configure any +# local modules either before or after the default block, and use +# pam-auth-update to manage selection of other modules. See +# pam-auth-update(8) for details. +# + +# here are the per-package modules (the "Primary" block) +account [success=1 new_authtok_reqd=done default=ignore] pam_unix.so +# here's the fallback if no module succeeds +account requisite pam_deny.so +# prime the stack with a positive return value if there isn't one already; +# this avoids us returning an error just because nothing sets a success code +# since the modules above will each just jump around +account required pam_permit.so +# and here are more per-package modules (the "Additional" block) +# end of pam-auth-update config diff --git a/tests/chroot/chsh/01_chsh--root/config_chroot/etc/pam.d/common-auth b/tests/chroot/chsh/01_chsh--root/config_chroot/etc/pam.d/common-auth new file mode 100644 index 00000000..5facfa29 --- /dev/null +++ b/tests/chroot/chsh/01_chsh--root/config_chroot/etc/pam.d/common-auth @@ -0,0 +1,25 @@ +# +# /etc/pam.d/common-auth - authentication settings common to all services +# +# This file is included from other service-specific PAM config files, +# and should contain a list of the authentication modules that define +# the central authentication scheme for use on the system +# (e.g., /etc/shadow, LDAP, Kerberos, etc.). The default is to use the +# traditional Unix authentication mechanisms. +# +# As of pam 1.0.1-6, this file is managed by pam-auth-update by default. +# To take advantage of this, it is recommended that you configure any +# local modules either before or after the default block, and use +# pam-auth-update to manage selection of other modules. See +# pam-auth-update(8) for details. + +# here are the per-package modules (the "Primary" block) +auth [success=1 default=ignore] pam_unix.so nullok_secure +# here's the fallback if no module succeeds +auth requisite pam_deny.so +# prime the stack with a positive return value if there isn't one already; +# this avoids us returning an error just because nothing sets a success code +# since the modules above will each just jump around +auth required pam_permit.so +# and here are more per-package modules (the "Additional" block) +# end of pam-auth-update config diff --git a/tests/chroot/chsh/01_chsh--root/config_chroot/etc/pam.d/common-session b/tests/chroot/chsh/01_chsh--root/config_chroot/etc/pam.d/common-session new file mode 100644 index 00000000..4ad17292 --- /dev/null +++ b/tests/chroot/chsh/01_chsh--root/config_chroot/etc/pam.d/common-session @@ -0,0 +1,25 @@ +# +# /etc/pam.d/common-session - session-related modules common to all services +# +# This file is included from other service-specific PAM config files, +# and should contain a list of modules that define tasks to be performed +# at the start and end of sessions of *any* kind (both interactive and +# non-interactive). +# +# As of pam 1.0.1-6, this file is managed by pam-auth-update by default. +# To take advantage of this, it is recommended that you configure any +# local modules either before or after the default block, and use +# pam-auth-update to manage selection of other modules. See +# pam-auth-update(8) for details. + +# here are the per-package modules (the "Primary" block) +session [default=1] pam_permit.so +# here's the fallback if no module succeeds +session requisite pam_deny.so +# prime the stack with a positive return value if there isn't one already; +# this avoids us returning an error just because nothing sets a success code +# since the modules above will each just jump around +session required pam_permit.so +# and here are more per-package modules (the "Additional" block) +session required pam_unix.so +# end of pam-auth-update config diff --git a/tests/chroot/chsh/01_chsh--root/config_chroot/etc/passwd b/tests/chroot/chsh/01_chsh--root/config_chroot/etc/passwd new file mode 100644 index 00000000..9bdeb8ce --- /dev/null +++ b/tests/chroot/chsh/01_chsh--root/config_chroot/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/chsh/01_chsh--root/config_chroot/etc/shadow b/tests/chroot/chsh/01_chsh--root/config_chroot/etc/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chroot/chsh/01_chsh--root/config_chroot/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/chsh/01_chsh--root/config_chroot/etc/shells b/tests/chroot/chsh/01_chsh--root/config_chroot/etc/shells new file mode 100644 index 00000000..3cf5cc4f --- /dev/null +++ b/tests/chroot/chsh/01_chsh--root/config_chroot/etc/shells @@ -0,0 +1,3 @@ +# /etc/shells: valid login shells +/bin/bash +/bin/dash diff --git a/tests/chroot/chsh/01_chsh--root/data/passwd b/tests/chroot/chsh/01_chsh--root/data/passwd new file mode 100644 index 00000000..72c8a866 --- /dev/null +++ b/tests/chroot/chsh/01_chsh--root/data/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/dash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/gpasswd/01_gpasswd--root/config.txt b/tests/chroot/gpasswd/01_gpasswd--root/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/chroot/gpasswd/01_gpasswd--root/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/chroot/gpasswd/01_gpasswd--root/config/etc/default/useradd b/tests/chroot/gpasswd/01_gpasswd--root/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/chroot/gpasswd/01_gpasswd--root/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/gpasswd/01_gpasswd--root/config/etc/group b/tests/chroot/gpasswd/01_gpasswd--root/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/chroot/gpasswd/01_gpasswd--root/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/chroot/gpasswd/01_gpasswd--root/config/etc/gshadow b/tests/chroot/gpasswd/01_gpasswd--root/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/chroot/gpasswd/01_gpasswd--root/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/chroot/gpasswd/01_gpasswd--root/config/etc/passwd b/tests/chroot/gpasswd/01_gpasswd--root/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/chroot/gpasswd/01_gpasswd--root/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/chroot/gpasswd/01_gpasswd--root/config/etc/shadow b/tests/chroot/gpasswd/01_gpasswd--root/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/chroot/gpasswd/01_gpasswd--root/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/chroot/gpasswd/01_gpasswd--root/config_chroot/etc/group b/tests/chroot/gpasswd/01_gpasswd--root/config_chroot/etc/group new file mode 100644 index 00000000..d2a4b10a --- /dev/null +++ b/tests/chroot/gpasswd/01_gpasswd--root/config_chroot/etc/group @@ -0,0 +1,42 @@ +staff:x:50: +root:x:0: +tty:x:5: +daemon:x:1: +bin:x:2: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +sys:x:3: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +adm:x:4: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: +disk:x:6: diff --git a/tests/chroot/gpasswd/01_gpasswd--root/config_chroot/etc/gshadow b/tests/chroot/gpasswd/01_gpasswd--root/config_chroot/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chroot/gpasswd/01_gpasswd--root/config_chroot/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/gpasswd/01_gpasswd--root/config_chroot/etc/login.defs b/tests/chroot/gpasswd/01_gpasswd--root/config_chroot/etc/login.defs new file mode 100644 index 00000000..7b70c90e --- /dev/null +++ b/tests/chroot/gpasswd/01_gpasswd--root/config_chroot/etc/login.defs @@ -0,0 +1,335 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, such as Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/gpasswd/01_gpasswd--root/config_chroot/etc/passwd b/tests/chroot/gpasswd/01_gpasswd--root/config_chroot/etc/passwd new file mode 100644 index 00000000..9bdeb8ce --- /dev/null +++ b/tests/chroot/gpasswd/01_gpasswd--root/config_chroot/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/gpasswd/01_gpasswd--root/config_chroot/etc/shadow b/tests/chroot/gpasswd/01_gpasswd--root/config_chroot/etc/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chroot/gpasswd/01_gpasswd--root/config_chroot/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/gpasswd/01_gpasswd--root/data/group b/tests/chroot/gpasswd/01_gpasswd--root/data/group new file mode 100644 index 00000000..5c28b637 --- /dev/null +++ b/tests/chroot/gpasswd/01_gpasswd--root/data/group @@ -0,0 +1,42 @@ +staff:x:50: +root:x:0: +tty:x:5: +daemon:x:1: +bin:x:2: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +sys:x:3: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +adm:x:4: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +games:x:60: +users:x:100:root +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: +disk:x:6: diff --git a/tests/chroot/gpasswd/01_gpasswd--root/data/gshadow b/tests/chroot/gpasswd/01_gpasswd--root/data/gshadow new file mode 100644 index 00000000..7b869c21 --- /dev/null +++ b/tests/chroot/gpasswd/01_gpasswd--root/data/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*::root +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/gpasswd/01_gpasswd--root/gpasswd.test b/tests/chroot/gpasswd/01_gpasswd--root/gpasswd.test new file mode 100755 index 00000000..8e861aac --- /dev/null +++ b/tests/chroot/gpasswd/01_gpasswd--root/gpasswd.test @@ -0,0 +1,52 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "gpasswd can change a group in a chroot" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; clean_chroot; restore_config' 0 + +change_config + +prepare_chroot + +ls tmp/root/lib + +echo -n "Chang group in chroot (gpasswd -a root users -Q $PWD/tmp/root)..." +gpasswd -a root users -Q $PWD/tmp/root +echo "OK" + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl config_chroot/etc/passwd tmp/root/etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl data/group tmp/root/etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +../../../common/compare_file.pl config_chroot/etc/shadow tmp/root/etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +../../../common/compare_file.pl data/gshadow tmp/root/etc/gshadow +echo "OK" + +rm -f tmp/root/etc/.pwd.lock +rm -f tmp/root/etc/group- +rm -f tmp/root/etc/gshadow- +clean_chroot + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chroot/groupadd/01_groupadd--root/config.txt b/tests/chroot/groupadd/01_groupadd--root/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/chroot/groupadd/01_groupadd--root/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/chroot/groupadd/01_groupadd--root/config/etc/default/useradd b/tests/chroot/groupadd/01_groupadd--root/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/chroot/groupadd/01_groupadd--root/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/groupadd/01_groupadd--root/config/etc/group b/tests/chroot/groupadd/01_groupadd--root/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/chroot/groupadd/01_groupadd--root/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/chroot/groupadd/01_groupadd--root/config/etc/gshadow b/tests/chroot/groupadd/01_groupadd--root/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/chroot/groupadd/01_groupadd--root/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/chroot/groupadd/01_groupadd--root/config/etc/passwd b/tests/chroot/groupadd/01_groupadd--root/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/chroot/groupadd/01_groupadd--root/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/chroot/groupadd/01_groupadd--root/config/etc/shadow b/tests/chroot/groupadd/01_groupadd--root/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/chroot/groupadd/01_groupadd--root/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/chroot/groupadd/01_groupadd--root/config_chroot/etc/group b/tests/chroot/groupadd/01_groupadd--root/config_chroot/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chroot/groupadd/01_groupadd--root/config_chroot/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chroot/groupadd/01_groupadd--root/config_chroot/etc/gshadow b/tests/chroot/groupadd/01_groupadd--root/config_chroot/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chroot/groupadd/01_groupadd--root/config_chroot/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/groupadd/01_groupadd--root/config_chroot/etc/login.defs b/tests/chroot/groupadd/01_groupadd--root/config_chroot/etc/login.defs new file mode 100644 index 00000000..7b70c90e --- /dev/null +++ b/tests/chroot/groupadd/01_groupadd--root/config_chroot/etc/login.defs @@ -0,0 +1,335 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, such as Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/groupadd/01_groupadd--root/config_chroot/etc/passwd b/tests/chroot/groupadd/01_groupadd--root/config_chroot/etc/passwd new file mode 100644 index 00000000..9bdeb8ce --- /dev/null +++ b/tests/chroot/groupadd/01_groupadd--root/config_chroot/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/groupadd/01_groupadd--root/config_chroot/etc/shadow b/tests/chroot/groupadd/01_groupadd--root/config_chroot/etc/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chroot/groupadd/01_groupadd--root/config_chroot/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/groupadd/01_groupadd--root/data/group b/tests/chroot/groupadd/01_groupadd--root/data/group new file mode 100644 index 00000000..ffc452fd --- /dev/null +++ b/tests/chroot/groupadd/01_groupadd--root/data/group @@ -0,0 +1,43 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: +foo:x:1000: diff --git a/tests/chroot/groupadd/01_groupadd--root/data/gshadow b/tests/chroot/groupadd/01_groupadd--root/data/gshadow new file mode 100644 index 00000000..e4b350df --- /dev/null +++ b/tests/chroot/groupadd/01_groupadd--root/data/gshadow @@ -0,0 +1,43 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: +foo:!:: diff --git a/tests/chroot/groupadd/01_groupadd--root/groupadd.test b/tests/chroot/groupadd/01_groupadd--root/groupadd.test new file mode 100755 index 00000000..26f4c9b7 --- /dev/null +++ b/tests/chroot/groupadd/01_groupadd--root/groupadd.test @@ -0,0 +1,52 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "groupadd can add a group in a chroot" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; clean_chroot; restore_config' 0 + +change_config + +prepare_chroot + +echo -n "Add group foo in chroot (groupadd --root $PWD/tmp/root foo)..." +groupadd --root $PWD/tmp/root foo +echo "OK" + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl config_chroot/etc/passwd tmp/root/etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl data/group tmp/root/etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +../../../common/compare_file.pl config_chroot/etc/shadow tmp/root/etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +../../../common/compare_file.pl data/gshadow tmp/root/etc/gshadow +echo "OK" + +rm -f tmp/root/etc/.pwd.lock +rm -f tmp/root/etc/passwd- +rm -f tmp/root/etc/group- +rm -f tmp/root/etc/shadow- +rm -f tmp/root/etc/gshadow- +clean_chroot + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chroot/groupdel/01_groupdel--root/config.txt b/tests/chroot/groupdel/01_groupdel--root/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/chroot/groupdel/01_groupdel--root/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/chroot/groupdel/01_groupdel--root/config/etc/default/useradd b/tests/chroot/groupdel/01_groupdel--root/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/chroot/groupdel/01_groupdel--root/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/groupdel/01_groupdel--root/config/etc/group b/tests/chroot/groupdel/01_groupdel--root/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/chroot/groupdel/01_groupdel--root/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/chroot/groupdel/01_groupdel--root/config/etc/gshadow b/tests/chroot/groupdel/01_groupdel--root/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/chroot/groupdel/01_groupdel--root/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/chroot/groupdel/01_groupdel--root/config/etc/passwd b/tests/chroot/groupdel/01_groupdel--root/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/chroot/groupdel/01_groupdel--root/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/chroot/groupdel/01_groupdel--root/config/etc/shadow b/tests/chroot/groupdel/01_groupdel--root/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/chroot/groupdel/01_groupdel--root/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/chroot/groupdel/01_groupdel--root/config_chroot/etc/group b/tests/chroot/groupdel/01_groupdel--root/config_chroot/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chroot/groupdel/01_groupdel--root/config_chroot/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chroot/groupdel/01_groupdel--root/config_chroot/etc/gshadow b/tests/chroot/groupdel/01_groupdel--root/config_chroot/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chroot/groupdel/01_groupdel--root/config_chroot/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/groupdel/01_groupdel--root/config_chroot/etc/login.defs b/tests/chroot/groupdel/01_groupdel--root/config_chroot/etc/login.defs new file mode 100644 index 00000000..7b70c90e --- /dev/null +++ b/tests/chroot/groupdel/01_groupdel--root/config_chroot/etc/login.defs @@ -0,0 +1,335 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, such as Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/groupdel/01_groupdel--root/config_chroot/etc/passwd b/tests/chroot/groupdel/01_groupdel--root/config_chroot/etc/passwd new file mode 100644 index 00000000..9bdeb8ce --- /dev/null +++ b/tests/chroot/groupdel/01_groupdel--root/config_chroot/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/groupdel/01_groupdel--root/config_chroot/etc/shadow b/tests/chroot/groupdel/01_groupdel--root/config_chroot/etc/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chroot/groupdel/01_groupdel--root/config_chroot/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/groupdel/01_groupdel--root/data/group b/tests/chroot/groupdel/01_groupdel--root/data/group new file mode 100644 index 00000000..9ee4d568 --- /dev/null +++ b/tests/chroot/groupdel/01_groupdel--root/data/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chroot/groupdel/01_groupdel--root/data/gshadow b/tests/chroot/groupdel/01_groupdel--root/data/gshadow new file mode 100644 index 00000000..b969cf25 --- /dev/null +++ b/tests/chroot/groupdel/01_groupdel--root/data/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/groupdel/01_groupdel--root/groupdel.test b/tests/chroot/groupdel/01_groupdel--root/groupdel.test new file mode 100755 index 00000000..6d7fa5af --- /dev/null +++ b/tests/chroot/groupdel/01_groupdel--root/groupdel.test @@ -0,0 +1,52 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "groupmodd can delete a group in a chroot" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; clean_chroot; restore_config' 0 + +change_config + +prepare_chroot + +echo -n "Delete group users in chroot (groupdel --root $PWD/tmp/root users)..." +groupdel --root $PWD/tmp/root users +echo "OK" + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl config_chroot/etc/passwd tmp/root/etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl data/group tmp/root/etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +../../../common/compare_file.pl config_chroot/etc/shadow tmp/root/etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +../../../common/compare_file.pl data/gshadow tmp/root/etc/gshadow +echo "OK" + +rm -f tmp/root/etc/.pwd.lock +rm -f tmp/root/etc/passwd- +rm -f tmp/root/etc/group- +rm -f tmp/root/etc/shadow- +rm -f tmp/root/etc/gshadow- +clean_chroot + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chroot/groupmod/01_groupmod--root/config.txt b/tests/chroot/groupmod/01_groupmod--root/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/chroot/groupmod/01_groupmod--root/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/chroot/groupmod/01_groupmod--root/config/etc/default/useradd b/tests/chroot/groupmod/01_groupmod--root/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/chroot/groupmod/01_groupmod--root/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/groupmod/01_groupmod--root/config/etc/group b/tests/chroot/groupmod/01_groupmod--root/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/chroot/groupmod/01_groupmod--root/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/chroot/groupmod/01_groupmod--root/config/etc/gshadow b/tests/chroot/groupmod/01_groupmod--root/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/chroot/groupmod/01_groupmod--root/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/chroot/groupmod/01_groupmod--root/config/etc/passwd b/tests/chroot/groupmod/01_groupmod--root/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/chroot/groupmod/01_groupmod--root/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/chroot/groupmod/01_groupmod--root/config/etc/shadow b/tests/chroot/groupmod/01_groupmod--root/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/chroot/groupmod/01_groupmod--root/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/chroot/groupmod/01_groupmod--root/config_chroot/etc/group b/tests/chroot/groupmod/01_groupmod--root/config_chroot/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chroot/groupmod/01_groupmod--root/config_chroot/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chroot/groupmod/01_groupmod--root/config_chroot/etc/gshadow b/tests/chroot/groupmod/01_groupmod--root/config_chroot/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chroot/groupmod/01_groupmod--root/config_chroot/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/groupmod/01_groupmod--root/config_chroot/etc/login.defs b/tests/chroot/groupmod/01_groupmod--root/config_chroot/etc/login.defs new file mode 100644 index 00000000..7b70c90e --- /dev/null +++ b/tests/chroot/groupmod/01_groupmod--root/config_chroot/etc/login.defs @@ -0,0 +1,335 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, such as Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/groupmod/01_groupmod--root/config_chroot/etc/passwd b/tests/chroot/groupmod/01_groupmod--root/config_chroot/etc/passwd new file mode 100644 index 00000000..9bdeb8ce --- /dev/null +++ b/tests/chroot/groupmod/01_groupmod--root/config_chroot/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/groupmod/01_groupmod--root/config_chroot/etc/shadow b/tests/chroot/groupmod/01_groupmod--root/config_chroot/etc/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chroot/groupmod/01_groupmod--root/config_chroot/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/groupmod/01_groupmod--root/data/group b/tests/chroot/groupmod/01_groupmod--root/data/group new file mode 100644 index 00000000..068bdf57 --- /dev/null +++ b/tests/chroot/groupmod/01_groupmod--root/data/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: +utilisateurs:x:100: diff --git a/tests/chroot/groupmod/01_groupmod--root/data/gshadow b/tests/chroot/groupmod/01_groupmod--root/data/gshadow new file mode 100644 index 00000000..249ec498 --- /dev/null +++ b/tests/chroot/groupmod/01_groupmod--root/data/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: +utilisateurs:*:: diff --git a/tests/chroot/groupmod/01_groupmod--root/groupmod.test b/tests/chroot/groupmod/01_groupmod--root/groupmod.test new file mode 100755 index 00000000..853df8f5 --- /dev/null +++ b/tests/chroot/groupmod/01_groupmod--root/groupmod.test @@ -0,0 +1,52 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "groupmod can change a group in a chroot" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; clean_chroot; restore_config' 0 + +change_config + +prepare_chroot + +echo -n "Change group in chroot (groupmod --root $PWD/tmp/root -n utilisateurs users)..." +groupmod --root $PWD/tmp/root -n utilisateurs users +echo "OK" + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl config_chroot/etc/passwd tmp/root/etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl data/group tmp/root/etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +../../../common/compare_file.pl config_chroot/etc/shadow tmp/root/etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +../../../common/compare_file.pl data/gshadow tmp/root/etc/gshadow +echo "OK" + +rm -f tmp/root/etc/.pwd.lock +rm -f tmp/root/etc/passwd- +rm -f tmp/root/etc/group- +rm -f tmp/root/etc/shadow- +rm -f tmp/root/etc/gshadow- +clean_chroot + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chroot/grpck/01_grpck--root/config.txt b/tests/chroot/grpck/01_grpck--root/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/chroot/grpck/01_grpck--root/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/chroot/grpck/01_grpck--root/config/etc/default/useradd b/tests/chroot/grpck/01_grpck--root/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/chroot/grpck/01_grpck--root/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/grpck/01_grpck--root/config/etc/group b/tests/chroot/grpck/01_grpck--root/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/chroot/grpck/01_grpck--root/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/chroot/grpck/01_grpck--root/config/etc/gshadow b/tests/chroot/grpck/01_grpck--root/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/chroot/grpck/01_grpck--root/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/chroot/grpck/01_grpck--root/config/etc/passwd b/tests/chroot/grpck/01_grpck--root/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/chroot/grpck/01_grpck--root/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/chroot/grpck/01_grpck--root/config/etc/shadow b/tests/chroot/grpck/01_grpck--root/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/chroot/grpck/01_grpck--root/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/chroot/grpck/01_grpck--root/config_chroot/etc/group b/tests/chroot/grpck/01_grpck--root/config_chroot/etc/group new file mode 100644 index 00000000..d2a4b10a --- /dev/null +++ b/tests/chroot/grpck/01_grpck--root/config_chroot/etc/group @@ -0,0 +1,42 @@ +staff:x:50: +root:x:0: +tty:x:5: +daemon:x:1: +bin:x:2: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +sys:x:3: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +adm:x:4: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: +disk:x:6: diff --git a/tests/chroot/grpck/01_grpck--root/config_chroot/etc/gshadow b/tests/chroot/grpck/01_grpck--root/config_chroot/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chroot/grpck/01_grpck--root/config_chroot/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/grpck/01_grpck--root/config_chroot/etc/login.defs b/tests/chroot/grpck/01_grpck--root/config_chroot/etc/login.defs new file mode 100644 index 00000000..7b70c90e --- /dev/null +++ b/tests/chroot/grpck/01_grpck--root/config_chroot/etc/login.defs @@ -0,0 +1,335 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, such as Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/grpck/01_grpck--root/config_chroot/etc/passwd b/tests/chroot/grpck/01_grpck--root/config_chroot/etc/passwd new file mode 100644 index 00000000..9bdeb8ce --- /dev/null +++ b/tests/chroot/grpck/01_grpck--root/config_chroot/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/grpck/01_grpck--root/config_chroot/etc/shadow b/tests/chroot/grpck/01_grpck--root/config_chroot/etc/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chroot/grpck/01_grpck--root/config_chroot/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/grpck/01_grpck--root/data/group b/tests/chroot/grpck/01_grpck--root/data/group new file mode 100644 index 00000000..dd74ea83 --- /dev/null +++ b/tests/chroot/grpck/01_grpck--root/data/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +crontab:x:101: +Debian-exim:x:102: +nogroup:x:65534: +myuser:x:424242: diff --git a/tests/chroot/grpck/01_grpck--root/data/gshadow b/tests/chroot/grpck/01_grpck--root/data/gshadow new file mode 100644 index 00000000..5b9b1d49 --- /dev/null +++ b/tests/chroot/grpck/01_grpck--root/data/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +crontab:x:: +Debian-exim:x:: +nogroup:*:: +myuser:x:: diff --git a/tests/chroot/grpck/01_grpck--root/grpck.test b/tests/chroot/grpck/01_grpck--root/grpck.test new file mode 100755 index 00000000..93867d02 --- /dev/null +++ b/tests/chroot/grpck/01_grpck--root/grpck.test @@ -0,0 +1,50 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck can sort groups in a chroot" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; clean_chroot; restore_config' 0 + +change_config + +prepare_chroot + +echo -n "Sort groups in chroot (grpck --sort --root $PWD/tmp/root)..." +grpck --sort --root $PWD/tmp/root +echo "OK" + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl config_chroot/etc/passwd tmp/root/etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl data/group tmp/root/etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +../../../common/compare_file.pl config_chroot/etc/shadow tmp/root/etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +../../../common/compare_file.pl data/gshadow tmp/root/etc/gshadow +echo "OK" + +rm -f tmp/root/etc/.pwd.lock +rm -f tmp/root/etc/group- +rm -f tmp/root/etc/gshadow- +clean_chroot + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chroot/grpconv/01_grpconv--root/config.txt b/tests/chroot/grpconv/01_grpconv--root/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/chroot/grpconv/01_grpconv--root/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/chroot/grpconv/01_grpconv--root/config/etc/default/useradd b/tests/chroot/grpconv/01_grpconv--root/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/chroot/grpconv/01_grpconv--root/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/grpconv/01_grpconv--root/config/etc/group b/tests/chroot/grpconv/01_grpconv--root/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/chroot/grpconv/01_grpconv--root/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/chroot/grpconv/01_grpconv--root/config/etc/gshadow b/tests/chroot/grpconv/01_grpconv--root/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/chroot/grpconv/01_grpconv--root/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/chroot/grpconv/01_grpconv--root/config/etc/passwd b/tests/chroot/grpconv/01_grpconv--root/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/chroot/grpconv/01_grpconv--root/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/chroot/grpconv/01_grpconv--root/config/etc/shadow b/tests/chroot/grpconv/01_grpconv--root/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/chroot/grpconv/01_grpconv--root/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/chroot/grpconv/01_grpconv--root/config_chroot/etc/group b/tests/chroot/grpconv/01_grpconv--root/config_chroot/etc/group new file mode 100644 index 00000000..27f1e9a2 --- /dev/null +++ b/tests/chroot/grpconv/01_grpconv--root/config_chroot/etc/group @@ -0,0 +1,42 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:0: +daemon:*:1: +bin:*:2: +sys:*:3: +adm:*:4: +tty:*:5: +disk:*:6: +lp:*:7: +mail:*:8: +news:*:9: +uucp:*:10: +man:*:12: +proxy:*:13: +kmem:*:15: +dialout:*:20: +fax:*:21: +voice:*:22: +cdrom:*:24: +floppy:*:25: +tape:*:26: +sudo:*:27: +audio:*:29: +dip:*:30: +www-data:*:33: +backup:*:34: +operator:*:37: +list:*:38: +irc:*:39: +src:*:40: +gnats:*:41: +shadow:*:42: +utmp:*:43: +video:*:44: +sasl:*:45: +plugdev:*:46: +staff:*:50: +games:*:60: +users:foo:100: +nogroup::65534: +crontab:*:101: +Debian-exim:!:102: +myuser:*:424242: diff --git a/tests/chroot/grpconv/01_grpconv--root/config_chroot/etc/login.defs b/tests/chroot/grpconv/01_grpconv--root/config_chroot/etc/login.defs new file mode 100644 index 00000000..7b70c90e --- /dev/null +++ b/tests/chroot/grpconv/01_grpconv--root/config_chroot/etc/login.defs @@ -0,0 +1,335 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, such as Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/grpconv/01_grpconv--root/config_chroot/etc/passwd b/tests/chroot/grpconv/01_grpconv--root/config_chroot/etc/passwd new file mode 100644 index 00000000..9bdeb8ce --- /dev/null +++ b/tests/chroot/grpconv/01_grpconv--root/config_chroot/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/grpconv/01_grpconv--root/config_chroot/etc/shadow b/tests/chroot/grpconv/01_grpconv--root/config_chroot/etc/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chroot/grpconv/01_grpconv--root/config_chroot/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/grpconv/01_grpconv--root/data/group b/tests/chroot/grpconv/01_grpconv--root/data/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chroot/grpconv/01_grpconv--root/data/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chroot/grpconv/01_grpconv--root/data/gshadow b/tests/chroot/grpconv/01_grpconv--root/data/gshadow new file mode 100644 index 00000000..5f81b8f9 --- /dev/null +++ b/tests/chroot/grpconv/01_grpconv--root/data/gshadow @@ -0,0 +1,42 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:foo:: +nogroup::: +crontab:*:: +Debian-exim:!:: +myuser:*:: diff --git a/tests/chroot/grpconv/01_grpconv--root/grpconv.test b/tests/chroot/grpconv/01_grpconv--root/grpconv.test new file mode 100755 index 00000000..92e1bf06 --- /dev/null +++ b/tests/chroot/grpconv/01_grpconv--root/grpconv.test @@ -0,0 +1,50 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpconv can change a chroot" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; clean_chroot; restore_config' 0 + +change_config + +prepare_chroot + +echo -n "grpconv in a chroot (grpconv --root $PWD/tmp/root)..." +grpconv --root $PWD/tmp/root +echo "OK" + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl config_chroot/etc/passwd tmp/root/etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl data/group tmp/root/etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +../../../common/compare_file.pl config_chroot/etc/shadow tmp/root/etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +../../../common/compare_file.pl data/gshadow tmp/root/etc/gshadow +echo "OK" + +rm -f tmp/root/etc/.pwd.lock +rm -f tmp/root/etc/group- +rm -f tmp/root/etc/gshadow +clean_chroot + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chroot/grpunconv/01_grpunconv--root/config.txt b/tests/chroot/grpunconv/01_grpunconv--root/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/chroot/grpunconv/01_grpunconv--root/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/chroot/grpunconv/01_grpunconv--root/config/etc/default/useradd b/tests/chroot/grpunconv/01_grpunconv--root/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/chroot/grpunconv/01_grpunconv--root/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/grpunconv/01_grpunconv--root/config/etc/group b/tests/chroot/grpunconv/01_grpunconv--root/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/chroot/grpunconv/01_grpunconv--root/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/chroot/grpunconv/01_grpunconv--root/config/etc/gshadow b/tests/chroot/grpunconv/01_grpunconv--root/config/etc/gshadow new file mode 100644 index 00000000..b21489b2 --- /dev/null +++ b/tests/chroot/grpunconv/01_grpunconv--root/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/chroot/grpunconv/01_grpunconv--root/config/etc/passwd b/tests/chroot/grpunconv/01_grpunconv--root/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/chroot/grpunconv/01_grpunconv--root/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/chroot/grpunconv/01_grpunconv--root/config/etc/shadow b/tests/chroot/grpunconv/01_grpunconv--root/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/chroot/grpunconv/01_grpunconv--root/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/chroot/grpunconv/01_grpunconv--root/config_chroot/etc/group b/tests/chroot/grpunconv/01_grpunconv--root/config_chroot/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chroot/grpunconv/01_grpunconv--root/config_chroot/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chroot/grpunconv/01_grpunconv--root/config_chroot/etc/gshadow b/tests/chroot/grpunconv/01_grpunconv--root/config_chroot/etc/gshadow new file mode 100644 index 00000000..86f5654a --- /dev/null +++ b/tests/chroot/grpunconv/01_grpunconv--root/config_chroot/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:: diff --git a/tests/chroot/grpunconv/01_grpunconv--root/config_chroot/etc/login.defs b/tests/chroot/grpunconv/01_grpunconv--root/config_chroot/etc/login.defs new file mode 100644 index 00000000..7b70c90e --- /dev/null +++ b/tests/chroot/grpunconv/01_grpunconv--root/config_chroot/etc/login.defs @@ -0,0 +1,335 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, such as Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/grpunconv/01_grpunconv--root/config_chroot/etc/passwd b/tests/chroot/grpunconv/01_grpunconv--root/config_chroot/etc/passwd new file mode 100644 index 00000000..9bdeb8ce --- /dev/null +++ b/tests/chroot/grpunconv/01_grpunconv--root/config_chroot/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/grpunconv/01_grpunconv--root/config_chroot/etc/shadow b/tests/chroot/grpunconv/01_grpunconv--root/config_chroot/etc/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chroot/grpunconv/01_grpunconv--root/config_chroot/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/grpunconv/01_grpunconv--root/data/group b/tests/chroot/grpunconv/01_grpunconv--root/data/group new file mode 100644 index 00000000..9a037038 --- /dev/null +++ b/tests/chroot/grpunconv/01_grpunconv--root/data/group @@ -0,0 +1,42 @@ +root:*:0: +daemon:*:1: +bin:*:2: +sys:*:3: +adm:*:4: +tty:*:5: +disk:*:6: +lp:*:7: +mail:*:8: +news:*:9: +uucp:*:10: +man:*:12: +proxy:*:13: +kmem:*:15: +dialout:*:20: +fax:*:21: +voice:*:22: +cdrom:*:24: +floppy:*:25: +tape:*:26: +sudo:*:27: +audio:*:29: +dip:*:30: +www-data:*:33: +backup:*:34: +operator:*:37: +list:*:38: +irc:*:39: +src:*:40: +gnats:*:41: +shadow:*:42: +utmp:*:43: +video:*:44: +sasl:*:45: +plugdev:*:46: +staff:*:50: +games:*:60: +users:*:100: +nogroup:*:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:424242: diff --git a/tests/chroot/grpunconv/01_grpunconv--root/grpunconv.test b/tests/chroot/grpunconv/01_grpunconv--root/grpunconv.test new file mode 100755 index 00000000..5d6edd58 --- /dev/null +++ b/tests/chroot/grpunconv/01_grpunconv--root/grpunconv.test @@ -0,0 +1,52 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpunconv can change a chroot" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; clean_chroot; restore_config' 0 + +change_config + +prepare_chroot + +echo -n "grpunconv in a chroot (grpunconv --root $PWD/tmp/root)..." +grpunconv --root $PWD/tmp/root +echo "OK" + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl config_chroot/etc/passwd tmp/root/etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl data/group tmp/root/etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +../../../common/compare_file.pl config_chroot/etc/shadow tmp/root/etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +test ! -f tmp/root/etc/gshadow +echo "OK" + +rm -f tmp/root/etc/.pwd.lock +rm -f tmp/root/etc/passwd- +rm -f tmp/root/etc/group- +rm -f tmp/root/etc/shadow- +rm -f tmp/root/etc/gshadow- +clean_chroot + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chroot/lastlog/01_lastlog--root/config.txt b/tests/chroot/lastlog/01_lastlog--root/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/chroot/lastlog/01_lastlog--root/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/chroot/lastlog/01_lastlog--root/config/etc/default/useradd b/tests/chroot/lastlog/01_lastlog--root/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/chroot/lastlog/01_lastlog--root/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/lastlog/01_lastlog--root/config/etc/group b/tests/chroot/lastlog/01_lastlog--root/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/chroot/lastlog/01_lastlog--root/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/chroot/lastlog/01_lastlog--root/config/etc/gshadow b/tests/chroot/lastlog/01_lastlog--root/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/chroot/lastlog/01_lastlog--root/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/chroot/lastlog/01_lastlog--root/config/etc/passwd b/tests/chroot/lastlog/01_lastlog--root/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/chroot/lastlog/01_lastlog--root/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/chroot/lastlog/01_lastlog--root/config/etc/shadow b/tests/chroot/lastlog/01_lastlog--root/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/chroot/lastlog/01_lastlog--root/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/chroot/lastlog/01_lastlog--root/config_chroot/etc/group b/tests/chroot/lastlog/01_lastlog--root/config_chroot/etc/group new file mode 100644 index 00000000..d2a4b10a --- /dev/null +++ b/tests/chroot/lastlog/01_lastlog--root/config_chroot/etc/group @@ -0,0 +1,42 @@ +staff:x:50: +root:x:0: +tty:x:5: +daemon:x:1: +bin:x:2: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +sys:x:3: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +adm:x:4: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: +disk:x:6: diff --git a/tests/chroot/lastlog/01_lastlog--root/config_chroot/etc/gshadow b/tests/chroot/lastlog/01_lastlog--root/config_chroot/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chroot/lastlog/01_lastlog--root/config_chroot/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/lastlog/01_lastlog--root/config_chroot/etc/login.defs b/tests/chroot/lastlog/01_lastlog--root/config_chroot/etc/login.defs new file mode 100644 index 00000000..7b70c90e --- /dev/null +++ b/tests/chroot/lastlog/01_lastlog--root/config_chroot/etc/login.defs @@ -0,0 +1,335 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, such as Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/lastlog/01_lastlog--root/config_chroot/etc/passwd b/tests/chroot/lastlog/01_lastlog--root/config_chroot/etc/passwd new file mode 100644 index 00000000..9bdeb8ce --- /dev/null +++ b/tests/chroot/lastlog/01_lastlog--root/config_chroot/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/lastlog/01_lastlog--root/config_chroot/etc/shadow b/tests/chroot/lastlog/01_lastlog--root/config_chroot/etc/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chroot/lastlog/01_lastlog--root/config_chroot/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/lastlog/01_lastlog--root/data/group b/tests/chroot/lastlog/01_lastlog--root/data/group new file mode 100644 index 00000000..5c28b637 --- /dev/null +++ b/tests/chroot/lastlog/01_lastlog--root/data/group @@ -0,0 +1,42 @@ +staff:x:50: +root:x:0: +tty:x:5: +daemon:x:1: +bin:x:2: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +sys:x:3: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +adm:x:4: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +games:x:60: +users:x:100:root +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: +disk:x:6: diff --git a/tests/chroot/lastlog/01_lastlog--root/data/gshadow b/tests/chroot/lastlog/01_lastlog--root/data/gshadow new file mode 100644 index 00000000..7b869c21 --- /dev/null +++ b/tests/chroot/lastlog/01_lastlog--root/data/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*::root +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/lastlog/01_lastlog--root/data/lastlog.list b/tests/chroot/lastlog/01_lastlog--root/data/lastlog.list new file mode 100644 index 00000000..e95b2053 --- /dev/null +++ b/tests/chroot/lastlog/01_lastlog--root/data/lastlog.list @@ -0,0 +1,2 @@ +Username +myuser diff --git a/tests/chroot/lastlog/01_lastlog--root/lastlog.test b/tests/chroot/lastlog/01_lastlog--root/lastlog.test new file mode 100755 index 00000000..d61d9a70 --- /dev/null +++ b/tests/chroot/lastlog/01_lastlog--root/lastlog.test @@ -0,0 +1,47 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "gpasswd can change a group in a chroot" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; rm -f tmp/root/var/log/lastlog; clean_chroot; restore_config' 0 + +change_config + +prepare_chroot + +echo -n "Create an empty /var/log/lastlog in the chroot..." +> tmp/root/var/log/lastlog +echo "OK" + +echo -n "lastlog --root $PWD/tmp/root -u 424242..." +lastlog --root $PWD/tmp/root -u 424242> tmp/lastlog.out +echo "OK." + +echo "lastlog :" +echo "=======================================================================" +cat tmp/lastlog.out +echo "=======================================================================" + +echo -n "Check the list of logged in users..." +cat tmp/lastlog.out | cut -d" " -f1 > tmp/lastlog.list +diff -au data/lastlog.list tmp/lastlog.list +echo "OK." + +rm -f tmp/lastlog.out tmp/lastlog.list +rm -f tmp/root/var/log/lastlog + +clean_chroot + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chroot/login/01_login_sublogin/config.txt b/tests/chroot/login/01_login_sublogin/config.txt new file mode 100644 index 00000000..aecff4a9 --- /dev/null +++ b/tests/chroot/login/01_login_sublogin/config.txt @@ -0,0 +1,3 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz diff --git a/tests/chroot/login/01_login_sublogin/config/etc/group b/tests/chroot/login/01_login_sublogin/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chroot/login/01_login_sublogin/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chroot/login/01_login_sublogin/config/etc/gshadow b/tests/chroot/login/01_login_sublogin/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chroot/login/01_login_sublogin/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/login/01_login_sublogin/config/etc/login.defs b/tests/chroot/login/01_login_sublogin/config/etc/login.defs new file mode 100644 index 00000000..8605f437 --- /dev/null +++ b/tests/chroot/login/01_login_sublogin/config/etc/login.defs @@ -0,0 +1,315 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +#ENV_SUPATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +#ENV_PATH /usr/local/bin:/usr/bin:/bin:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK usage is discouraged because it catches only some classes of user +# entries to system, in fact only those made through login(1), while setting +# umask in shell rc file will catch also logins through su, cron, ssh etc. +# +# At the same time, using shell rc to set umask won't catch entries which use +# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" +# user and alike. +# +# Therefore the use of pam_umask is recommended (Debian package libpam-umask) +# as the solution which catches all these cases on PAM-enabled systems. +# +# This avoids the confusion created by having the umask set +# in two different places -- in login.defs and shell rc files (i.e. +# /etc/profile). +# +# For discussion, see #314539 and #248150 as well as the thread starting at +# http://lists.debian.org/debian-devel/2005/06/msg01598.html +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +# 022 is the "historical" value in Debian for UMASK when it was used +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +#UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 100 +GID_MAX 60000 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# This enables userdel to remove user groups if no members exist. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, thus in Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is used by chpasswd, gpasswd and newusers. +# +#MD5_CRYPT_ENAB no + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/login/01_login_sublogin/config/etc/passwd b/tests/chroot/login/01_login_sublogin/config/etc/passwd new file mode 100644 index 00000000..7b82b884 --- /dev/null +++ b/tests/chroot/login/01_login_sublogin/config/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/nonexistent:*/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/login/01_login_sublogin/config/etc/shadow b/tests/chroot/login/01_login_sublogin/config/etc/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chroot/login/01_login_sublogin/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/login/01_login_sublogin/config_chroot.list b/tests/chroot/login/01_login_sublogin/config_chroot.list new file mode 100644 index 00000000..e22e8e82 --- /dev/null +++ b/tests/chroot/login/01_login_sublogin/config_chroot.list @@ -0,0 +1,3 @@ +/bin/dash +/bin/sh +/usr/bin/id diff --git a/tests/chroot/login/01_login_sublogin/config_chroot/etc/group b/tests/chroot/login/01_login_sublogin/config_chroot/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chroot/login/01_login_sublogin/config_chroot/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chroot/login/01_login_sublogin/config_chroot/etc/gshadow b/tests/chroot/login/01_login_sublogin/config_chroot/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chroot/login/01_login_sublogin/config_chroot/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/login/01_login_sublogin/config_chroot/etc/login.defs b/tests/chroot/login/01_login_sublogin/config_chroot/etc/login.defs new file mode 100644 index 00000000..8605f437 --- /dev/null +++ b/tests/chroot/login/01_login_sublogin/config_chroot/etc/login.defs @@ -0,0 +1,315 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +#ENV_SUPATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +#ENV_PATH /usr/local/bin:/usr/bin:/bin:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK usage is discouraged because it catches only some classes of user +# entries to system, in fact only those made through login(1), while setting +# umask in shell rc file will catch also logins through su, cron, ssh etc. +# +# At the same time, using shell rc to set umask won't catch entries which use +# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" +# user and alike. +# +# Therefore the use of pam_umask is recommended (Debian package libpam-umask) +# as the solution which catches all these cases on PAM-enabled systems. +# +# This avoids the confusion created by having the umask set +# in two different places -- in login.defs and shell rc files (i.e. +# /etc/profile). +# +# For discussion, see #314539 and #248150 as well as the thread starting at +# http://lists.debian.org/debian-devel/2005/06/msg01598.html +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +# 022 is the "historical" value in Debian for UMASK when it was used +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +#UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 100 +GID_MAX 60000 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# This enables userdel to remove user groups if no members exist. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, thus in Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# Only works if compiled with MD5_CRYPT defined: +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is used by chpasswd, gpasswd and newusers. +# +#MD5_CRYPT_ENAB no + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/common-account b/tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/common-account new file mode 100644 index 00000000..316b1733 --- /dev/null +++ b/tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/common-account @@ -0,0 +1,25 @@ +# +# /etc/pam.d/common-account - authorization settings common to all services +# +# This file is included from other service-specific PAM config files, +# and should contain a list of the authorization modules that define +# the central access policy for use on the system. The default is to +# only deny service to users whose accounts are expired in /etc/shadow. +# +# As of pam 1.0.1-6, this file is managed by pam-auth-update by default. +# To take advantage of this, it is recommended that you configure any +# local modules either before or after the default block, and use +# pam-auth-update to manage selection of other modules. See +# pam-auth-update(8) for details. +# + +# here are the per-package modules (the "Primary" block) +account [success=1 new_authtok_reqd=done default=ignore] pam_unix.so +# here's the fallback if no module succeeds +account requisite pam_deny.so +# prime the stack with a positive return value if there isn't one already; +# this avoids us returning an error just because nothing sets a success code +# since the modules above will each just jump around +account required pam_permit.so +# and here are more per-package modules (the "Additional" block) +# end of pam-auth-update config diff --git a/tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/common-auth b/tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/common-auth new file mode 100644 index 00000000..5facfa29 --- /dev/null +++ b/tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/common-auth @@ -0,0 +1,25 @@ +# +# /etc/pam.d/common-auth - authentication settings common to all services +# +# This file is included from other service-specific PAM config files, +# and should contain a list of the authentication modules that define +# the central authentication scheme for use on the system +# (e.g., /etc/shadow, LDAP, Kerberos, etc.). The default is to use the +# traditional Unix authentication mechanisms. +# +# As of pam 1.0.1-6, this file is managed by pam-auth-update by default. +# To take advantage of this, it is recommended that you configure any +# local modules either before or after the default block, and use +# pam-auth-update to manage selection of other modules. See +# pam-auth-update(8) for details. + +# here are the per-package modules (the "Primary" block) +auth [success=1 default=ignore] pam_unix.so nullok_secure +# here's the fallback if no module succeeds +auth requisite pam_deny.so +# prime the stack with a positive return value if there isn't one already; +# this avoids us returning an error just because nothing sets a success code +# since the modules above will each just jump around +auth required pam_permit.so +# and here are more per-package modules (the "Additional" block) +# end of pam-auth-update config diff --git a/tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/common-password b/tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/common-password new file mode 100644 index 00000000..cb8c7b71 --- /dev/null +++ b/tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/common-password @@ -0,0 +1,33 @@ +# +# /etc/pam.d/common-password - password-related modules common to all services +# +# This file is included from other service-specific PAM config files, +# and should contain a list of modules that define the services to be +# used to change user passwords. The default is pam_unix. + +# Explanation of pam_unix options: +# +# The "sha512" option enables salted SHA512 passwords. Without this option, +# the default is Unix crypt. Prior releases used the option "md5". +# +# The "obscure" option replaces the old `OBSCURE_CHECKS_ENAB' option in +# login.defs. +# +# See the pam_unix manpage for other options. + +# As of pam 1.0.1-6, this file is managed by pam-auth-update by default. +# To take advantage of this, it is recommended that you configure any +# local modules either before or after the default block, and use +# pam-auth-update to manage selection of other modules. See +# pam-auth-update(8) for details. + +# here are the per-package modules (the "Primary" block) +password [success=1 default=ignore] pam_unix.so obscure sha512 +# here's the fallback if no module succeeds +password requisite pam_deny.so +# prime the stack with a positive return value if there isn't one already; +# this avoids us returning an error just because nothing sets a success code +# since the modules above will each just jump around +password required pam_permit.so +# and here are more per-package modules (the "Additional" block) +# end of pam-auth-update config diff --git a/tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/common-session b/tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/common-session new file mode 100644 index 00000000..4ad17292 --- /dev/null +++ b/tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/common-session @@ -0,0 +1,25 @@ +# +# /etc/pam.d/common-session - session-related modules common to all services +# +# This file is included from other service-specific PAM config files, +# and should contain a list of modules that define tasks to be performed +# at the start and end of sessions of *any* kind (both interactive and +# non-interactive). +# +# As of pam 1.0.1-6, this file is managed by pam-auth-update by default. +# To take advantage of this, it is recommended that you configure any +# local modules either before or after the default block, and use +# pam-auth-update to manage selection of other modules. See +# pam-auth-update(8) for details. + +# here are the per-package modules (the "Primary" block) +session [default=1] pam_permit.so +# here's the fallback if no module succeeds +session requisite pam_deny.so +# prime the stack with a positive return value if there isn't one already; +# this avoids us returning an error just because nothing sets a success code +# since the modules above will each just jump around +session required pam_permit.so +# and here are more per-package modules (the "Additional" block) +session required pam_unix.so +# end of pam-auth-update config diff --git a/tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/common-session-noninteractive b/tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/common-session-noninteractive new file mode 100644 index 00000000..c9144d54 --- /dev/null +++ b/tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/common-session-noninteractive @@ -0,0 +1,25 @@ +# +# /etc/pam.d/common-session-noninteractive - session-related modules +# common to all non-interactive services +# +# This file is included from other service-specific PAM config files, +# and should contain a list of modules that define tasks to be performed +# at the start and end of all non-interactive sessions. +# +# As of pam 1.0.1-6, this file is managed by pam-auth-update by default. +# To take advantage of this, it is recommended that you configure any +# local modules either before or after the default block, and use +# pam-auth-update to manage selection of other modules. See +# pam-auth-update(8) for details. + +# here are the per-package modules (the "Primary" block) +session [default=1] pam_permit.so +# here's the fallback if no module succeeds +session requisite pam_deny.so +# prime the stack with a positive return value if there isn't one already; +# this avoids us returning an error just because nothing sets a success code +# since the modules above will each just jump around +session required pam_permit.so +# and here are more per-package modules (the "Additional" block) +session required pam_unix.so +# end of pam-auth-update config diff --git a/tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/login b/tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/login new file mode 100644 index 00000000..f1e43b21 --- /dev/null +++ b/tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/login @@ -0,0 +1,107 @@ +# +# The PAM configuration file for the Shadow `login' service +# + +# Enforce a minimal delay in case of failure (in microseconds). +# (Replaces the `FAIL_DELAY' setting from login.defs) +# Note that other modules may require another minimal delay. (for example, +# to disable any delay, you should add the nodelay option to pam_unix) +auth optional pam_faildelay.so delay=3000000 + +# Outputs an issue file prior to each login prompt (Replaces the +# ISSUE_FILE option from login.defs). Uncomment for use +# auth required pam_issue.so issue=/etc/issue + +# Disallows root logins except on tty's listed in /etc/securetty +# (Replaces the `CONSOLE' setting from login.defs) +# +# With the default control of this module: +# [success=ok new_authtok_reqd=ok ignore=ignore user_unknown=bad default=die] +# root will not be prompted for a password on insecure lines. +# if an invalid username is entered, a password is prompted (but login +# will eventually be rejected) +# +# You can change it to a "requisite" module if you think root may mis-type +# her login and should not be prompted for a password in that case. But +# this will leave the system as vulnerable to user enumeration attacks. +# +# You can change it to a "required" module if you think it permits to +# guess valid user names of your system (invalid user names are considered +# as possibly being root on insecure lines), but root passwords may be +# communicated over insecure lines. +auth [success=ok new_authtok_reqd=ok ignore=ignore user_unknown=bad default=die] pam_securetty.so + +# Disallows other than root logins when /etc/nologin exists +# (Replaces the `NOLOGINS_FILE' option from login.defs) +auth requisite pam_nologin.so + +# SELinux needs to be the first session rule. This ensures that any +# lingering context has been cleared. Without out this it is possible +# that a module could execute code in the wrong domain. +# When the module is present, "required" would be sufficient (When SELinux +# is disabled, this returns success.) +session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so close + +# This module parses environment configuration file(s) +# and also allows you to use an extended config +# file /etc/security/pam_env.conf. +# +# parsing /etc/environment needs "readenv=1" +session required pam_env.so readenv=1 +# locale variables are also kept into /etc/default/locale in etch +# reading this file *in addition to /etc/environment* does not hurt +session required pam_env.so readenv=1 envfile=/etc/default/locale + +# Standard Un*x authentication. +@include common-auth + +# This allows certain extra groups to be granted to a user +# based on things like time of day, tty, service, and user. +# Please edit /etc/security/group.conf to fit your needs +# (Replaces the `CONSOLE_GROUPS' option in login.defs) +auth optional pam_group.so + +# Uncomment and edit /etc/security/time.conf if you need to set +# time restrainst on logins. +# (Replaces the `PORTTIME_CHECKS_ENAB' option from login.defs +# as well as /etc/porttime) +# account requisite pam_time.so + +# Uncomment and edit /etc/security/access.conf if you need to +# set access limits. +# (Replaces /etc/login.access file) +# account required pam_access.so + +# Sets up user limits according to /etc/security/limits.conf +# (Replaces the use of /etc/limits in old login) +session required pam_limits.so + +# Prints the last login info upon succesful login +# (Replaces the `LASTLOG_ENAB' option from login.defs) +session optional pam_lastlog.so + +# Prints the motd upon succesful login +# (Replaces the `MOTD_FILE' option in login.defs) +session optional pam_motd.so + +# Prints the status of the user's mailbox upon succesful login +# (Replaces the `MAIL_CHECK_ENAB' option from login.defs). +# +# This also defines the MAIL environment variable +# However, userdel also needs MAIL_DIR and MAIL_FILE variables +# in /etc/login.defs to make sure that removing a user +# also removes the user's mail spool file. +# See comments in /etc/login.defs +session optional pam_mail.so standard + +# Standard Un*x account and session +@include common-account +@include common-session +@include common-password + +# SELinux needs to intervene at login time to ensure that the process +# starts in the proper default security context. Only sessions which are +# intended to run in the user's context should be run after this. +session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so open +# When the module is present, "required" would be sufficient (When SELinux +# is disabled, this returns success.) diff --git a/tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/other b/tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/other new file mode 100644 index 00000000..59d776c9 --- /dev/null +++ b/tests/chroot/login/01_login_sublogin/config_chroot/etc/pam.d/other @@ -0,0 +1,16 @@ +# +# /etc/pam.d/other - specify the PAM fallback behaviour +# +# Note that this file is used for any unspecified service; for example +#if /etc/pam.d/cron specifies no session modules but cron calls +#pam_open_session, the session module out of /etc/pam.d/other is +#used. If you really want nothing to happen then use pam_permit.so or +#pam_deny.so as appropriate. + +# We fall back to the system default in /etc/pam.d/common-* +# + +@include common-auth +@include common-account +@include common-password +@include common-session diff --git a/tests/chroot/login/01_login_sublogin/config_chroot/etc/passwd b/tests/chroot/login/01_login_sublogin/config_chroot/etc/passwd new file mode 100644 index 00000000..9bdeb8ce --- /dev/null +++ b/tests/chroot/login/01_login_sublogin/config_chroot/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/login/01_login_sublogin/config_chroot/etc/securetty b/tests/chroot/login/01_login_sublogin/config_chroot/etc/securetty new file mode 100644 index 00000000..4d705440 --- /dev/null +++ b/tests/chroot/login/01_login_sublogin/config_chroot/etc/securetty @@ -0,0 +1,390 @@ +# /etc/securetty: list of terminals on which root is allowed to login. +# See securetty(5) and login(1). + +console + +# Local X displays (allows empty passwords with pam_unix's nullok_secure) +:0 +:0.0 +:0.1 +:1 +:1.0 +:1.1 +:2 +:2.0 +:2.1 +:3 +:3.0 +:3.1 +#... + + +# ========================================================== +# +# TTYs sorted by major number according to Documentation/devices.txt +# +# ========================================================== + +# Virtual consoles +tty1 +tty2 +tty3 +tty4 +tty5 +tty6 +tty7 +tty8 +tty9 +tty10 +tty11 +tty12 +tty13 +tty14 +tty15 +tty16 +tty17 +tty18 +tty19 +tty20 +tty21 +tty22 +tty23 +tty24 +tty25 +tty26 +tty27 +tty28 +tty29 +tty30 +tty31 +tty32 +tty33 +tty34 +tty35 +tty36 +tty37 +tty38 +tty39 +tty40 +tty41 +tty42 +tty43 +tty44 +tty45 +tty46 +tty47 +tty48 +tty49 +tty50 +tty51 +tty52 +tty53 +tty54 +tty55 +tty56 +tty57 +tty58 +tty59 +tty60 +tty61 +tty62 +tty63 + +# UART serial ports +ttyS0 +ttyS1 +ttyS2 +ttyS3 +ttyS4 +ttyS5 +#...ttyS191 + +# Serial Mux devices (Linux/PA-RISC only) +ttyB0 +ttyB1 +#... + +# Chase serial card +ttyH0 +ttyH1 +#... + +# Cyclades serial cards +ttyC0 +ttyC1 +#...ttyC31 + +# Digiboard serial cards +ttyD0 +ttyD1 +#... + +# Stallion serial cards +ttyE0 +ttyE1 +#...ttyE255 + +# Specialix serial cards +ttyX0 +ttyX1 +#... + +# Comtrol Rocketport serial cards +ttyR0 +ttyR1 +#... + +# SDL RISCom serial cards +ttyL0 +ttyL1 +#... + +# Hayes ESP serial card +ttyP0 +ttyP1 +#... + +# Computone IntelliPort II serial card +ttyF0 +ttyF1 +#...ttyF255 + +# Specialix IO8+ serial card +ttyW0 +ttyW1 +#... + +# Comtrol VS-1000 serial controller +ttyV0 +ttyV1 +#... + +# ISI serial card +ttyM0 +ttyM1 +#... + +# Technology Concepts serial card +ttyT0 +ttyT1 +#... + +# Specialix RIO serial card +ttySR0 +ttySR1 +#...ttySR511 + +# Chase Research AT/PCI-Fast serial card +ttyCH0 +ttyCH1 +#...ttyCH63 + +# Moxa Intellio serial card +ttyMX0 +ttyMX1 +#...ttyMX127 + +# SmartIO serial card +ttySI0 +ttySI1 +#... + +# USB dongles +ttyUSB0 +ttyUSB1 +ttyUSB2 +#... + +# LinkUp Systems L72xx UARTs +ttyLU0 +ttyLU1 +ttyLU2 +ttyLU3 + +# StrongARM builtin serial ports +ttySA0 +ttySA1 +ttySA2 + +# SCI serial port (SuperH) ports and SC26xx serial ports +ttySC0 +ttySC1 +ttySC2 +ttySC3 + +# ARM "AMBA" serial ports +ttyAM0 +ttyAM1 +ttyAM2 +ttyAM3 +ttyAM4 +ttyAM5 +ttyAM6 +ttyAM7 +ttyAM8 +ttyAM9 +ttyAM10 +ttyAM11 +ttyAM12 +ttyAM13 +ttyAM14 +ttyAM15 + +# Embedded ARM AMBA PL011 ports (e.g. emulated by QEMU) +ttyAMA0 +ttyAMA1 +ttyAMA2 +ttyAMA3 + +# DataBooster serial ports +ttyDB0 +ttyDB1 +ttyDB2 +ttyDB3 +ttyDB4 +ttyDB5 +ttyDB6 +ttyDB7 + +# SGI Altix console ports +ttySG0 + +# Motorola i.MX ports +ttySMX0 +ttySMX1 +ttySMX2 + +# Marvell MPSC ports +ttyMM0 +ttyMM1 + +# PPC CPM (SCC or SMC) ports +ttyCPM0 +ttyCPM1 +ttyCPM2 +ttyCPM3 +ttyCPM4 +ttyCPM5 + +# Altix serial cards +ttyIOC0 +ttyIOC1 +#...ttyIOC31 + +# NEC VR4100 series SIU +ttyVR0 + +# NEC VR4100 series SSIU +ttyVR1 + +# Altix ioc4 serial cards +ttyIOC84 +ttyIOC85 +#...ttyIOC115 + +# Altix ioc3 serial cards +ttySIOC0 +ttySIOC1 +#...ttySIOC31 + +# PPC PSC ports +ttyPSC0 +ttyPSC1 +ttyPSC2 +ttyPSC3 +ttyPSC4 +ttyPSC5 + +# ATMEL serial ports +ttyAT0 +ttyAT1 +#...ttyAT15 + +# Hilscher netX serial port +ttyNX0 +ttyNX1 +#...ttyNX15 + +# Xilinx uartlite - port +ttyUL0 +ttyUL1 +ttyUL2 +ttyUL3 + +# Xen virtual console - port 0 +xvc0 + +# pmac_zilog - port +ttyPZ0 +ttyPZ1 +ttyPZ2 +ttyPZ3 + +# TX39/49 serial port +ttyTX0 +ttyTX1 +ttyTX2 +ttyTX3 +ttyTX4 +ttyTX5 +ttyTX6 +ttyTX7 + +# SC26xx serial ports (see SCI serial ports (SuperH)) + +# MAX3100 serial ports +ttyMAX0 +ttyMAX1 +ttyMAX2 +ttyMAX3 + +# OMAP serial ports +ttyO0 +ttyO1 +ttyO2 +ttyO3 + +# User space serial ports +ttyU0 +ttyU1 + +# A2232 serial card +ttyY0 +ttyY1 + +# IBM 3270 terminal Unix tty access +3270/tty1 +3270/tty2 +#... + +# IBM iSeries/pSeries virtual console +hvc0 +hvc1 +#... +#IBM pSeries console ports +hvsi0 +hvsi1 +hvsi2 + +# Equinox SST multi-port serial boards +ttyEQ0 +ttyEQ1 +#...ttyEQ1027 + +# ========================================================== +# +# Not in Documentation/Devicess.txt +# +# ========================================================== + +# Embedded Freescale i.MX ports +ttymxc0 +ttymxc1 +ttymxc2 +ttymxc3 +ttymxc4 +ttymxc5 + +# Serial Console for MIPS Swarm +duart0 +duart1 diff --git a/tests/chroot/login/01_login_sublogin/config_chroot/etc/security/limits.conf b/tests/chroot/login/01_login_sublogin/config_chroot/etc/security/limits.conf new file mode 100644 index 00000000..e69de29b diff --git a/tests/chroot/login/01_login_sublogin/config_chroot/etc/shadow b/tests/chroot/login/01_login_sublogin/config_chroot/etc/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chroot/login/01_login_sublogin/config_chroot/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/login/01_login_sublogin/login.exp b/tests/chroot/login/01_login_sublogin/login.exp new file mode 100755 index 00000000..86253bcf --- /dev/null +++ b/tests/chroot/login/01_login_sublogin/login.exp @@ -0,0 +1,25 @@ +#!/usr/bin/expect + +set timeout 10 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/bash +expect "# " + +send "strace -s 1000 -o /tmp/login.strace login\r" +expect " login: " +send "myuser\r" +expect "Password: " +send "myuserF00barbaz\r" +expect "Password: " +send "myuserF00barbaz\r" +expect "$ " + +send "# expect uid=424242(myuser) gid=424242(myuser) groups=424242(myuser)\r" +expect "$ " +send "id\r" +expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser)\r" +expect "$ " +send "exit\r" + +exit 0 diff --git a/tests/chroot/login/01_login_sublogin/login.test b/tests/chroot/login/01_login_sublogin/login.test new file mode 100755 index 00000000..f5d271ba --- /dev/null +++ b/tests/chroot/login/01_login_sublogin/login.test @@ -0,0 +1,33 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +testname=$(basename $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "try regular login with user prompt" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +usermod -d $PWD/tmp/root myuser + +prepare_chroot + +./login.exp +echo + +clean_chroot + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chroot/pwck/01_pwck--root/config.txt b/tests/chroot/pwck/01_pwck--root/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/chroot/pwck/01_pwck--root/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/chroot/pwck/01_pwck--root/config/etc/default/useradd b/tests/chroot/pwck/01_pwck--root/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/chroot/pwck/01_pwck--root/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/pwck/01_pwck--root/config/etc/group b/tests/chroot/pwck/01_pwck--root/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/chroot/pwck/01_pwck--root/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/chroot/pwck/01_pwck--root/config/etc/gshadow b/tests/chroot/pwck/01_pwck--root/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/chroot/pwck/01_pwck--root/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/chroot/pwck/01_pwck--root/config/etc/passwd b/tests/chroot/pwck/01_pwck--root/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/chroot/pwck/01_pwck--root/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/chroot/pwck/01_pwck--root/config/etc/shadow b/tests/chroot/pwck/01_pwck--root/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/chroot/pwck/01_pwck--root/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/chroot/pwck/01_pwck--root/config_chroot/etc/group b/tests/chroot/pwck/01_pwck--root/config_chroot/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chroot/pwck/01_pwck--root/config_chroot/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chroot/pwck/01_pwck--root/config_chroot/etc/gshadow b/tests/chroot/pwck/01_pwck--root/config_chroot/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chroot/pwck/01_pwck--root/config_chroot/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/pwck/01_pwck--root/config_chroot/etc/login.defs b/tests/chroot/pwck/01_pwck--root/config_chroot/etc/login.defs new file mode 100644 index 00000000..7b70c90e --- /dev/null +++ b/tests/chroot/pwck/01_pwck--root/config_chroot/etc/login.defs @@ -0,0 +1,335 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, such as Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/pwck/01_pwck--root/config_chroot/etc/passwd b/tests/chroot/pwck/01_pwck--root/config_chroot/etc/passwd new file mode 100644 index 00000000..76c6fc38 --- /dev/null +++ b/tests/chroot/pwck/01_pwck--root/config_chroot/etc/passwd @@ -0,0 +1,23 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash +testsuite::424244:424244::/home:/bin/bash +testsuite1::424243:424243::/home:/bin/bash diff --git a/tests/chroot/pwck/01_pwck--root/config_chroot/etc/shadow b/tests/chroot/pwck/01_pwck--root/config_chroot/etc/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chroot/pwck/01_pwck--root/config_chroot/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/pwck/01_pwck--root/data/pwck.out b/tests/chroot/pwck/01_pwck--root/data/pwck.out new file mode 100644 index 00000000..92a56706 --- /dev/null +++ b/tests/chroot/pwck/01_pwck--root/data/pwck.out @@ -0,0 +1,59 @@ +user 'root': program '/bin/bash' does not exist +user 'daemon': directory '/usr/sbin' does not exist +user 'daemon': program '/bin/sh' does not exist +user 'bin': directory '/bin' does not exist +user 'bin': program '/bin/sh' does not exist +user 'sys': directory '/dev' does not exist +user 'sys': program '/bin/sh' does not exist +user 'sync': directory '/bin' does not exist +user 'sync': program '/bin/sync' does not exist +user 'games': directory '/usr/games' does not exist +user 'games': program '/bin/sh' does not exist +user 'man': directory '/var/cache/man' does not exist +user 'man': program '/bin/sh' does not exist +user 'lp': directory '/var/spool/lpd' does not exist +user 'lp': program '/bin/sh' does not exist +user 'mail': directory '/var/mail' does not exist +user 'mail': program '/bin/sh' does not exist +user 'news': directory '/var/spool/news' does not exist +user 'news': program '/bin/sh' does not exist +user 'uucp': directory '/var/spool/uucp' does not exist +user 'uucp': program '/bin/sh' does not exist +user 'proxy': directory '/bin' does not exist +user 'proxy': program '/bin/sh' does not exist +user 'www-data': directory '/var/www' does not exist +user 'www-data': program '/bin/sh' does not exist +user 'backup': directory '/var/backups' does not exist +user 'backup': program '/bin/sh' does not exist +user 'list': directory '/var/list' does not exist +user 'list': program '/bin/sh' does not exist +user 'irc': directory '/var/run/ircd' does not exist +user 'irc': program '/bin/sh' does not exist +user 'gnats': directory '/var/lib/gnats' does not exist +user 'gnats': program '/bin/sh' does not exist +user 'nobody': directory '/nonexistent' does not exist +user 'nobody': program '/bin/sh' does not exist +user 'Debian-exim': directory '/var/spool/exim4' does not exist +user 'Debian-exim': program '/bin/false' does not exist +user 'myuser': directory '/home/' does not exist +user 'myuser': program '/bin/sh' does not exist +duplicate password entry +delete line 'testsuite::424243:424243::/home:/bin/bash'? No +user 'testsuite': no group 424243 +user 'testsuite': directory '/home' does not exist +user 'testsuite': program '/bin/bash' does not exist +no matching password file entry in /etc/shadow +add user 'testsuite' in /etc/shadow? No +duplicate password entry +delete line 'testsuite::424244:424244::/home:/bin/bash'? No +user 'testsuite': no group 424244 +user 'testsuite': directory '/home' does not exist +user 'testsuite': program '/bin/bash' does not exist +no matching password file entry in /etc/shadow +add user 'testsuite' in /etc/shadow? No +user 'testsuite1': no group 424243 +user 'testsuite1': directory '/home' does not exist +user 'testsuite1': program '/bin/bash' does not exist +no matching password file entry in /etc/shadow +add user 'testsuite1' in /etc/shadow? No +pwck: no changes diff --git a/tests/chroot/pwck/01_pwck--root/pwck.test b/tests/chroot/pwck/01_pwck--root/pwck.test new file mode 100755 index 00000000..25cba9f0 --- /dev/null +++ b/tests/chroot/pwck/01_pwck--root/pwck.test @@ -0,0 +1,67 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "pwck can change a chroot" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; clean_chroot; restore_config' 0 + +change_config + +prepare_chroot + +echo -n "pwck in a chroot (pwck --read-only --root $PWD/tmp/root)..." +pwck --read-only --root $PWD/tmp/root >tmp/pwck.out && exit 1 || { + status=$? +} +echo "OK" + +echo -n "Check returned status ($status)..." +test "$status" = "2" +echo "OK" + +echo "pwck reported:" +echo "=======================================================================" +cat tmp/pwck.out +echo "=======================================================================" +echo -n "Check that there were a failure message..." +diff -au data/pwck.out tmp/pwck.out +echo "error message OK." +rm -f tmp/pwck.out + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl config_chroot/etc/passwd tmp/root/etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl config_chroot/etc/group tmp/root/etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +../../../common/compare_file.pl config_chroot/etc/shadow tmp/root/etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +../../../common/compare_file.pl config_chroot/etc/gshadow tmp/root/etc/gshadow +echo "OK" + +rm -f tmp/root/etc/.pwd.lock +rm -f tmp/root/etc/passwd- +rm -f tmp/root/etc/group- +rm -f tmp/root/etc/shadow- +rm -f tmp/root/etc/gshadow- +clean_chroot + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chroot/pwconv/01_pwconv--root/config.txt b/tests/chroot/pwconv/01_pwconv--root/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/chroot/pwconv/01_pwconv--root/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/chroot/pwconv/01_pwconv--root/config/etc/default/useradd b/tests/chroot/pwconv/01_pwconv--root/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/chroot/pwconv/01_pwconv--root/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/pwconv/01_pwconv--root/config/etc/group b/tests/chroot/pwconv/01_pwconv--root/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/chroot/pwconv/01_pwconv--root/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/chroot/pwconv/01_pwconv--root/config/etc/gshadow b/tests/chroot/pwconv/01_pwconv--root/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/chroot/pwconv/01_pwconv--root/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/chroot/pwconv/01_pwconv--root/config/etc/passwd b/tests/chroot/pwconv/01_pwconv--root/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/chroot/pwconv/01_pwconv--root/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/chroot/pwconv/01_pwconv--root/config/etc/shadow b/tests/chroot/pwconv/01_pwconv--root/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/chroot/pwconv/01_pwconv--root/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/chroot/pwconv/01_pwconv--root/config_chroot/etc/group b/tests/chroot/pwconv/01_pwconv--root/config_chroot/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chroot/pwconv/01_pwconv--root/config_chroot/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chroot/pwconv/01_pwconv--root/config_chroot/etc/gshadow b/tests/chroot/pwconv/01_pwconv--root/config_chroot/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chroot/pwconv/01_pwconv--root/config_chroot/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/pwconv/01_pwconv--root/config_chroot/etc/login.defs b/tests/chroot/pwconv/01_pwconv--root/config_chroot/etc/login.defs new file mode 100644 index 00000000..7b70c90e --- /dev/null +++ b/tests/chroot/pwconv/01_pwconv--root/config_chroot/etc/login.defs @@ -0,0 +1,335 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, such as Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/pwconv/01_pwconv--root/config_chroot/etc/passwd b/tests/chroot/pwconv/01_pwconv--root/config_chroot/etc/passwd new file mode 100644 index 00000000..1a85284e --- /dev/null +++ b/tests/chroot/pwconv/01_pwconv--root/config_chroot/etc/passwd @@ -0,0 +1,21 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:0:0:root:/root:/bin/bash +daemon:*:1:1:daemon:/usr/sbin:/bin/sh +bin:*:2:2:bin:/bin:/bin/sh +sys:*:3:3:sys:/dev:/bin/sh +sync:*:4:65534:sync:/bin:/bin/sync +games:*:5:60:games:/usr/games:/bin/sh +man:*:6:12:man:/var/cache/man:/bin/sh +lp:*:7:7:lp:/var/spool/lpd:/bin/sh +mail:*:8:8:mail:/var/mail:/bin/sh +news:*:9:9:news:/var/spool/news:/bin/sh +uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:*:13:13:proxy:/bin:/bin/sh +www-data:*:33:33:www-data:/var/www:/bin/sh +backup:*:34:34:backup:/var/backups:/bin/sh +list:*:38:38:Mailing List Manager:/var/list:/bin/sh +irc:*:39:39:ircd:/var/run/ircd:/bin/sh +gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:*:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:!:102:102::/var/spool/exim4:/bin/false +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/pwconv/01_pwconv--root/data/passwd b/tests/chroot/pwconv/01_pwconv--root/data/passwd new file mode 100644 index 00000000..89b69625 --- /dev/null +++ b/tests/chroot/pwconv/01_pwconv--root/data/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite:x:424243:424243::/home:/bin/bash diff --git a/tests/chroot/pwconv/01_pwconv--root/data/shadow b/tests/chroot/pwconv/01_pwconv--root/data/shadow new file mode 100644 index 00000000..38bf30c5 --- /dev/null +++ b/tests/chroot/pwconv/01_pwconv--root/data/shadow @@ -0,0 +1,21 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:@TODAY@:0:99999:7::: +daemon:*:@TODAY@:0:99999:7::: +bin:*:@TODAY@:0:99999:7::: +sys:*:@TODAY@:0:99999:7::: +sync:*:@TODAY@:0:99999:7::: +games:*:@TODAY@:0:99999:7::: +man:*:@TODAY@:0:99999:7::: +lp:*:@TODAY@:0:99999:7::: +mail:*:@TODAY@:0:99999:7::: +news:*:@TODAY@:0:99999:7::: +uucp:*:@TODAY@:0:99999:7::: +proxy:*:@TODAY@:0:99999:7::: +www-data:*:@TODAY@:0:99999:7::: +backup:*:@TODAY@:0:99999:7::: +list:*:@TODAY@:0:99999:7::: +irc:*:@TODAY@:0:99999:7::: +gnats:*:@TODAY@:0:99999:7::: +nobody:*:@TODAY@:0:99999:7::: +Debian-exim:!:@TODAY@:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:@TODAY@:0:99999:7::: +testsuite::@TODAY@:0:99999:7::: diff --git a/tests/chroot/pwconv/01_pwconv--root/pwconv.test b/tests/chroot/pwconv/01_pwconv--root/pwconv.test new file mode 100755 index 00000000..3b92ab4b --- /dev/null +++ b/tests/chroot/pwconv/01_pwconv--root/pwconv.test @@ -0,0 +1,50 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "pwconv can change a chroot" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; clean_chroot; restore_config' 0 + +change_config + +prepare_chroot + +echo -n "pwconv in a chroot (pwconv --root $PWD/tmp/root)..." +pwconv --root $PWD/tmp/root +echo "OK" + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl data/passwd tmp/root/etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl config_chroot/etc/group tmp/root/etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +../../../common/compare_file.pl data/shadow tmp/root/etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +../../../common/compare_file.pl config_chroot/etc/gshadow tmp/root/etc/gshadow +echo "OK" + +rm -f tmp/root/etc/.pwd.lock +rm -f tmp/root/etc/passwd- +rm -f tmp/root/etc/shadow +clean_chroot + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chroot/pwunconv/01_pwunconv--root/config.txt b/tests/chroot/pwunconv/01_pwunconv--root/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/chroot/pwunconv/01_pwunconv--root/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/chroot/pwunconv/01_pwunconv--root/config/etc/default/useradd b/tests/chroot/pwunconv/01_pwunconv--root/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/chroot/pwunconv/01_pwunconv--root/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/pwunconv/01_pwunconv--root/config/etc/group b/tests/chroot/pwunconv/01_pwunconv--root/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/chroot/pwunconv/01_pwunconv--root/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/chroot/pwunconv/01_pwunconv--root/config/etc/gshadow b/tests/chroot/pwunconv/01_pwunconv--root/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/chroot/pwunconv/01_pwunconv--root/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/chroot/pwunconv/01_pwunconv--root/config/etc/passwd b/tests/chroot/pwunconv/01_pwunconv--root/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/chroot/pwunconv/01_pwunconv--root/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/chroot/pwunconv/01_pwunconv--root/config/etc/shadow b/tests/chroot/pwunconv/01_pwunconv--root/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/chroot/pwunconv/01_pwunconv--root/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/chroot/pwunconv/01_pwunconv--root/config_chroot/etc/group b/tests/chroot/pwunconv/01_pwunconv--root/config_chroot/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chroot/pwunconv/01_pwunconv--root/config_chroot/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chroot/pwunconv/01_pwunconv--root/config_chroot/etc/gshadow b/tests/chroot/pwunconv/01_pwunconv--root/config_chroot/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chroot/pwunconv/01_pwunconv--root/config_chroot/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/pwunconv/01_pwunconv--root/config_chroot/etc/login.defs b/tests/chroot/pwunconv/01_pwunconv--root/config_chroot/etc/login.defs new file mode 100644 index 00000000..7b70c90e --- /dev/null +++ b/tests/chroot/pwunconv/01_pwunconv--root/config_chroot/etc/login.defs @@ -0,0 +1,335 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, such as Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/pwunconv/01_pwunconv--root/config_chroot/etc/passwd b/tests/chroot/pwunconv/01_pwunconv--root/config_chroot/etc/passwd new file mode 100644 index 00000000..9bdeb8ce --- /dev/null +++ b/tests/chroot/pwunconv/01_pwunconv--root/config_chroot/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/pwunconv/01_pwunconv--root/config_chroot/etc/shadow b/tests/chroot/pwunconv/01_pwunconv--root/config_chroot/etc/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chroot/pwunconv/01_pwunconv--root/config_chroot/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/pwunconv/01_pwunconv--root/data/passwd b/tests/chroot/pwunconv/01_pwunconv--root/data/passwd new file mode 100644 index 00000000..1a85284e --- /dev/null +++ b/tests/chroot/pwunconv/01_pwunconv--root/data/passwd @@ -0,0 +1,21 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:0:0:root:/root:/bin/bash +daemon:*:1:1:daemon:/usr/sbin:/bin/sh +bin:*:2:2:bin:/bin:/bin/sh +sys:*:3:3:sys:/dev:/bin/sh +sync:*:4:65534:sync:/bin:/bin/sync +games:*:5:60:games:/usr/games:/bin/sh +man:*:6:12:man:/var/cache/man:/bin/sh +lp:*:7:7:lp:/var/spool/lpd:/bin/sh +mail:*:8:8:mail:/var/mail:/bin/sh +news:*:9:9:news:/var/spool/news:/bin/sh +uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:*:13:13:proxy:/bin:/bin/sh +www-data:*:33:33:www-data:/var/www:/bin/sh +backup:*:34:34:backup:/var/backups:/bin/sh +list:*:38:38:Mailing List Manager:/var/list:/bin/sh +irc:*:39:39:ircd:/var/run/ircd:/bin/sh +gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:*:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:!:102:102::/var/spool/exim4:/bin/false +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/pwunconv/01_pwunconv--root/pwunconv.test b/tests/chroot/pwunconv/01_pwunconv--root/pwunconv.test new file mode 100755 index 00000000..60c25529 --- /dev/null +++ b/tests/chroot/pwunconv/01_pwunconv--root/pwunconv.test @@ -0,0 +1,52 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "pwunconv can change a chroot" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; clean_chroot; restore_config' 0 + +change_config + +prepare_chroot + +echo -n "pwunconv in a chroot (pwunconv --root $PWD/tmp/root)..." +pwunconv --root $PWD/tmp/root +echo "OK" + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl data/passwd tmp/root/etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl config_chroot/etc/group tmp/root/etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +test ! -f tmp/root/etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +../../../common/compare_file.pl config_chroot/etc/gshadow tmp/root/etc/gshadow +echo "OK" + +rm -f tmp/root/etc/.pwd.lock +rm -f tmp/root/etc/passwd- +rm -f tmp/root/etc/group- +rm -f tmp/root/etc/shadow- +rm -f tmp/root/etc/gshadow- +clean_chroot + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chroot/useradd/01_useradd--root/config.txt b/tests/chroot/useradd/01_useradd--root/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/chroot/useradd/01_useradd--root/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/chroot/useradd/01_useradd--root/config/etc/default/useradd b/tests/chroot/useradd/01_useradd--root/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/chroot/useradd/01_useradd--root/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/useradd/01_useradd--root/config/etc/group b/tests/chroot/useradd/01_useradd--root/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/chroot/useradd/01_useradd--root/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/chroot/useradd/01_useradd--root/config/etc/gshadow b/tests/chroot/useradd/01_useradd--root/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/chroot/useradd/01_useradd--root/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/chroot/useradd/01_useradd--root/config/etc/passwd b/tests/chroot/useradd/01_useradd--root/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/chroot/useradd/01_useradd--root/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/chroot/useradd/01_useradd--root/config/etc/shadow b/tests/chroot/useradd/01_useradd--root/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/chroot/useradd/01_useradd--root/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/chroot/useradd/01_useradd--root/config_chroot/etc/group b/tests/chroot/useradd/01_useradd--root/config_chroot/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chroot/useradd/01_useradd--root/config_chroot/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chroot/useradd/01_useradd--root/config_chroot/etc/gshadow b/tests/chroot/useradd/01_useradd--root/config_chroot/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chroot/useradd/01_useradd--root/config_chroot/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/useradd/01_useradd--root/config_chroot/etc/login.defs b/tests/chroot/useradd/01_useradd--root/config_chroot/etc/login.defs new file mode 100644 index 00000000..7b70c90e --- /dev/null +++ b/tests/chroot/useradd/01_useradd--root/config_chroot/etc/login.defs @@ -0,0 +1,335 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, such as Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/useradd/01_useradd--root/config_chroot/etc/passwd b/tests/chroot/useradd/01_useradd--root/config_chroot/etc/passwd new file mode 100644 index 00000000..9bdeb8ce --- /dev/null +++ b/tests/chroot/useradd/01_useradd--root/config_chroot/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/useradd/01_useradd--root/config_chroot/etc/shadow b/tests/chroot/useradd/01_useradd--root/config_chroot/etc/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chroot/useradd/01_useradd--root/config_chroot/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/useradd/01_useradd--root/data/group b/tests/chroot/useradd/01_useradd--root/data/group new file mode 100644 index 00000000..ffc452fd --- /dev/null +++ b/tests/chroot/useradd/01_useradd--root/data/group @@ -0,0 +1,43 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: +foo:x:1000: diff --git a/tests/chroot/useradd/01_useradd--root/data/gshadow b/tests/chroot/useradd/01_useradd--root/data/gshadow new file mode 100644 index 00000000..e4b350df --- /dev/null +++ b/tests/chroot/useradd/01_useradd--root/data/gshadow @@ -0,0 +1,43 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: +foo:!:: diff --git a/tests/chroot/useradd/01_useradd--root/data/passwd b/tests/chroot/useradd/01_useradd--root/data/passwd new file mode 100644 index 00000000..102186a6 --- /dev/null +++ b/tests/chroot/useradd/01_useradd--root/data/passwd @@ -0,0 +1,22 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash +foo:x:1000:1000::/home/foo: diff --git a/tests/chroot/useradd/01_useradd--root/data/shadow b/tests/chroot/useradd/01_useradd--root/data/shadow new file mode 100644 index 00000000..258cf2b9 --- /dev/null +++ b/tests/chroot/useradd/01_useradd--root/data/shadow @@ -0,0 +1,21 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +foo:!:@TODAY@:0:99999:7::: diff --git a/tests/chroot/useradd/01_useradd--root/useradd.test b/tests/chroot/useradd/01_useradd--root/useradd.test new file mode 100755 index 00000000..aa9dd35a --- /dev/null +++ b/tests/chroot/useradd/01_useradd--root/useradd.test @@ -0,0 +1,52 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "useradd can add an user in a chroot" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; clean_chroot; restore_config' 0 + +change_config + +prepare_chroot + +echo -n "Add user foo in chroot (useradd --root $PWD/tmp/root foo)..." +useradd --root $PWD/tmp/root foo +echo "OK" + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl data/passwd tmp/root/etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl data/group tmp/root/etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +../../../common/compare_file.pl data/shadow tmp/root/etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +../../../common/compare_file.pl data/gshadow tmp/root/etc/gshadow +echo "OK" + +rm -f tmp/root/etc/.pwd.lock +rm -f tmp/root/etc/passwd- +rm -f tmp/root/etc/group- +rm -f tmp/root/etc/shadow- +rm -f tmp/root/etc/gshadow- +clean_chroot + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chroot/useradd/02_useradd--root_login.defs/config.txt b/tests/chroot/useradd/02_useradd--root_login.defs/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/chroot/useradd/02_useradd--root_login.defs/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/chroot/useradd/02_useradd--root_login.defs/config/etc/default/useradd b/tests/chroot/useradd/02_useradd--root_login.defs/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/chroot/useradd/02_useradd--root_login.defs/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/useradd/02_useradd--root_login.defs/config/etc/group b/tests/chroot/useradd/02_useradd--root_login.defs/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/chroot/useradd/02_useradd--root_login.defs/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/chroot/useradd/02_useradd--root_login.defs/config/etc/gshadow b/tests/chroot/useradd/02_useradd--root_login.defs/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/chroot/useradd/02_useradd--root_login.defs/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/chroot/useradd/02_useradd--root_login.defs/config/etc/passwd b/tests/chroot/useradd/02_useradd--root_login.defs/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/chroot/useradd/02_useradd--root_login.defs/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/chroot/useradd/02_useradd--root_login.defs/config/etc/shadow b/tests/chroot/useradd/02_useradd--root_login.defs/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/chroot/useradd/02_useradd--root_login.defs/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/chroot/useradd/02_useradd--root_login.defs/config_chroot/etc/group b/tests/chroot/useradd/02_useradd--root_login.defs/config_chroot/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chroot/useradd/02_useradd--root_login.defs/config_chroot/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chroot/useradd/02_useradd--root_login.defs/config_chroot/etc/gshadow b/tests/chroot/useradd/02_useradd--root_login.defs/config_chroot/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chroot/useradd/02_useradd--root_login.defs/config_chroot/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/useradd/02_useradd--root_login.defs/config_chroot/etc/login.defs b/tests/chroot/useradd/02_useradd--root_login.defs/config_chroot/etc/login.defs new file mode 100644 index 00000000..e2291282 --- /dev/null +++ b/tests/chroot/useradd/02_useradd--root_login.defs/config_chroot/etc/login.defs @@ -0,0 +1,335 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 2000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1500 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, such as Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/useradd/02_useradd--root_login.defs/config_chroot/etc/passwd b/tests/chroot/useradd/02_useradd--root_login.defs/config_chroot/etc/passwd new file mode 100644 index 00000000..9bdeb8ce --- /dev/null +++ b/tests/chroot/useradd/02_useradd--root_login.defs/config_chroot/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/useradd/02_useradd--root_login.defs/config_chroot/etc/shadow b/tests/chroot/useradd/02_useradd--root_login.defs/config_chroot/etc/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chroot/useradd/02_useradd--root_login.defs/config_chroot/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/useradd/02_useradd--root_login.defs/data/group b/tests/chroot/useradd/02_useradd--root_login.defs/data/group new file mode 100644 index 00000000..eb04ceda --- /dev/null +++ b/tests/chroot/useradd/02_useradd--root_login.defs/data/group @@ -0,0 +1,43 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: +foo:x:2000: diff --git a/tests/chroot/useradd/02_useradd--root_login.defs/data/gshadow b/tests/chroot/useradd/02_useradd--root_login.defs/data/gshadow new file mode 100644 index 00000000..e4b350df --- /dev/null +++ b/tests/chroot/useradd/02_useradd--root_login.defs/data/gshadow @@ -0,0 +1,43 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: +foo:!:: diff --git a/tests/chroot/useradd/02_useradd--root_login.defs/data/passwd b/tests/chroot/useradd/02_useradd--root_login.defs/data/passwd new file mode 100644 index 00000000..25d10d6a --- /dev/null +++ b/tests/chroot/useradd/02_useradd--root_login.defs/data/passwd @@ -0,0 +1,22 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash +foo:x:2000:2000::/home/foo: diff --git a/tests/chroot/useradd/02_useradd--root_login.defs/data/shadow b/tests/chroot/useradd/02_useradd--root_login.defs/data/shadow new file mode 100644 index 00000000..258cf2b9 --- /dev/null +++ b/tests/chroot/useradd/02_useradd--root_login.defs/data/shadow @@ -0,0 +1,21 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +foo:!:@TODAY@:0:99999:7::: diff --git a/tests/chroot/useradd/02_useradd--root_login.defs/useradd.test b/tests/chroot/useradd/02_useradd--root_login.defs/useradd.test new file mode 100755 index 00000000..aa9dd35a --- /dev/null +++ b/tests/chroot/useradd/02_useradd--root_login.defs/useradd.test @@ -0,0 +1,52 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "useradd can add an user in a chroot" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; clean_chroot; restore_config' 0 + +change_config + +prepare_chroot + +echo -n "Add user foo in chroot (useradd --root $PWD/tmp/root foo)..." +useradd --root $PWD/tmp/root foo +echo "OK" + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl data/passwd tmp/root/etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl data/group tmp/root/etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +../../../common/compare_file.pl data/shadow tmp/root/etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +../../../common/compare_file.pl data/gshadow tmp/root/etc/gshadow +echo "OK" + +rm -f tmp/root/etc/.pwd.lock +rm -f tmp/root/etc/passwd- +rm -f tmp/root/etc/group- +rm -f tmp/root/etc/shadow- +rm -f tmp/root/etc/gshadow- +clean_chroot + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chroot/useradd/03_useradd--root_useradd.default/config.txt b/tests/chroot/useradd/03_useradd--root_useradd.default/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/chroot/useradd/03_useradd--root_useradd.default/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/chroot/useradd/03_useradd--root_useradd.default/config/etc/default/useradd b/tests/chroot/useradd/03_useradd--root_useradd.default/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/chroot/useradd/03_useradd--root_useradd.default/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/useradd/03_useradd--root_useradd.default/config/etc/group b/tests/chroot/useradd/03_useradd--root_useradd.default/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/chroot/useradd/03_useradd--root_useradd.default/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/chroot/useradd/03_useradd--root_useradd.default/config/etc/gshadow b/tests/chroot/useradd/03_useradd--root_useradd.default/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/chroot/useradd/03_useradd--root_useradd.default/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/chroot/useradd/03_useradd--root_useradd.default/config/etc/passwd b/tests/chroot/useradd/03_useradd--root_useradd.default/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/chroot/useradd/03_useradd--root_useradd.default/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/chroot/useradd/03_useradd--root_useradd.default/config/etc/shadow b/tests/chroot/useradd/03_useradd--root_useradd.default/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/chroot/useradd/03_useradd--root_useradd.default/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/chroot/useradd/03_useradd--root_useradd.default/config_chroot/etc/default/useradd b/tests/chroot/useradd/03_useradd--root_useradd.default/config_chroot/etc/default/useradd new file mode 100644 index 00000000..5051e1d9 --- /dev/null +++ b/tests/chroot/useradd/03_useradd--root_useradd.default/config_chroot/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/sh +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/useradd/03_useradd--root_useradd.default/config_chroot/etc/group b/tests/chroot/useradd/03_useradd--root_useradd.default/config_chroot/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chroot/useradd/03_useradd--root_useradd.default/config_chroot/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chroot/useradd/03_useradd--root_useradd.default/config_chroot/etc/gshadow b/tests/chroot/useradd/03_useradd--root_useradd.default/config_chroot/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chroot/useradd/03_useradd--root_useradd.default/config_chroot/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/useradd/03_useradd--root_useradd.default/config_chroot/etc/login.defs b/tests/chroot/useradd/03_useradd--root_useradd.default/config_chroot/etc/login.defs new file mode 100644 index 00000000..7b70c90e --- /dev/null +++ b/tests/chroot/useradd/03_useradd--root_useradd.default/config_chroot/etc/login.defs @@ -0,0 +1,335 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, such as Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/useradd/03_useradd--root_useradd.default/config_chroot/etc/passwd b/tests/chroot/useradd/03_useradd--root_useradd.default/config_chroot/etc/passwd new file mode 100644 index 00000000..9bdeb8ce --- /dev/null +++ b/tests/chroot/useradd/03_useradd--root_useradd.default/config_chroot/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/useradd/03_useradd--root_useradd.default/config_chroot/etc/shadow b/tests/chroot/useradd/03_useradd--root_useradd.default/config_chroot/etc/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chroot/useradd/03_useradd--root_useradd.default/config_chroot/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/useradd/03_useradd--root_useradd.default/data/group b/tests/chroot/useradd/03_useradd--root_useradd.default/data/group new file mode 100644 index 00000000..ffc452fd --- /dev/null +++ b/tests/chroot/useradd/03_useradd--root_useradd.default/data/group @@ -0,0 +1,43 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: +foo:x:1000: diff --git a/tests/chroot/useradd/03_useradd--root_useradd.default/data/gshadow b/tests/chroot/useradd/03_useradd--root_useradd.default/data/gshadow new file mode 100644 index 00000000..e4b350df --- /dev/null +++ b/tests/chroot/useradd/03_useradd--root_useradd.default/data/gshadow @@ -0,0 +1,43 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: +foo:!:: diff --git a/tests/chroot/useradd/03_useradd--root_useradd.default/data/passwd b/tests/chroot/useradd/03_useradd--root_useradd.default/data/passwd new file mode 100644 index 00000000..22fa7447 --- /dev/null +++ b/tests/chroot/useradd/03_useradd--root_useradd.default/data/passwd @@ -0,0 +1,22 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash +foo:x:1000:1000::/tmp/foo:/bin/sh diff --git a/tests/chroot/useradd/03_useradd--root_useradd.default/data/shadow b/tests/chroot/useradd/03_useradd--root_useradd.default/data/shadow new file mode 100644 index 00000000..f4c9dfbd --- /dev/null +++ b/tests/chroot/useradd/03_useradd--root_useradd.default/data/shadow @@ -0,0 +1,21 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +foo:!:@TODAY@:0:99999:7:12:13849: diff --git a/tests/chroot/useradd/03_useradd--root_useradd.default/useradd.test b/tests/chroot/useradd/03_useradd--root_useradd.default/useradd.test new file mode 100755 index 00000000..aa9dd35a --- /dev/null +++ b/tests/chroot/useradd/03_useradd--root_useradd.default/useradd.test @@ -0,0 +1,52 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "useradd can add an user in a chroot" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; clean_chroot; restore_config' 0 + +change_config + +prepare_chroot + +echo -n "Add user foo in chroot (useradd --root $PWD/tmp/root foo)..." +useradd --root $PWD/tmp/root foo +echo "OK" + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl data/passwd tmp/root/etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl data/group tmp/root/etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +../../../common/compare_file.pl data/shadow tmp/root/etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +../../../common/compare_file.pl data/gshadow tmp/root/etc/gshadow +echo "OK" + +rm -f tmp/root/etc/.pwd.lock +rm -f tmp/root/etc/passwd- +rm -f tmp/root/etc/group- +rm -f tmp/root/etc/shadow- +rm -f tmp/root/etc/gshadow- +clean_chroot + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chroot/useradd/04_useradd--root_useradd-D/config.txt b/tests/chroot/useradd/04_useradd--root_useradd-D/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/chroot/useradd/04_useradd--root_useradd-D/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/chroot/useradd/04_useradd--root_useradd-D/config/etc/default/useradd b/tests/chroot/useradd/04_useradd--root_useradd-D/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/chroot/useradd/04_useradd--root_useradd-D/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/useradd/04_useradd--root_useradd-D/config/etc/group b/tests/chroot/useradd/04_useradd--root_useradd-D/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/chroot/useradd/04_useradd--root_useradd-D/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/chroot/useradd/04_useradd--root_useradd-D/config/etc/gshadow b/tests/chroot/useradd/04_useradd--root_useradd-D/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/chroot/useradd/04_useradd--root_useradd-D/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/chroot/useradd/04_useradd--root_useradd-D/config/etc/passwd b/tests/chroot/useradd/04_useradd--root_useradd-D/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/chroot/useradd/04_useradd--root_useradd-D/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/chroot/useradd/04_useradd--root_useradd-D/config/etc/shadow b/tests/chroot/useradd/04_useradd--root_useradd-D/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/chroot/useradd/04_useradd--root_useradd-D/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/chroot/useradd/04_useradd--root_useradd-D/config_chroot/etc/default/useradd b/tests/chroot/useradd/04_useradd--root_useradd-D/config_chroot/etc/default/useradd new file mode 100644 index 00000000..5051e1d9 --- /dev/null +++ b/tests/chroot/useradd/04_useradd--root_useradd-D/config_chroot/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/sh +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/useradd/04_useradd--root_useradd-D/config_chroot/etc/group b/tests/chroot/useradd/04_useradd--root_useradd-D/config_chroot/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chroot/useradd/04_useradd--root_useradd-D/config_chroot/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chroot/useradd/04_useradd--root_useradd-D/config_chroot/etc/gshadow b/tests/chroot/useradd/04_useradd--root_useradd-D/config_chroot/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chroot/useradd/04_useradd--root_useradd-D/config_chroot/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/useradd/04_useradd--root_useradd-D/config_chroot/etc/login.defs b/tests/chroot/useradd/04_useradd--root_useradd-D/config_chroot/etc/login.defs new file mode 100644 index 00000000..7b70c90e --- /dev/null +++ b/tests/chroot/useradd/04_useradd--root_useradd-D/config_chroot/etc/login.defs @@ -0,0 +1,335 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, such as Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/useradd/04_useradd--root_useradd-D/config_chroot/etc/passwd b/tests/chroot/useradd/04_useradd--root_useradd-D/config_chroot/etc/passwd new file mode 100644 index 00000000..9bdeb8ce --- /dev/null +++ b/tests/chroot/useradd/04_useradd--root_useradd-D/config_chroot/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/useradd/04_useradd--root_useradd-D/config_chroot/etc/shadow b/tests/chroot/useradd/04_useradd--root_useradd-D/config_chroot/etc/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chroot/useradd/04_useradd--root_useradd-D/config_chroot/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/useradd/04_useradd--root_useradd-D/data/useradd.out b/tests/chroot/useradd/04_useradd--root_useradd-D/data/useradd.out new file mode 100644 index 00000000..581c0555 --- /dev/null +++ b/tests/chroot/useradd/04_useradd--root_useradd-D/data/useradd.out @@ -0,0 +1,7 @@ +GROUP=10 +HOME=/tmp +INACTIVE=12 +EXPIRE=2007-12-02 +SHELL=/bin/sh +SKEL=/etc/skel +CREATE_MAIL_SPOOL=no diff --git a/tests/chroot/useradd/04_useradd--root_useradd-D/useradd.test b/tests/chroot/useradd/04_useradd--root_useradd-D/useradd.test new file mode 100755 index 00000000..069e7042 --- /dev/null +++ b/tests/chroot/useradd/04_useradd--root_useradd-D/useradd.test @@ -0,0 +1,61 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "useradd can list defaults from a chroot" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; clean_chroot; restore_config' 0 + +change_config + +prepare_chroot + +echo -n "List defaults in chroot (useradd --root $PWD/tmp/root foo)..." +useradd -D --root $PWD/tmp/root > tmp/useradd.out +echo "OK" + +echo "useradd reported:" +echo "=======================================================================" +cat tmp/useradd.out +echo "=======================================================================" +echo -n "Check the usage message..." +diff -au data/useradd.out tmp/useradd.out +echo "OK." +rm -f tmp/useradd.out + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl config_chroot/etc/passwd tmp/root/etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl config_chroot/etc//group tmp/root/etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +../../../common/compare_file.pl config_chroot/etc/shadow tmp/root/etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +../../../common/compare_file.pl config_chroot/etc/gshadow tmp/root/etc/gshadow +echo "OK" + +rm -f tmp/root/etc/.pwd.lock +rm -f tmp/root/etc/passwd- +rm -f tmp/root/etc/group- +rm -f tmp/root/etc/shadow- +rm -f tmp/root/etc/gshadow- +clean_chroot + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config.txt b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config/etc/default/useradd b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config/etc/group b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config/etc/gshadow b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config/etc/passwd b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config/etc/shadow b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config_chroot/etc/default/useradd b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config_chroot/etc/default/useradd new file mode 100644 index 00000000..d1406e44 --- /dev/null +++ b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config_chroot/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/sh +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=100 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config_chroot/etc/group b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config_chroot/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config_chroot/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config_chroot/etc/gshadow b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config_chroot/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config_chroot/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config_chroot/etc/login.defs b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config_chroot/etc/login.defs new file mode 100644 index 00000000..7b70c90e --- /dev/null +++ b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config_chroot/etc/login.defs @@ -0,0 +1,335 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, such as Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config_chroot/etc/passwd b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config_chroot/etc/passwd new file mode 100644 index 00000000..9bdeb8ce --- /dev/null +++ b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config_chroot/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config_chroot/etc/shadow b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config_chroot/etc/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/config_chroot/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/data/useradd.default b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/data/useradd.default new file mode 100644 index 00000000..aaca91a5 --- /dev/null +++ b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/data/useradd.default @@ -0,0 +1,38 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/sh +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=424242 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2012-12-12 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes +SKEL=/etc/skel +CREATE_MAIL_SPOOL=no diff --git a/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/useradd.test b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/useradd.test new file mode 100755 index 00000000..97059dad --- /dev/null +++ b/tests/chroot/useradd/05_useradd--root_useradd-D-e-g/useradd.test @@ -0,0 +1,56 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "useradd can list defaults from a chroot" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; clean_chroot; restore_config' 0 + +change_config + +prepare_chroot + +echo -n "List defaults in chroot (useradd -D --root $PWD/tmp/root -e 2012-12-12 -g 424242)..." +useradd -D --root $PWD/tmp/root -e 2012-12-12 -g 424242 +echo "OK" + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl config_chroot/etc/passwd tmp/root/etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl config_chroot/etc//group tmp/root/etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +../../../common/compare_file.pl config_chroot/etc/shadow tmp/root/etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +../../../common/compare_file.pl config_chroot/etc/gshadow tmp/root/etc/gshadow +echo "OK" +echo -n "Check the useradd's default file..." +diff -au data/useradd.default tmp/root/etc/default/useradd +echo "OK" + +rm -f tmp/root/etc/.pwd.lock +rm -f tmp/root/etc/passwd- +rm -f tmp/root/etc/group- +rm -f tmp/root/etc/shadow- +rm -f tmp/root/etc/gshadow- +rm -f tmp/root/etc/default/useradd- +clean_chroot + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chroot/userdel/01_userdel--root/config.txt b/tests/chroot/userdel/01_userdel--root/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/chroot/userdel/01_userdel--root/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/chroot/userdel/01_userdel--root/config/etc/default/useradd b/tests/chroot/userdel/01_userdel--root/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/chroot/userdel/01_userdel--root/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/userdel/01_userdel--root/config/etc/group b/tests/chroot/userdel/01_userdel--root/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/chroot/userdel/01_userdel--root/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/chroot/userdel/01_userdel--root/config/etc/gshadow b/tests/chroot/userdel/01_userdel--root/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/chroot/userdel/01_userdel--root/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/chroot/userdel/01_userdel--root/config/etc/passwd b/tests/chroot/userdel/01_userdel--root/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/chroot/userdel/01_userdel--root/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/chroot/userdel/01_userdel--root/config/etc/shadow b/tests/chroot/userdel/01_userdel--root/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/chroot/userdel/01_userdel--root/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/chroot/userdel/01_userdel--root/config_chroot/etc/group b/tests/chroot/userdel/01_userdel--root/config_chroot/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chroot/userdel/01_userdel--root/config_chroot/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chroot/userdel/01_userdel--root/config_chroot/etc/gshadow b/tests/chroot/userdel/01_userdel--root/config_chroot/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chroot/userdel/01_userdel--root/config_chroot/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/userdel/01_userdel--root/config_chroot/etc/login.defs b/tests/chroot/userdel/01_userdel--root/config_chroot/etc/login.defs new file mode 100644 index 00000000..7b70c90e --- /dev/null +++ b/tests/chroot/userdel/01_userdel--root/config_chroot/etc/login.defs @@ -0,0 +1,335 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, such as Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/userdel/01_userdel--root/config_chroot/etc/passwd b/tests/chroot/userdel/01_userdel--root/config_chroot/etc/passwd new file mode 100644 index 00000000..9bdeb8ce --- /dev/null +++ b/tests/chroot/userdel/01_userdel--root/config_chroot/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/userdel/01_userdel--root/config_chroot/etc/shadow b/tests/chroot/userdel/01_userdel--root/config_chroot/etc/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chroot/userdel/01_userdel--root/config_chroot/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/userdel/01_userdel--root/data/group b/tests/chroot/userdel/01_userdel--root/data/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/chroot/userdel/01_userdel--root/data/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/chroot/userdel/01_userdel--root/data/gshadow b/tests/chroot/userdel/01_userdel--root/data/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/chroot/userdel/01_userdel--root/data/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/chroot/userdel/01_userdel--root/data/passwd b/tests/chroot/userdel/01_userdel--root/data/passwd new file mode 100644 index 00000000..4736f1c9 --- /dev/null +++ b/tests/chroot/userdel/01_userdel--root/data/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/userdel/01_userdel--root/data/shadow b/tests/chroot/userdel/01_userdel--root/data/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/chroot/userdel/01_userdel--root/data/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/chroot/userdel/01_userdel--root/userdel.test b/tests/chroot/userdel/01_userdel--root/userdel.test new file mode 100755 index 00000000..4ee203e2 --- /dev/null +++ b/tests/chroot/userdel/01_userdel--root/userdel.test @@ -0,0 +1,52 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "userdel can change a user in a chroot" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; clean_chroot; restore_config' 0 + +change_config + +prepare_chroot + +echo -n "Delete a user in chroot (userdel --root $PWD/tmp/root myuser)..." +userdel --root $PWD/tmp/root myuser +echo "OK" + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl data/passwd tmp/root/etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl data/group tmp/root/etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +../../../common/compare_file.pl data/shadow tmp/root/etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +../../../common/compare_file.pl data/gshadow tmp/root/etc/gshadow +echo "OK" + +rm -f tmp/root/etc/.pwd.lock +rm -f tmp/root/etc/passwd- +rm -f tmp/root/etc/group- +rm -f tmp/root/etc/shadow- +rm -f tmp/root/etc/gshadow- +clean_chroot + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chroot/usermod/01_usermod--root/config.txt b/tests/chroot/usermod/01_usermod--root/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/chroot/usermod/01_usermod--root/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/chroot/usermod/01_usermod--root/config/etc/default/useradd b/tests/chroot/usermod/01_usermod--root/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/chroot/usermod/01_usermod--root/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/chroot/usermod/01_usermod--root/config/etc/group b/tests/chroot/usermod/01_usermod--root/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/chroot/usermod/01_usermod--root/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/chroot/usermod/01_usermod--root/config/etc/gshadow b/tests/chroot/usermod/01_usermod--root/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/chroot/usermod/01_usermod--root/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/chroot/usermod/01_usermod--root/config/etc/passwd b/tests/chroot/usermod/01_usermod--root/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/chroot/usermod/01_usermod--root/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/chroot/usermod/01_usermod--root/config/etc/shadow b/tests/chroot/usermod/01_usermod--root/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/chroot/usermod/01_usermod--root/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/chroot/usermod/01_usermod--root/config_chroot/etc/group b/tests/chroot/usermod/01_usermod--root/config_chroot/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chroot/usermod/01_usermod--root/config_chroot/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chroot/usermod/01_usermod--root/config_chroot/etc/gshadow b/tests/chroot/usermod/01_usermod--root/config_chroot/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chroot/usermod/01_usermod--root/config_chroot/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chroot/usermod/01_usermod--root/config_chroot/etc/login.defs b/tests/chroot/usermod/01_usermod--root/config_chroot/etc/login.defs new file mode 100644 index 00000000..7b70c90e --- /dev/null +++ b/tests/chroot/usermod/01_usermod--root/config_chroot/etc/login.defs @@ -0,0 +1,335 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +# Other former uses of this variable such as setting the umask when +# user==primary group are not used in PAM environments, such as Debian +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +#ENCRYPT_METHOD DES + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/tests/chroot/usermod/01_usermod--root/config_chroot/etc/passwd b/tests/chroot/usermod/01_usermod--root/config_chroot/etc/passwd new file mode 100644 index 00000000..9bdeb8ce --- /dev/null +++ b/tests/chroot/usermod/01_usermod--root/config_chroot/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/usermod/01_usermod--root/config_chroot/etc/shadow b/tests/chroot/usermod/01_usermod--root/config_chroot/etc/shadow new file mode 100644 index 00000000..038d5cf4 --- /dev/null +++ b/tests/chroot/usermod/01_usermod--root/config_chroot/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chroot/usermod/01_usermod--root/data/passwd b/tests/chroot/usermod/01_usermod--root/data/passwd new file mode 100644 index 00000000..1f47aafa --- /dev/null +++ b/tests/chroot/usermod/01_usermod--root/data/passwd @@ -0,0 +1,21 @@ +root:x:0:100:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home/:/bin/sh +testsuite::424243:424243::/home:/bin/bash diff --git a/tests/chroot/usermod/01_usermod--root/usermod.test b/tests/chroot/usermod/01_usermod--root/usermod.test new file mode 100755 index 00000000..14f7a08b --- /dev/null +++ b/tests/chroot/usermod/01_usermod--root/usermod.test @@ -0,0 +1,52 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "usermod can change a user in a chroot" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; clean_chroot; restore_config' 0 + +change_config + +prepare_chroot + +echo -n "Change user in chroot (usermod --root $PWD/tmp/root -g users root)..." +usermod --root $PWD/tmp/root -g users root +echo "OK" + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl data/passwd tmp/root/etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl config_chroot/etc/group tmp/root/etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +../../../common/compare_file.pl config_chroot/etc/shadow tmp/root/etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +../../../common/compare_file.pl config_chroot/etc/gshadow tmp/root/etc/gshadow +echo "OK" + +rm -f tmp/root/etc/.pwd.lock +rm -f tmp/root/etc/passwd- +rm -f tmp/root/etc/group- +rm -f tmp/root/etc/shadow- +rm -f tmp/root/etc/gshadow- +clean_chroot + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chsh/01/data/chsh1 b/tests/chsh/01/data/chsh1 new file mode 100644 index 00000000..01b3d539 --- /dev/null +++ b/tests/chsh/01/data/chsh1 @@ -0,0 +1 @@ +You may not change the shell for 'myuser'. diff --git a/tests/chsh/01/data/chsh2 b/tests/chsh/01/data/chsh2 new file mode 100644 index 00000000..b017d6dd --- /dev/null +++ b/tests/chsh/01/data/chsh2 @@ -0,0 +1 @@ +You may not change the shell for 'myuser2'. diff --git a/tests/chsh/01/data/group b/tests/chsh/01/data/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chsh/01/data/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chsh/01/data/gshadow b/tests/chsh/01/data/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chsh/01/data/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chsh/01/data/passwd b/tests/chsh/01/data/passwd new file mode 100644 index 00000000..37b04674 --- /dev/null +++ b/tests/chsh/01/data/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/sh diff --git a/tests/chsh/01/data/shadow b/tests/chsh/01/data/shadow new file mode 100644 index 00000000..f004fa26 --- /dev/null +++ b/tests/chsh/01/data/shadow @@ -0,0 +1,21 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chsh/01/data/shells b/tests/chsh/01/data/shells new file mode 100644 index 00000000..4fd4378e --- /dev/null +++ b/tests/chsh/01/data/shells @@ -0,0 +1,16 @@ +# /etc/shells: valid login shells +/bin/ash +/bin/csh +/bin/sh +/usr/bin/es +/usr/bin/ksh +/bin/ksh +/usr/bin/rc +/usr/bin/tcsh +/bin/tcsh +/usr/bin/zsh +/bin/sash +/bin/zsh +/usr/bin/esh +/bin/bash +/bin/rbash diff --git a/tests/chsh/01/run b/tests/chsh/01/run new file mode 100755 index 00000000..72760c26 --- /dev/null +++ b/tests/chsh/01/run @@ -0,0 +1,143 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +# Rational: +# Test chage options + +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +save() +{ + [ ! -d tmp ] && mkdir tmp + for i in passwd group shadow gshadow shells + do + [ -f /etc/$i ] && cp /etc/$i tmp/$i + [ -f /etc/$i- ] && cp /etc/$i- tmp/$i- + done + + true +} + +restore() +{ + for i in passwd group shadow gshadow shells + do + [ -f tmp/$i ] && cp tmp/$i /etc/$i && rm tmp/$i + [ -f tmp/$i- ] && cp tmp/$i- /etc/$i- && rm tmp/$i- + done + rm -f tmp/out + rm -f tmp/shell tmp/sh:ell + rmdir tmp +} + +save + +# restore the files on exit +trap 'if [ "$?" != "0" ]; then echo "FAIL"; fi; restore' 0 + +for i in passwd group shadow gshadow shells +do + cp data/$i /etc +done + +echo -n "changing to a restricted shell, by root..." +cp /bin/bash tmp/shell +chsh -s $(pwd)/tmp/shell myuser +ent=$(getent passwd myuser) +[ "$ent" = "myuser:x:424242:424242::/home:"$(pwd)"/tmp/shell" ] || exit 1 +echo "OK" + +echo -n "changing from a restricted shell, by myuser..." +su myuser -c "chsh -s /bin/bash" 2> tmp/out && exit 1 +ent=$(getent passwd myuser) +[ "$ent" = "myuser:x:424242:424242::/home:"$(pwd)"/tmp/shell" ] || exit 1 +diff -au data/chsh1 tmp/out +echo "OK" + +echo -n "changing from a restricted shell, by root..." +chsh -s /bin/bash myuser +ent=$(getent passwd myuser) +[ "$ent" = "myuser:x:424242:424242::/home:/bin/bash" ] || exit 1 +echo "OK" + +# Need to be done by expect now (chage asks for a passwd if not root) +#echo -n "changing to a restricted shell, by myuser..." +#su myuser -c "chsh -s $(pwd)/tmp/shell" 2> tmp/out && exit 1 +#ent=$(getent passwd myuser) +#[ "$ent" = "myuser:x:424242:424242::/home:/bin/bash" ] || exit 1 +#grep "/tmp/shell is an invalid shell." tmp/out > /dev/null +#[ $(wc -l tmp/out| cut -d" " -f1) = "1" ] || exit 1 +#echo "OK" + +#echo -n "changing to a new valid shell, by myuser..." +#echo $(pwd)/tmp/shell >> /tmp/shells +#su myuser -c "chsh -s $(pwd)/tmp/shell" 2> tmp/out && exit 1 +#ent=$(getent passwd myuser) +#[ "$ent" = "myuser:x:424242:424242::/home:/bin/bash" ] || exit 1 +#grep "/tmp/shell is an invalid shell." tmp/out > /dev/null +#[ $(wc -l tmp/out| cut -d" " -f1) = "1" ] || exit 1 +#echo "OK" + +echo -n "changing another user's shell..." +su myuser -c "chsh -s /bin/sh myuser2" 2> tmp/out && exit 1 +ent=$(getent passwd myuser2) +[ "$ent" = "myuser2:x:424243:424242::/home:/bin/sh" ] || exit 1 +diff -au data/chsh2 tmp/out +echo "OK" + +#echo -n "changing to a non-executable shell..." +#chmod a-x tmp/shell +#su myuser -c "chsh -s $(pwd)/tmp/shell myuser" 2> tmp/out && exit 1 +#ent=$(getent passwd myuser) +#[ "$ent" = "myuser:x:424242:424242::/home:/bin/bash" ] || exit 1 +#grep "/tmp/shell is an invalid shell." tmp/out > /dev/null +#[ $(wc -l tmp/out| cut -d" " -f1) = "1" ] || exit 1 +#echo "OK" + +echo -n "changing to an invalid shell name..." +cp /bin/bash tmp/sh:ell +echo $(pwd)/tmp/sh:ell >> /etc/shells +chsh -s $(pwd)/tmp/sh:ell myuser 2> tmp/out && exit 1 +ent=$(getent passwd myuser) +[ "$ent" = "myuser:x:424242:424242::/home:/bin/bash" ] || exit 1 +egrep "chsh: Invalid entry: .*/tmp/sh:ell" tmp/out > /dev/null +[ $(wc -l tmp/out| cut -d" " -f1) = "1" ] || exit 1 +echo "OK" + +echo "testing the interactive mode (1)..." +rm -f tmp/out +./run.exp /bin/bash myuser +[ -f tmp/out ] && exit 1 +ent=$(getent passwd myuser) +[ "$ent" = "myuser:x:424242:424242::/home:/bin/bash" ] || exit 1 +echo "OK" + +#echo "testing the interactive mode (2)..." +#rm -f tmp/out +#su myuser -c "./run.exp /bin/bash" +#[ -f tmp/out ] && exit 1 +#ent=$(getent passwd myuser) +#[ "$ent" = "myuser:x:424242:424242::/home:/bin/bash" ] || exit 1 +#echo "OK" + +echo "testing the interactive mode (3)..." +rm -f tmp/out +./run.exp /bin/sh myuser +[ -f tmp/out ] && exit 1 +ent=$(getent passwd myuser) +[ "$ent" = "myuser:x:424242:424242::/home:/bin/sh" ] || exit 1 +echo "OK" + +echo "testing the interactive mode (4)..." +rm -f tmp/out +./run.exp $(pwd)/tmp/sh:ell myuser && exit 1 +egrep "chsh: Invalid entry: .*/tmp/sh:ell" tmp/out > /dev/null +ent=$(getent passwd myuser) +[ "$ent" = "myuser:x:424242:424242::/home:/bin/sh" ] || exit 1 +echo "OK" + diff --git a/tests/chsh/01/run.exp b/tests/chsh/01/run.exp new file mode 100755 index 00000000..4890193f --- /dev/null +++ b/tests/chsh/01/run.exp @@ -0,0 +1,38 @@ +#!/usr/bin/expect + +set timeout 5 + +if {$argc < 1} { + puts "usage: run.exp \[shell] \[user]" + exit 1 +} +set shell [lindex $argv 0] + +if {$argc == 2} { + spawn /usr/bin/chsh [lindex $argv 1] +} else { + spawn /usr/bin/chsh +} + +expect "Changing the login shell for myuser" +expect "Enter the new value, or press ENTER for the default" +expect -re "Login Shell .*\]: " +send "$shell\r" +expect "$shell\r\n" +expect { + eof { + if ([string compare $expect_out(buffer) ""]) { + set fp [open "tmp/out" w] + puts $fp "$expect_out(buffer)" + puts "\nFAIL" + exit 1 + } + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + diff --git a/tests/chsh/02_chsh_usage/chsh.test b/tests/chsh/02_chsh_usage/chsh.test new file mode 100755 index 00000000..3a6e656a --- /dev/null +++ b/tests/chsh/02_chsh_usage/chsh.test @@ -0,0 +1,48 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chsh can display its usage message" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Get chsh usage (chsh -h)..." +chsh -h >tmp/usage.out +echo "OK" + +echo "chsh reported:" +echo "=======================================================================" +cat tmp/usage.out +echo "=======================================================================" +echo -n "Check the usage message..." +diff -au data/usage.out tmp/usage.out +echo "usage message OK." +rm -f tmp/usage.out + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chsh/02_chsh_usage/config.txt b/tests/chsh/02_chsh_usage/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/02_chsh_usage/config/etc/group b/tests/chsh/02_chsh_usage/config/etc/group new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/02_chsh_usage/config/etc/gshadow b/tests/chsh/02_chsh_usage/config/etc/gshadow new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/02_chsh_usage/config/etc/passwd b/tests/chsh/02_chsh_usage/config/etc/passwd new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/02_chsh_usage/config/etc/shadow b/tests/chsh/02_chsh_usage/config/etc/shadow new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/02_chsh_usage/data/usage.out b/tests/chsh/02_chsh_usage/data/usage.out new file mode 100644 index 00000000..ef576ec4 --- /dev/null +++ b/tests/chsh/02_chsh_usage/data/usage.out @@ -0,0 +1,7 @@ +Usage: chsh [options] [LOGIN] + +Options: + -h, --help display this help message and exit + -R, --root CHROOT_DIR directory to chroot into + -s, --shell SHELL new login shell for the user account + diff --git a/tests/chsh/03_chsh_usage_invalid_option/chsh.test b/tests/chsh/03_chsh_usage_invalid_option/chsh.test new file mode 100755 index 00000000..4552cc32 --- /dev/null +++ b/tests/chsh/03_chsh_usage_invalid_option/chsh.test @@ -0,0 +1,54 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chsh displays its usage message is case of invalid option" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Use wrong chsh option (chsh -Z)..." +chsh -Z 2>tmp/usage.out && exit 1 || { + status=$? +} +echo "OK" + +echo -n "Check returned status ($status)..." +test "$status" = "2" +echo "OK" + +echo "chsh reported:" +echo "=======================================================================" +cat tmp/usage.out +echo "=======================================================================" +echo -n "Check the usage message..." +diff -au data/usage.out tmp/usage.out +echo "usage message OK." +rm -f tmp/usage.out + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chsh/03_chsh_usage_invalid_option/config.txt b/tests/chsh/03_chsh_usage_invalid_option/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/03_chsh_usage_invalid_option/config/etc/group b/tests/chsh/03_chsh_usage_invalid_option/config/etc/group new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/03_chsh_usage_invalid_option/config/etc/gshadow b/tests/chsh/03_chsh_usage_invalid_option/config/etc/gshadow new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/03_chsh_usage_invalid_option/config/etc/passwd b/tests/chsh/03_chsh_usage_invalid_option/config/etc/passwd new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/03_chsh_usage_invalid_option/config/etc/shadow b/tests/chsh/03_chsh_usage_invalid_option/config/etc/shadow new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/03_chsh_usage_invalid_option/data/usage.out b/tests/chsh/03_chsh_usage_invalid_option/data/usage.out new file mode 100644 index 00000000..e930bab5 --- /dev/null +++ b/tests/chsh/03_chsh_usage_invalid_option/data/usage.out @@ -0,0 +1,8 @@ +chsh: invalid option -- 'Z' +Usage: chsh [options] [LOGIN] + +Options: + -h, --help display this help message and exit + -R, --root CHROOT_DIR directory to chroot into + -s, --shell SHELL new login shell for the user account + diff --git a/tests/chsh/04_chsh_usage_2_users/chsh.test b/tests/chsh/04_chsh_usage_2_users/chsh.test new file mode 100755 index 00000000..ef1c1818 --- /dev/null +++ b/tests/chsh/04_chsh_usage_2_users/chsh.test @@ -0,0 +1,54 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chsh displays its usage message is case multiple users are provided" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Use chsh with 2 users (chsh -s /bin/sh root bin)..." +chsh -s /bin/sh root bin 2>tmp/usage.out && exit 1 || { + status=$? +} +echo "OK" + +echo -n "Check returned status ($status)..." +test "$status" = "2" +echo "OK" + +echo "chsh reported:" +echo "=======================================================================" +cat tmp/usage.out +echo "=======================================================================" +echo -n "Check the usage message..." +diff -au data/usage.out tmp/usage.out +echo "usage message OK." +rm -f tmp/usage.out + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chsh/04_chsh_usage_2_users/config.txt b/tests/chsh/04_chsh_usage_2_users/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/04_chsh_usage_2_users/config/etc/group b/tests/chsh/04_chsh_usage_2_users/config/etc/group new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/04_chsh_usage_2_users/config/etc/gshadow b/tests/chsh/04_chsh_usage_2_users/config/etc/gshadow new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/04_chsh_usage_2_users/config/etc/passwd b/tests/chsh/04_chsh_usage_2_users/config/etc/passwd new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/04_chsh_usage_2_users/config/etc/shadow b/tests/chsh/04_chsh_usage_2_users/config/etc/shadow new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/04_chsh_usage_2_users/data/usage.out b/tests/chsh/04_chsh_usage_2_users/data/usage.out new file mode 100644 index 00000000..ef576ec4 --- /dev/null +++ b/tests/chsh/04_chsh_usage_2_users/data/usage.out @@ -0,0 +1,7 @@ +Usage: chsh [options] [LOGIN] + +Options: + -h, --help display this help message and exit + -R, --root CHROOT_DIR directory to chroot into + -s, --shell SHELL new login shell for the user account + diff --git a/tests/chsh/05_chsh_myuser_restricted_shell/chsh.test b/tests/chsh/05_chsh_myuser_restricted_shell/chsh.test new file mode 100755 index 00000000..48442668 --- /dev/null +++ b/tests/chsh/05_chsh_myuser_restricted_shell/chsh.test @@ -0,0 +1,41 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chsh can displays its usage message" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +chmod a+w tmp + +echo -n "execute chsh..." +su myuser -c "./run.exp /bin/sh" +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chsh/05_chsh_myuser_restricted_shell/config.txt b/tests/chsh/05_chsh_myuser_restricted_shell/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/05_chsh_myuser_restricted_shell/config/etc/group b/tests/chsh/05_chsh_myuser_restricted_shell/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chsh/05_chsh_myuser_restricted_shell/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chsh/05_chsh_myuser_restricted_shell/config/etc/gshadow b/tests/chsh/05_chsh_myuser_restricted_shell/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chsh/05_chsh_myuser_restricted_shell/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chsh/05_chsh_myuser_restricted_shell/config/etc/passwd b/tests/chsh/05_chsh_myuser_restricted_shell/config/etc/passwd new file mode 100644 index 00000000..37b04674 --- /dev/null +++ b/tests/chsh/05_chsh_myuser_restricted_shell/config/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/sh diff --git a/tests/chsh/05_chsh_myuser_restricted_shell/config/etc/shadow b/tests/chsh/05_chsh_myuser_restricted_shell/config/etc/shadow new file mode 100644 index 00000000..f004fa26 --- /dev/null +++ b/tests/chsh/05_chsh_myuser_restricted_shell/config/etc/shadow @@ -0,0 +1,21 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chsh/05_chsh_myuser_restricted_shell/config/etc/shells b/tests/chsh/05_chsh_myuser_restricted_shell/config/etc/shells new file mode 100644 index 00000000..16e922a1 --- /dev/null +++ b/tests/chsh/05_chsh_myuser_restricted_shell/config/etc/shells @@ -0,0 +1,15 @@ +# /etc/shells: valid login shells +/bin/ash +/bin/csh +/bin/sh +/usr/bin/es +/usr/bin/ksh +/bin/ksh +/usr/bin/rc +/usr/bin/tcsh +/bin/tcsh +/usr/bin/zsh +/bin/sash +#/bin/zsh +/usr/bin/esh +/bin/rbash diff --git a/tests/chsh/05_chsh_myuser_restricted_shell/run.exp b/tests/chsh/05_chsh_myuser_restricted_shell/run.exp new file mode 100755 index 00000000..1abf0858 --- /dev/null +++ b/tests/chsh/05_chsh_myuser_restricted_shell/run.exp @@ -0,0 +1,34 @@ +#!/usr/bin/expect + +set timeout 5 + +if {$argc < 1} { + puts "usage: run.exp \[shell] \[user]" + exit 1 +} +set shell [lindex $argv 0] + +if {$argc == 2} { + spawn /usr/bin/chsh [lindex $argv 1] +} else { + spawn /usr/bin/chsh +} + +expect "You may not change the shell for 'myuser'.\r\n" +expect { + eof { + if ([string compare $expect_out(buffer) ""]) { + set fp [open "tmp/out" w] + puts $fp "$expect_out(buffer)" + puts "\nFAIL" + exit 1 + } + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + diff --git a/tests/chsh/06_chsh_myuser_non_restricted_shell/chsh.test b/tests/chsh/06_chsh_myuser_non_restricted_shell/chsh.test new file mode 100755 index 00000000..d8d88ac1 --- /dev/null +++ b/tests/chsh/06_chsh_myuser_non_restricted_shell/chsh.test @@ -0,0 +1,41 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chsh can displays its usage message" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +chmod a+w tmp + +echo -n "execute chsh..." +su myuser -c "./run.exp /bin/sh" +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl data/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chsh/06_chsh_myuser_non_restricted_shell/config.txt b/tests/chsh/06_chsh_myuser_non_restricted_shell/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/06_chsh_myuser_non_restricted_shell/config/etc/group b/tests/chsh/06_chsh_myuser_non_restricted_shell/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chsh/06_chsh_myuser_non_restricted_shell/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chsh/06_chsh_myuser_non_restricted_shell/config/etc/gshadow b/tests/chsh/06_chsh_myuser_non_restricted_shell/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chsh/06_chsh_myuser_non_restricted_shell/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chsh/06_chsh_myuser_non_restricted_shell/config/etc/passwd b/tests/chsh/06_chsh_myuser_non_restricted_shell/config/etc/passwd new file mode 100644 index 00000000..37b04674 --- /dev/null +++ b/tests/chsh/06_chsh_myuser_non_restricted_shell/config/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/sh diff --git a/tests/chsh/06_chsh_myuser_non_restricted_shell/config/etc/shadow b/tests/chsh/06_chsh_myuser_non_restricted_shell/config/etc/shadow new file mode 100644 index 00000000..f004fa26 --- /dev/null +++ b/tests/chsh/06_chsh_myuser_non_restricted_shell/config/etc/shadow @@ -0,0 +1,21 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chsh/06_chsh_myuser_non_restricted_shell/config/etc/shells b/tests/chsh/06_chsh_myuser_non_restricted_shell/config/etc/shells new file mode 100644 index 00000000..d52a3bf0 --- /dev/null +++ b/tests/chsh/06_chsh_myuser_non_restricted_shell/config/etc/shells @@ -0,0 +1,16 @@ +# /etc/shells: valid login shells +/bin/ash +/bin/csh +/bin/sh +/usr/bin/es +/usr/bin/ksh +/bin/ksh +/usr/bin/rc +/usr/bin/tcsh +/bin/tcsh +/usr/bin/zsh +/bin/sash +#/bin/zsh +/usr/bin/esh +/bin/bash +/bin/rbash diff --git a/tests/chsh/06_chsh_myuser_non_restricted_shell/data/passwd b/tests/chsh/06_chsh_myuser_non_restricted_shell/data/passwd new file mode 100644 index 00000000..ae3eda3f --- /dev/null +++ b/tests/chsh/06_chsh_myuser_non_restricted_shell/data/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home:/bin/sh +myuser2:x:424243:424242::/home:/bin/sh diff --git a/tests/chsh/06_chsh_myuser_non_restricted_shell/run.exp b/tests/chsh/06_chsh_myuser_non_restricted_shell/run.exp new file mode 100755 index 00000000..0c0e023b --- /dev/null +++ b/tests/chsh/06_chsh_myuser_non_restricted_shell/run.exp @@ -0,0 +1,40 @@ +#!/usr/bin/expect + +set timeout 5 + +if {$argc < 1} { + puts "usage: run.exp \[shell] \[user]" + exit 1 +} +set shell [lindex $argv 0] + +if {$argc == 2} { + spawn /usr/bin/chsh [lindex $argv 1] +} else { + spawn /usr/bin/chsh +} + +expect "Password: " +send "myuserF00barbaz\r" +expect "Changing the login shell for myuser" +expect "Enter the new value, or press ENTER for the default" +expect -re "Login Shell .*\]: " +send "$shell\r" +expect "$shell\r\n" +expect { + eof { + if ([string compare $expect_out(buffer) ""]) { + set fp [open "tmp/out" w] + puts $fp "$expect_out(buffer)" + puts "\nFAIL" + exit 1 + } + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + diff --git a/tests/chsh/07_chsh_usage_invalid_user/chsh.test b/tests/chsh/07_chsh_usage_invalid_user/chsh.test new file mode 100755 index 00000000..5d76de21 --- /dev/null +++ b/tests/chsh/07_chsh_usage_invalid_user/chsh.test @@ -0,0 +1,54 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chsh checks that the user exist" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Use chsh for an invalid user (chsh wronguser)..." +chsh wronguser 2>tmp/usage.out && exit 1 || { + status=$? +} +echo "OK" + +echo -n "Check returned status ($status)..." +test "$status" = "1" +echo "OK" + +echo "chsh reported:" +echo "=======================================================================" +cat tmp/usage.out +echo "=======================================================================" +echo -n "Check the usage message..." +diff -au data/usage.out tmp/usage.out +echo "usage message OK." +rm -f tmp/usage.out + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chsh/07_chsh_usage_invalid_user/config.txt b/tests/chsh/07_chsh_usage_invalid_user/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/07_chsh_usage_invalid_user/config/etc/group b/tests/chsh/07_chsh_usage_invalid_user/config/etc/group new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/07_chsh_usage_invalid_user/config/etc/gshadow b/tests/chsh/07_chsh_usage_invalid_user/config/etc/gshadow new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/07_chsh_usage_invalid_user/config/etc/passwd b/tests/chsh/07_chsh_usage_invalid_user/config/etc/passwd new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/07_chsh_usage_invalid_user/config/etc/shadow b/tests/chsh/07_chsh_usage_invalid_user/config/etc/shadow new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/07_chsh_usage_invalid_user/data/usage.out b/tests/chsh/07_chsh_usage_invalid_user/data/usage.out new file mode 100644 index 00000000..f57326c7 --- /dev/null +++ b/tests/chsh/07_chsh_usage_invalid_user/data/usage.out @@ -0,0 +1 @@ +chsh: user 'wronguser' does not exist diff --git a/tests/chsh/08_chsh_myuser_to_restricted_shell/chsh.test b/tests/chsh/08_chsh_myuser_to_restricted_shell/chsh.test new file mode 100755 index 00000000..611d1a6b --- /dev/null +++ b/tests/chsh/08_chsh_myuser_to_restricted_shell/chsh.test @@ -0,0 +1,41 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chsh can displays its usage message" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +chmod a+w tmp + +echo -n "execute chsh..." +su myuser -c "./run.exp /bin/bash" +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl data/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chsh/08_chsh_myuser_to_restricted_shell/config.txt b/tests/chsh/08_chsh_myuser_to_restricted_shell/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/08_chsh_myuser_to_restricted_shell/config/etc/group b/tests/chsh/08_chsh_myuser_to_restricted_shell/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chsh/08_chsh_myuser_to_restricted_shell/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chsh/08_chsh_myuser_to_restricted_shell/config/etc/gshadow b/tests/chsh/08_chsh_myuser_to_restricted_shell/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chsh/08_chsh_myuser_to_restricted_shell/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chsh/08_chsh_myuser_to_restricted_shell/config/etc/passwd b/tests/chsh/08_chsh_myuser_to_restricted_shell/config/etc/passwd new file mode 100644 index 00000000..ae3eda3f --- /dev/null +++ b/tests/chsh/08_chsh_myuser_to_restricted_shell/config/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home:/bin/sh +myuser2:x:424243:424242::/home:/bin/sh diff --git a/tests/chsh/08_chsh_myuser_to_restricted_shell/config/etc/shadow b/tests/chsh/08_chsh_myuser_to_restricted_shell/config/etc/shadow new file mode 100644 index 00000000..f004fa26 --- /dev/null +++ b/tests/chsh/08_chsh_myuser_to_restricted_shell/config/etc/shadow @@ -0,0 +1,21 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chsh/08_chsh_myuser_to_restricted_shell/config/etc/shells b/tests/chsh/08_chsh_myuser_to_restricted_shell/config/etc/shells new file mode 100644 index 00000000..16e922a1 --- /dev/null +++ b/tests/chsh/08_chsh_myuser_to_restricted_shell/config/etc/shells @@ -0,0 +1,15 @@ +# /etc/shells: valid login shells +/bin/ash +/bin/csh +/bin/sh +/usr/bin/es +/usr/bin/ksh +/bin/ksh +/usr/bin/rc +/usr/bin/tcsh +/bin/tcsh +/usr/bin/zsh +/bin/sash +#/bin/zsh +/usr/bin/esh +/bin/rbash diff --git a/tests/chsh/08_chsh_myuser_to_restricted_shell/data/passwd b/tests/chsh/08_chsh_myuser_to_restricted_shell/data/passwd new file mode 100644 index 00000000..ae3eda3f --- /dev/null +++ b/tests/chsh/08_chsh_myuser_to_restricted_shell/data/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home:/bin/sh +myuser2:x:424243:424242::/home:/bin/sh diff --git a/tests/chsh/08_chsh_myuser_to_restricted_shell/run.exp b/tests/chsh/08_chsh_myuser_to_restricted_shell/run.exp new file mode 100755 index 00000000..b1bd8d66 --- /dev/null +++ b/tests/chsh/08_chsh_myuser_to_restricted_shell/run.exp @@ -0,0 +1,41 @@ +#!/usr/bin/expect + +set timeout 5 + +if {$argc < 1} { + puts "usage: run.exp \[shell] \[user]" + exit 1 +} +set shell [lindex $argv 0] + +if {$argc == 2} { + spawn /usr/bin/chsh [lindex $argv 1] +} else { + spawn /usr/bin/chsh +} + +expect "Password: " +send "myuserF00barbaz\r" +expect "Changing the login shell for myuser" +expect "Enter the new value, or press ENTER for the default" +expect -re "Login Shell .*\]: " +send "$shell\r" +expect "$shell\r\n" +expect "chsh: $shell is an invalid shell\r\n" +expect { + eof { + if ([string compare $expect_out(buffer) ""]) { + set fp [open "tmp/out" w] + puts $fp "$expect_out(buffer)" + puts "\nFAIL" + exit 1 + } + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + diff --git a/tests/chsh/09_chsh_myuser_to_missing_shell/chsh.test b/tests/chsh/09_chsh_myuser_to_missing_shell/chsh.test new file mode 100755 index 00000000..6248780b --- /dev/null +++ b/tests/chsh/09_chsh_myuser_to_missing_shell/chsh.test @@ -0,0 +1,42 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chsh can displays its usage message" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +chmod a+w tmp + +echo /tmp/bash >> /etc/shells +echo -n "execute chsh..." +su myuser -c "./run.exp /tmp/bash" +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl data/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chsh/09_chsh_myuser_to_missing_shell/config.txt b/tests/chsh/09_chsh_myuser_to_missing_shell/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/09_chsh_myuser_to_missing_shell/config/etc/group b/tests/chsh/09_chsh_myuser_to_missing_shell/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chsh/09_chsh_myuser_to_missing_shell/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chsh/09_chsh_myuser_to_missing_shell/config/etc/gshadow b/tests/chsh/09_chsh_myuser_to_missing_shell/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chsh/09_chsh_myuser_to_missing_shell/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chsh/09_chsh_myuser_to_missing_shell/config/etc/passwd b/tests/chsh/09_chsh_myuser_to_missing_shell/config/etc/passwd new file mode 100644 index 00000000..ae3eda3f --- /dev/null +++ b/tests/chsh/09_chsh_myuser_to_missing_shell/config/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home:/bin/sh +myuser2:x:424243:424242::/home:/bin/sh diff --git a/tests/chsh/09_chsh_myuser_to_missing_shell/config/etc/shadow b/tests/chsh/09_chsh_myuser_to_missing_shell/config/etc/shadow new file mode 100644 index 00000000..f004fa26 --- /dev/null +++ b/tests/chsh/09_chsh_myuser_to_missing_shell/config/etc/shadow @@ -0,0 +1,21 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chsh/09_chsh_myuser_to_missing_shell/config/etc/shells b/tests/chsh/09_chsh_myuser_to_missing_shell/config/etc/shells new file mode 100644 index 00000000..16e922a1 --- /dev/null +++ b/tests/chsh/09_chsh_myuser_to_missing_shell/config/etc/shells @@ -0,0 +1,15 @@ +# /etc/shells: valid login shells +/bin/ash +/bin/csh +/bin/sh +/usr/bin/es +/usr/bin/ksh +/bin/ksh +/usr/bin/rc +/usr/bin/tcsh +/bin/tcsh +/usr/bin/zsh +/bin/sash +#/bin/zsh +/usr/bin/esh +/bin/rbash diff --git a/tests/chsh/09_chsh_myuser_to_missing_shell/data/passwd b/tests/chsh/09_chsh_myuser_to_missing_shell/data/passwd new file mode 100644 index 00000000..ae3eda3f --- /dev/null +++ b/tests/chsh/09_chsh_myuser_to_missing_shell/data/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home:/bin/sh +myuser2:x:424243:424242::/home:/bin/sh diff --git a/tests/chsh/09_chsh_myuser_to_missing_shell/run.exp b/tests/chsh/09_chsh_myuser_to_missing_shell/run.exp new file mode 100755 index 00000000..b1bd8d66 --- /dev/null +++ b/tests/chsh/09_chsh_myuser_to_missing_shell/run.exp @@ -0,0 +1,41 @@ +#!/usr/bin/expect + +set timeout 5 + +if {$argc < 1} { + puts "usage: run.exp \[shell] \[user]" + exit 1 +} +set shell [lindex $argv 0] + +if {$argc == 2} { + spawn /usr/bin/chsh [lindex $argv 1] +} else { + spawn /usr/bin/chsh +} + +expect "Password: " +send "myuserF00barbaz\r" +expect "Changing the login shell for myuser" +expect "Enter the new value, or press ENTER for the default" +expect -re "Login Shell .*\]: " +send "$shell\r" +expect "$shell\r\n" +expect "chsh: $shell is an invalid shell\r\n" +expect { + eof { + if ([string compare $expect_out(buffer) ""]) { + set fp [open "tmp/out" w] + puts $fp "$expect_out(buffer)" + puts "\nFAIL" + exit 1 + } + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + diff --git a/tests/chsh/10_chsh_myuser_to_non_executable_shell/chsh.test b/tests/chsh/10_chsh_myuser_to_non_executable_shell/chsh.test new file mode 100755 index 00000000..7dd4642d --- /dev/null +++ b/tests/chsh/10_chsh_myuser_to_non_executable_shell/chsh.test @@ -0,0 +1,46 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chsh can displays its usage message" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config; rm -f /tmp/bash' 0 + +change_config + +chmod a+w tmp + +echo /tmp/bash >> /etc/shells +cp /bin/bash /tmp/bash +chmod a-x /tmp/bash + +echo -n "execute chsh..." +su myuser -c "./run.exp /tmp/bash" +echo "OK" +rm -f /tmp/bash + +echo -n "Check the passwd file..." +../../common/compare_file.pl data/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chsh/10_chsh_myuser_to_non_executable_shell/config.txt b/tests/chsh/10_chsh_myuser_to_non_executable_shell/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/10_chsh_myuser_to_non_executable_shell/config/etc/group b/tests/chsh/10_chsh_myuser_to_non_executable_shell/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chsh/10_chsh_myuser_to_non_executable_shell/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chsh/10_chsh_myuser_to_non_executable_shell/config/etc/gshadow b/tests/chsh/10_chsh_myuser_to_non_executable_shell/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chsh/10_chsh_myuser_to_non_executable_shell/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chsh/10_chsh_myuser_to_non_executable_shell/config/etc/passwd b/tests/chsh/10_chsh_myuser_to_non_executable_shell/config/etc/passwd new file mode 100644 index 00000000..ae3eda3f --- /dev/null +++ b/tests/chsh/10_chsh_myuser_to_non_executable_shell/config/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home:/bin/sh +myuser2:x:424243:424242::/home:/bin/sh diff --git a/tests/chsh/10_chsh_myuser_to_non_executable_shell/config/etc/shadow b/tests/chsh/10_chsh_myuser_to_non_executable_shell/config/etc/shadow new file mode 100644 index 00000000..f004fa26 --- /dev/null +++ b/tests/chsh/10_chsh_myuser_to_non_executable_shell/config/etc/shadow @@ -0,0 +1,21 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chsh/10_chsh_myuser_to_non_executable_shell/config/etc/shells b/tests/chsh/10_chsh_myuser_to_non_executable_shell/config/etc/shells new file mode 100644 index 00000000..16e922a1 --- /dev/null +++ b/tests/chsh/10_chsh_myuser_to_non_executable_shell/config/etc/shells @@ -0,0 +1,15 @@ +# /etc/shells: valid login shells +/bin/ash +/bin/csh +/bin/sh +/usr/bin/es +/usr/bin/ksh +/bin/ksh +/usr/bin/rc +/usr/bin/tcsh +/bin/tcsh +/usr/bin/zsh +/bin/sash +#/bin/zsh +/usr/bin/esh +/bin/rbash diff --git a/tests/chsh/10_chsh_myuser_to_non_executable_shell/data/passwd b/tests/chsh/10_chsh_myuser_to_non_executable_shell/data/passwd new file mode 100644 index 00000000..ae3eda3f --- /dev/null +++ b/tests/chsh/10_chsh_myuser_to_non_executable_shell/data/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home:/bin/sh +myuser2:x:424243:424242::/home:/bin/sh diff --git a/tests/chsh/10_chsh_myuser_to_non_executable_shell/run.exp b/tests/chsh/10_chsh_myuser_to_non_executable_shell/run.exp new file mode 100755 index 00000000..b1bd8d66 --- /dev/null +++ b/tests/chsh/10_chsh_myuser_to_non_executable_shell/run.exp @@ -0,0 +1,41 @@ +#!/usr/bin/expect + +set timeout 5 + +if {$argc < 1} { + puts "usage: run.exp \[shell] \[user]" + exit 1 +} +set shell [lindex $argv 0] + +if {$argc == 2} { + spawn /usr/bin/chsh [lindex $argv 1] +} else { + spawn /usr/bin/chsh +} + +expect "Password: " +send "myuserF00barbaz\r" +expect "Changing the login shell for myuser" +expect "Enter the new value, or press ENTER for the default" +expect -re "Login Shell .*\]: " +send "$shell\r" +expect "$shell\r\n" +expect "chsh: $shell is an invalid shell\r\n" +expect { + eof { + if ([string compare $expect_out(buffer) ""]) { + set fp [open "tmp/out" w] + puts $fp "$expect_out(buffer)" + puts "\nFAIL" + exit 1 + } + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + diff --git a/tests/chsh/11_chsh_auth_failure/chsh.test b/tests/chsh/11_chsh_auth_failure/chsh.test new file mode 100755 index 00000000..dda9bc6e --- /dev/null +++ b/tests/chsh/11_chsh_auth_failure/chsh.test @@ -0,0 +1,41 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chsh checks password for non root" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +chmod a+w tmp + +echo -n "execute chsh..." +su myuser -c "./run.exp /bin/bash" +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl data/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chsh/11_chsh_auth_failure/config.txt b/tests/chsh/11_chsh_auth_failure/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/11_chsh_auth_failure/config/etc/group b/tests/chsh/11_chsh_auth_failure/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chsh/11_chsh_auth_failure/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chsh/11_chsh_auth_failure/config/etc/gshadow b/tests/chsh/11_chsh_auth_failure/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chsh/11_chsh_auth_failure/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chsh/11_chsh_auth_failure/config/etc/passwd b/tests/chsh/11_chsh_auth_failure/config/etc/passwd new file mode 100644 index 00000000..ae3eda3f --- /dev/null +++ b/tests/chsh/11_chsh_auth_failure/config/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home:/bin/sh +myuser2:x:424243:424242::/home:/bin/sh diff --git a/tests/chsh/11_chsh_auth_failure/config/etc/shadow b/tests/chsh/11_chsh_auth_failure/config/etc/shadow new file mode 100644 index 00000000..f004fa26 --- /dev/null +++ b/tests/chsh/11_chsh_auth_failure/config/etc/shadow @@ -0,0 +1,21 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chsh/11_chsh_auth_failure/config/etc/shells b/tests/chsh/11_chsh_auth_failure/config/etc/shells new file mode 100644 index 00000000..16e922a1 --- /dev/null +++ b/tests/chsh/11_chsh_auth_failure/config/etc/shells @@ -0,0 +1,15 @@ +# /etc/shells: valid login shells +/bin/ash +/bin/csh +/bin/sh +/usr/bin/es +/usr/bin/ksh +/bin/ksh +/usr/bin/rc +/usr/bin/tcsh +/bin/tcsh +/usr/bin/zsh +/bin/sash +#/bin/zsh +/usr/bin/esh +/bin/rbash diff --git a/tests/chsh/11_chsh_auth_failure/data/passwd b/tests/chsh/11_chsh_auth_failure/data/passwd new file mode 100644 index 00000000..ae3eda3f --- /dev/null +++ b/tests/chsh/11_chsh_auth_failure/data/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home:/bin/sh +myuser2:x:424243:424242::/home:/bin/sh diff --git a/tests/chsh/11_chsh_auth_failure/run.exp b/tests/chsh/11_chsh_auth_failure/run.exp new file mode 100755 index 00000000..67e34552 --- /dev/null +++ b/tests/chsh/11_chsh_auth_failure/run.exp @@ -0,0 +1,36 @@ +#!/usr/bin/expect + +set timeout 5 + +if {$argc < 1} { + puts "usage: run.exp \[shell] \[user]" + exit 1 +} +set shell [lindex $argv 0] + +if {$argc == 2} { + spawn /usr/bin/chsh [lindex $argv 1] +} else { + spawn /usr/bin/chsh +} + +expect "Password: " +send "wrong pass\r" +expect "chsh: PAM: Authentication failure\r\n" +expect { + eof { + if ([string compare $expect_out(buffer) ""]) { + set fp [open "tmp/out" w] + puts $fp "$expect_out(buffer)" + puts "\nFAIL" + exit 1 + } + } default { + puts "\nFAIL" + exit 1 + } +} + +puts "\nPASS" +exit 0 + diff --git a/tests/chsh/12_chsh_warning_missing_shell/chsh.test b/tests/chsh/12_chsh_warning_missing_shell/chsh.test new file mode 100755 index 00000000..de12b13e --- /dev/null +++ b/tests/chsh/12_chsh_warning_missing_shell/chsh.test @@ -0,0 +1,48 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chsh can displays its usage message" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Change shell to a missing shell (chsh -s /tmp/bash bin)..." +chsh -s /tmp/bash bin 2>tmp/chsh.err +echo "OK" + +echo "chsh reported:" +echo "=======================================================================" +cat tmp/chsh.err +echo "=======================================================================" +echo -n "Check the usage message..." +diff -au data/chsh.err tmp/chsh.err +echo "usage message OK." +rm -f tmp/chsh.err + +echo -n "Check the passwd file..." +../../common/compare_file.pl data/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chsh/12_chsh_warning_missing_shell/config.txt b/tests/chsh/12_chsh_warning_missing_shell/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/12_chsh_warning_missing_shell/config/etc/group b/tests/chsh/12_chsh_warning_missing_shell/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chsh/12_chsh_warning_missing_shell/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chsh/12_chsh_warning_missing_shell/config/etc/gshadow b/tests/chsh/12_chsh_warning_missing_shell/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chsh/12_chsh_warning_missing_shell/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chsh/12_chsh_warning_missing_shell/config/etc/pam.d/chsh b/tests/chsh/12_chsh_warning_missing_shell/config/etc/pam.d/chsh new file mode 100644 index 00000000..7eb604d7 --- /dev/null +++ b/tests/chsh/12_chsh_warning_missing_shell/config/etc/pam.d/chsh @@ -0,0 +1,20 @@ +# +# The PAM configuration file for the Shadow `chsh' service +# + +# This will not allow a user to change their shell unless +# their current one is listed in /etc/shells. This keeps +# accounts with special shells from changing them. +auth required pam_shells.so + +# This allows root to change user shell without being +# prompted for a password +auth sufficient pam_rootok.so + +# The standard Unix authentication modules, used with +# NIS (man nsswitch) as well as normal /etc/passwd and +# /etc/shadow entries. +@include common-auth +@include common-account +@include common-session + diff --git a/tests/chsh/12_chsh_warning_missing_shell/config/etc/passwd b/tests/chsh/12_chsh_warning_missing_shell/config/etc/passwd new file mode 100644 index 00000000..ae3eda3f --- /dev/null +++ b/tests/chsh/12_chsh_warning_missing_shell/config/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home:/bin/sh +myuser2:x:424243:424242::/home:/bin/sh diff --git a/tests/chsh/12_chsh_warning_missing_shell/config/etc/shadow b/tests/chsh/12_chsh_warning_missing_shell/config/etc/shadow new file mode 100644 index 00000000..f004fa26 --- /dev/null +++ b/tests/chsh/12_chsh_warning_missing_shell/config/etc/shadow @@ -0,0 +1,21 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chsh/12_chsh_warning_missing_shell/config/etc/shells b/tests/chsh/12_chsh_warning_missing_shell/config/etc/shells new file mode 100644 index 00000000..4fd4378e --- /dev/null +++ b/tests/chsh/12_chsh_warning_missing_shell/config/etc/shells @@ -0,0 +1,16 @@ +# /etc/shells: valid login shells +/bin/ash +/bin/csh +/bin/sh +/usr/bin/es +/usr/bin/ksh +/bin/ksh +/usr/bin/rc +/usr/bin/tcsh +/bin/tcsh +/usr/bin/zsh +/bin/sash +/bin/zsh +/usr/bin/esh +/bin/bash +/bin/rbash diff --git a/tests/chsh/12_chsh_warning_missing_shell/data/chsh.err b/tests/chsh/12_chsh_warning_missing_shell/data/chsh.err new file mode 100644 index 00000000..7801a163 --- /dev/null +++ b/tests/chsh/12_chsh_warning_missing_shell/data/chsh.err @@ -0,0 +1 @@ +chsh: Warning: /tmp/bash does not exist diff --git a/tests/chsh/12_chsh_warning_missing_shell/data/passwd b/tests/chsh/12_chsh_warning_missing_shell/data/passwd new file mode 100644 index 00000000..7e745d96 --- /dev/null +++ b/tests/chsh/12_chsh_warning_missing_shell/data/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/tmp/bash +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home:/bin/sh +myuser2:x:424243:424242::/home:/bin/sh diff --git a/tests/chsh/13_chsh_warning_non_executable/chsh.test b/tests/chsh/13_chsh_warning_non_executable/chsh.test new file mode 100755 index 00000000..c98bad72 --- /dev/null +++ b/tests/chsh/13_chsh_warning_non_executable/chsh.test @@ -0,0 +1,52 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chsh can displays its usage message" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config; rm -f /tmp/bash' 0 + +change_config + +cp /bin/bash /tmp/bash +chmod a-x /tmp/bash + +echo -n "Change shell to a missing shell (chsh -s /tmp/bash bin)..." +chsh -s /tmp/bash bin 2>tmp/chsh.err +echo "OK" +rm -f /tmp/bash + +echo "chsh reported:" +echo "=======================================================================" +cat tmp/chsh.err +echo "=======================================================================" +echo -n "Check the usage message..." +diff -au data/chsh.err tmp/chsh.err +echo "usage message OK." +rm -f tmp/chsh.err + +echo -n "Check the passwd file..." +../../common/compare_file.pl data/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chsh/13_chsh_warning_non_executable/config.txt b/tests/chsh/13_chsh_warning_non_executable/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/13_chsh_warning_non_executable/config/etc/group b/tests/chsh/13_chsh_warning_non_executable/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chsh/13_chsh_warning_non_executable/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chsh/13_chsh_warning_non_executable/config/etc/gshadow b/tests/chsh/13_chsh_warning_non_executable/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chsh/13_chsh_warning_non_executable/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chsh/13_chsh_warning_non_executable/config/etc/pam.d/chsh b/tests/chsh/13_chsh_warning_non_executable/config/etc/pam.d/chsh new file mode 100644 index 00000000..7eb604d7 --- /dev/null +++ b/tests/chsh/13_chsh_warning_non_executable/config/etc/pam.d/chsh @@ -0,0 +1,20 @@ +# +# The PAM configuration file for the Shadow `chsh' service +# + +# This will not allow a user to change their shell unless +# their current one is listed in /etc/shells. This keeps +# accounts with special shells from changing them. +auth required pam_shells.so + +# This allows root to change user shell without being +# prompted for a password +auth sufficient pam_rootok.so + +# The standard Unix authentication modules, used with +# NIS (man nsswitch) as well as normal /etc/passwd and +# /etc/shadow entries. +@include common-auth +@include common-account +@include common-session + diff --git a/tests/chsh/13_chsh_warning_non_executable/config/etc/passwd b/tests/chsh/13_chsh_warning_non_executable/config/etc/passwd new file mode 100644 index 00000000..ae3eda3f --- /dev/null +++ b/tests/chsh/13_chsh_warning_non_executable/config/etc/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home:/bin/sh +myuser2:x:424243:424242::/home:/bin/sh diff --git a/tests/chsh/13_chsh_warning_non_executable/config/etc/shadow b/tests/chsh/13_chsh_warning_non_executable/config/etc/shadow new file mode 100644 index 00000000..f004fa26 --- /dev/null +++ b/tests/chsh/13_chsh_warning_non_executable/config/etc/shadow @@ -0,0 +1,21 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/chsh/13_chsh_warning_non_executable/config/etc/shells b/tests/chsh/13_chsh_warning_non_executable/config/etc/shells new file mode 100644 index 00000000..4fd4378e --- /dev/null +++ b/tests/chsh/13_chsh_warning_non_executable/config/etc/shells @@ -0,0 +1,16 @@ +# /etc/shells: valid login shells +/bin/ash +/bin/csh +/bin/sh +/usr/bin/es +/usr/bin/ksh +/bin/ksh +/usr/bin/rc +/usr/bin/tcsh +/bin/tcsh +/usr/bin/zsh +/bin/sash +/bin/zsh +/usr/bin/esh +/bin/bash +/bin/rbash diff --git a/tests/chsh/13_chsh_warning_non_executable/data/chsh.err b/tests/chsh/13_chsh_warning_non_executable/data/chsh.err new file mode 100644 index 00000000..4a87ec2e --- /dev/null +++ b/tests/chsh/13_chsh_warning_non_executable/data/chsh.err @@ -0,0 +1 @@ +chsh: Warning: /tmp/bash is not executable diff --git a/tests/chsh/13_chsh_warning_non_executable/data/passwd b/tests/chsh/13_chsh_warning_non_executable/data/passwd new file mode 100644 index 00000000..7e745d96 --- /dev/null +++ b/tests/chsh/13_chsh_warning_non_executable/data/passwd @@ -0,0 +1,21 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/tmp/bash +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser:x:424242:424242::/home:/bin/sh +myuser2:x:424243:424242::/home:/bin/sh diff --git a/tests/chsh/14_chsh_locked_passwd/chsh.test b/tests/chsh/14_chsh_locked_passwd/chsh.test new file mode 100755 index 00000000..c41e1ebb --- /dev/null +++ b/tests/chsh/14_chsh_locked_passwd/chsh.test @@ -0,0 +1,59 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chsh warns when passwd is already locked" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config; rm -f /etc/passwd.lock' 0 + +change_config + +echo -n "Create lock file for /etc/passwd..." +touch /etc/passwd.lock +echo "done" + +echo -n "Change shell (chsh -s /bin/bash bin)..." +chsh -s /bin/bash bin 2>tmp/chsh.err && exit 1 || { + status=$? +} +echo "OK" +rm -f /etc/passwd.lock + +echo -n "Check returned status ($status)..." +test "$status" = "1" +echo "OK" + +echo "chsh reported:" +echo "=======================================================================" +cat tmp/chsh.err +echo "=======================================================================" +echo -n "Check the error message..." +diff -au data/chsh.err tmp/chsh.err +echo "error message OK." +rm -f tmp/chsh.err + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chsh/14_chsh_locked_passwd/config.txt b/tests/chsh/14_chsh_locked_passwd/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/14_chsh_locked_passwd/config/etc/group b/tests/chsh/14_chsh_locked_passwd/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chsh/14_chsh_locked_passwd/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chsh/14_chsh_locked_passwd/config/etc/gshadow b/tests/chsh/14_chsh_locked_passwd/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chsh/14_chsh_locked_passwd/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chsh/14_chsh_locked_passwd/config/etc/passwd b/tests/chsh/14_chsh_locked_passwd/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chsh/14_chsh_locked_passwd/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chsh/14_chsh_locked_passwd/config/etc/shadow b/tests/chsh/14_chsh_locked_passwd/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chsh/14_chsh_locked_passwd/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chsh/14_chsh_locked_passwd/data/chsh.err b/tests/chsh/14_chsh_locked_passwd/data/chsh.err new file mode 100644 index 00000000..c5ebce9e --- /dev/null +++ b/tests/chsh/14_chsh_locked_passwd/data/chsh.err @@ -0,0 +1,2 @@ +chsh: existing lock file /etc/passwd.lock without a PID +chsh: cannot lock /etc/passwd; try again later. diff --git a/tests/chsh/15_chsh_PAM_error/chsh.test b/tests/chsh/15_chsh_PAM_error/chsh.test new file mode 100755 index 00000000..c900e0c3 --- /dev/null +++ b/tests/chsh/15_chsh_PAM_error/chsh.test @@ -0,0 +1,58 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "chsh warns when the chsh PAM configuration is invalid" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Remove the PAM configuration (/etc/pam.d/chsh /etc/pam.d/other)..." +rm -f /etc/pam.d/chsh /etc/pam.d/other +echo OK + +echo -n "Change shell (chsh -s /bin/bash bin)..." +chsh -s /bin/bash bin 2>tmp/chsh.err && exit 1 || { + status=$? +} +echo "OK" + +echo -n "Check returned status ($status)..." +test "$status" = "1" +echo "OK" + +echo "chsh reported:" +echo "=======================================================================" +cat tmp/chsh.err +echo "=======================================================================" +echo -n "Check the error message..." +diff -au data/chsh.err tmp/chsh.err +echo "error message OK." +rm -f tmp/chsh.err + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/chsh/15_chsh_PAM_error/config.txt b/tests/chsh/15_chsh_PAM_error/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/chsh/15_chsh_PAM_error/config/etc/group b/tests/chsh/15_chsh_PAM_error/config/etc/group new file mode 100644 index 00000000..245cc9cf --- /dev/null +++ b/tests/chsh/15_chsh_PAM_error/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +myuser:x:424242: diff --git a/tests/chsh/15_chsh_PAM_error/config/etc/gshadow b/tests/chsh/15_chsh_PAM_error/config/etc/gshadow new file mode 100644 index 00000000..25bd55bd --- /dev/null +++ b/tests/chsh/15_chsh_PAM_error/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +myuser:x:: diff --git a/tests/chsh/15_chsh_PAM_error/config/etc/pam.d/chsh b/tests/chsh/15_chsh_PAM_error/config/etc/pam.d/chsh new file mode 100644 index 00000000..91529699 --- /dev/null +++ b/tests/chsh/15_chsh_PAM_error/config/etc/pam.d/chsh @@ -0,0 +1 @@ +This file will be removed diff --git a/tests/chsh/15_chsh_PAM_error/config/etc/pam.d/other b/tests/chsh/15_chsh_PAM_error/config/etc/pam.d/other new file mode 100644 index 00000000..91529699 --- /dev/null +++ b/tests/chsh/15_chsh_PAM_error/config/etc/pam.d/other @@ -0,0 +1 @@ +This file will be removed diff --git a/tests/chsh/15_chsh_PAM_error/config/etc/passwd b/tests/chsh/15_chsh_PAM_error/config/etc/passwd new file mode 100644 index 00000000..5d27e129 --- /dev/null +++ b/tests/chsh/15_chsh_PAM_error/config/etc/passwd @@ -0,0 +1,26 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +myuser1:x:424242:424242::/home:/bin/bash +myuser2:x:424243:424242::/home:/bin/bash +myuser3:x:424244:424242::/home:/bin/bash +myuser4:x:424245:424242::/home:/bin/bash +myuser5:x:424246:424242::/home:/bin/bash +myuser6:x:424247:424242::/home:/bin/bash +myuser7:x:424248:424242::/home:/bin/bash diff --git a/tests/chsh/15_chsh_PAM_error/config/etc/shadow b/tests/chsh/15_chsh_PAM_error/config/etc/shadow new file mode 100644 index 00000000..da4c2bc4 --- /dev/null +++ b/tests/chsh/15_chsh_PAM_error/config/etc/shadow @@ -0,0 +1,26 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +myuser1:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: +myuser2:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12992:1:99996:5::: +myuser3:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::0: +myuser4:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::1: +myuser5:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:0:: +myuser6:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: +myuser7:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:1:: diff --git a/tests/chsh/15_chsh_PAM_error/data/chsh.err b/tests/chsh/15_chsh_PAM_error/data/chsh.err new file mode 100644 index 00000000..5c039d55 --- /dev/null +++ b/tests/chsh/15_chsh_PAM_error/data/chsh.err @@ -0,0 +1 @@ +chsh: PAM: Critical error - immediate abort diff --git a/tests/cktools/01/data/group b/tests/cktools/01/data/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/cktools/01/data/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/cktools/01/data/gshadow b/tests/cktools/01/data/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/cktools/01/data/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/cktools/01/data/passwd b/tests/cktools/01/data/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/cktools/01/data/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/cktools/01/data/run2.err b/tests/cktools/01/data/run2.err new file mode 100644 index 00000000..e69de29b diff --git a/tests/cktools/01/data/run2.out b/tests/cktools/01/data/run2.out new file mode 100644 index 00000000..00df3125 --- /dev/null +++ b/tests/cktools/01/data/run2.out @@ -0,0 +1,13 @@ +user 'lp': directory '/var/spool/lpd' does not exist +user 'news': directory '/var/spool/news' does not exist +user 'uucp': directory '/var/spool/uucp' does not exist +user 'www-data': directory '/var/www' does not exist +user 'list': directory '/var/list' does not exist +user 'irc': directory '/var/run/ircd' does not exist +user 'gnats': directory '/var/lib/gnats' does not exist +user 'nobody': directory '/nonexistent' does not exist +user 'Debian-exim': directory '/var/spool/exim4' does not exist +user 'test': no group 10002 +no matching password file entry in /etc/shadow +add user 'test' in /etc/shadow? No +pwck: no changes diff --git a/tests/cktools/01/data/shadow b/tests/cktools/01/data/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/cktools/01/data/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/cktools/01/run1 b/tests/cktools/01/run1 new file mode 100755 index 00000000..04aa793b --- /dev/null +++ b/tests/cktools/01/run1 @@ -0,0 +1,54 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +# Rational: +# Test that useradd can add an user and userdel removes it. + +save() +{ + [ ! -d tmp ] && mkdir tmp + for i in passwd group shadow gshadow + do + [ -f /etc/$i ] && cp /etc/$i tmp/$i + done + + true +} + +restore() +{ + for i in passwd group shadow gshadow + do + [ -f tmp/$i ] && cp tmp/$i /etc/$i && rm tmp/$i + done + rmdir tmp +} + +save + +# restore the files on exit +trap 'restore' 0 + +for i in passwd group shadow gshadow +do + cp data/$i /etc +done + +lines_passwd=$(wc -l /etc/passwd | cut -f1 -d" ") +lines_shadow=$(wc -l /etc/shadow | cut -f1 -d" ") +lines_group=$(wc -l /etc/group | cut -f1 -d" ") +lines_gshadow=$(wc -l /etc/gshadow | cut -f1 -d" ") + +echo "pwck accepts valid password file " +msg=$(pwck -r | grep -v "^user .*: directory .* does not exist$") +echo msg: $msg +test "$msg" = "pwck: no changes" +echo " OK" +echo "grpck accepts valid password file " +msg=$(grpck -r) +test "$msg" = "" +echo " OK" + diff --git a/tests/cktools/01/run2 b/tests/cktools/01/run2 new file mode 100755 index 00000000..df1e2777 --- /dev/null +++ b/tests/cktools/01/run2 @@ -0,0 +1,62 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +# Rational: +# Test that useradd can add an user and userdel removes it. + +save() +{ + [ ! -d tmp ] && mkdir tmp + for i in passwd group shadow gshadow + do + [ -f /etc/$i ] && cp /etc/$i tmp/$i + done + + true +} + +restore() +{ + rm -f tmp/err tmp/out + for i in passwd group shadow gshadow + do + [ -f tmp/$i ] && cp tmp/$i /etc/$i && rm tmp/$i + done + rmdir tmp +} + +save + +# restore the files on exit +trap 'restore' 0 + +for i in passwd group shadow gshadow +do + cp data/$i /etc +done + +lines_passwd=$(wc -l /etc/passwd | cut -f1 -d" ") +lines_shadow=$(wc -l /etc/shadow | cut -f1 -d" ") +lines_group=$(wc -l /etc/group | cut -f1 -d" ") +lines_gshadow=$(wc -l /etc/gshadow | cut -f1 -d" ") + +echo -n "Add an user without an entry in shadow " +echo "test:x:10002:10002::/tmp:/bin/false" >> /etc/passwd +echo "OK" + +echo "Check that pwck detects it " +pwck -r > tmp/out 2> tmp/err || true +diff -au data/run2.out tmp/out +diff -au data/run2.err tmp/err +echo " OK" +echo "grpck accepts valid password file " +msg=$(grpck -r) +test "$msg" = "" +echo " OK" + +#echo -n "Make sure pwck can fix it " +#pwcd +#echo "OK" diff --git a/tests/cktools/02_pwck_sort/config.txt b/tests/cktools/02_pwck_sort/config.txt new file mode 100644 index 00000000..3d43135c --- /dev/null +++ b/tests/cktools/02_pwck_sort/config.txt @@ -0,0 +1,5 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users diff --git a/tests/cktools/02_pwck_sort/config/etc/group b/tests/cktools/02_pwck_sort/config/etc/group new file mode 100644 index 00000000..50518255 --- /dev/null +++ b/tests/cktools/02_pwck_sort/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100:foo +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/02_pwck_sort/config/etc/gshadow b/tests/cktools/02_pwck_sort/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/02_pwck_sort/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/02_pwck_sort/config/etc/passwd b/tests/cktools/02_pwck_sort/config/etc/passwd new file mode 100644 index 00000000..e69a810c --- /dev/null +++ b/tests/cktools/02_pwck_sort/config/etc/passwd @@ -0,0 +1,20 @@ +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +root:x:0:0:root:/root:/bin/bash +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +games:x:5:60:games:/usr/games:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/02_pwck_sort/config/etc/shadow b/tests/cktools/02_pwck_sort/config/etc/shadow new file mode 100644 index 00000000..42cf133f --- /dev/null +++ b/tests/cktools/02_pwck_sort/config/etc/shadow @@ -0,0 +1,20 @@ +daemon:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/02_pwck_sort/data/passwd b/tests/cktools/02_pwck_sort/data/passwd new file mode 100644 index 00000000..5b45b52c --- /dev/null +++ b/tests/cktools/02_pwck_sort/data/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh diff --git a/tests/cktools/02_pwck_sort/data/shadow b/tests/cktools/02_pwck_sort/data/shadow new file mode 100644 index 00000000..8033f272 --- /dev/null +++ b/tests/cktools/02_pwck_sort/data/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: diff --git a/tests/cktools/02_pwck_sort/pwck.test b/tests/cktools/02_pwck_sort/pwck.test new file mode 100755 index 00000000..9d6afb1b --- /dev/null +++ b/tests/cktools/02_pwck_sort/pwck.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "pwck can sort the passwd entries" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Sort the passwd entries (pwck -s)..." +pwck -s +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl data/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl data/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/03_grpck_sort/config.txt b/tests/cktools/03_grpck_sort/config.txt new file mode 100644 index 00000000..3d43135c --- /dev/null +++ b/tests/cktools/03_grpck_sort/config.txt @@ -0,0 +1,5 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users diff --git a/tests/cktools/03_grpck_sort/config/etc/group b/tests/cktools/03_grpck_sort/config/etc/group new file mode 100644 index 00000000..afbb01e0 --- /dev/null +++ b/tests/cktools/03_grpck_sort/config/etc/group @@ -0,0 +1,42 @@ +daemon:x:1: +bin:x:2: +kmem:x:15: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +root:x:0: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +shadow:x:42: +gnats:x:41: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100:foo +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/03_grpck_sort/config/etc/gshadow b/tests/cktools/03_grpck_sort/config/etc/gshadow new file mode 100644 index 00000000..8182ad79 --- /dev/null +++ b/tests/cktools/03_grpck_sort/config/etc/gshadow @@ -0,0 +1,42 @@ +daemon:*:: +bin:*:: +kmem:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +root:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +shadow:*:: +gnats:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/03_grpck_sort/config/etc/passwd b/tests/cktools/03_grpck_sort/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/03_grpck_sort/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/03_grpck_sort/config/etc/shadow b/tests/cktools/03_grpck_sort/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/03_grpck_sort/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/03_grpck_sort/data/group b/tests/cktools/03_grpck_sort/data/group new file mode 100644 index 00000000..12659535 --- /dev/null +++ b/tests/cktools/03_grpck_sort/data/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100:foo +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: +nogroup:x:65534: diff --git a/tests/cktools/03_grpck_sort/data/gshadow b/tests/cktools/03_grpck_sort/data/gshadow new file mode 100644 index 00000000..f2209e3b --- /dev/null +++ b/tests/cktools/03_grpck_sort/data/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: +nogroup:*:: diff --git a/tests/cktools/03_grpck_sort/grpck.test b/tests/cktools/03_grpck_sort/grpck.test new file mode 100755 index 00000000..75e62cf6 --- /dev/null +++ b/tests/cktools/03_grpck_sort/grpck.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "grpck can sort the group entries" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Sort the group entries (grpck -s)..." +grpck -s +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl data/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl data/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/04_pwck_sort_missing_shadow_user/config.txt b/tests/cktools/04_pwck_sort_missing_shadow_user/config.txt new file mode 100644 index 00000000..3d43135c --- /dev/null +++ b/tests/cktools/04_pwck_sort_missing_shadow_user/config.txt @@ -0,0 +1,5 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users diff --git a/tests/cktools/04_pwck_sort_missing_shadow_user/config/etc/group b/tests/cktools/04_pwck_sort_missing_shadow_user/config/etc/group new file mode 100644 index 00000000..50518255 --- /dev/null +++ b/tests/cktools/04_pwck_sort_missing_shadow_user/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100:foo +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/04_pwck_sort_missing_shadow_user/config/etc/gshadow b/tests/cktools/04_pwck_sort_missing_shadow_user/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/04_pwck_sort_missing_shadow_user/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/04_pwck_sort_missing_shadow_user/config/etc/passwd b/tests/cktools/04_pwck_sort_missing_shadow_user/config/etc/passwd new file mode 100644 index 00000000..e69a810c --- /dev/null +++ b/tests/cktools/04_pwck_sort_missing_shadow_user/config/etc/passwd @@ -0,0 +1,20 @@ +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +root:x:0:0:root:/root:/bin/bash +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +games:x:5:60:games:/usr/games:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/04_pwck_sort_missing_shadow_user/config/etc/shadow b/tests/cktools/04_pwck_sort_missing_shadow_user/config/etc/shadow new file mode 100644 index 00000000..64573fab --- /dev/null +++ b/tests/cktools/04_pwck_sort_missing_shadow_user/config/etc/shadow @@ -0,0 +1,19 @@ +daemon:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/04_pwck_sort_missing_shadow_user/data/passwd b/tests/cktools/04_pwck_sort_missing_shadow_user/data/passwd new file mode 100644 index 00000000..5b45b52c --- /dev/null +++ b/tests/cktools/04_pwck_sort_missing_shadow_user/data/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh diff --git a/tests/cktools/04_pwck_sort_missing_shadow_user/data/shadow b/tests/cktools/04_pwck_sort_missing_shadow_user/data/shadow new file mode 100644 index 00000000..f1e4d806 --- /dev/null +++ b/tests/cktools/04_pwck_sort_missing_shadow_user/data/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +foo:!:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: diff --git a/tests/cktools/04_pwck_sort_missing_shadow_user/pwck.test b/tests/cktools/04_pwck_sort_missing_shadow_user/pwck.test new file mode 100755 index 00000000..9d6afb1b --- /dev/null +++ b/tests/cktools/04_pwck_sort_missing_shadow_user/pwck.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "pwck can sort the passwd entries" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Sort the passwd entries (pwck -s)..." +pwck -s +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl data/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl data/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/05_grpck_sort_missing_shadow_group/config.txt b/tests/cktools/05_grpck_sort_missing_shadow_group/config.txt new file mode 100644 index 00000000..3d43135c --- /dev/null +++ b/tests/cktools/05_grpck_sort_missing_shadow_group/config.txt @@ -0,0 +1,5 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users diff --git a/tests/cktools/05_grpck_sort_missing_shadow_group/config/etc/group b/tests/cktools/05_grpck_sort_missing_shadow_group/config/etc/group new file mode 100644 index 00000000..afbb01e0 --- /dev/null +++ b/tests/cktools/05_grpck_sort_missing_shadow_group/config/etc/group @@ -0,0 +1,42 @@ +daemon:x:1: +bin:x:2: +kmem:x:15: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +root:x:0: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +shadow:x:42: +gnats:x:41: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100:foo +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/05_grpck_sort_missing_shadow_group/config/etc/gshadow b/tests/cktools/05_grpck_sort_missing_shadow_group/config/etc/gshadow new file mode 100644 index 00000000..695bf8f5 --- /dev/null +++ b/tests/cktools/05_grpck_sort_missing_shadow_group/config/etc/gshadow @@ -0,0 +1,41 @@ +daemon:*:: +bin:*:: +kmem:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +root:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +shadow:*:: +gnats:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +foo:*:: diff --git a/tests/cktools/05_grpck_sort_missing_shadow_group/config/etc/passwd b/tests/cktools/05_grpck_sort_missing_shadow_group/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/05_grpck_sort_missing_shadow_group/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/05_grpck_sort_missing_shadow_group/config/etc/shadow b/tests/cktools/05_grpck_sort_missing_shadow_group/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/05_grpck_sort_missing_shadow_group/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/05_grpck_sort_missing_shadow_group/data/group b/tests/cktools/05_grpck_sort_missing_shadow_group/data/group new file mode 100644 index 00000000..12659535 --- /dev/null +++ b/tests/cktools/05_grpck_sort_missing_shadow_group/data/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100:foo +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: +nogroup:x:65534: diff --git a/tests/cktools/05_grpck_sort_missing_shadow_group/data/gshadow b/tests/cktools/05_grpck_sort_missing_shadow_group/data/gshadow new file mode 100644 index 00000000..7dcb3e59 --- /dev/null +++ b/tests/cktools/05_grpck_sort_missing_shadow_group/data/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +crontab:x:: +foo:*:: +nogroup:*:: diff --git a/tests/cktools/05_grpck_sort_missing_shadow_group/grpck.test b/tests/cktools/05_grpck_sort_missing_shadow_group/grpck.test new file mode 100755 index 00000000..75e62cf6 --- /dev/null +++ b/tests/cktools/05_grpck_sort_missing_shadow_group/grpck.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "grpck can sort the group entries" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Sort the group entries (grpck -s)..." +grpck -s +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl data/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl data/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/06_pwck_sort_NIS_server/config.txt b/tests/cktools/06_pwck_sort_NIS_server/config.txt new file mode 100644 index 00000000..3d43135c --- /dev/null +++ b/tests/cktools/06_pwck_sort_NIS_server/config.txt @@ -0,0 +1,5 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users diff --git a/tests/cktools/06_pwck_sort_NIS_server/config/etc/group b/tests/cktools/06_pwck_sort_NIS_server/config/etc/group new file mode 100644 index 00000000..18eb6c27 --- /dev/null +++ b/tests/cktools/06_pwck_sort_NIS_server/config/etc/group @@ -0,0 +1,43 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100:foo +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: ++::: diff --git a/tests/cktools/06_pwck_sort_NIS_server/config/etc/gshadow b/tests/cktools/06_pwck_sort_NIS_server/config/etc/gshadow new file mode 100644 index 00000000..7a7ef3a4 --- /dev/null +++ b/tests/cktools/06_pwck_sort_NIS_server/config/etc/gshadow @@ -0,0 +1,43 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: ++::: diff --git a/tests/cktools/06_pwck_sort_NIS_server/config/etc/passwd b/tests/cktools/06_pwck_sort_NIS_server/config/etc/passwd new file mode 100644 index 00000000..365af623 --- /dev/null +++ b/tests/cktools/06_pwck_sort_NIS_server/config/etc/passwd @@ -0,0 +1,24 @@ +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +root:x:0:0:root:/root:/bin/bash +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +games:x:5:60:games:/usr/games:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false ++miquels:::::: ++:*:::::/etc/NoShell +tester:*:299:10:Just a test account:/tmp: +miquels:1234567890123:101:10:Miquel van Smoorenburg:/home/miquels:/bin/zsh diff --git a/tests/cktools/06_pwck_sort_NIS_server/config/etc/shadow b/tests/cktools/06_pwck_sort_NIS_server/config/etc/shadow new file mode 100644 index 00000000..5a24e788 --- /dev/null +++ b/tests/cktools/06_pwck_sort_NIS_server/config/etc/shadow @@ -0,0 +1,21 @@ +daemon:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: ++:::::::: diff --git a/tests/cktools/06_pwck_sort_NIS_server/data/passwd b/tests/cktools/06_pwck_sort_NIS_server/data/passwd new file mode 100644 index 00000000..c12f8a96 --- /dev/null +++ b/tests/cktools/06_pwck_sort_NIS_server/data/passwd @@ -0,0 +1,24 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh ++miquels:::::: ++:*:::::/etc/NoShell +tester:*:299:10:Just a test account:/tmp: +miquels:1234567890123:101:10:Miquel van Smoorenburg:/home/miquels:/bin/zsh diff --git a/tests/cktools/06_pwck_sort_NIS_server/data/shadow b/tests/cktools/06_pwck_sort_NIS_server/data/shadow new file mode 100644 index 00000000..6a626dfd --- /dev/null +++ b/tests/cktools/06_pwck_sort_NIS_server/data/shadow @@ -0,0 +1,21 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: ++:::::::: diff --git a/tests/cktools/06_pwck_sort_NIS_server/pwck.test b/tests/cktools/06_pwck_sort_NIS_server/pwck.test new file mode 100755 index 00000000..9d6afb1b --- /dev/null +++ b/tests/cktools/06_pwck_sort_NIS_server/pwck.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "pwck can sort the passwd entries" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Sort the passwd entries (pwck -s)..." +pwck -s +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl data/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl data/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/07_pwck_sort_NIS_client/config.txt b/tests/cktools/07_pwck_sort_NIS_client/config.txt new file mode 100644 index 00000000..3d43135c --- /dev/null +++ b/tests/cktools/07_pwck_sort_NIS_client/config.txt @@ -0,0 +1,5 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users diff --git a/tests/cktools/07_pwck_sort_NIS_client/config/etc/group b/tests/cktools/07_pwck_sort_NIS_client/config/etc/group new file mode 100644 index 00000000..f914b38e --- /dev/null +++ b/tests/cktools/07_pwck_sort_NIS_client/config/etc/group @@ -0,0 +1,45 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100:foo +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: ++::: ++miquels::: ++foo::: diff --git a/tests/cktools/07_pwck_sort_NIS_client/config/etc/gshadow b/tests/cktools/07_pwck_sort_NIS_client/config/etc/gshadow new file mode 100644 index 00000000..7a7ef3a4 --- /dev/null +++ b/tests/cktools/07_pwck_sort_NIS_client/config/etc/gshadow @@ -0,0 +1,43 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: ++::: diff --git a/tests/cktools/07_pwck_sort_NIS_client/config/etc/passwd b/tests/cktools/07_pwck_sort_NIS_client/config/etc/passwd new file mode 100644 index 00000000..913d7fc9 --- /dev/null +++ b/tests/cktools/07_pwck_sort_NIS_client/config/etc/passwd @@ -0,0 +1,22 @@ +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +root:x:0:0:root:/root:/bin/bash +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +games:x:5:60:games:/usr/games:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false ++miquels:::::: ++:*:::::/etc/NoShell diff --git a/tests/cktools/07_pwck_sort_NIS_client/config/etc/shadow b/tests/cktools/07_pwck_sort_NIS_client/config/etc/shadow new file mode 100644 index 00000000..8f31dfbb --- /dev/null +++ b/tests/cktools/07_pwck_sort_NIS_client/config/etc/shadow @@ -0,0 +1,22 @@ +daemon:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: ++:::::::: ++foo2:!::::::: diff --git a/tests/cktools/07_pwck_sort_NIS_client/data/passwd b/tests/cktools/07_pwck_sort_NIS_client/data/passwd new file mode 100644 index 00000000..032bdd26 --- /dev/null +++ b/tests/cktools/07_pwck_sort_NIS_client/data/passwd @@ -0,0 +1,22 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh ++miquels:::::: ++:*:::::/etc/NoShell diff --git a/tests/cktools/07_pwck_sort_NIS_client/data/shadow b/tests/cktools/07_pwck_sort_NIS_client/data/shadow new file mode 100644 index 00000000..5350e77b --- /dev/null +++ b/tests/cktools/07_pwck_sort_NIS_client/data/shadow @@ -0,0 +1,22 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: ++:::::::: ++foo2:!::::::: diff --git a/tests/cktools/07_pwck_sort_NIS_client/pwck.test b/tests/cktools/07_pwck_sort_NIS_client/pwck.test new file mode 100755 index 00000000..9d6afb1b --- /dev/null +++ b/tests/cktools/07_pwck_sort_NIS_client/pwck.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../common/config.sh +. ../../common/log.sh + +log_start "$0" "pwck can sort the passwd entries" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Sort the passwd entries (pwck -s)..." +pwck -s +echo "OK" + +echo -n "Check the passwd file..." +../../common/compare_file.pl data/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../common/compare_file.pl data/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/04_grpck_missing_field_group_delete/config.txt b/tests/cktools/grpck/04_grpck_missing_field_group_delete/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/grpck/04_grpck_missing_field_group_delete/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/grpck/04_grpck_missing_field_group_delete/config/etc/group b/tests/cktools/grpck/04_grpck_missing_field_group_delete/config/etc/group new file mode 100644 index 00000000..d1e687c3 --- /dev/null +++ b/tests/cktools/grpck/04_grpck_missing_field_group_delete/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x diff --git a/tests/cktools/grpck/04_grpck_missing_field_group_delete/config/etc/gshadow b/tests/cktools/grpck/04_grpck_missing_field_group_delete/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/grpck/04_grpck_missing_field_group_delete/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/grpck/04_grpck_missing_field_group_delete/config/etc/passwd b/tests/cktools/grpck/04_grpck_missing_field_group_delete/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/04_grpck_missing_field_group_delete/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/04_grpck_missing_field_group_delete/config/etc/shadow b/tests/cktools/grpck/04_grpck_missing_field_group_delete/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/04_grpck_missing_field_group_delete/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/04_grpck_missing_field_group_delete/data/group b/tests/cktools/grpck/04_grpck_missing_field_group_delete/data/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/cktools/grpck/04_grpck_missing_field_group_delete/data/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/cktools/grpck/04_grpck_missing_field_group_delete/data/gshadow b/tests/cktools/grpck/04_grpck_missing_field_group_delete/data/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/cktools/grpck/04_grpck_missing_field_group_delete/data/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/cktools/grpck/04_grpck_missing_field_group_delete/grpck.exp b/tests/cktools/grpck/04_grpck_missing_field_group_delete/grpck.exp new file mode 100755 index 00000000..6d0be77e --- /dev/null +++ b/tests/cktools/grpck/04_grpck_missing_field_group_delete/grpck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "grpck\r" +expect "invalid group file entry" +expect "delete line 'foo:x'? " +send "yes\r" +expect "no matching group file entry in /etc/group" +expect "delete line 'foo:*::'? " +send "yes\r" +expect "grpck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/grpck/04_grpck_missing_field_group_delete/grpck.test b/tests/cktools/grpck/04_grpck_missing_field_group_delete/grpck.test new file mode 100755 index 00000000..906d6294 --- /dev/null +++ b/tests/cktools/grpck/04_grpck_missing_field_group_delete/grpck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./grpck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl data/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl data/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/05_grpck_missing_field_group_keep/config.txt b/tests/cktools/grpck/05_grpck_missing_field_group_keep/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/grpck/05_grpck_missing_field_group_keep/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/grpck/05_grpck_missing_field_group_keep/config/etc/group b/tests/cktools/grpck/05_grpck_missing_field_group_keep/config/etc/group new file mode 100644 index 00000000..d1e687c3 --- /dev/null +++ b/tests/cktools/grpck/05_grpck_missing_field_group_keep/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x diff --git a/tests/cktools/grpck/05_grpck_missing_field_group_keep/config/etc/gshadow b/tests/cktools/grpck/05_grpck_missing_field_group_keep/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/grpck/05_grpck_missing_field_group_keep/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/grpck/05_grpck_missing_field_group_keep/config/etc/passwd b/tests/cktools/grpck/05_grpck_missing_field_group_keep/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/05_grpck_missing_field_group_keep/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/05_grpck_missing_field_group_keep/config/etc/shadow b/tests/cktools/grpck/05_grpck_missing_field_group_keep/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/05_grpck_missing_field_group_keep/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/05_grpck_missing_field_group_keep/data/gshadow b/tests/cktools/grpck/05_grpck_missing_field_group_keep/data/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/cktools/grpck/05_grpck_missing_field_group_keep/data/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/cktools/grpck/05_grpck_missing_field_group_keep/grpck.exp b/tests/cktools/grpck/05_grpck_missing_field_group_keep/grpck.exp new file mode 100755 index 00000000..cfd779fb --- /dev/null +++ b/tests/cktools/grpck/05_grpck_missing_field_group_keep/grpck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "grpck\r" +expect "invalid group file entry" +expect "delete line 'foo:x'? " +send "no\r" +expect "no matching group file entry in /etc/group" +expect "delete line 'foo:*::'? " +send "yes\r" +expect "grpck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/grpck/05_grpck_missing_field_group_keep/grpck.test b/tests/cktools/grpck/05_grpck_missing_field_group_keep/grpck.test new file mode 100755 index 00000000..dcfa2498 --- /dev/null +++ b/tests/cktools/grpck/05_grpck_missing_field_group_keep/grpck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./grpck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl data/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/06_grpck_missing_field_group_no_changes/config.txt b/tests/cktools/grpck/06_grpck_missing_field_group_no_changes/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/grpck/06_grpck_missing_field_group_no_changes/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/grpck/06_grpck_missing_field_group_no_changes/config/etc/group b/tests/cktools/grpck/06_grpck_missing_field_group_no_changes/config/etc/group new file mode 100644 index 00000000..d1e687c3 --- /dev/null +++ b/tests/cktools/grpck/06_grpck_missing_field_group_no_changes/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x diff --git a/tests/cktools/grpck/06_grpck_missing_field_group_no_changes/config/etc/gshadow b/tests/cktools/grpck/06_grpck_missing_field_group_no_changes/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/grpck/06_grpck_missing_field_group_no_changes/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/grpck/06_grpck_missing_field_group_no_changes/config/etc/passwd b/tests/cktools/grpck/06_grpck_missing_field_group_no_changes/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/06_grpck_missing_field_group_no_changes/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/06_grpck_missing_field_group_no_changes/config/etc/shadow b/tests/cktools/grpck/06_grpck_missing_field_group_no_changes/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/06_grpck_missing_field_group_no_changes/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/06_grpck_missing_field_group_no_changes/grpck.exp b/tests/cktools/grpck/06_grpck_missing_field_group_no_changes/grpck.exp new file mode 100755 index 00000000..48adf7a1 --- /dev/null +++ b/tests/cktools/grpck/06_grpck_missing_field_group_no_changes/grpck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "grpck\r" +expect "invalid group file entry" +expect "delete line 'foo:x'? " +send "no\r" +expect "no matching group file entry in /etc/group" +expect "delete line 'foo:*::'? " +send "no\r" +expect "grpck: no changes" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/grpck/06_grpck_missing_field_group_no_changes/grpck.test b/tests/cktools/grpck/06_grpck_missing_field_group_no_changes/grpck.test new file mode 100755 index 00000000..81bf12ca --- /dev/null +++ b/tests/cktools/grpck/06_grpck_missing_field_group_no_changes/grpck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./grpck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/07_grpck_missing_field_gshadow_add/config.txt b/tests/cktools/grpck/07_grpck_missing_field_gshadow_add/config.txt new file mode 100644 index 00000000..52fad51b --- /dev/null +++ b/tests/cktools/grpck/07_grpck_missing_field_gshadow_add/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in gshadow diff --git a/tests/cktools/grpck/07_grpck_missing_field_gshadow_add/config/etc/group b/tests/cktools/grpck/07_grpck_missing_field_gshadow_add/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/grpck/07_grpck_missing_field_gshadow_add/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/grpck/07_grpck_missing_field_gshadow_add/config/etc/gshadow b/tests/cktools/grpck/07_grpck_missing_field_gshadow_add/config/etc/gshadow new file mode 100644 index 00000000..b8fb2347 --- /dev/null +++ b/tests/cktools/grpck/07_grpck_missing_field_gshadow_add/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*: diff --git a/tests/cktools/grpck/07_grpck_missing_field_gshadow_add/config/etc/passwd b/tests/cktools/grpck/07_grpck_missing_field_gshadow_add/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/07_grpck_missing_field_gshadow_add/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/07_grpck_missing_field_gshadow_add/config/etc/shadow b/tests/cktools/grpck/07_grpck_missing_field_gshadow_add/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/07_grpck_missing_field_gshadow_add/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/07_grpck_missing_field_gshadow_add/data/gshadow b/tests/cktools/grpck/07_grpck_missing_field_gshadow_add/data/gshadow new file mode 100644 index 00000000..be1575eb --- /dev/null +++ b/tests/cktools/grpck/07_grpck_missing_field_gshadow_add/data/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:x:: diff --git a/tests/cktools/grpck/07_grpck_missing_field_gshadow_add/grpck.exp b/tests/cktools/grpck/07_grpck_missing_field_gshadow_add/grpck.exp new file mode 100755 index 00000000..5229ab52 --- /dev/null +++ b/tests/cktools/grpck/07_grpck_missing_field_gshadow_add/grpck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "grpck\r" +expect "no matching group file entry in /etc/gshadow" +expect "add group 'foo' in /etc/gshadow? " +send "yes\r" +expect "invalid shadow group file entry" +expect "delete line 'foo:*:'? " +send "yes\r" +expect "grpck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/grpck/07_grpck_missing_field_gshadow_add/grpck.test b/tests/cktools/grpck/07_grpck_missing_field_gshadow_add/grpck.test new file mode 100755 index 00000000..dcfa2498 --- /dev/null +++ b/tests/cktools/grpck/07_grpck_missing_field_gshadow_add/grpck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./grpck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl data/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/config.txt b/tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/config.txt new file mode 100644 index 00000000..52fad51b --- /dev/null +++ b/tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in gshadow diff --git a/tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/config/etc/group b/tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/config/etc/gshadow b/tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/config/etc/gshadow new file mode 100644 index 00000000..b8fb2347 --- /dev/null +++ b/tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*: diff --git a/tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/config/etc/passwd b/tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/config/etc/shadow b/tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/data/gshadow b/tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/data/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/data/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/grpck.exp b/tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/grpck.exp new file mode 100755 index 00000000..5181ebaf --- /dev/null +++ b/tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/grpck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "grpck\r" +expect "no matching group file entry in /etc/gshadow" +expect "add group 'foo' in /etc/gshadow? " +send "no\r" +expect "invalid shadow group file entry" +expect "delete line 'foo:*:'? " +send "yes\r" +expect "grpck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/grpck.test b/tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/grpck.test new file mode 100755 index 00000000..dcfa2498 --- /dev/null +++ b/tests/cktools/grpck/08_grpck_missing_field_gshadow_delete/grpck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./grpck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl data/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/config.txt b/tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/config.txt new file mode 100644 index 00000000..52fad51b --- /dev/null +++ b/tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in gshadow diff --git a/tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/config/etc/group b/tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/config/etc/gshadow b/tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/config/etc/gshadow new file mode 100644 index 00000000..b8fb2347 --- /dev/null +++ b/tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*: diff --git a/tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/config/etc/passwd b/tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/config/etc/shadow b/tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/grpck.exp b/tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/grpck.exp new file mode 100755 index 00000000..3ac4abee --- /dev/null +++ b/tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/grpck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "grpck\r" +expect "no matching group file entry in /etc/gshadow" +expect "add group 'foo' in /etc/gshadow? " +send "no\r" +expect "invalid shadow group file entry" +expect "delete line 'foo:*:'? " +send "no\r" +expect "grpck: no changes" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/grpck.test b/tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/grpck.test new file mode 100755 index 00000000..81bf12ca --- /dev/null +++ b/tests/cktools/grpck/09_grpck_missing_field_gshadow_no_changes/grpck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./grpck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/10_grpck_missing_field_group_local/config.txt b/tests/cktools/grpck/10_grpck_missing_field_group_local/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/grpck/10_grpck_missing_field_group_local/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/grpck/10_grpck_missing_field_group_local/config/etc/group b/tests/cktools/grpck/10_grpck_missing_field_group_local/config/etc/group new file mode 100644 index 00000000..d1e687c3 --- /dev/null +++ b/tests/cktools/grpck/10_grpck_missing_field_group_local/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x diff --git a/tests/cktools/grpck/10_grpck_missing_field_group_local/config/etc/gshadow b/tests/cktools/grpck/10_grpck_missing_field_group_local/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/grpck/10_grpck_missing_field_group_local/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/grpck/10_grpck_missing_field_group_local/config/etc/passwd b/tests/cktools/grpck/10_grpck_missing_field_group_local/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/10_grpck_missing_field_group_local/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/10_grpck_missing_field_group_local/config/etc/shadow b/tests/cktools/grpck/10_grpck_missing_field_group_local/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/10_grpck_missing_field_group_local/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/10_grpck_missing_field_group_local/data/group b/tests/cktools/grpck/10_grpck_missing_field_group_local/data/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/cktools/grpck/10_grpck_missing_field_group_local/data/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/cktools/grpck/10_grpck_missing_field_group_local/data/gshadow b/tests/cktools/grpck/10_grpck_missing_field_group_local/data/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/cktools/grpck/10_grpck_missing_field_group_local/data/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/cktools/grpck/10_grpck_missing_field_group_local/grpck.exp b/tests/cktools/grpck/10_grpck_missing_field_group_local/grpck.exp new file mode 100755 index 00000000..f8228c27 --- /dev/null +++ b/tests/cktools/grpck/10_grpck_missing_field_group_local/grpck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "grpck tmp/group tmp/gshadow\r" +expect "invalid group file entry" +expect "delete line 'foo:x'? " +send "yes\r" +expect "no matching group file entry in tmp/group" +expect "delete line 'foo:*::'? " +send "yes\r" +expect "grpck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/grpck/10_grpck_missing_field_group_local/grpck.test b/tests/cktools/grpck/10_grpck_missing_field_group_local/grpck.test new file mode 100755 index 00000000..63c75aa0 --- /dev/null +++ b/tests/cktools/grpck/10_grpck_missing_field_group_local/grpck.test @@ -0,0 +1,45 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "copy group and gshadow localy..." +cp /etc/group /etc/gshadow tmp/ +echo "OK" + +./grpck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl data/group tmp/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +../../../common/compare_file.pl data/gshadow tmp/gshadow +echo "OK" + +rm -f tmp/group tmp/group- tmp/gshadow tmp/gshadow- + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/config.txt b/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/config.txt new file mode 100644 index 00000000..52fad51b --- /dev/null +++ b/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in gshadow diff --git a/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/config/etc/group b/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/config/etc/gshadow b/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/config/etc/gshadow new file mode 100644 index 00000000..b8fb2347 --- /dev/null +++ b/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*: diff --git a/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/config/etc/passwd b/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/config/etc/shadow b/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/data/group b/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/data/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/data/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/data/gshadow b/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/data/gshadow new file mode 100644 index 00000000..be1575eb --- /dev/null +++ b/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/data/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:x:: diff --git a/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/data/shadow b/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/data/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/data/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/grpck.exp b/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/grpck.exp new file mode 100755 index 00000000..d111afc3 --- /dev/null +++ b/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/grpck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "grpck tmp/group tmp/gshadow\r" +expect "no matching group file entry in tmp/gshadow" +expect "add group 'foo' in tmp/gshadow? " +send "yes\r" +expect "invalid shadow group file entry" +expect "delete line 'foo:*:'? " +send "yes\r" +expect "grpck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/grpck.test b/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/grpck.test new file mode 100755 index 00000000..63c75aa0 --- /dev/null +++ b/tests/cktools/grpck/11_grpck_missing_field_gshadow_local/grpck.test @@ -0,0 +1,45 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "copy group and gshadow localy..." +cp /etc/group /etc/gshadow tmp/ +echo "OK" + +./grpck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl data/group tmp/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +../../../common/compare_file.pl data/gshadow tmp/gshadow +echo "OK" + +rm -f tmp/group tmp/group- tmp/gshadow tmp/gshadow- + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/12_grpck_unknown_user_group/config.txt b/tests/cktools/grpck/12_grpck_unknown_user_group/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/grpck/12_grpck_unknown_user_group/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/grpck/12_grpck_unknown_user_group/config/etc/group b/tests/cktools/grpck/12_grpck_unknown_user_group/config/etc/group new file mode 100644 index 00000000..757aef84 --- /dev/null +++ b/tests/cktools/grpck/12_grpck_unknown_user_group/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000:daemon,foo2,bin diff --git a/tests/cktools/grpck/12_grpck_unknown_user_group/config/etc/gshadow b/tests/cktools/grpck/12_grpck_unknown_user_group/config/etc/gshadow new file mode 100644 index 00000000..3e97ea42 --- /dev/null +++ b/tests/cktools/grpck/12_grpck_unknown_user_group/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*::daemon,bin diff --git a/tests/cktools/grpck/12_grpck_unknown_user_group/config/etc/passwd b/tests/cktools/grpck/12_grpck_unknown_user_group/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/12_grpck_unknown_user_group/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/12_grpck_unknown_user_group/config/etc/shadow b/tests/cktools/grpck/12_grpck_unknown_user_group/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/12_grpck_unknown_user_group/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/12_grpck_unknown_user_group/data/group b/tests/cktools/grpck/12_grpck_unknown_user_group/data/group new file mode 100644 index 00000000..cf18eb5b --- /dev/null +++ b/tests/cktools/grpck/12_grpck_unknown_user_group/data/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000:daemon,bin diff --git a/tests/cktools/grpck/12_grpck_unknown_user_group/grpck.exp b/tests/cktools/grpck/12_grpck_unknown_user_group/grpck.exp new file mode 100755 index 00000000..1dd1d010 --- /dev/null +++ b/tests/cktools/grpck/12_grpck_unknown_user_group/grpck.exp @@ -0,0 +1,20 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "grpck\r" +expect "group foo: no user foo2" +expect "delete member 'foo2'? " +send "yes\r" +expect "grpck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/grpck/12_grpck_unknown_user_group/grpck.test b/tests/cktools/grpck/12_grpck_unknown_user_group/grpck.test new file mode 100755 index 00000000..741bfe18 --- /dev/null +++ b/tests/cktools/grpck/12_grpck_unknown_user_group/grpck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./grpck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl data/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/13_grpck_unknown_user_gshadow/config.txt b/tests/cktools/grpck/13_grpck_unknown_user_gshadow/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/grpck/13_grpck_unknown_user_gshadow/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/grpck/13_grpck_unknown_user_gshadow/config/etc/group b/tests/cktools/grpck/13_grpck_unknown_user_gshadow/config/etc/group new file mode 100644 index 00000000..cf18eb5b --- /dev/null +++ b/tests/cktools/grpck/13_grpck_unknown_user_gshadow/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000:daemon,bin diff --git a/tests/cktools/grpck/13_grpck_unknown_user_gshadow/config/etc/gshadow b/tests/cktools/grpck/13_grpck_unknown_user_gshadow/config/etc/gshadow new file mode 100644 index 00000000..d2a17827 --- /dev/null +++ b/tests/cktools/grpck/13_grpck_unknown_user_gshadow/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*::daemon,foo2,bin diff --git a/tests/cktools/grpck/13_grpck_unknown_user_gshadow/config/etc/passwd b/tests/cktools/grpck/13_grpck_unknown_user_gshadow/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/13_grpck_unknown_user_gshadow/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/13_grpck_unknown_user_gshadow/config/etc/shadow b/tests/cktools/grpck/13_grpck_unknown_user_gshadow/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/13_grpck_unknown_user_gshadow/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/13_grpck_unknown_user_gshadow/data/gshadow b/tests/cktools/grpck/13_grpck_unknown_user_gshadow/data/gshadow new file mode 100644 index 00000000..3e97ea42 --- /dev/null +++ b/tests/cktools/grpck/13_grpck_unknown_user_gshadow/data/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*::daemon,bin diff --git a/tests/cktools/grpck/13_grpck_unknown_user_gshadow/grpck.exp b/tests/cktools/grpck/13_grpck_unknown_user_gshadow/grpck.exp new file mode 100755 index 00000000..b470a90f --- /dev/null +++ b/tests/cktools/grpck/13_grpck_unknown_user_gshadow/grpck.exp @@ -0,0 +1,21 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "grpck\r" +expect "'foo2' is a member of the 'foo' group in /etc/gshadow but not in /etc/group" +expect "shadow group foo: no user foo2" +expect "delete member 'foo2'? " +send "yes\r" +expect "grpck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/grpck/13_grpck_unknown_user_gshadow/grpck.test b/tests/cktools/grpck/13_grpck_unknown_user_gshadow/grpck.test new file mode 100755 index 00000000..dcfa2498 --- /dev/null +++ b/tests/cktools/grpck/13_grpck_unknown_user_gshadow/grpck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./grpck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl data/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/config.txt b/tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/config/etc/group b/tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/config/etc/group new file mode 100644 index 00000000..cf18eb5b --- /dev/null +++ b/tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000:daemon,bin diff --git a/tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/config/etc/gshadow b/tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/config/etc/gshadow new file mode 100644 index 00000000..a7d227e6 --- /dev/null +++ b/tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:foo3,foo4:foo3,daemon,bin,foo2 diff --git a/tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/config/etc/passwd b/tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/config/etc/shadow b/tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/data/gshadow b/tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/data/gshadow new file mode 100644 index 00000000..3e97ea42 --- /dev/null +++ b/tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/data/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*::daemon,bin diff --git a/tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/grpck.exp b/tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/grpck.exp new file mode 100755 index 00000000..ec5378b8 --- /dev/null +++ b/tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/grpck.exp @@ -0,0 +1,31 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "grpck\r" +expect "'foo3' is a member of the 'foo' group in /etc/gshadow but not in /etc/group" +expect "'foo2' is a member of the 'foo' group in /etc/gshadow but not in /etc/group" +expect "shadow group foo: no administrative user foo3" +expect "delete administrative member 'foo3'? " +send "yes\r" +expect "shadow group foo: no administrative user foo4" +expect "delete administrative member 'foo4'? " +send "yes\r" +expect "shadow group foo: no user foo3" +expect "delete member 'foo3'? " +send "yes\r" +expect "shadow group foo: no user foo2" +expect "delete member 'foo2'? " +send "yes\r" +expect "grpck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/grpck.test b/tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/grpck.test new file mode 100755 index 00000000..dcfa2498 --- /dev/null +++ b/tests/cktools/grpck/14_grpck_unknown_user_adm_gshadow/grpck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./grpck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl data/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/config.txt b/tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/config/etc/group b/tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/config/etc/group new file mode 100644 index 00000000..4eeb1ff3 --- /dev/null +++ b/tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000:daemon,foo2,foo2,bin diff --git a/tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/config/etc/gshadow b/tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/config/etc/gshadow new file mode 100644 index 00000000..3e97ea42 --- /dev/null +++ b/tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*::daemon,bin diff --git a/tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/config/etc/passwd b/tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/config/etc/shadow b/tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/data/group b/tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/data/group new file mode 100644 index 00000000..cf18eb5b --- /dev/null +++ b/tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/data/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000:daemon,bin diff --git a/tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/grpck.exp b/tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/grpck.exp new file mode 100755 index 00000000..c12fbd81 --- /dev/null +++ b/tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/grpck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "grpck\r" +expect "group foo: no user foo2" +expect "delete member 'foo2'? " +send "yes\r" +expect "group foo: no user foo2" +expect "delete member 'foo2'? " +send "yes\r" +expect "grpck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/grpck.test b/tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/grpck.test new file mode 100755 index 00000000..741bfe18 --- /dev/null +++ b/tests/cktools/grpck/15_grpck_unknown_user_duplicate_group/grpck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./grpck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl data/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/16_grpck_duplicate_entry_group/config.txt b/tests/cktools/grpck/16_grpck_duplicate_entry_group/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/grpck/16_grpck_duplicate_entry_group/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/grpck/16_grpck_duplicate_entry_group/config/etc/group b/tests/cktools/grpck/16_grpck_duplicate_entry_group/config/etc/group new file mode 100644 index 00000000..73518006 --- /dev/null +++ b/tests/cktools/grpck/16_grpck_duplicate_entry_group/config/etc/group @@ -0,0 +1,43 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000:daemon +foo:x:1000:bin diff --git a/tests/cktools/grpck/16_grpck_duplicate_entry_group/config/etc/gshadow b/tests/cktools/grpck/16_grpck_duplicate_entry_group/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/grpck/16_grpck_duplicate_entry_group/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/grpck/16_grpck_duplicate_entry_group/config/etc/passwd b/tests/cktools/grpck/16_grpck_duplicate_entry_group/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/16_grpck_duplicate_entry_group/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/16_grpck_duplicate_entry_group/config/etc/shadow b/tests/cktools/grpck/16_grpck_duplicate_entry_group/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/16_grpck_duplicate_entry_group/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/16_grpck_duplicate_entry_group/data/group b/tests/cktools/grpck/16_grpck_duplicate_entry_group/data/group new file mode 100644 index 00000000..5c08ae19 --- /dev/null +++ b/tests/cktools/grpck/16_grpck_duplicate_entry_group/data/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000:bin diff --git a/tests/cktools/grpck/16_grpck_duplicate_entry_group/grpck.exp b/tests/cktools/grpck/16_grpck_duplicate_entry_group/grpck.exp new file mode 100755 index 00000000..cce68028 --- /dev/null +++ b/tests/cktools/grpck/16_grpck_duplicate_entry_group/grpck.exp @@ -0,0 +1,20 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "grpck\r" +expect "duplicate group entry" +expect "delete line 'foo:x:1000:daemon'? " +send "yes\r" +expect "grpck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/grpck/16_grpck_duplicate_entry_group/grpck.test b/tests/cktools/grpck/16_grpck_duplicate_entry_group/grpck.test new file mode 100755 index 00000000..741bfe18 --- /dev/null +++ b/tests/cktools/grpck/16_grpck_duplicate_entry_group/grpck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./grpck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl data/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/config.txt b/tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/config/etc/group b/tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/config/etc/group new file mode 100644 index 00000000..fda0a6df --- /dev/null +++ b/tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000:daemon diff --git a/tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/config/etc/gshadow b/tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/config/etc/gshadow new file mode 100644 index 00000000..124c8051 --- /dev/null +++ b/tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/config/etc/gshadow @@ -0,0 +1,43 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +foo:*::daemon +crontab:x:: +Debian-exim:x:: +foo:*::bin diff --git a/tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/config/etc/passwd b/tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/config/etc/shadow b/tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/data/gshadow b/tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/data/gshadow new file mode 100644 index 00000000..bdd8388f --- /dev/null +++ b/tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/data/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*::bin diff --git a/tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/grpck.exp b/tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/grpck.exp new file mode 100755 index 00000000..1b123f11 --- /dev/null +++ b/tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/grpck.exp @@ -0,0 +1,20 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "grpck\r" +expect "duplicate shadow group entry" +expect "delete line 'foo:*::daemon'? " +send "yes\r" +expect "grpck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/grpck.test b/tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/grpck.test new file mode 100755 index 00000000..dcfa2498 --- /dev/null +++ b/tests/cktools/grpck/17_grpck_duplicate_entry_gshadow/grpck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./grpck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl data/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/config.txt b/tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/config/etc/group b/tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/config/etc/group new file mode 100644 index 00000000..73518006 --- /dev/null +++ b/tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/config/etc/group @@ -0,0 +1,43 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000:daemon +foo:x:1000:bin diff --git a/tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/config/etc/gshadow b/tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/config/etc/passwd b/tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/config/etc/shadow b/tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/grpck.exp b/tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/grpck.exp new file mode 100755 index 00000000..7e544151 --- /dev/null +++ b/tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/grpck.exp @@ -0,0 +1,24 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "grpck\r" +expect "duplicate group entry" +expect "delete line 'foo:x:1000:daemon'? " +send "no\r" +expect "'daemon' is a member of the 'foo' group in /etc/group but not in /etc/gshadow" +expect "duplicate group entry" +expect "delete line 'foo:x:1000:bin'? " +send "no \r" +expect "grpck: no changes" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/grpck.test b/tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/grpck.test new file mode 100755 index 00000000..81bf12ca --- /dev/null +++ b/tests/cktools/grpck/18_grpck_duplicate_entry_group_no_changes/grpck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./grpck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/config.txt b/tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/config/etc/group b/tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/config/etc/group new file mode 100644 index 00000000..fda0a6df --- /dev/null +++ b/tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000:daemon diff --git a/tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/config/etc/gshadow b/tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/config/etc/gshadow new file mode 100644 index 00000000..124c8051 --- /dev/null +++ b/tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/config/etc/gshadow @@ -0,0 +1,43 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +foo:*::daemon +crontab:x:: +Debian-exim:x:: +foo:*::bin diff --git a/tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/config/etc/passwd b/tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/config/etc/shadow b/tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/grpck.exp b/tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/grpck.exp new file mode 100755 index 00000000..aa7f11f9 --- /dev/null +++ b/tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/grpck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "grpck\r" +expect "duplicate shadow group entry" +expect "delete line 'foo:*::daemon'? " +send "no\r" +expect "duplicate shadow group entry" +expect "delete line 'foo:*::bin'? " +send "no\r" +expect "grpck: no changes" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/grpck.test b/tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/grpck.test new file mode 100755 index 00000000..81bf12ca --- /dev/null +++ b/tests/cktools/grpck/19_grpck_duplicate_entry_gshadow_no_changes/grpck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./grpck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/config.txt b/tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/config/etc/group b/tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/config/etc/group new file mode 100644 index 00000000..fda0a6df --- /dev/null +++ b/tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000:daemon diff --git a/tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/config/etc/gshadow b/tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/config/etc/gshadow new file mode 100644 index 00000000..124c8051 --- /dev/null +++ b/tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/config/etc/gshadow @@ -0,0 +1,43 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +foo:*::daemon +crontab:x:: +Debian-exim:x:: +foo:*::bin diff --git a/tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/config/etc/passwd b/tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/config/etc/shadow b/tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/data/gshadow b/tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/data/gshadow new file mode 100644 index 00000000..a1a4f31e --- /dev/null +++ b/tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/data/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +foo:*::daemon +crontab:x:: +Debian-exim:x:: diff --git a/tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/grpck.exp b/tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/grpck.exp new file mode 100755 index 00000000..ce6cb2e8 --- /dev/null +++ b/tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/grpck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "grpck\r" +expect "duplicate shadow group entry" +expect "delete line 'foo:*::daemon'? " +send "no\r" +expect "duplicate shadow group entry" +expect "delete line 'foo:*::bin'? " +send "yes\r" +expect "grpck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/grpck.test b/tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/grpck.test new file mode 100755 index 00000000..dcfa2498 --- /dev/null +++ b/tests/cktools/grpck/20_grpck_duplicate_entry_gshadow_delete_second/grpck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./grpck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl data/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/21_grpck_invalid_group_name/config.txt b/tests/cktools/grpck/21_grpck_invalid_group_name/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/grpck/21_grpck_invalid_group_name/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/grpck/21_grpck_invalid_group_name/config/etc/group b/tests/cktools/grpck/21_grpck_invalid_group_name/config/etc/group new file mode 100644 index 00000000..220f3757 --- /dev/null +++ b/tests/cktools/grpck/21_grpck_invalid_group_name/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +f o o:x:1000: diff --git a/tests/cktools/grpck/21_grpck_invalid_group_name/config/etc/gshadow b/tests/cktools/grpck/21_grpck_invalid_group_name/config/etc/gshadow new file mode 100644 index 00000000..8337b653 --- /dev/null +++ b/tests/cktools/grpck/21_grpck_invalid_group_name/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +f o o:*:: diff --git a/tests/cktools/grpck/21_grpck_invalid_group_name/config/etc/passwd b/tests/cktools/grpck/21_grpck_invalid_group_name/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/21_grpck_invalid_group_name/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/21_grpck_invalid_group_name/config/etc/shadow b/tests/cktools/grpck/21_grpck_invalid_group_name/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/21_grpck_invalid_group_name/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/21_grpck_invalid_group_name/grpck.exp b/tests/cktools/grpck/21_grpck_invalid_group_name/grpck.exp new file mode 100755 index 00000000..cb758db2 --- /dev/null +++ b/tests/cktools/grpck/21_grpck_invalid_group_name/grpck.exp @@ -0,0 +1,17 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "grpck\r" +expect "invalid group name 'f o o'" +expect "grpck: no changes" +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/grpck/21_grpck_invalid_group_name/grpck.test b/tests/cktools/grpck/21_grpck_invalid_group_name/grpck.test new file mode 100755 index 00000000..81bf12ca --- /dev/null +++ b/tests/cktools/grpck/21_grpck_invalid_group_name/grpck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./grpck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/config.txt b/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/config/etc/group b/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/config/etc/group new file mode 100644 index 00000000..e9efa8be --- /dev/null +++ b/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:-1: diff --git a/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/config/etc/gshadow b/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/config/etc/passwd b/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/config/etc/shadow b/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/data/group b/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/data/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/data/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/data/gshadow b/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/data/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/data/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/grpck.exp b/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/grpck.exp new file mode 100755 index 00000000..40f22df7 --- /dev/null +++ b/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/grpck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "grpck\r" +expect "invalid group file entry" +expect "delete line 'foo:x:-1:'? " +send "yes\r" +expect "no matching group file entry in /etc/group" +expect "delete line 'foo:*::'? " +send "yes\r" +expect "grpck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/grpck.test b/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/grpck.test new file mode 100755 index 00000000..906d6294 --- /dev/null +++ b/tests/cktools/grpck/22_grpck_invalid_group_ID_-1/grpck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./grpck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl data/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl data/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/config.txt b/tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/config/etc/group b/tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/config/etc/group new file mode 100644 index 00000000..c6a2e190 --- /dev/null +++ b/tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:4294967295: diff --git a/tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/config/etc/gshadow b/tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/config/etc/passwd b/tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/config/etc/shadow b/tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/grpck.exp b/tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/grpck.exp new file mode 100755 index 00000000..5c10a627 --- /dev/null +++ b/tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/grpck.exp @@ -0,0 +1,18 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "grpck\r" +expect "invalid group ID '4294967295'" +expect "grpck: no changes" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/grpck.test b/tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/grpck.test new file mode 100755 index 00000000..81bf12ca --- /dev/null +++ b/tests/cktools/grpck/23_grpck_invalid_group_ID_4294967295/grpck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./grpck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/config.txt b/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/config/etc/group b/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/config/etc/group new file mode 100644 index 00000000..cb278cec --- /dev/null +++ b/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:4294967296: diff --git a/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/config/etc/gshadow b/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/config/etc/passwd b/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/config/etc/shadow b/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/data/group b/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/data/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/data/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/data/gshadow b/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/data/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/data/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/grpck.exp b/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/grpck.exp new file mode 100755 index 00000000..d5e5ddf9 --- /dev/null +++ b/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/grpck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "grpck\r" +expect "invalid group file entry" +expect "delete line 'foo:x:4294967296:'? " +send "yes\r" +expect "no matching group file entry in /etc/group" +expect "delete line 'foo:*::'? " +send "yes\r" +expect "grpck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/grpck.test b/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/grpck.test new file mode 100755 index 00000000..906d6294 --- /dev/null +++ b/tests/cktools/grpck/24_grpck_invalid_group_ID_4294967296/grpck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./grpck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl data/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl data/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/config.txt b/tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/config/etc/group b/tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/config/etc/group new file mode 100644 index 00000000..757aef84 --- /dev/null +++ b/tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000:daemon,foo2,bin diff --git a/tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/config/etc/gshadow b/tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/config/etc/gshadow new file mode 100644 index 00000000..d2a17827 --- /dev/null +++ b/tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*::daemon,foo2,bin diff --git a/tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/config/etc/passwd b/tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/config/etc/shadow b/tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/grpck.exp b/tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/grpck.exp new file mode 100755 index 00000000..da5dee56 --- /dev/null +++ b/tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/grpck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "grpck\r" +expect "group foo: no user foo2" +expect "delete member 'foo2'? " +send "no\r" +expect "shadow group foo: no user foo2" +expect "delete member 'foo2'? " +send "no\r" +expect "grpck: no changes" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/grpck.test b/tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/grpck.test new file mode 100755 index 00000000..81bf12ca --- /dev/null +++ b/tests/cktools/grpck/25_grpck_unknown_user_group_no_changes/grpck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./grpck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/26_grpck_no_gshadow_file/config.txt b/tests/cktools/grpck/26_grpck_no_gshadow_file/config.txt new file mode 100644 index 00000000..3d43135c --- /dev/null +++ b/tests/cktools/grpck/26_grpck_no_gshadow_file/config.txt @@ -0,0 +1,5 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users diff --git a/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/group b/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/group new file mode 100644 index 00000000..9303fe27 --- /dev/null +++ b/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/group @@ -0,0 +1,42 @@ +daemon:x:1: +bin:x:2: +kmem:x:15: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +root:x:0: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +shadow:x:42: +gnats:x:41: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100:foo +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000:bar diff --git a/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/gshadow b/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/gshadow new file mode 100644 index 00000000..695bf8f5 --- /dev/null +++ b/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/gshadow @@ -0,0 +1,41 @@ +daemon:*:: +bin:*:: +kmem:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +root:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +shadow:*:: +gnats:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +foo:*:: diff --git a/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/passwd b/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/shadow b/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/26_grpck_no_gshadow_file/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/26_grpck_no_gshadow_file/data/grpck.out b/tests/cktools/grpck/26_grpck_no_gshadow_file/data/grpck.out new file mode 100644 index 00000000..929e0e80 --- /dev/null +++ b/tests/cktools/grpck/26_grpck_no_gshadow_file/data/grpck.out @@ -0,0 +1,3 @@ +group foo: no user bar +delete member 'bar'? No +grpck: no changes diff --git a/tests/cktools/grpck/26_grpck_no_gshadow_file/grpck.test b/tests/cktools/grpck/26_grpck_no_gshadow_file/grpck.test new file mode 100755 index 00000000..0ccd682e --- /dev/null +++ b/tests/cktools/grpck/26_grpck_no_gshadow_file/grpck.test @@ -0,0 +1,58 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck can check the group entries when there are no gshadow file" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Remove the gshadow file..." +rm -f /etc/gshadow +echo "done" + +echo -n "Check the group entries (grpck -r)..." +grpck -r >tmp/grpck.out && exit 1 || { + status=$? +} +echo "OK" + +echo -n "Check returned status ($status)..." +test "$status" = "2" +echo "OK" + +echo "grpck reported:" +echo "=======================================================================" +cat tmp/grpck.out +echo "=======================================================================" +echo -n "Check that there were a failure message..." +diff -au data/grpck.out tmp/grpck.out +echo "error message OK." +rm -f tmp/grpck.out + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +test ! -f /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config.txt b/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config.txt new file mode 100644 index 00000000..3d43135c --- /dev/null +++ b/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config.txt @@ -0,0 +1,5 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users diff --git a/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/group b/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/group new file mode 100644 index 00000000..afbb01e0 --- /dev/null +++ b/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/group @@ -0,0 +1,42 @@ +daemon:x:1: +bin:x:2: +kmem:x:15: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +root:x:0: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +shadow:x:42: +gnats:x:41: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100:foo +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/gshadow b/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/gshadow new file mode 100644 index 00000000..695bf8f5 --- /dev/null +++ b/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/gshadow @@ -0,0 +1,41 @@ +daemon:*:: +bin:*:: +kmem:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +root:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +shadow:*:: +gnats:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +foo:*:: diff --git a/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/passwd b/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/shadow b/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/data/group b/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/data/group new file mode 100644 index 00000000..12659535 --- /dev/null +++ b/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/data/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100:foo +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: +nogroup:x:65534: diff --git a/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/grpck.test b/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/grpck.test new file mode 100755 index 00000000..31a6e9ee --- /dev/null +++ b/tests/cktools/grpck/27_grpck_sort_no_gshadow_file/grpck.test @@ -0,0 +1,43 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck can sort the group entries" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Remove the gshadow file..." +rm -f /etc/gshadow +echo "done" + +echo -n "Sort the group entries (grpck -s)..." +grpck -s +echo "OK" + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl data/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +test ! -f /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/28_grpck_usage/config.txt b/tests/cktools/grpck/28_grpck_usage/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/cktools/grpck/28_grpck_usage/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/cktools/grpck/28_grpck_usage/config/etc/default/useradd b/tests/cktools/grpck/28_grpck_usage/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/cktools/grpck/28_grpck_usage/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/cktools/grpck/28_grpck_usage/config/etc/group b/tests/cktools/grpck/28_grpck_usage/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/cktools/grpck/28_grpck_usage/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/cktools/grpck/28_grpck_usage/config/etc/gshadow b/tests/cktools/grpck/28_grpck_usage/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/cktools/grpck/28_grpck_usage/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/cktools/grpck/28_grpck_usage/config/etc/passwd b/tests/cktools/grpck/28_grpck_usage/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/cktools/grpck/28_grpck_usage/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/cktools/grpck/28_grpck_usage/config/etc/shadow b/tests/cktools/grpck/28_grpck_usage/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/cktools/grpck/28_grpck_usage/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/28_grpck_usage/data/usage.out b/tests/cktools/grpck/28_grpck_usage/data/usage.out new file mode 100644 index 00000000..899e2d78 --- /dev/null +++ b/tests/cktools/grpck/28_grpck_usage/data/usage.out @@ -0,0 +1,9 @@ +Usage: grpck [options] [group [gshadow]] + +Options: + -h, --help display this help message and exit + -r, --read-only display errors and warnings + but do not change files + -R, --root CHROOT_DIR directory to chroot into + -s, --sort sort entries by UID + diff --git a/tests/cktools/grpck/28_grpck_usage/grpck.test b/tests/cktools/grpck/28_grpck_usage/grpck.test new file mode 100755 index 00000000..e397aafb --- /dev/null +++ b/tests/cktools/grpck/28_grpck_usage/grpck.test @@ -0,0 +1,47 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck can display its usage message" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Get grpck usage (grpck -h)..." +grpck -h >tmp/usage.out + +echo "grpck reported:" +echo "=======================================================================" +cat tmp/usage.out +echo "=======================================================================" +echo -n "Check the usage message..." +diff -au data/usage.out tmp/usage.out +echo "usage message OK." +rm -f tmp/usage.out + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/29_grpck_sort_readonly/config.txt b/tests/cktools/grpck/29_grpck_sort_readonly/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/cktools/grpck/29_grpck_sort_readonly/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/default/useradd b/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/group b/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/gshadow b/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/passwd b/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/shadow b/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/cktools/grpck/29_grpck_sort_readonly/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/29_grpck_sort_readonly/data/usage.out b/tests/cktools/grpck/29_grpck_sort_readonly/data/usage.out new file mode 100644 index 00000000..cd278fa5 --- /dev/null +++ b/tests/cktools/grpck/29_grpck_sort_readonly/data/usage.out @@ -0,0 +1 @@ +grpck: -s and -r are incompatible diff --git a/tests/cktools/grpck/29_grpck_sort_readonly/grpck.test b/tests/cktools/grpck/29_grpck_sort_readonly/grpck.test new file mode 100755 index 00000000..417584f9 --- /dev/null +++ b/tests/cktools/grpck/29_grpck_sort_readonly/grpck.test @@ -0,0 +1,54 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck report failure when sorting and read only are enabled" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Get grpck usage (grpck -r -s)..." +grpck -r -s 2>tmp/usage.out && exit 1 || { + status=$? +} +echo "OK" + +echo -n "Check returned status ($status)..." +test "$status" = "1" +echo "OK" + +echo "grpck reported:" +echo "=======================================================================" +cat tmp/usage.out +echo "=======================================================================" +echo -n "Check the usage message..." +diff -au data/usage.out tmp/usage.out +echo "usage message OK." +rm -f tmp/usage.out + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/30_grpck_3_files/config.txt b/tests/cktools/grpck/30_grpck_3_files/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/cktools/grpck/30_grpck_3_files/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/cktools/grpck/30_grpck_3_files/config/etc/default/useradd b/tests/cktools/grpck/30_grpck_3_files/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/cktools/grpck/30_grpck_3_files/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/cktools/grpck/30_grpck_3_files/config/etc/group b/tests/cktools/grpck/30_grpck_3_files/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/cktools/grpck/30_grpck_3_files/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/cktools/grpck/30_grpck_3_files/config/etc/gshadow b/tests/cktools/grpck/30_grpck_3_files/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/cktools/grpck/30_grpck_3_files/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/cktools/grpck/30_grpck_3_files/config/etc/passwd b/tests/cktools/grpck/30_grpck_3_files/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/cktools/grpck/30_grpck_3_files/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/cktools/grpck/30_grpck_3_files/config/etc/shadow b/tests/cktools/grpck/30_grpck_3_files/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/cktools/grpck/30_grpck_3_files/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/30_grpck_3_files/data/usage.out b/tests/cktools/grpck/30_grpck_3_files/data/usage.out new file mode 100644 index 00000000..899e2d78 --- /dev/null +++ b/tests/cktools/grpck/30_grpck_3_files/data/usage.out @@ -0,0 +1,9 @@ +Usage: grpck [options] [group [gshadow]] + +Options: + -h, --help display this help message and exit + -r, --read-only display errors and warnings + but do not change files + -R, --root CHROOT_DIR directory to chroot into + -s, --sort sort entries by UID + diff --git a/tests/cktools/grpck/30_grpck_3_files/grpck.test b/tests/cktools/grpck/30_grpck_3_files/grpck.test new file mode 100755 index 00000000..e2614d97 --- /dev/null +++ b/tests/cktools/grpck/30_grpck_3_files/grpck.test @@ -0,0 +1,54 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck checks its number of arguments" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Get grpck usage (grpck -r foo bar baz)..." +grpck -r foo bar baz 2>tmp/usage.out && exit 1 || { + status=$? +} +echo "OK" + +echo -n "Check returned status ($status)..." +test "$status" = "1" +echo "OK" + +echo "grpck reported:" +echo "=======================================================================" +cat tmp/usage.out +echo "=======================================================================" +echo -n "Check the usage message..." +diff -au data/usage.out tmp/usage.out +echo "usage message OK." +rm -f tmp/usage.out + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config.txt b/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/group b/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/group new file mode 100644 index 00000000..d1e687c3 --- /dev/null +++ b/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x diff --git a/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/gshadow b/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/passwd b/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/shadow b/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/data/group b/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/data/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/data/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/grpck.exp b/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/grpck.exp new file mode 100755 index 00000000..84b7354c --- /dev/null +++ b/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/grpck.exp @@ -0,0 +1,20 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "grpck tmp/group\r" +expect "invalid group file entry" +expect "delete line 'foo:x'? " +send "yes\r" +expect "grpck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/grpck.test b/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/grpck.test new file mode 100755 index 00000000..744dd072 --- /dev/null +++ b/tests/cktools/grpck/31_grpck_missing_field_group_local_no_gshadow/grpck.test @@ -0,0 +1,44 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "copy group and gshadow localy..." +cp /etc/group tmp/ +echo "OK" + +./grpck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +../../../common/compare_file.pl data/group tmp/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +rm -f tmp/group tmp/group- tmp/gshadow tmp/gshadow- + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/32_grpck_sort_nis/config.txt b/tests/cktools/grpck/32_grpck_sort_nis/config.txt new file mode 100644 index 00000000..3d43135c --- /dev/null +++ b/tests/cktools/grpck/32_grpck_sort_nis/config.txt @@ -0,0 +1,5 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users diff --git a/tests/cktools/grpck/32_grpck_sort_nis/config/etc/group b/tests/cktools/grpck/32_grpck_sort_nis/config/etc/group new file mode 100644 index 00000000..e644ed9d --- /dev/null +++ b/tests/cktools/grpck/32_grpck_sort_nis/config/etc/group @@ -0,0 +1,45 @@ +daemon:x:1: +bin:x:2: +kmem:x:15: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +root:x:0: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +shadow:x:42: +gnats:x:41: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100:foo +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: ++::: ++foo1::: +-foo2: diff --git a/tests/cktools/grpck/32_grpck_sort_nis/config/etc/gshadow b/tests/cktools/grpck/32_grpck_sort_nis/config/etc/gshadow new file mode 100644 index 00000000..8182ad79 --- /dev/null +++ b/tests/cktools/grpck/32_grpck_sort_nis/config/etc/gshadow @@ -0,0 +1,42 @@ +daemon:*:: +bin:*:: +kmem:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +root:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +shadow:*:: +gnats:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/grpck/32_grpck_sort_nis/config/etc/passwd b/tests/cktools/grpck/32_grpck_sort_nis/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/32_grpck_sort_nis/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/32_grpck_sort_nis/config/etc/shadow b/tests/cktools/grpck/32_grpck_sort_nis/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/32_grpck_sort_nis/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/32_grpck_sort_nis/data/group b/tests/cktools/grpck/32_grpck_sort_nis/data/group new file mode 100644 index 00000000..23467d30 --- /dev/null +++ b/tests/cktools/grpck/32_grpck_sort_nis/data/group @@ -0,0 +1,45 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100:foo +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: +nogroup:x:65534: ++::: ++foo1::: +-foo2: diff --git a/tests/cktools/grpck/32_grpck_sort_nis/data/gshadow b/tests/cktools/grpck/32_grpck_sort_nis/data/gshadow new file mode 100644 index 00000000..f2209e3b --- /dev/null +++ b/tests/cktools/grpck/32_grpck_sort_nis/data/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: +nogroup:*:: diff --git a/tests/cktools/grpck/32_grpck_sort_nis/grpck.test b/tests/cktools/grpck/32_grpck_sort_nis/grpck.test new file mode 100755 index 00000000..d509689f --- /dev/null +++ b/tests/cktools/grpck/32_grpck_sort_nis/grpck.test @@ -0,0 +1,39 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck can sort the group entries" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Sort the group entries (grpck -s)..." +grpck -s +echo "OK" + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl data/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl data/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/33_grpck_locked_group/config.txt b/tests/cktools/grpck/33_grpck_locked_group/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/cktools/grpck/33_grpck_locked_group/config/etc/default/useradd b/tests/cktools/grpck/33_grpck_locked_group/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/cktools/grpck/33_grpck_locked_group/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/cktools/grpck/33_grpck_locked_group/config/etc/group b/tests/cktools/grpck/33_grpck_locked_group/config/etc/group new file mode 100644 index 00000000..b6fae894 --- /dev/null +++ b/tests/cktools/grpck/33_grpck_locked_group/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3:root +adm:x:4:root,foo +tty:x:5: +disk:x:6: +lp:x:7:foo,root +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21:foo +voice:x:22: +cdrom:x:24: +floppy:x:25:foo +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100:foo +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/grpck/33_grpck_locked_group/config/etc/gshadow b/tests/cktools/grpck/33_grpck_locked_group/config/etc/gshadow new file mode 100644 index 00000000..1f2ba8da --- /dev/null +++ b/tests/cktools/grpck/33_grpck_locked_group/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*::root +adm:*::root,foo +tty:*::foo +disk:*:foo: +lp:*::foo,root +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:foo:foo +voice:*:: +cdrom:*:foo:foo +floppy:*::foo +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/grpck/33_grpck_locked_group/config/etc/passwd b/tests/cktools/grpck/33_grpck_locked_group/config/etc/passwd new file mode 100644 index 00000000..bf52df00 --- /dev/null +++ b/tests/cktools/grpck/33_grpck_locked_group/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000::/home/foo:/bin/false diff --git a/tests/cktools/grpck/33_grpck_locked_group/config/etc/shadow b/tests/cktools/grpck/33_grpck_locked_group/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/33_grpck_locked_group/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/33_grpck_locked_group/data/grpck.err b/tests/cktools/grpck/33_grpck_locked_group/data/grpck.err new file mode 100644 index 00000000..1f6325dd --- /dev/null +++ b/tests/cktools/grpck/33_grpck_locked_group/data/grpck.err @@ -0,0 +1,2 @@ +grpck: existing lock file /etc/group.lock without a PID +grpck: cannot lock /etc/group; try again later. diff --git a/tests/cktools/grpck/33_grpck_locked_group/grpck.test b/tests/cktools/grpck/33_grpck_locked_group/grpck.test new file mode 100755 index 00000000..0aa139cc --- /dev/null +++ b/tests/cktools/grpck/33_grpck_locked_group/grpck.test @@ -0,0 +1,60 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck checks if the group file is locked" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config; rm -f /etc/group.lock' 0 + +change_config + +echo -n "Create lock file for /etc/group..." +touch /etc/group.lock +echo "done" + +echo -n "Check groups (grpck)..." +grpck 2>tmp/grpck.err && exit 1 || { + status=$? +} +echo "OK" + +rm -f /etc/group.lock + +echo -n "Check returned status ($status)..." +test "$status" = "4" +echo "OK" + +echo "grpck reported:" +echo "=======================================================================" +cat tmp/grpck.err +echo "=======================================================================" +echo -n "Check that there were a failure message..." +diff -au data/grpck.err tmp/grpck.err +echo "error message OK." +rm -f tmp/grpck.err + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/34_grpck_locked_gshadow/config.txt b/tests/cktools/grpck/34_grpck_locked_gshadow/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/default/useradd b/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/default/useradd new file mode 100644 index 00000000..31c44abe --- /dev/null +++ b/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/default/useradd @@ -0,0 +1,36 @@ +# Default values for useradd(8) +# +# The SHELL variable specifies the default login shell on your +# system. +# Similar to DHSELL in adduser. However, we use "sh" here because +# useradd is a low level utility and should be as general +# as possible +SHELL=/bin/foobar +# +# The default group for users +# 100=users on Debian systems +# Same as USERS_GID in adduser +# This argument is used when the -n flag is specified. +# The default behavior (when -n and -g are not specified) is to create a +# primary user group with the same name as the user being added to the +# system. +GROUP=10 +# +# The default home directory. Same as DHOME for adduser +HOME=/tmp +# +# The number of days after a password expires until the account +# is permanently disabled +INACTIVE=12 +# +# The default expire date +EXPIRE=2007-12-02 +# +# The SKEL variable specifies the directory containing "skeletal" user +# files; in other words, files such as a sample .profile that will be +# copied to the new user's home directory when it is created. +# SKEL=/etc/skel +# +# Defines whether the mail spool should be created while +# creating the account +# CREATE_MAIL_SPOOL=yes diff --git a/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/group b/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/group new file mode 100644 index 00000000..b6fae894 --- /dev/null +++ b/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3:root +adm:x:4:root,foo +tty:x:5: +disk:x:6: +lp:x:7:foo,root +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21:foo +voice:x:22: +cdrom:x:24: +floppy:x:25:foo +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100:foo +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/gshadow b/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/gshadow new file mode 100644 index 00000000..1f2ba8da --- /dev/null +++ b/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*::root +adm:*::root,foo +tty:*::foo +disk:*:foo: +lp:*::foo,root +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:foo:foo +voice:*:: +cdrom:*:foo:foo +floppy:*::foo +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/passwd b/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/passwd new file mode 100644 index 00000000..bf52df00 --- /dev/null +++ b/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000::/home/foo:/bin/false diff --git a/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/shadow b/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/34_grpck_locked_gshadow/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/34_grpck_locked_gshadow/data/grpck.err b/tests/cktools/grpck/34_grpck_locked_gshadow/data/grpck.err new file mode 100644 index 00000000..868dee17 --- /dev/null +++ b/tests/cktools/grpck/34_grpck_locked_gshadow/data/grpck.err @@ -0,0 +1,2 @@ +grpck: existing lock file /etc/gshadow.lock without a PID +grpck: cannot lock /etc/gshadow; try again later. diff --git a/tests/cktools/grpck/34_grpck_locked_gshadow/grpck.test b/tests/cktools/grpck/34_grpck_locked_gshadow/grpck.test new file mode 100755 index 00000000..4c6ea0c5 --- /dev/null +++ b/tests/cktools/grpck/34_grpck_locked_gshadow/grpck.test @@ -0,0 +1,60 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck checks if the gshadow file is locked" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config; rm -f /etc/gshadow.lock' 0 + +change_config + +echo -n "Create lock file for /etc/gshadow..." +touch /etc/gshadow.lock +echo "done" + +echo -n "Check groups (grpck)..." +grpck 2>tmp/grpck.err && exit 1 || { + status=$? +} +echo "OK" + +rm -f /etc/gshadow.lock + +echo -n "Check returned status ($status)..." +test "$status" = "4" +echo "OK" + +echo "grpck reported:" +echo "=======================================================================" +cat tmp/grpck.err +echo "=======================================================================" +echo -n "Check that there were a failure message..." +diff -au data/grpck.err tmp/grpck.err +echo "error message OK." +rm -f tmp/grpck.err + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config.txt b/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/group b/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/group new file mode 100644 index 00000000..213b065f --- /dev/null +++ b/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/group @@ -0,0 +1,45 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000:daemon ++::: +-bar::: +foo:x:1000:bin diff --git a/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/gshadow b/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/passwd b/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/shadow b/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/data/group b/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/data/group new file mode 100644 index 00000000..6c080ef2 --- /dev/null +++ b/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/data/group @@ -0,0 +1,44 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: ++::: +-bar::: +foo:x:1000:bin diff --git a/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/grpck.exp b/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/grpck.exp new file mode 100755 index 00000000..cce68028 --- /dev/null +++ b/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/grpck.exp @@ -0,0 +1,20 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "grpck\r" +expect "duplicate group entry" +expect "delete line 'foo:x:1000:daemon'? " +send "yes\r" +expect "grpck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/grpck.test b/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/grpck.test new file mode 100755 index 00000000..741bfe18 --- /dev/null +++ b/tests/cktools/grpck/35_grpck_duplicate_entry_group_NIS/grpck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./grpck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl data/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/36_grpck_password_group_gshadow/config.txt b/tests/cktools/grpck/36_grpck_password_group_gshadow/config.txt new file mode 100644 index 00000000..3d43135c --- /dev/null +++ b/tests/cktools/grpck/36_grpck_password_group_gshadow/config.txt @@ -0,0 +1,5 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users diff --git a/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/group b/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/group new file mode 100644 index 00000000..52cf2af6 --- /dev/null +++ b/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/group @@ -0,0 +1,42 @@ +daemon:x:1: +bin:x:2: +kmem:x:15: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +root:x:0: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +shadow:x:42: +gnats:x:41: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100:foo +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:toto:1000: diff --git a/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/gshadow b/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/gshadow new file mode 100644 index 00000000..817f1743 --- /dev/null +++ b/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/gshadow @@ -0,0 +1,42 @@ +daemon:*:: +bin:*:: +kmem:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +root:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +shadow:*:: +gnats:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*::foo +nogroup:*:: +crontab:x:: +foo:foo:: +Debian-exim:*:: diff --git a/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/passwd b/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/passwd new file mode 100644 index 00000000..dc7bf840 --- /dev/null +++ b/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000:::/bin/false diff --git a/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/shadow b/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/grpck/36_grpck_password_group_gshadow/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/36_grpck_password_group_gshadow/data/grpck.out b/tests/cktools/grpck/36_grpck_password_group_gshadow/data/grpck.out new file mode 100644 index 00000000..476a7984 --- /dev/null +++ b/tests/cktools/grpck/36_grpck_password_group_gshadow/data/grpck.out @@ -0,0 +1,2 @@ +group foo has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x' +grpck: no changes diff --git a/tests/cktools/grpck/36_grpck_password_group_gshadow/grpck.test b/tests/cktools/grpck/36_grpck_password_group_gshadow/grpck.test new file mode 100755 index 00000000..d32ae670 --- /dev/null +++ b/tests/cktools/grpck/36_grpck_password_group_gshadow/grpck.test @@ -0,0 +1,54 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck can sort the group entries" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Check the group entries (grpck -r)..." +grpck -r >tmp/grpck.out && exit 1 || { + status=$? +} +echo "OK" + +echo -n "Check returned status ($status)..." +test "$status" = "2" +echo "OK" + +echo "grpck reported:" +echo "=======================================================================" +cat tmp/grpck.out +echo "=======================================================================" +echo -n "Check that there were a failure message..." +diff -au data/grpck.out tmp/grpck.out +echo "error message OK." +rm -f tmp/grpck.out + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/grpck/37_grpck_invalid_option/config.txt b/tests/cktools/grpck/37_grpck_invalid_option/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/cktools/grpck/37_grpck_invalid_option/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/cktools/grpck/37_grpck_invalid_option/config/etc/group b/tests/cktools/grpck/37_grpck_invalid_option/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/cktools/grpck/37_grpck_invalid_option/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/cktools/grpck/37_grpck_invalid_option/config/etc/gshadow b/tests/cktools/grpck/37_grpck_invalid_option/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/cktools/grpck/37_grpck_invalid_option/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/cktools/grpck/37_grpck_invalid_option/config/etc/passwd b/tests/cktools/grpck/37_grpck_invalid_option/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/cktools/grpck/37_grpck_invalid_option/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/cktools/grpck/37_grpck_invalid_option/config/etc/shadow b/tests/cktools/grpck/37_grpck_invalid_option/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/cktools/grpck/37_grpck_invalid_option/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/cktools/grpck/37_grpck_invalid_option/data/usage.out b/tests/cktools/grpck/37_grpck_invalid_option/data/usage.out new file mode 100644 index 00000000..11420514 --- /dev/null +++ b/tests/cktools/grpck/37_grpck_invalid_option/data/usage.out @@ -0,0 +1,10 @@ +grpck: unrecognized option '--invalid' +Usage: grpck [options] [group [gshadow]] + +Options: + -h, --help display this help message and exit + -r, --read-only display errors and warnings + but do not change files + -R, --root CHROOT_DIR directory to chroot into + -s, --sort sort entries by UID + diff --git a/tests/cktools/grpck/37_grpck_invalid_option/grpck.test b/tests/cktools/grpck/37_grpck_invalid_option/grpck.test new file mode 100755 index 00000000..b5561487 --- /dev/null +++ b/tests/cktools/grpck/37_grpck_invalid_option/grpck.test @@ -0,0 +1,54 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck reports usage when called withan invalid option" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Call grpck with an invalid option (grpck --invalid)..." +grpck --invalid 2>tmp/usage.out && exit 1 || { + status=$? +} +echo "OK" + +echo -n "Check returned status ($status)..." +test "$status" = "1" +echo "OK" + +echo "grpck reported:" +echo "=======================================================================" +cat tmp/usage.out +echo "=======================================================================" +echo -n "Check the usage message..." +diff -au data/usage.out tmp/usage.out +echo "usage message OK." +rm -f tmp/usage.out + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/config.txt b/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/config.txt new file mode 100644 index 00000000..b3c3e751 --- /dev/null +++ b/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/config.txt @@ -0,0 +1,2 @@ +group foo +user foo with typo in passwd diff --git a/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/config/etc/group b/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/config/etc/gshadow b/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/config/etc/passwd b/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/config/etc/passwd new file mode 100644 index 00000000..4ee448d9 --- /dev/null +++ b/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/config/etc/passwd @@ -0,0 +1,11 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +foo:x:1000:1000:: diff --git a/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/config/etc/shadow b/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/config/etc/shadow new file mode 100644 index 00000000..d3c0775b --- /dev/null +++ b/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/config/etc/shadow @@ -0,0 +1,11 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/data/passwd b/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/data/passwd new file mode 100644 index 00000000..2b911d1d --- /dev/null +++ b/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/data/passwd @@ -0,0 +1,10 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh diff --git a/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/data/shadow b/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/data/shadow new file mode 100644 index 00000000..0a2fddb7 --- /dev/null +++ b/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/data/shadow @@ -0,0 +1,10 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: diff --git a/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/pwck.exp b/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/pwck.exp new file mode 100755 index 00000000..e9c675dc --- /dev/null +++ b/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/pwck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "pwck\r" +expect "invalid password file entry" +expect "delete line 'foo:x:1000:1000::'? " +send "yes\r" +expect "no matching password file entry in /etc/passwd" +expect "delete line 'foo:!:12977:0:99999:7:::'? " +send "yes\r" +expect "pwck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/pwck.test b/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/pwck.test new file mode 100755 index 00000000..9f8c33a2 --- /dev/null +++ b/tests/cktools/pwck/04_pwck_missing_field_passwd_delete/pwck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./pwck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl data/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl data/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/05_pwck_missing_field_passwd_keep/config.txt b/tests/cktools/pwck/05_pwck_missing_field_passwd_keep/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/pwck/05_pwck_missing_field_passwd_keep/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/pwck/05_pwck_missing_field_passwd_keep/config/etc/group b/tests/cktools/pwck/05_pwck_missing_field_passwd_keep/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/pwck/05_pwck_missing_field_passwd_keep/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/05_pwck_missing_field_passwd_keep/config/etc/gshadow b/tests/cktools/pwck/05_pwck_missing_field_passwd_keep/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/pwck/05_pwck_missing_field_passwd_keep/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/pwck/05_pwck_missing_field_passwd_keep/config/etc/passwd b/tests/cktools/pwck/05_pwck_missing_field_passwd_keep/config/etc/passwd new file mode 100644 index 00000000..4ee448d9 --- /dev/null +++ b/tests/cktools/pwck/05_pwck_missing_field_passwd_keep/config/etc/passwd @@ -0,0 +1,11 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +foo:x:1000:1000:: diff --git a/tests/cktools/pwck/05_pwck_missing_field_passwd_keep/config/etc/shadow b/tests/cktools/pwck/05_pwck_missing_field_passwd_keep/config/etc/shadow new file mode 100644 index 00000000..d3c0775b --- /dev/null +++ b/tests/cktools/pwck/05_pwck_missing_field_passwd_keep/config/etc/shadow @@ -0,0 +1,11 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/05_pwck_missing_field_passwd_keep/data/shadow b/tests/cktools/pwck/05_pwck_missing_field_passwd_keep/data/shadow new file mode 100644 index 00000000..0a2fddb7 --- /dev/null +++ b/tests/cktools/pwck/05_pwck_missing_field_passwd_keep/data/shadow @@ -0,0 +1,10 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: diff --git a/tests/cktools/pwck/05_pwck_missing_field_passwd_keep/pwck.exp b/tests/cktools/pwck/05_pwck_missing_field_passwd_keep/pwck.exp new file mode 100755 index 00000000..89341ffb --- /dev/null +++ b/tests/cktools/pwck/05_pwck_missing_field_passwd_keep/pwck.exp @@ -0,0 +1,22 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "pwck\r" +expect "invalid password file entry" +expect "delete line 'foo:x:1000:1000::'? " +send "no\r" +expect "no matching password file entry in /etc/passwd" +expect "delete line 'foo:!:12977:0:99999:7:::'? " +send "yes\r" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/pwck/05_pwck_missing_field_passwd_keep/pwck.test b/tests/cktools/pwck/05_pwck_missing_field_passwd_keep/pwck.test new file mode 100755 index 00000000..688759dd --- /dev/null +++ b/tests/cktools/pwck/05_pwck_missing_field_passwd_keep/pwck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "pwck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./pwck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl data/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/config.txt b/tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/config/etc/group b/tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/config/etc/group new file mode 100644 index 00000000..d1e687c3 --- /dev/null +++ b/tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x diff --git a/tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/config/etc/gshadow b/tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/config/etc/passwd b/tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/config/etc/passwd new file mode 100644 index 00000000..4ee448d9 --- /dev/null +++ b/tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/config/etc/passwd @@ -0,0 +1,11 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +foo:x:1000:1000:: diff --git a/tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/config/etc/shadow b/tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/config/etc/shadow new file mode 100644 index 00000000..d3c0775b --- /dev/null +++ b/tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/config/etc/shadow @@ -0,0 +1,11 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/pwck.exp b/tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/pwck.exp new file mode 100755 index 00000000..bd4003d5 --- /dev/null +++ b/tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/pwck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "pwck\r" +expect "invalid password file entry" +expect "delete line 'foo:x:1000:1000::'? " +send "no\r" +expect "no matching password file entry in /etc/passwd" +expect "delete line 'foo:!:12977:0:99999:7:::'? " +send "no\r" +expect "pwck: no changes" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/pwck.test b/tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/pwck.test new file mode 100755 index 00000000..b9f4a137 --- /dev/null +++ b/tests/cktools/pwck/06_pwck_missing_field_passwd_no_changes/pwck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "pwck check the number of fields and does not change the system database if requested" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./pwck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/07_pwck_missing_field_shadow_add/config.txt b/tests/cktools/pwck/07_pwck_missing_field_shadow_add/config.txt new file mode 100644 index 00000000..52fad51b --- /dev/null +++ b/tests/cktools/pwck/07_pwck_missing_field_shadow_add/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in gshadow diff --git a/tests/cktools/pwck/07_pwck_missing_field_shadow_add/config/etc/group b/tests/cktools/pwck/07_pwck_missing_field_shadow_add/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/pwck/07_pwck_missing_field_shadow_add/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/07_pwck_missing_field_shadow_add/config/etc/gshadow b/tests/cktools/pwck/07_pwck_missing_field_shadow_add/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/pwck/07_pwck_missing_field_shadow_add/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/pwck/07_pwck_missing_field_shadow_add/config/etc/passwd b/tests/cktools/pwck/07_pwck_missing_field_shadow_add/config/etc/passwd new file mode 100644 index 00000000..6377a5d3 --- /dev/null +++ b/tests/cktools/pwck/07_pwck_missing_field_shadow_add/config/etc/passwd @@ -0,0 +1,11 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +foo:x:1000:1000::/home:/bin/sh diff --git a/tests/cktools/pwck/07_pwck_missing_field_shadow_add/config/etc/shadow b/tests/cktools/pwck/07_pwck_missing_field_shadow_add/config/etc/shadow new file mode 100644 index 00000000..3a064c0c --- /dev/null +++ b/tests/cktools/pwck/07_pwck_missing_field_shadow_add/config/etc/shadow @@ -0,0 +1,11 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +foo:!:12977:0:99999:7:: diff --git a/tests/cktools/pwck/07_pwck_missing_field_shadow_add/data/shadow b/tests/cktools/pwck/07_pwck_missing_field_shadow_add/data/shadow new file mode 100644 index 00000000..c9a03146 --- /dev/null +++ b/tests/cktools/pwck/07_pwck_missing_field_shadow_add/data/shadow @@ -0,0 +1,11 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +foo:x:@TODAY@:0:99999:7::: diff --git a/tests/cktools/pwck/07_pwck_missing_field_shadow_add/pwck.exp b/tests/cktools/pwck/07_pwck_missing_field_shadow_add/pwck.exp new file mode 100755 index 00000000..5a9b856a --- /dev/null +++ b/tests/cktools/pwck/07_pwck_missing_field_shadow_add/pwck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "pwck\r" +expect "no matching password file entry in /etc/shadow" +expect "add user 'foo' in /etc/shadow? " +send "yes\r" +expect "invalid shadow password file entry" +expect "delete line 'foo:!:12977:0:99999:7::'? " +send "yes\r" +expect "pwck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/pwck/07_pwck_missing_field_shadow_add/pwck.test b/tests/cktools/pwck/07_pwck_missing_field_shadow_add/pwck.test new file mode 100755 index 00000000..688759dd --- /dev/null +++ b/tests/cktools/pwck/07_pwck_missing_field_shadow_add/pwck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "pwck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./pwck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl data/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/08_pwck_missing_field_shadow_delete/config.txt b/tests/cktools/pwck/08_pwck_missing_field_shadow_delete/config.txt new file mode 100644 index 00000000..52fad51b --- /dev/null +++ b/tests/cktools/pwck/08_pwck_missing_field_shadow_delete/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in gshadow diff --git a/tests/cktools/pwck/08_pwck_missing_field_shadow_delete/config/etc/group b/tests/cktools/pwck/08_pwck_missing_field_shadow_delete/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/pwck/08_pwck_missing_field_shadow_delete/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/08_pwck_missing_field_shadow_delete/config/etc/gshadow b/tests/cktools/pwck/08_pwck_missing_field_shadow_delete/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/pwck/08_pwck_missing_field_shadow_delete/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/pwck/08_pwck_missing_field_shadow_delete/config/etc/passwd b/tests/cktools/pwck/08_pwck_missing_field_shadow_delete/config/etc/passwd new file mode 100644 index 00000000..6377a5d3 --- /dev/null +++ b/tests/cktools/pwck/08_pwck_missing_field_shadow_delete/config/etc/passwd @@ -0,0 +1,11 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +foo:x:1000:1000::/home:/bin/sh diff --git a/tests/cktools/pwck/08_pwck_missing_field_shadow_delete/config/etc/shadow b/tests/cktools/pwck/08_pwck_missing_field_shadow_delete/config/etc/shadow new file mode 100644 index 00000000..3a064c0c --- /dev/null +++ b/tests/cktools/pwck/08_pwck_missing_field_shadow_delete/config/etc/shadow @@ -0,0 +1,11 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +foo:!:12977:0:99999:7:: diff --git a/tests/cktools/pwck/08_pwck_missing_field_shadow_delete/data/shadow b/tests/cktools/pwck/08_pwck_missing_field_shadow_delete/data/shadow new file mode 100644 index 00000000..0a2fddb7 --- /dev/null +++ b/tests/cktools/pwck/08_pwck_missing_field_shadow_delete/data/shadow @@ -0,0 +1,10 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: diff --git a/tests/cktools/pwck/08_pwck_missing_field_shadow_delete/pwck.exp b/tests/cktools/pwck/08_pwck_missing_field_shadow_delete/pwck.exp new file mode 100755 index 00000000..38a613d4 --- /dev/null +++ b/tests/cktools/pwck/08_pwck_missing_field_shadow_delete/pwck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "pwck\r" +expect "no matching password file entry in /etc/shadow" +expect "add user 'foo' in /etc/shadow? " +send "no\r" +expect "invalid shadow password file entry" +expect "delete line 'foo:!:12977:0:99999:7::'? " +send "yes\r" +expect "pwck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/pwck/08_pwck_missing_field_shadow_delete/pwck.test b/tests/cktools/pwck/08_pwck_missing_field_shadow_delete/pwck.test new file mode 100755 index 00000000..688759dd --- /dev/null +++ b/tests/cktools/pwck/08_pwck_missing_field_shadow_delete/pwck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "pwck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./pwck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl data/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/config.txt b/tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/config.txt new file mode 100644 index 00000000..52fad51b --- /dev/null +++ b/tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in gshadow diff --git a/tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/config/etc/group b/tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/config/etc/gshadow b/tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/config/etc/passwd b/tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/config/etc/passwd new file mode 100644 index 00000000..6377a5d3 --- /dev/null +++ b/tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/config/etc/passwd @@ -0,0 +1,11 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +foo:x:1000:1000::/home:/bin/sh diff --git a/tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/config/etc/shadow b/tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/config/etc/shadow new file mode 100644 index 00000000..3a064c0c --- /dev/null +++ b/tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/config/etc/shadow @@ -0,0 +1,11 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +foo:!:12977:0:99999:7:: diff --git a/tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/pwck.exp b/tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/pwck.exp new file mode 100755 index 00000000..b4451026 --- /dev/null +++ b/tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/pwck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "pwck\r" +expect "no matching password file entry in /etc/shadow" +expect "add user 'foo' in /etc/shadow? " +send "no\r" +expect "invalid shadow password file entry" +expect "delete line 'foo:!:12977:0:99999:7::'? " +send "no\r" +expect "pwck: no changes" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/pwck.test b/tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/pwck.test new file mode 100755 index 00000000..893ba6e6 --- /dev/null +++ b/tests/cktools/pwck/09_pwck_missing_field_shadow_no_changes/pwck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "pwck check the number of fields and can change the system database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./pwck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/10_pwck_missing_field_passwd_local/config.txt b/tests/cktools/pwck/10_pwck_missing_field_passwd_local/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/pwck/10_pwck_missing_field_passwd_local/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/pwck/10_pwck_missing_field_passwd_local/config/etc/group b/tests/cktools/pwck/10_pwck_missing_field_passwd_local/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/pwck/10_pwck_missing_field_passwd_local/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/10_pwck_missing_field_passwd_local/config/etc/gshadow b/tests/cktools/pwck/10_pwck_missing_field_passwd_local/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/pwck/10_pwck_missing_field_passwd_local/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/pwck/10_pwck_missing_field_passwd_local/config/etc/passwd b/tests/cktools/pwck/10_pwck_missing_field_passwd_local/config/etc/passwd new file mode 100644 index 00000000..4ee448d9 --- /dev/null +++ b/tests/cktools/pwck/10_pwck_missing_field_passwd_local/config/etc/passwd @@ -0,0 +1,11 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +foo:x:1000:1000:: diff --git a/tests/cktools/pwck/10_pwck_missing_field_passwd_local/config/etc/shadow b/tests/cktools/pwck/10_pwck_missing_field_passwd_local/config/etc/shadow new file mode 100644 index 00000000..d3c0775b --- /dev/null +++ b/tests/cktools/pwck/10_pwck_missing_field_passwd_local/config/etc/shadow @@ -0,0 +1,11 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/10_pwck_missing_field_passwd_local/data/passwd b/tests/cktools/pwck/10_pwck_missing_field_passwd_local/data/passwd new file mode 100644 index 00000000..2b911d1d --- /dev/null +++ b/tests/cktools/pwck/10_pwck_missing_field_passwd_local/data/passwd @@ -0,0 +1,10 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh diff --git a/tests/cktools/pwck/10_pwck_missing_field_passwd_local/data/shadow b/tests/cktools/pwck/10_pwck_missing_field_passwd_local/data/shadow new file mode 100644 index 00000000..0a2fddb7 --- /dev/null +++ b/tests/cktools/pwck/10_pwck_missing_field_passwd_local/data/shadow @@ -0,0 +1,10 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: diff --git a/tests/cktools/pwck/10_pwck_missing_field_passwd_local/pwck.exp b/tests/cktools/pwck/10_pwck_missing_field_passwd_local/pwck.exp new file mode 100755 index 00000000..31af0895 --- /dev/null +++ b/tests/cktools/pwck/10_pwck_missing_field_passwd_local/pwck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "pwck tmp/passwd tmp/shadow\r" +expect "invalid password file entry" +expect "delete line 'foo:x:1000:1000::'? " +send "yes\r" +expect "no matching password file entry in tmp/passwd" +expect "delete line 'foo:!:12977:0:99999:7:::'? " +send "yes\r" +expect "pwck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/pwck/10_pwck_missing_field_passwd_local/pwck.test b/tests/cktools/pwck/10_pwck_missing_field_passwd_local/pwck.test new file mode 100755 index 00000000..4ca903f7 --- /dev/null +++ b/tests/cktools/pwck/10_pwck_missing_field_passwd_local/pwck.test @@ -0,0 +1,45 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "pwck check the number of fields and can change local databases" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "copy passwd and shadow localy..." +cp /etc/passwd /etc/shadow tmp/ +echo "OK" + +./pwck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl data/passwd tmp/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +../../../common/compare_file.pl data/shadow tmp/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +rm -f tmp/passwd tmp/passwd- tmp/shadow tmp/shadow- + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/11_pwck_missing_field_shadow_local/config.txt b/tests/cktools/pwck/11_pwck_missing_field_shadow_local/config.txt new file mode 100644 index 00000000..52fad51b --- /dev/null +++ b/tests/cktools/pwck/11_pwck_missing_field_shadow_local/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in gshadow diff --git a/tests/cktools/pwck/11_pwck_missing_field_shadow_local/config/etc/group b/tests/cktools/pwck/11_pwck_missing_field_shadow_local/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/pwck/11_pwck_missing_field_shadow_local/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/11_pwck_missing_field_shadow_local/config/etc/gshadow b/tests/cktools/pwck/11_pwck_missing_field_shadow_local/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/pwck/11_pwck_missing_field_shadow_local/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/pwck/11_pwck_missing_field_shadow_local/config/etc/passwd b/tests/cktools/pwck/11_pwck_missing_field_shadow_local/config/etc/passwd new file mode 100644 index 00000000..6377a5d3 --- /dev/null +++ b/tests/cktools/pwck/11_pwck_missing_field_shadow_local/config/etc/passwd @@ -0,0 +1,11 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +foo:x:1000:1000::/home:/bin/sh diff --git a/tests/cktools/pwck/11_pwck_missing_field_shadow_local/config/etc/shadow b/tests/cktools/pwck/11_pwck_missing_field_shadow_local/config/etc/shadow new file mode 100644 index 00000000..3a064c0c --- /dev/null +++ b/tests/cktools/pwck/11_pwck_missing_field_shadow_local/config/etc/shadow @@ -0,0 +1,11 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +foo:!:12977:0:99999:7:: diff --git a/tests/cktools/pwck/11_pwck_missing_field_shadow_local/data/passwd b/tests/cktools/pwck/11_pwck_missing_field_shadow_local/data/passwd new file mode 100644 index 00000000..6377a5d3 --- /dev/null +++ b/tests/cktools/pwck/11_pwck_missing_field_shadow_local/data/passwd @@ -0,0 +1,11 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +foo:x:1000:1000::/home:/bin/sh diff --git a/tests/cktools/pwck/11_pwck_missing_field_shadow_local/data/shadow b/tests/cktools/pwck/11_pwck_missing_field_shadow_local/data/shadow new file mode 100644 index 00000000..c9a03146 --- /dev/null +++ b/tests/cktools/pwck/11_pwck_missing_field_shadow_local/data/shadow @@ -0,0 +1,11 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +foo:x:@TODAY@:0:99999:7::: diff --git a/tests/cktools/pwck/11_pwck_missing_field_shadow_local/pwck.exp b/tests/cktools/pwck/11_pwck_missing_field_shadow_local/pwck.exp new file mode 100755 index 00000000..2b2a09d4 --- /dev/null +++ b/tests/cktools/pwck/11_pwck_missing_field_shadow_local/pwck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "pwck tmp/passwd tmp/shadow\r" +expect "no matching password file entry in tmp/shadow" +expect "add user 'foo' in tmp/shadow? " +send "yes\r" +expect "invalid shadow password file entry" +expect "delete line 'foo:*:'? " +send "yes\r" +expect "pwck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/pwck/11_pwck_missing_field_shadow_local/pwck.test b/tests/cktools/pwck/11_pwck_missing_field_shadow_local/pwck.test new file mode 100755 index 00000000..fd3f4e6d --- /dev/null +++ b/tests/cktools/pwck/11_pwck_missing_field_shadow_local/pwck.test @@ -0,0 +1,45 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the number of fields and can change local databases" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "copy passwd and shadow localy..." +cp /etc/passwd /etc/shadow tmp/ +echo "OK" + +./pwck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +../../../common/compare_file.pl data/passwd tmp/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +../../../common/compare_file.pl data/shadow tmp/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +rm -f tmp/passwd tmp/passwd- tmp/shadow tmp/shadow- + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/12_pwck_unknown_user_group_ID/config.txt b/tests/cktools/pwck/12_pwck_unknown_user_group_ID/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/pwck/12_pwck_unknown_user_group_ID/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/pwck/12_pwck_unknown_user_group_ID/config/etc/group b/tests/cktools/pwck/12_pwck_unknown_user_group_ID/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/pwck/12_pwck_unknown_user_group_ID/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/12_pwck_unknown_user_group_ID/config/etc/gshadow b/tests/cktools/pwck/12_pwck_unknown_user_group_ID/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/pwck/12_pwck_unknown_user_group_ID/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/pwck/12_pwck_unknown_user_group_ID/config/etc/passwd b/tests/cktools/pwck/12_pwck_unknown_user_group_ID/config/etc/passwd new file mode 100644 index 00000000..58f2d752 --- /dev/null +++ b/tests/cktools/pwck/12_pwck_unknown_user_group_ID/config/etc/passwd @@ -0,0 +1,11 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +foo:x:1000:1001::/home:/bin/sh diff --git a/tests/cktools/pwck/12_pwck_unknown_user_group_ID/config/etc/shadow b/tests/cktools/pwck/12_pwck_unknown_user_group_ID/config/etc/shadow new file mode 100644 index 00000000..d3c0775b --- /dev/null +++ b/tests/cktools/pwck/12_pwck_unknown_user_group_ID/config/etc/shadow @@ -0,0 +1,11 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/12_pwck_unknown_user_group_ID/pwck.exp b/tests/cktools/pwck/12_pwck_unknown_user_group_ID/pwck.exp new file mode 100755 index 00000000..fb8cba1e --- /dev/null +++ b/tests/cktools/pwck/12_pwck_unknown_user_group_ID/pwck.exp @@ -0,0 +1,18 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "pwck\r" +expect "user 'foo': no group 1001" +expect "pwck: no changes" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/pwck/12_pwck_unknown_user_group_ID/pwck.test b/tests/cktools/pwck/12_pwck_unknown_user_group_ID/pwck.test new file mode 100755 index 00000000..8df54820 --- /dev/null +++ b/tests/cktools/pwck/12_pwck_unknown_user_group_ID/pwck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check that the user's GID matches an existing group" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./pwck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/13_pwck_duplicate_entry_passwd/config.txt b/tests/cktools/pwck/13_pwck_duplicate_entry_passwd/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/pwck/13_pwck_duplicate_entry_passwd/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/pwck/13_pwck_duplicate_entry_passwd/config/etc/group b/tests/cktools/pwck/13_pwck_duplicate_entry_passwd/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/pwck/13_pwck_duplicate_entry_passwd/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/13_pwck_duplicate_entry_passwd/config/etc/gshadow b/tests/cktools/pwck/13_pwck_duplicate_entry_passwd/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/pwck/13_pwck_duplicate_entry_passwd/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/pwck/13_pwck_duplicate_entry_passwd/config/etc/passwd b/tests/cktools/pwck/13_pwck_duplicate_entry_passwd/config/etc/passwd new file mode 100644 index 00000000..33debc51 --- /dev/null +++ b/tests/cktools/pwck/13_pwck_duplicate_entry_passwd/config/etc/passwd @@ -0,0 +1,12 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +foo:x:1000:1000::/home:/bin/sh +foo:x:1001:1001::/home:/bin/sh diff --git a/tests/cktools/pwck/13_pwck_duplicate_entry_passwd/config/etc/shadow b/tests/cktools/pwck/13_pwck_duplicate_entry_passwd/config/etc/shadow new file mode 100644 index 00000000..d3c0775b --- /dev/null +++ b/tests/cktools/pwck/13_pwck_duplicate_entry_passwd/config/etc/shadow @@ -0,0 +1,11 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/13_pwck_duplicate_entry_passwd/data/passwd b/tests/cktools/pwck/13_pwck_duplicate_entry_passwd/data/passwd new file mode 100644 index 00000000..a45f378a --- /dev/null +++ b/tests/cktools/pwck/13_pwck_duplicate_entry_passwd/data/passwd @@ -0,0 +1,11 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +foo:x:1001:1001::/home:/bin/sh diff --git a/tests/cktools/pwck/13_pwck_duplicate_entry_passwd/pwck.exp b/tests/cktools/pwck/13_pwck_duplicate_entry_passwd/pwck.exp new file mode 100755 index 00000000..9c460ce4 --- /dev/null +++ b/tests/cktools/pwck/13_pwck_duplicate_entry_passwd/pwck.exp @@ -0,0 +1,20 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "pwck\r" +expect "duplicate password entry" +expect "delete line 'foo:x:1000:1000::/home:/bin/sh'? " +send "yes\r" +expect "pwck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/pwck/13_pwck_duplicate_entry_passwd/pwck.test b/tests/cktools/pwck/13_pwck_duplicate_entry_passwd/pwck.test new file mode 100755 index 00000000..4d4b9576 --- /dev/null +++ b/tests/cktools/pwck/13_pwck_duplicate_entry_passwd/pwck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check that user are uniq" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./pwck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl data/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/14_pwck_duplicate_entry_shadow/config.txt b/tests/cktools/pwck/14_pwck_duplicate_entry_shadow/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/pwck/14_pwck_duplicate_entry_shadow/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/pwck/14_pwck_duplicate_entry_shadow/config/etc/group b/tests/cktools/pwck/14_pwck_duplicate_entry_shadow/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/pwck/14_pwck_duplicate_entry_shadow/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/14_pwck_duplicate_entry_shadow/config/etc/gshadow b/tests/cktools/pwck/14_pwck_duplicate_entry_shadow/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/pwck/14_pwck_duplicate_entry_shadow/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/pwck/14_pwck_duplicate_entry_shadow/config/etc/passwd b/tests/cktools/pwck/14_pwck_duplicate_entry_shadow/config/etc/passwd new file mode 100644 index 00000000..6377a5d3 --- /dev/null +++ b/tests/cktools/pwck/14_pwck_duplicate_entry_shadow/config/etc/passwd @@ -0,0 +1,11 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +foo:x:1000:1000::/home:/bin/sh diff --git a/tests/cktools/pwck/14_pwck_duplicate_entry_shadow/config/etc/shadow b/tests/cktools/pwck/14_pwck_duplicate_entry_shadow/config/etc/shadow new file mode 100644 index 00000000..a5344f5e --- /dev/null +++ b/tests/cktools/pwck/14_pwck_duplicate_entry_shadow/config/etc/shadow @@ -0,0 +1,12 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +foo:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/14_pwck_duplicate_entry_shadow/data/shadow b/tests/cktools/pwck/14_pwck_duplicate_entry_shadow/data/shadow new file mode 100644 index 00000000..d3c0775b --- /dev/null +++ b/tests/cktools/pwck/14_pwck_duplicate_entry_shadow/data/shadow @@ -0,0 +1,11 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/14_pwck_duplicate_entry_shadow/pwck.exp b/tests/cktools/pwck/14_pwck_duplicate_entry_shadow/pwck.exp new file mode 100755 index 00000000..c7affdc9 --- /dev/null +++ b/tests/cktools/pwck/14_pwck_duplicate_entry_shadow/pwck.exp @@ -0,0 +1,20 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "pwck\r" +expect "duplicate shadow password entry" +expect "delete line 'foo:!:12977:0:99999:7:::'? " +send "yes\r" +expect "pwck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/pwck/14_pwck_duplicate_entry_shadow/pwck.test b/tests/cktools/pwck/14_pwck_duplicate_entry_shadow/pwck.test new file mode 100755 index 00000000..4430d1a2 --- /dev/null +++ b/tests/cktools/pwck/14_pwck_duplicate_entry_shadow/pwck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check unicity of users in the shadow database" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./pwck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl data/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/config.txt b/tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/config/etc/group b/tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/config/etc/gshadow b/tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/config/etc/passwd b/tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/config/etc/passwd new file mode 100644 index 00000000..69c72ff6 --- /dev/null +++ b/tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/config/etc/passwd @@ -0,0 +1,12 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +foo:x:1000:1000::/home:/bin/sh +foo:x:1000:1000::/home:/bin/bash diff --git a/tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/config/etc/shadow b/tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/config/etc/shadow new file mode 100644 index 00000000..d3c0775b --- /dev/null +++ b/tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/config/etc/shadow @@ -0,0 +1,11 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/pwck.exp b/tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/pwck.exp new file mode 100755 index 00000000..61c6c6bd --- /dev/null +++ b/tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/pwck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "pwck\r" +expect "duplicate password entry" +expect "delete line 'foo:x:1000:1000::/home:/bin/sh'? " +send "no\r" +expect "duplicate password entry" +expect "delete line 'foo:x:1000:1000::/home:/bin/bash'? " +send "no\r" +expect "pwck: no changes" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/pwck.test b/tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/pwck.test new file mode 100755 index 00000000..9ceb60e2 --- /dev/null +++ b/tests/cktools/pwck/15_pwck_duplicate_entry_passwd_no_changes/pwck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check unicity of users in passwd" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./pwck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/config.txt b/tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/config/etc/group b/tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/config/etc/gshadow b/tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/config/etc/passwd b/tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/config/etc/passwd new file mode 100644 index 00000000..6377a5d3 --- /dev/null +++ b/tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/config/etc/passwd @@ -0,0 +1,11 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +foo:x:1000:1000::/home:/bin/sh diff --git a/tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/config/etc/shadow b/tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/config/etc/shadow new file mode 100644 index 00000000..a5344f5e --- /dev/null +++ b/tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/config/etc/shadow @@ -0,0 +1,12 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +foo:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/pwck.exp b/tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/pwck.exp new file mode 100755 index 00000000..dc9ef892 --- /dev/null +++ b/tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/pwck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "pwck\r" +expect "duplicate shadow password entry" +expect "delete line 'foo:!:12977:0:99999:7:::'? " +send "no\r" +expect "duplicate shadow password entry" +expect "delete line 'foo:!:12977:0:99999:7:::'? " +send "no\r" +expect "pwck: no changes" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/pwck.test b/tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/pwck.test new file mode 100755 index 00000000..8eed716d --- /dev/null +++ b/tests/cktools/pwck/16_pwck_duplicate_entry_shadow_no_changes/pwck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck checks unicity of users in shadow" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./pwck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/config.txt b/tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/config/etc/group b/tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/config/etc/gshadow b/tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/config/etc/passwd b/tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/config/etc/passwd new file mode 100644 index 00000000..69c72ff6 --- /dev/null +++ b/tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/config/etc/passwd @@ -0,0 +1,12 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +foo:x:1000:1000::/home:/bin/sh +foo:x:1000:1000::/home:/bin/bash diff --git a/tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/config/etc/shadow b/tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/config/etc/shadow new file mode 100644 index 00000000..d3c0775b --- /dev/null +++ b/tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/config/etc/shadow @@ -0,0 +1,11 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/data/passwd b/tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/data/passwd new file mode 100644 index 00000000..6377a5d3 --- /dev/null +++ b/tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/data/passwd @@ -0,0 +1,11 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +foo:x:1000:1000::/home:/bin/sh diff --git a/tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/pwck.exp b/tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/pwck.exp new file mode 100755 index 00000000..d6ec869e --- /dev/null +++ b/tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/pwck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "pwck\r" +expect "duplicate password entry" +expect "delete line 'foo:x:1000:1000::/home:/bin/sh'? " +send "no\r" +expect "duplicate password entry" +expect "delete line 'foo:x:1000:1000::/home:/bin/bash'? " +send "yes\r" +expect "pwck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/pwck.test b/tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/pwck.test new file mode 100755 index 00000000..d61a9463 --- /dev/null +++ b/tests/cktools/pwck/17_pwck_duplicate_entry_passwd_delete_second/pwck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck checks the unicity of users in passwd" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./pwck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl data/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/18_pwck_invalid_user_name/config.txt b/tests/cktools/pwck/18_pwck_invalid_user_name/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/pwck/18_pwck_invalid_user_name/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/pwck/18_pwck_invalid_user_name/config/etc/group b/tests/cktools/pwck/18_pwck_invalid_user_name/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/pwck/18_pwck_invalid_user_name/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/18_pwck_invalid_user_name/config/etc/gshadow b/tests/cktools/pwck/18_pwck_invalid_user_name/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/pwck/18_pwck_invalid_user_name/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/pwck/18_pwck_invalid_user_name/config/etc/passwd b/tests/cktools/pwck/18_pwck_invalid_user_name/config/etc/passwd new file mode 100644 index 00000000..a82dbf6e --- /dev/null +++ b/tests/cktools/pwck/18_pwck_invalid_user_name/config/etc/passwd @@ -0,0 +1,11 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +f o o:x:1000:1000::/home:/bin/sh diff --git a/tests/cktools/pwck/18_pwck_invalid_user_name/config/etc/shadow b/tests/cktools/pwck/18_pwck_invalid_user_name/config/etc/shadow new file mode 100644 index 00000000..f771b668 --- /dev/null +++ b/tests/cktools/pwck/18_pwck_invalid_user_name/config/etc/shadow @@ -0,0 +1,11 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +f o o:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/18_pwck_invalid_user_name/pwck.exp b/tests/cktools/pwck/18_pwck_invalid_user_name/pwck.exp new file mode 100755 index 00000000..a75ef355 --- /dev/null +++ b/tests/cktools/pwck/18_pwck_invalid_user_name/pwck.exp @@ -0,0 +1,18 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "pwck\r" +expect "invalid user name 'f o o'" +expect "pwck: no changes" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/pwck/18_pwck_invalid_user_name/pwck.test b/tests/cktools/pwck/18_pwck_invalid_user_name/pwck.test new file mode 100755 index 00000000..587f11c7 --- /dev/null +++ b/tests/cktools/pwck/18_pwck_invalid_user_name/pwck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the validity of usernames" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./pwck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/config.txt b/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/config/etc/group b/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/config/etc/gshadow b/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/config/etc/passwd b/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/config/etc/passwd new file mode 100644 index 00000000..850768a9 --- /dev/null +++ b/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/config/etc/passwd @@ -0,0 +1,11 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +foo:x:-1:1000::/home:/bin/sh diff --git a/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/config/etc/shadow b/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/config/etc/shadow new file mode 100644 index 00000000..d3c0775b --- /dev/null +++ b/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/config/etc/shadow @@ -0,0 +1,11 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/data/passwd b/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/data/passwd new file mode 100644 index 00000000..2b911d1d --- /dev/null +++ b/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/data/passwd @@ -0,0 +1,10 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh diff --git a/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/data/shadow b/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/data/shadow new file mode 100644 index 00000000..0a2fddb7 --- /dev/null +++ b/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/data/shadow @@ -0,0 +1,10 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: diff --git a/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/pwck.exp b/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/pwck.exp new file mode 100755 index 00000000..cde86e5c --- /dev/null +++ b/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/pwck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "pwck\r" +expect "invalid password file entry" +expect "delete line 'foo:x:-1:1000::/home:/bin/sh'? " +send "yes\r" +expect "no matching password file entry in /etc/passwd" +expect "delete line 'foo:!:12977:0:99999:7:::'? " +send "yes\r" +expect "pwck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/pwck.test b/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/pwck.test new file mode 100755 index 00000000..8b56894f --- /dev/null +++ b/tests/cktools/pwck/19_pwck_invalid_user_ID_-1/pwck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck checks the validity of UIDs" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./pwck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl data/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl data/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/config.txt b/tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/config/etc/group b/tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/config/etc/gshadow b/tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/config/etc/passwd b/tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/config/etc/passwd new file mode 100644 index 00000000..e4387349 --- /dev/null +++ b/tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/config/etc/passwd @@ -0,0 +1,11 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +foo:x:4294967295:1000::/home:/bin/sh diff --git a/tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/config/etc/shadow b/tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/config/etc/shadow new file mode 100644 index 00000000..d3c0775b --- /dev/null +++ b/tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/config/etc/shadow @@ -0,0 +1,11 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/pwck.exp b/tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/pwck.exp new file mode 100755 index 00000000..315a72bb --- /dev/null +++ b/tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/pwck.exp @@ -0,0 +1,18 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "pwck\r" +expect "invalid user ID '4294967295'" +expect "pwck: no changes" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/pwck.test b/tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/pwck.test new file mode 100755 index 00000000..19d157fc --- /dev/null +++ b/tests/cktools/pwck/20_pwck_invalid_user_ID_4294967295/pwck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck check the validity of the UID" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./pwck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/config.txt b/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/config.txt new file mode 100644 index 00000000..01189bd6 --- /dev/null +++ b/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/config.txt @@ -0,0 +1,2 @@ +user foo +group foo with typo in group diff --git a/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/config/etc/group b/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/config/etc/gshadow b/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/config/etc/gshadow new file mode 100644 index 00000000..5042e581 --- /dev/null +++ b/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/config/etc/passwd b/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/config/etc/passwd new file mode 100644 index 00000000..de8dd667 --- /dev/null +++ b/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/config/etc/passwd @@ -0,0 +1,11 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +foo:x:4294967296:1000::/home:/bin/sh diff --git a/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/config/etc/shadow b/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/config/etc/shadow new file mode 100644 index 00000000..d3c0775b --- /dev/null +++ b/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/config/etc/shadow @@ -0,0 +1,11 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/data/passwd b/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/data/passwd new file mode 100644 index 00000000..2b911d1d --- /dev/null +++ b/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/data/passwd @@ -0,0 +1,10 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh diff --git a/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/data/shadow b/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/data/shadow new file mode 100644 index 00000000..0a2fddb7 --- /dev/null +++ b/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/data/shadow @@ -0,0 +1,10 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: diff --git a/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/pwck.exp b/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/pwck.exp new file mode 100755 index 00000000..83575ac5 --- /dev/null +++ b/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/pwck.exp @@ -0,0 +1,23 @@ +#!/usr/bin/expect + +set timeout 2 +expect_after default {puts "\nFAIL"; exit 1} + +spawn /bin/sh +send "if \[ \$(id -u) -eq 0 \]; then PS1='# '; else PS1='$ '; fi\r" +expect "# " + +send "pwck\r" +expect "invalid password file entry" +expect "delete line 'foo:x:4294967296:1000::/home:/bin/sh'? " +send "yes\r" +expect "no matching password file entry in /etc/passwd" +expect "delete line 'foo:!:12977:0:99999:7:::'? " +send "yes\r" +expect "pwck: the files have been updated" +expect "# " +send "echo \$?\r" +expect "2" +send "exit\r" +puts "OK\n" +exit 0 diff --git a/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/pwck.test b/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/pwck.test new file mode 100755 index 00000000..8b56894f --- /dev/null +++ b/tests/cktools/pwck/21_pwck_invalid_user_ID_4294967296/pwck.test @@ -0,0 +1,37 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "grpck checks the validity of UIDs" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +./pwck.exp + +echo -n "Check the passwd file..." +../../../common/compare_file.pl data/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl data/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/22_pwck_usage/config.txt b/tests/cktools/pwck/22_pwck_usage/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/cktools/pwck/22_pwck_usage/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/cktools/pwck/22_pwck_usage/config/etc/group b/tests/cktools/pwck/22_pwck_usage/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/cktools/pwck/22_pwck_usage/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/cktools/pwck/22_pwck_usage/config/etc/gshadow b/tests/cktools/pwck/22_pwck_usage/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/cktools/pwck/22_pwck_usage/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/cktools/pwck/22_pwck_usage/config/etc/passwd b/tests/cktools/pwck/22_pwck_usage/config/etc/passwd new file mode 100644 index 00000000..43fc135a --- /dev/null +++ b/tests/cktools/pwck/22_pwck_usage/config/etc/passwd @@ -0,0 +1,19 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/cktools/pwck/22_pwck_usage/config/etc/shadow b/tests/cktools/pwck/22_pwck_usage/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/cktools/pwck/22_pwck_usage/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/22_pwck_usage/data/usage.out b/tests/cktools/pwck/22_pwck_usage/data/usage.out new file mode 100644 index 00000000..fa629415 --- /dev/null +++ b/tests/cktools/pwck/22_pwck_usage/data/usage.out @@ -0,0 +1,10 @@ +Usage: pwck [options] [passwd [shadow]] + +Options: + -h, --help display this help message and exit + -q, --quiet report errors only + -r, --read-only display errors and warnings + but do not change files + -R, --root CHROOT_DIR directory to chroot into + -s, --sort sort entries by UID + diff --git a/tests/cktools/pwck/22_pwck_usage/pwck.test b/tests/cktools/pwck/22_pwck_usage/pwck.test new file mode 100755 index 00000000..ccca31a2 --- /dev/null +++ b/tests/cktools/pwck/22_pwck_usage/pwck.test @@ -0,0 +1,47 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "pwck can display its usage message" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Get pwck usage (pwck -h)..." +pwck -h >tmp/usage.out + +echo "pwck reported:" +echo "=======================================================================" +cat tmp/usage.out +echo "=======================================================================" +echo -n "Check the usage message..." +diff -au data/usage.out tmp/usage.out +echo "usage message OK." +rm -f tmp/usage.out + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/23_pwck_locked_passwd/config.txt b/tests/cktools/pwck/23_pwck_locked_passwd/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/cktools/pwck/23_pwck_locked_passwd/config/etc/group b/tests/cktools/pwck/23_pwck_locked_passwd/config/etc/group new file mode 100644 index 00000000..b6fae894 --- /dev/null +++ b/tests/cktools/pwck/23_pwck_locked_passwd/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3:root +adm:x:4:root,foo +tty:x:5: +disk:x:6: +lp:x:7:foo,root +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21:foo +voice:x:22: +cdrom:x:24: +floppy:x:25:foo +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100:foo +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/23_pwck_locked_passwd/config/etc/gshadow b/tests/cktools/pwck/23_pwck_locked_passwd/config/etc/gshadow new file mode 100644 index 00000000..1f2ba8da --- /dev/null +++ b/tests/cktools/pwck/23_pwck_locked_passwd/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*::root +adm:*::root,foo +tty:*::foo +disk:*:foo: +lp:*::foo,root +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:foo:foo +voice:*:: +cdrom:*:foo:foo +floppy:*::foo +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/pwck/23_pwck_locked_passwd/config/etc/passwd b/tests/cktools/pwck/23_pwck_locked_passwd/config/etc/passwd new file mode 100644 index 00000000..bf52df00 --- /dev/null +++ b/tests/cktools/pwck/23_pwck_locked_passwd/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000::/home/foo:/bin/false diff --git a/tests/cktools/pwck/23_pwck_locked_passwd/config/etc/shadow b/tests/cktools/pwck/23_pwck_locked_passwd/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/pwck/23_pwck_locked_passwd/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/23_pwck_locked_passwd/data/pwck.err b/tests/cktools/pwck/23_pwck_locked_passwd/data/pwck.err new file mode 100644 index 00000000..798e427e --- /dev/null +++ b/tests/cktools/pwck/23_pwck_locked_passwd/data/pwck.err @@ -0,0 +1,2 @@ +pwck: existing lock file /etc/passwd.lock without a PID +pwck: cannot lock /etc/passwd; try again later. diff --git a/tests/cktools/pwck/23_pwck_locked_passwd/pwck.test b/tests/cktools/pwck/23_pwck_locked_passwd/pwck.test new file mode 100755 index 00000000..8731b286 --- /dev/null +++ b/tests/cktools/pwck/23_pwck_locked_passwd/pwck.test @@ -0,0 +1,60 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "pwck checks if the passwd file is locked" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config; rm -f /etc/passwd.lock' 0 + +change_config + +echo -n "Create lock file for /etc/passwd..." +touch /etc/passwd.lock +echo "done" + +echo -n "Check user database (pwck)..." +pwck 2>tmp/pwck.err && exit 1 || { + status=$? +} +echo "OK" + +rm -f /etc/passwd.lock + +echo -n "Check returned status ($status)..." +test "$status" = "4" +echo "OK" + +echo "pwck reported:" +echo "=======================================================================" +cat tmp/pwck.err +echo "=======================================================================" +echo -n "Check that there were a failure message..." +diff -au data/pwck.err tmp/pwck.err +echo "error message OK." +rm -f tmp/pwck.err + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/24_pwck_locked_shadow/config.txt b/tests/cktools/pwck/24_pwck_locked_shadow/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/cktools/pwck/24_pwck_locked_shadow/config/etc/group b/tests/cktools/pwck/24_pwck_locked_shadow/config/etc/group new file mode 100644 index 00000000..b6fae894 --- /dev/null +++ b/tests/cktools/pwck/24_pwck_locked_shadow/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3:root +adm:x:4:root,foo +tty:x:5: +disk:x:6: +lp:x:7:foo,root +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21:foo +voice:x:22: +cdrom:x:24: +floppy:x:25:foo +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100:foo +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/24_pwck_locked_shadow/config/etc/gshadow b/tests/cktools/pwck/24_pwck_locked_shadow/config/etc/gshadow new file mode 100644 index 00000000..1f2ba8da --- /dev/null +++ b/tests/cktools/pwck/24_pwck_locked_shadow/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*::root +adm:*::root,foo +tty:*::foo +disk:*:foo: +lp:*::foo,root +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:foo:foo +voice:*:: +cdrom:*:foo:foo +floppy:*::foo +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/pwck/24_pwck_locked_shadow/config/etc/passwd b/tests/cktools/pwck/24_pwck_locked_shadow/config/etc/passwd new file mode 100644 index 00000000..bf52df00 --- /dev/null +++ b/tests/cktools/pwck/24_pwck_locked_shadow/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000::/home/foo:/bin/false diff --git a/tests/cktools/pwck/24_pwck_locked_shadow/config/etc/shadow b/tests/cktools/pwck/24_pwck_locked_shadow/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/pwck/24_pwck_locked_shadow/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/24_pwck_locked_shadow/data/pwck.err b/tests/cktools/pwck/24_pwck_locked_shadow/data/pwck.err new file mode 100644 index 00000000..f8112fb1 --- /dev/null +++ b/tests/cktools/pwck/24_pwck_locked_shadow/data/pwck.err @@ -0,0 +1,2 @@ +pwck: existing lock file /etc/shadow.lock without a PID +pwck: cannot lock /etc/shadow; try again later. diff --git a/tests/cktools/pwck/24_pwck_locked_shadow/pwck.test b/tests/cktools/pwck/24_pwck_locked_shadow/pwck.test new file mode 100755 index 00000000..61e2926c --- /dev/null +++ b/tests/cktools/pwck/24_pwck_locked_shadow/pwck.test @@ -0,0 +1,60 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "pwck checks if the shadow file is locked" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config; rm -f /etc/shadow.lock' 0 + +change_config + +echo -n "Create lock file for /etc/shadow..." +touch /etc/shadow.lock +echo "done" + +echo -n "Check user database (pwck)..." +pwck 2>tmp/pwck.err && exit 1 || { + status=$? +} +echo "OK" + +rm -f /etc/shadow.lock + +echo -n "Check returned status ($status)..." +test "$status" = "4" +echo "OK" + +echo "pwck reported:" +echo "=======================================================================" +cat tmp/pwck.err +echo "=======================================================================" +echo -n "Check that there were a failure message..." +diff -au data/pwck.err tmp/pwck.err +echo "error message OK." +rm -f tmp/pwck.err + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/25_pwck_usage_invalid_option/config.txt b/tests/cktools/pwck/25_pwck_usage_invalid_option/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/cktools/pwck/25_pwck_usage_invalid_option/config/etc/group b/tests/cktools/pwck/25_pwck_usage_invalid_option/config/etc/group new file mode 100644 index 00000000..b6fae894 --- /dev/null +++ b/tests/cktools/pwck/25_pwck_usage_invalid_option/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3:root +adm:x:4:root,foo +tty:x:5: +disk:x:6: +lp:x:7:foo,root +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21:foo +voice:x:22: +cdrom:x:24: +floppy:x:25:foo +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100:foo +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/25_pwck_usage_invalid_option/config/etc/gshadow b/tests/cktools/pwck/25_pwck_usage_invalid_option/config/etc/gshadow new file mode 100644 index 00000000..1f2ba8da --- /dev/null +++ b/tests/cktools/pwck/25_pwck_usage_invalid_option/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*::root +adm:*::root,foo +tty:*::foo +disk:*:foo: +lp:*::foo,root +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:foo:foo +voice:*:: +cdrom:*:foo:foo +floppy:*::foo +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/pwck/25_pwck_usage_invalid_option/config/etc/passwd b/tests/cktools/pwck/25_pwck_usage_invalid_option/config/etc/passwd new file mode 100644 index 00000000..bf52df00 --- /dev/null +++ b/tests/cktools/pwck/25_pwck_usage_invalid_option/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000::/home/foo:/bin/false diff --git a/tests/cktools/pwck/25_pwck_usage_invalid_option/config/etc/shadow b/tests/cktools/pwck/25_pwck_usage_invalid_option/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/pwck/25_pwck_usage_invalid_option/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/25_pwck_usage_invalid_option/data/pwck.err b/tests/cktools/pwck/25_pwck_usage_invalid_option/data/pwck.err new file mode 100644 index 00000000..b08f13f6 --- /dev/null +++ b/tests/cktools/pwck/25_pwck_usage_invalid_option/data/pwck.err @@ -0,0 +1,11 @@ +pwck: invalid option -- 'Z' +Usage: pwck [options] [passwd [shadow]] + +Options: + -h, --help display this help message and exit + -q, --quiet report errors only + -r, --read-only display errors and warnings + but do not change files + -R, --root CHROOT_DIR directory to chroot into + -s, --sort sort entries by UID + diff --git a/tests/cktools/pwck/25_pwck_usage_invalid_option/pwck.test b/tests/cktools/pwck/25_pwck_usage_invalid_option/pwck.test new file mode 100755 index 00000000..a8d5941a --- /dev/null +++ b/tests/cktools/pwck/25_pwck_usage_invalid_option/pwck.test @@ -0,0 +1,56 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "pwck displays its usage message when called with an invalid option" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Call pwck with an invalid option (pwck -Z)..." +pwck -Z 2>tmp/pwck.err && exit 1 || { + status=$? +} +echo "OK" + +rm -f /etc/passwd.lock + +echo -n "Check returned status ($status)..." +test "$status" = "1" +echo "OK" + +echo "pwck reported:" +echo "=======================================================================" +cat tmp/pwck.err +echo "=======================================================================" +echo -n "Check that there were a failure message..." +diff -au data/pwck.err tmp/pwck.err +echo "error message OK." +rm -f tmp/pwck.err + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/26_pwck_usage-s-r/config.txt b/tests/cktools/pwck/26_pwck_usage-s-r/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/cktools/pwck/26_pwck_usage-s-r/config/etc/group b/tests/cktools/pwck/26_pwck_usage-s-r/config/etc/group new file mode 100644 index 00000000..b6fae894 --- /dev/null +++ b/tests/cktools/pwck/26_pwck_usage-s-r/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3:root +adm:x:4:root,foo +tty:x:5: +disk:x:6: +lp:x:7:foo,root +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21:foo +voice:x:22: +cdrom:x:24: +floppy:x:25:foo +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100:foo +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/26_pwck_usage-s-r/config/etc/gshadow b/tests/cktools/pwck/26_pwck_usage-s-r/config/etc/gshadow new file mode 100644 index 00000000..1f2ba8da --- /dev/null +++ b/tests/cktools/pwck/26_pwck_usage-s-r/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*::root +adm:*::root,foo +tty:*::foo +disk:*:foo: +lp:*::foo,root +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:foo:foo +voice:*:: +cdrom:*:foo:foo +floppy:*::foo +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/pwck/26_pwck_usage-s-r/config/etc/passwd b/tests/cktools/pwck/26_pwck_usage-s-r/config/etc/passwd new file mode 100644 index 00000000..bf52df00 --- /dev/null +++ b/tests/cktools/pwck/26_pwck_usage-s-r/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000::/home/foo:/bin/false diff --git a/tests/cktools/pwck/26_pwck_usage-s-r/config/etc/shadow b/tests/cktools/pwck/26_pwck_usage-s-r/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/pwck/26_pwck_usage-s-r/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/26_pwck_usage-s-r/data/pwck.err b/tests/cktools/pwck/26_pwck_usage-s-r/data/pwck.err new file mode 100644 index 00000000..e44d375d --- /dev/null +++ b/tests/cktools/pwck/26_pwck_usage-s-r/data/pwck.err @@ -0,0 +1 @@ +pwck: -s and -r are incompatible diff --git a/tests/cktools/pwck/26_pwck_usage-s-r/pwck.test b/tests/cktools/pwck/26_pwck_usage-s-r/pwck.test new file mode 100755 index 00000000..6f0a3b5c --- /dev/null +++ b/tests/cktools/pwck/26_pwck_usage-s-r/pwck.test @@ -0,0 +1,56 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "pwck warns that -r and -s are exclusive" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Call pwck with the -r and -s options (pwck -r -s)..." +pwck -r -s 2>tmp/pwck.err && exit 1 || { + status=$? +} +echo "OK" + +rm -f /etc/passwd.lock + +echo -n "Check returned status ($status)..." +test "$status" = "1" +echo "OK" + +echo "pwck reported:" +echo "=======================================================================" +cat tmp/pwck.err +echo "=======================================================================" +echo -n "Check that there were a failure message..." +diff -au data/pwck.err tmp/pwck.err +echo "error message OK." +rm -f tmp/pwck.err + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/27_pwck_usage_3_files/config.txt b/tests/cktools/pwck/27_pwck_usage_3_files/config.txt new file mode 100644 index 00000000..e69de29b diff --git a/tests/cktools/pwck/27_pwck_usage_3_files/config/etc/group b/tests/cktools/pwck/27_pwck_usage_3_files/config/etc/group new file mode 100644 index 00000000..b6fae894 --- /dev/null +++ b/tests/cktools/pwck/27_pwck_usage_3_files/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3:root +adm:x:4:root,foo +tty:x:5: +disk:x:6: +lp:x:7:foo,root +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21:foo +voice:x:22: +cdrom:x:24: +floppy:x:25:foo +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100:foo +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/27_pwck_usage_3_files/config/etc/gshadow b/tests/cktools/pwck/27_pwck_usage_3_files/config/etc/gshadow new file mode 100644 index 00000000..1f2ba8da --- /dev/null +++ b/tests/cktools/pwck/27_pwck_usage_3_files/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*::root +adm:*::root,foo +tty:*::foo +disk:*:foo: +lp:*::foo,root +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:foo:foo +voice:*:: +cdrom:*:foo:foo +floppy:*::foo +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:*:: diff --git a/tests/cktools/pwck/27_pwck_usage_3_files/config/etc/passwd b/tests/cktools/pwck/27_pwck_usage_3_files/config/etc/passwd new file mode 100644 index 00000000..bf52df00 --- /dev/null +++ b/tests/cktools/pwck/27_pwck_usage_3_files/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +foo:x:1000:1000::/home/foo:/bin/false diff --git a/tests/cktools/pwck/27_pwck_usage_3_files/config/etc/shadow b/tests/cktools/pwck/27_pwck_usage_3_files/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/pwck/27_pwck_usage_3_files/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/27_pwck_usage_3_files/data/pwck.err b/tests/cktools/pwck/27_pwck_usage_3_files/data/pwck.err new file mode 100644 index 00000000..fa629415 --- /dev/null +++ b/tests/cktools/pwck/27_pwck_usage_3_files/data/pwck.err @@ -0,0 +1,10 @@ +Usage: pwck [options] [passwd [shadow]] + +Options: + -h, --help display this help message and exit + -q, --quiet report errors only + -r, --read-only display errors and warnings + but do not change files + -R, --root CHROOT_DIR directory to chroot into + -s, --sort sort entries by UID + diff --git a/tests/cktools/pwck/27_pwck_usage_3_files/pwck.test b/tests/cktools/pwck/27_pwck_usage_3_files/pwck.test new file mode 100755 index 00000000..9c8c81d1 --- /dev/null +++ b/tests/cktools/pwck/27_pwck_usage_3_files/pwck.test @@ -0,0 +1,56 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "pwck displays its usage message when called with 3 files" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Call pwck with 3 files (pwck data/passwd data/shadow data/foo)..." +pwck data/passwd data/shadow data/foo 2>tmp/pwck.err && exit 1 || { + status=$? +} +echo "OK" + +rm -f /etc/passwd.lock + +echo -n "Check returned status ($status)..." +test "$status" = "1" +echo "OK" + +echo "pwck reported:" +echo "=======================================================================" +cat tmp/pwck.err +echo "=======================================================================" +echo -n "Check that there were a failure message..." +diff -au data/pwck.err tmp/pwck.err +echo "error message OK." +rm -f tmp/pwck.err + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/28_pwck_no_shadow_file/config.txt b/tests/cktools/pwck/28_pwck_no_shadow_file/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/cktools/pwck/28_pwck_no_shadow_file/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/cktools/pwck/28_pwck_no_shadow_file/config/etc/group b/tests/cktools/pwck/28_pwck_no_shadow_file/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/pwck/28_pwck_no_shadow_file/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/28_pwck_no_shadow_file/config/etc/gshadow b/tests/cktools/pwck/28_pwck_no_shadow_file/config/etc/gshadow new file mode 100644 index 00000000..be1575eb --- /dev/null +++ b/tests/cktools/pwck/28_pwck_no_shadow_file/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:x:: diff --git a/tests/cktools/pwck/28_pwck_no_shadow_file/config/etc/passwd b/tests/cktools/pwck/28_pwck_no_shadow_file/config/etc/passwd new file mode 100644 index 00000000..57434e69 --- /dev/null +++ b/tests/cktools/pwck/28_pwck_no_shadow_file/config/etc/passwd @@ -0,0 +1,23 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/tmp:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/tmp:/bin/sh +uucp:x:10:10:uucp:/tmp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/tmp:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/tmp:/bin/sh +irc:x:39:39:ircd:/tmp:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/tmp:/bin/sh +nobody:x:65534:65534:nobody:/tmp:/bin/sh +Debian-exim:x:102:102::/tmp:/bin/false +foo:pass:1000:1000::/home/foo:/bin/sh +foo:pass:1001:1000::/tmp:/bin/sh +foo2:pass:1000:1000::/tmp:/bin/shs +foo3:x:1000:1000::/tmp: diff --git a/tests/cktools/pwck/28_pwck_no_shadow_file/config/etc/shadow b/tests/cktools/pwck/28_pwck_no_shadow_file/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/pwck/28_pwck_no_shadow_file/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/28_pwck_no_shadow_file/data/pwck.out b/tests/cktools/pwck/28_pwck_no_shadow_file/data/pwck.out new file mode 100644 index 00000000..e0cac3d8 --- /dev/null +++ b/tests/cktools/pwck/28_pwck_no_shadow_file/data/pwck.out @@ -0,0 +1,7 @@ +duplicate password entry +delete line 'foo:pass:1000:1000::/home/foo:/bin/sh'? No +user 'foo': directory '/home/foo' does not exist +duplicate password entry +delete line 'foo:pass:1001:1000::/tmp:/bin/sh'? No +user 'foo2': program '/bin/shs' does not exist +pwck: no changes diff --git a/tests/cktools/pwck/28_pwck_no_shadow_file/pwck.test b/tests/cktools/pwck/28_pwck_no_shadow_file/pwck.test new file mode 100755 index 00000000..e792f78a --- /dev/null +++ b/tests/cktools/pwck/28_pwck_no_shadow_file/pwck.test @@ -0,0 +1,58 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "pwck report issues when the shadow file does not exist" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Remove /etc/shadow..." +rm -f /etc/shadow +echo "OK" + +echo -n "Check user database (pwck -r)..." +pwck -r >tmp/pwck.out && exit 1 || { + status=$? +} +echo "OK" + +echo -n "Check returned status ($status)..." +test "$status" = "2" +echo "OK" + +echo "pwck reported:" +echo "=======================================================================" +cat tmp/pwck.out +echo "=======================================================================" +echo -n "Check the report..." +diff -au data/pwck.out tmp/pwck.out +echo "report OK." +rm -f tmp/pwck.out + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +test ! -f /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/29_pwck_password_change_in_future/config.txt b/tests/cktools/pwck/29_pwck_password_change_in_future/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/cktools/pwck/29_pwck_password_change_in_future/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/cktools/pwck/29_pwck_password_change_in_future/config/etc/group b/tests/cktools/pwck/29_pwck_password_change_in_future/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/pwck/29_pwck_password_change_in_future/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/29_pwck_password_change_in_future/config/etc/gshadow b/tests/cktools/pwck/29_pwck_password_change_in_future/config/etc/gshadow new file mode 100644 index 00000000..be1575eb --- /dev/null +++ b/tests/cktools/pwck/29_pwck_password_change_in_future/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:x:: diff --git a/tests/cktools/pwck/29_pwck_password_change_in_future/config/etc/passwd b/tests/cktools/pwck/29_pwck_password_change_in_future/config/etc/passwd new file mode 100644 index 00000000..ded978d9 --- /dev/null +++ b/tests/cktools/pwck/29_pwck_password_change_in_future/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/tmp:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/tmp:/bin/sh +uucp:x:10:10:uucp:/tmp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/tmp:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/tmp:/bin/sh +irc:x:39:39:ircd:/tmp:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/tmp:/bin/sh +nobody:x:65534:65534:nobody:/tmp:/bin/sh +Debian-exim:x:102:102::/tmp:/bin/false +foo:x:1000:1000::/home:/bin/sh diff --git a/tests/cktools/pwck/29_pwck_password_change_in_future/config/etc/shadow b/tests/cktools/pwck/29_pwck_password_change_in_future/config/etc/shadow new file mode 100644 index 00000000..37819882 --- /dev/null +++ b/tests/cktools/pwck/29_pwck_password_change_in_future/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:99997:0:99999:7::: diff --git a/tests/cktools/pwck/29_pwck_password_change_in_future/data/pwck.out b/tests/cktools/pwck/29_pwck_password_change_in_future/data/pwck.out new file mode 100644 index 00000000..12d2fbfe --- /dev/null +++ b/tests/cktools/pwck/29_pwck_password_change_in_future/data/pwck.out @@ -0,0 +1,2 @@ +user foo: last password change in the future +pwck: no changes diff --git a/tests/cktools/pwck/29_pwck_password_change_in_future/pwck.test b/tests/cktools/pwck/29_pwck_password_change_in_future/pwck.test new file mode 100755 index 00000000..6ccd8109 --- /dev/null +++ b/tests/cktools/pwck/29_pwck_password_change_in_future/pwck.test @@ -0,0 +1,54 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "pwck checks that the password was set in the past" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Check user database (pwck -r)..." +pwck -r >tmp/pwck.out && exit 1 || { + status=$? +} +echo "OK" + +echo -n "Check returned status ($status)..." +test "$status" = "2" +echo "OK" + +echo "pwck reported:" +echo "=======================================================================" +cat tmp/pwck.out +echo "=======================================================================" +echo -n "Check the report..." +diff -au data/pwck.out tmp/pwck.out +echo "report OK." +rm -f tmp/pwck.out + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/30_pwck_NIS_entries/config.txt b/tests/cktools/pwck/30_pwck_NIS_entries/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/cktools/pwck/30_pwck_NIS_entries/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/cktools/pwck/30_pwck_NIS_entries/config/etc/group b/tests/cktools/pwck/30_pwck_NIS_entries/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/pwck/30_pwck_NIS_entries/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/30_pwck_NIS_entries/config/etc/gshadow b/tests/cktools/pwck/30_pwck_NIS_entries/config/etc/gshadow new file mode 100644 index 00000000..be1575eb --- /dev/null +++ b/tests/cktools/pwck/30_pwck_NIS_entries/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:x:: diff --git a/tests/cktools/pwck/30_pwck_NIS_entries/config/etc/passwd b/tests/cktools/pwck/30_pwck_NIS_entries/config/etc/passwd new file mode 100644 index 00000000..e5bbc071 --- /dev/null +++ b/tests/cktools/pwck/30_pwck_NIS_entries/config/etc/passwd @@ -0,0 +1,23 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/tmp:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/tmp:/bin/sh +uucp:x:10:10:uucp:/tmp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/tmp:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/tmp:/bin/sh +irc:x:39:39:ircd:/tmp:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/tmp:/bin/sh +nobody:x:65534:65534:nobody:/tmp:/bin/sh +Debian-exim:x:102:102::/tmp:/bin/false +foo:x:1000:1000::/home:/bin/sh ++:::::: +-bar:::::: +foo:x:1001:1000::/home:/bin/sh diff --git a/tests/cktools/pwck/30_pwck_NIS_entries/config/etc/shadow b/tests/cktools/pwck/30_pwck_NIS_entries/config/etc/shadow new file mode 100644 index 00000000..d3c07656 --- /dev/null +++ b/tests/cktools/pwck/30_pwck_NIS_entries/config/etc/shadow @@ -0,0 +1,23 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:99997:0:99999:7::: ++:::::::: +-bar:::::::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/30_pwck_NIS_entries/data/pwck.out b/tests/cktools/pwck/30_pwck_NIS_entries/data/pwck.out new file mode 100644 index 00000000..56dce35c --- /dev/null +++ b/tests/cktools/pwck/30_pwck_NIS_entries/data/pwck.out @@ -0,0 +1,10 @@ +duplicate password entry +delete line 'foo:x:1000:1000::/home:/bin/sh'? No +duplicate password entry +delete line 'foo:x:1001:1000::/home:/bin/sh'? No +duplicate shadow password entry +delete line 'Debian-exim:!:12977:0:99999:7:::'? No +user foo: last password change in the future +duplicate shadow password entry +delete line 'Debian-exim:!:12977:0:99999:7:::'? No +pwck: no changes diff --git a/tests/cktools/pwck/30_pwck_NIS_entries/pwck.test b/tests/cktools/pwck/30_pwck_NIS_entries/pwck.test new file mode 100755 index 00000000..733fa94e --- /dev/null +++ b/tests/cktools/pwck/30_pwck_NIS_entries/pwck.test @@ -0,0 +1,54 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "pwck ignores NIS lines silently" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Check user database (pwck -r)..." +pwck -r >tmp/pwck.out && exit 1 || { + status=$? +} +echo "OK" + +echo -n "Check returned status ($status)..." +test "$status" = "2" +echo "OK" + +echo "pwck reported:" +echo "=======================================================================" +cat tmp/pwck.out +echo "=======================================================================" +echo -n "Check the report..." +diff -au data/pwck.out tmp/pwck.out +echo "report OK." +rm -f tmp/pwck.out + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/config.txt b/tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/config/etc/group b/tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/config/etc/group new file mode 100644 index 00000000..fecba0c4 --- /dev/null +++ b/tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/config/etc/group @@ -0,0 +1,42 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: +foo:x:1000: diff --git a/tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/config/etc/gshadow b/tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/config/etc/gshadow new file mode 100644 index 00000000..be1575eb --- /dev/null +++ b/tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/config/etc/gshadow @@ -0,0 +1,42 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: +foo:x:: diff --git a/tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/config/etc/passwd b/tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/config/etc/passwd new file mode 100644 index 00000000..fbeb96c2 --- /dev/null +++ b/tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/config/etc/passwd @@ -0,0 +1,20 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/tmp:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/tmp:/bin/sh +uucp:x:10:10:uucp:/tmp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/tmp:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/tmp:/bin/sh +irc:x:39:39:ircd:/tmp:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/tmp:/bin/sh +nobody:x:65534:65534:nobody:/tmp:/bin/sh +Debian-exim:x:102:102::/tmp:/bin/false +foo:pass:1000:1000::/home:/bin/sh diff --git a/tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/config/etc/shadow b/tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/config/etc/shadow new file mode 100644 index 00000000..2baad3b4 --- /dev/null +++ b/tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/config/etc/shadow @@ -0,0 +1,20 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: +foo:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/data/pwck.out b/tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/data/pwck.out new file mode 100644 index 00000000..5cedc7c3 --- /dev/null +++ b/tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/data/pwck.out @@ -0,0 +1,2 @@ +user foo has an entry in /etc/shadow, but its password field in /etc/passwd is not set to 'x' +pwck: no changes diff --git a/tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/pwck.test b/tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/pwck.test new file mode 100755 index 00000000..4c5b1f5f --- /dev/null +++ b/tests/cktools/pwck/31_pwck_shadow_entry_passwd_no_x/pwck.test @@ -0,0 +1,54 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "pwck checks that the password is set to x if there is a shadow entry" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Check user database (pwck -r)..." +pwck -r >tmp/pwck.out && exit 1 || { + status=$? +} +echo "OK" + +echo -n "Check returned status ($status)..." +test "$status" = "2" +echo "OK" + +echo "pwck reported:" +echo "=======================================================================" +cat tmp/pwck.out +echo "=======================================================================" +echo -n "Check the report..." +diff -au data/pwck.out tmp/pwck.out +echo "report OK." +rm -f tmp/pwck.out + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/cktools/pwck/32_pwck_quiet/config.txt b/tests/cktools/pwck/32_pwck_quiet/config.txt new file mode 100644 index 00000000..31f56359 --- /dev/null +++ b/tests/cktools/pwck/32_pwck_quiet/config.txt @@ -0,0 +1,10 @@ +# no testsuite password +# root password: rootF00barbaz +# myuser password: myuserF00barbaz + +user foo, in group users (only in /etc/group) +user foo, in group tty (only in /etc/gshadow) +user foo, in group floppy +user foo, admin of group disk +user foo, admin and member of group fax +user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/cktools/pwck/32_pwck_quiet/config/etc/group b/tests/cktools/pwck/32_pwck_quiet/config/etc/group new file mode 100644 index 00000000..10123908 --- /dev/null +++ b/tests/cktools/pwck/32_pwck_quiet/config/etc/group @@ -0,0 +1,41 @@ +root:x:0: +daemon:x:1: +bin:x:2: +sys:x:3: +adm:x:4: +tty:x:5: +disk:x:6: +lp:x:7: +mail:x:8: +news:x:9: +uucp:x:10: +man:x:12: +proxy:x:13: +kmem:x:15: +dialout:x:20: +fax:x:21: +voice:x:22: +cdrom:x:24: +floppy:x:25: +tape:x:26: +sudo:x:27: +audio:x:29: +dip:x:30: +www-data:x:33: +backup:x:34: +operator:x:37: +list:x:38: +irc:x:39: +src:x:40: +gnats:x:41: +shadow:x:42: +utmp:x:43: +video:x:44: +sasl:x:45: +plugdev:x:46: +staff:x:50: +games:x:60: +users:x:100: +nogroup:x:65534: +crontab:x:101: +Debian-exim:x:102: diff --git a/tests/cktools/pwck/32_pwck_quiet/config/etc/gshadow b/tests/cktools/pwck/32_pwck_quiet/config/etc/gshadow new file mode 100644 index 00000000..ae424865 --- /dev/null +++ b/tests/cktools/pwck/32_pwck_quiet/config/etc/gshadow @@ -0,0 +1,41 @@ +root:*:: +daemon:*:: +bin:*:: +sys:*:: +adm:*:: +tty:*:: +disk:*:: +lp:*:: +mail:*:: +news:*:: +uucp:*:: +man:*:: +proxy:*:: +kmem:*:: +dialout:*:: +fax:*:: +voice:*:: +cdrom:*:: +floppy:*:: +tape:*:: +sudo:*:: +audio:*:: +dip:*:: +www-data:*:: +backup:*:: +operator:*:: +list:*:: +irc:*:: +src:*:: +gnats:*:: +shadow:*:: +utmp:*:: +video:*:: +sasl:*:: +plugdev:*:: +staff:*:: +games:*:: +users:*:: +nogroup:*:: +crontab:x:: +Debian-exim:x:: diff --git a/tests/cktools/pwck/32_pwck_quiet/config/etc/passwd b/tests/cktools/pwck/32_pwck_quiet/config/etc/passwd new file mode 100644 index 00000000..4491abe7 --- /dev/null +++ b/tests/cktools/pwck/32_pwck_quiet/config/etc/passwd @@ -0,0 +1,22 @@ +root:x:0:0:root:/root:/bin/bash +daemon:x:1:1:daemon:/usr/sbin:/bin/sh +bin:x:2:2:bin:/bin:/bin/sh +sys:x:3:3:sys:/dev:/bin/sh +sync:x:4:65534:sync:/bin:/bin/sync +games:x:5:60:games:/usr/games:/bin/sh +man:x:6:12:man:/var/cache/man:/bin/sh +lp:x:7:7:lp:/var/spool/lpd:/bin/sh +mail:x:8:8:mail:/var/mail:/bin/sh +news:x:9:9:news:/var/spool/news:/bin/sh +uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:x:13:13:proxy:/bin:/bin/sh +www-data:x:33:33:www-data:/var/www:/bin/sh +backup:x:34:34:backup:/var/backups:/bin/sh +list:x:38:38:Mailing List Manager:/var/list:/bin/sh +irc:x:39:39:ircd:/var/run/ircd:/bin/sh +gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:x:65534:65534:nobody:/nonexistent:/bin/sh +Debian-exim:x:102:102::/var/spool/exim4:/bin/false +Debian-exim:x:103:102::/var/spool/exim4:/bin/false +Debian-exim2:x:104:103::/var/spool/exim4:/bin/false +Debian-exim3:x:102:103::/var/spool/exim4:/bin/false diff --git a/tests/cktools/pwck/32_pwck_quiet/config/etc/shadow b/tests/cktools/pwck/32_pwck_quiet/config/etc/shadow new file mode 100644 index 00000000..5f50d187 --- /dev/null +++ b/tests/cktools/pwck/32_pwck_quiet/config/etc/shadow @@ -0,0 +1,19 @@ +root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: +daemon:*:12977:0:99999:7::: +bin:*:12977:0:99999:7::: +sys:*:12977:0:99999:7::: +sync:*:12977:0:99999:7::: +games:*:12977:0:99999:7::: +man:*:12977:0:99999:7::: +lp:*:12977:0:99999:7::: +mail:*:12977:0:99999:7::: +news:*:12977:0:99999:7::: +uucp:*:12977:0:99999:7::: +proxy:*:12977:0:99999:7::: +www-data:*:12977:0:99999:7::: +backup:*:12977:0:99999:7::: +list:*:12977:0:99999:7::: +irc:*:12977:0:99999:7::: +gnats:*:12977:0:99999:7::: +nobody:*:12977:0:99999:7::: +Debian-exim:!:12977:0:99999:7::: diff --git a/tests/cktools/pwck/32_pwck_quiet/data/pwck.out b/tests/cktools/pwck/32_pwck_quiet/data/pwck.out new file mode 100644 index 00000000..c9a8c2c5 --- /dev/null +++ b/tests/cktools/pwck/32_pwck_quiet/data/pwck.out @@ -0,0 +1,9 @@ +duplicate password entry +delete line 'Debian-exim:x:102:102::/var/spool/exim4:/bin/false'? No +duplicate password entry +delete line 'Debian-exim:x:103:102::/var/spool/exim4:/bin/false'? No +no matching password file entry in /etc/shadow +add user 'Debian-exim2' in /etc/shadow? No +no matching password file entry in /etc/shadow +add user 'Debian-exim3' in /etc/shadow? No +pwck: no changes diff --git a/tests/cktools/pwck/32_pwck_quiet/pwck.test b/tests/cktools/pwck/32_pwck_quiet/pwck.test new file mode 100755 index 00000000..c8a8b8ed --- /dev/null +++ b/tests/cktools/pwck/32_pwck_quiet/pwck.test @@ -0,0 +1,54 @@ +#!/bin/sh + +set -e + +cd $(dirname $0) + +. ../../../common/config.sh +. ../../../common/log.sh + +log_start "$0" "pwck can display its usage message" + +save_config + +# restore the files on exit +trap 'log_status "$0" "FAILURE"; restore_config' 0 + +change_config + +echo -n "Get pwck usage (pwck -q -r)..." +pwck -q -r >tmp/pwck.out && exit 1 || { + status=$? +} +echo "OK" + +echo -n "Check returned status ($status)..." +test "$status" = "2" +echo "OK" + +echo "pwck reported:" +echo "=======================================================================" +cat tmp/pwck.out +echo "=======================================================================" +echo -n "Check the report..." +diff -au data/pwck.out tmp/pwck.out +echo "report OK." +rm -f tmp/pwck.out + +echo -n "Check the passwd file..." +../../../common/compare_file.pl config/etc/passwd /etc/passwd +echo "OK" +echo -n "Check the group file..." +../../../common/compare_file.pl config/etc/group /etc/group +echo "OK" +echo -n "Check the shadow file..." +../../../common/compare_file.pl config/etc/shadow /etc/shadow +echo "OK" +echo -n "Check the gshadow file..." +../../../common/compare_file.pl config/etc/gshadow /etc/gshadow +echo "OK" + +log_status "$0" "SUCCESS" +restore_config +trap '' 0 + diff --git a/tests/common/compare_file.pl b/tests/common/compare_file.pl new file mode 100755 index 00000000..eb498d32 --- /dev/null +++ b/tests/common/compare_file.pl @@ -0,0 +1,116 @@ +#!/usr/bin/perl + +open (TEMPLATE, $ARGV[0]) or die "Cannot open '".$ARGV[0]."': $!"; +my $template = join "",