[Pkg-shadow-commits] r3502 - in debian/trunk/tests/usertools: . useradd useradd/01_useradd_usage useradd/01_useradd_usage/config useradd/01_useradd_usage/config/etc useradd/01_useradd_usage/config/etc/default useradd/01_useradd_usage/data useradd/02_useradd_usage_invalid_option useradd/02_useradd_usage_invalid_option/config useradd/02_useradd_usage_invalid_option/config/etc useradd/02_useradd_usage_invalid_option/config/etc/default useradd/02_useradd_usage_invalid_option/data useradd/03_useradd_usage_no_users useradd/03_useradd_usage_no_users/config useradd/03_useradd_usage_no_users/config/etc useradd/03_useradd_usage_no_users/config/etc/default useradd/03_useradd_usage_no_users/data useradd/04_useradd_usage_2_users useradd/04_useradd_usage_2_users/config useradd/04_useradd_usage_2_users/config/etc useradd/04_useradd_usage_2_users/config/etc/default useradd/04_useradd_usage_2_users/data useradd/05_useradd_usage-b_invalid1 useradd/05_useradd_usage-b_invalid1/config useradd/05_useradd_usage-b_invalid1/config/etc useradd/05_useradd_usage-b_invalid1/config/etc/default useradd/05_useradd_usage-b_invalid1/data useradd/06_useradd_usage-b_invalid2 useradd/06_useradd_usage-b_invalid2/config useradd/06_useradd_usage-b_invalid2/config/etc useradd/06_useradd_usage-b_invalid2/config/etc/default useradd/06_useradd_usage-b_invalid2/data useradd/07_useradd_usage-b_invalid3 useradd/07_useradd_usage-b_invalid3/config useradd/07_useradd_usage-b_invalid3/config/etc useradd/07_useradd_usage-b_invalid3/config/etc/default useradd/07_useradd_usage-b_invalid3/data useradd/08_useradd_usage-c_invalid1 useradd/08_useradd_usage-c_invalid1/config useradd/08_useradd_usage-c_invalid1/config/etc useradd/08_useradd_usage-c_invalid1/config/etc/default useradd/08_useradd_usage-c_invalid1/data useradd/09_useradd_usage-c_invalid2 useradd/09_useradd_usage-c_invalid2/config useradd/09_useradd_usage-c_invalid2/config/etc useradd/09_useradd_usage-c_invalid2/config/etc/default useradd/09_useradd_usage-c_invalid2/data useradd/10_useradd_usage-d_invalid1 useradd/10_useradd_usage-d_invalid1/config useradd/10_useradd_usage-d_invalid1/config/etc useradd/10_useradd_usage-d_invalid1/config/etc/default useradd/10_useradd_usage-d_invalid1/data useradd/11_useradd_usage-d_invalid2 useradd/11_useradd_usage-d_invalid2/config useradd/11_useradd_usage-d_invalid2/config/etc useradd/11_useradd_usage-d_invalid2/config/etc/default useradd/11_useradd_usage-d_invalid2/data useradd/12_useradd_usage-d_invalid3 useradd/12_useradd_usage-d_invalid3/config useradd/12_useradd_usage-d_invalid3/config/etc useradd/12_useradd_usage-d_invalid3/config/etc/default useradd/12_useradd_usage-d_invalid3/data useradd/13_useradd_usage-e_invalid1 useradd/13_useradd_usage-e_invalid1/config useradd/13_useradd_usage-e_invalid1/config/etc useradd/13_useradd_usage-e_invalid1/config/etc/default useradd/13_useradd_usage-e_invalid1/data useradd/14_useradd_usage-e_invalid2 useradd/14_useradd_usage-e_invalid2/config useradd/14_useradd_usage-e_invalid2/config/etc useradd/14_useradd_usage-e_invalid2/config/etc/default useradd/14_useradd_usage-e_invalid2/data useradd/15_useradd_usage-e_no_shadow_file useradd/15_useradd_usage-e_no_shadow_file/config useradd/15_useradd_usage-e_no_shadow_file/config/etc useradd/15_useradd_usage-e_no_shadow_file/config/etc/default useradd/15_useradd_usage-e_no_shadow_file/data useradd/16_useradd_usage-f_invalid1 useradd/16_useradd_usage-f_invalid1/config useradd/16_useradd_usage-f_invalid1/config/etc useradd/16_useradd_usage-f_invalid1/config/etc/default useradd/16_useradd_usage-f_invalid1/data useradd/17_useradd_usage-f_invalid2 useradd/17_useradd_usage-f_invalid2/config useradd/17_useradd_usage-f_invalid2/config/etc useradd/17_useradd_usage-f_invalid2/config/etc/default useradd/17_useradd_usage-f_invalid2/data useradd/18_useradd_usage-f_no_shadow_file useradd/18_useradd_usage-f_no_shadow_file/config useradd/18_useradd_usage-f_no_shadow_file/config/etc useradd/18_useradd_usage-f_no_shadow_file/config/etc/default useradd/18_useradd_usage-f_no_shadow_file/data useradd/19_useradd_usage-K_invalid1 useradd/19_useradd_usage-K_invalid1/config useradd/19_useradd_usage-K_invalid1/config/etc useradd/19_useradd_usage-K_invalid1/config/etc/default useradd/19_useradd_usage-K_invalid1/data useradd/20_useradd_usage-O_invalid2 useradd/20_useradd_usage-O_invalid2/config useradd/20_useradd_usage-O_invalid2/config/etc useradd/20_useradd_usage-O_invalid2/config/etc/default useradd/20_useradd_usage-O_invalid2/data useradd/21_useradd_usage-p_invalid1 useradd/21_useradd_usage-p_invalid1/config useradd/21_useradd_usage-p_invalid1/config/etc useradd/21_useradd_usage-p_invalid1/config/etc/default useradd/21_useradd_usage-p_invalid1/data useradd/22_useradd_usage-p_invalid2 useradd/22_useradd_usage-p_invalid2/config useradd/22_useradd_usage-p_invalid2/config/etc useradd/22_useradd_usage-p_invalid2/config/etc/default useradd/22_useradd_usage-p_invalid2/data useradd/23_useradd_usage-s_invalid1 useradd/23_useradd_usage-s_invalid1/config useradd/23_useradd_usage-s_invalid1/config/etc useradd/23_useradd_usage-s_invalid1/config/etc/default useradd/23_useradd_usage-s_invalid1/data useradd/24_useradd_usage-s_invalid2 useradd/24_useradd_usage-s_invalid2/config useradd/24_useradd_usage-s_invalid2/config/etc useradd/24_useradd_usage-s_invalid2/config/etc/default useradd/24_useradd_usage-s_invalid2/data useradd/25_useradd_usage-s_invalid3 useradd/25_useradd_usage-s_invalid3/config useradd/25_useradd_usage-s_invalid3/config/etc useradd/25_useradd_usage-s_invalid3/config/etc/default useradd/25_useradd_usage-s_invalid3/data useradd/26_useradd_usage-o_without-u useradd/26_useradd_usage-o_without-u/config useradd/26_useradd_usage-o_without-u/config/etc useradd/26_useradd_usage-o_without-u/config/etc/default useradd/26_useradd_usage-o_without-u/data useradd/27_useradd_usage-k_without-m useradd/27_useradd_usage-k_without-m/config useradd/27_useradd_usage-k_without-m/config/etc useradd/27_useradd_usage-k_without-m/config/etc/default useradd/27_useradd_usage-k_without-m/data useradd/28_useradd_usage-U_with-g useradd/28_useradd_usage-U_with-g/config useradd/28_useradd_usage-U_with-g/config/etc useradd/28_useradd_usage-U_with-g/config/etc/default useradd/28_useradd_usage-U_with-g/data useradd/29_useradd_usage-U_with-N useradd/29_useradd_usage-U_with-N/config useradd/29_useradd_usage-U_with-N/config/etc useradd/29_useradd_usage-U_with-N/config/etc/default useradd/29_useradd_usage-U_with-N/data useradd/30_useradd_usage-m_with-M useradd/30_useradd_usage-m_with-M/config useradd/30_useradd_usage-m_with-M/config/etc useradd/30_useradd_usage-m_with-M/config/etc/default useradd/30_useradd_usage-m_with-M/data useradd/31_useradd_usage_user_with-D useradd/31_useradd_usage_user_with-D/config useradd/31_useradd_usage_user_with-D/config/etc useradd/31_useradd_usage_user_with-D/config/etc/default useradd/31_useradd_usage_user_with-D/data useradd/32_useradd_usage-D_with_other useradd/32_useradd_usage-D_with_other/config useradd/32_useradd_usage-D_with_other/config/etc useradd/32_useradd_usage-D_with_other/config/etc/default useradd/32_useradd_usage-D_with_other/data useradd/33_useradd_usage_invalid_username useradd/33_useradd_usage_invalid_username/config useradd/33_useradd_usage_invalid_username/config/etc useradd/33_useradd_usage_invalid_username/config/etc/default useradd/33_useradd_usage_invalid_username/data useradd/34_useradd_default_GROUP_GID useradd/34_useradd_default_GROUP_GID/config useradd/34_useradd_default_GROUP_GID/config/etc useradd/34_useradd_default_GROUP_GID/config/etc/default useradd/34_useradd_default_GROUP_GID/data useradd/35_useradd_default_GROUP_name useradd/35_useradd_default_GROUP_name/config useradd/35_useradd_default_GROUP_name/config/etc useradd/35_useradd_default_GROUP_name/config/etc/default useradd/35_useradd_default_GROUP_name/data useradd/36_useradd_default_GROUP_invalid_GID useradd/36_useradd_default_GROUP_invalid_GID/config useradd/36_useradd_default_GROUP_invalid_GID/config/etc useradd/36_useradd_default_GROUP_invalid_GID/config/etc/default useradd/36_useradd_default_GROUP_invalid_GID/data useradd/37_useradd_default_GROUP_invalid_name useradd/37_useradd_default_GROUP_invalid_name/config useradd/37_useradd_default_GROUP_invalid_name/config/etc useradd/37_useradd_default_GROUP_invalid_name/config/etc/default useradd/37_useradd_default_GROUP_invalid_name/data useradd/38_useradd_default_INACTIVE useradd/38_useradd_default_INACTIVE/config useradd/38_useradd_default_INACTIVE/config/etc useradd/38_useradd_default_INACTIVE/config/etc/default useradd/38_useradd_default_INACTIVE/data useradd/39_useradd_default_INACTIVE_invalid1 useradd/39_useradd_default_INACTIVE_invalid1/config useradd/39_useradd_default_INACTIVE_invalid1/config/etc useradd/39_useradd_default_INACTIVE_invalid1/config/etc/default useradd/39_useradd_default_INACTIVE_invalid1/data useradd/40_useradd_default_INACTIVE_invalid2 useradd/40_useradd_default_INACTIVE_invalid2/config useradd/40_useradd_default_INACTIVE_invalid2/config/etc useradd/40_useradd_default_INACTIVE_invalid2/config/etc/default useradd/40_useradd_default_INACTIVE_invalid2/data useradd/41_useradd_default_default_SKEL useradd/41_useradd_default_default_SKEL/config useradd/41_useradd_default_default_SKEL/config/etc useradd/41_useradd_default_default_SKEL/config/etc/default useradd/41_useradd_default_default_SKEL/data useradd/42_useradd_default_default_CREATE_MAIL_SPOOL useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/default useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/data useradd/43_useradd_default_no_final_eol useradd/43_useradd_default_no_final_eol/config useradd/43_useradd_default_no_final_eol/config/etc useradd/43_useradd_default_no_final_eol/config/etc/default useradd/43_useradd_default_no_final_eol/data useradd/44_useradd_default_no_file useradd/44_useradd_default_no_file/config useradd/44_useradd_default_no_file/config/etc useradd/44_useradd_default_no_file/config/etc/default useradd/44_useradd_default_no_file/data useradd/45_useradd-G_UID_name useradd/45_useradd-G_UID_name/config useradd/45_useradd-G_UID_name/config/etc useradd/45_useradd-G_UID_name/config/etc/default useradd/45_useradd-G_UID_name/data useradd/46_useradd-G_UID_duplicate useradd/46_useradd-G_UID_duplicate/config useradd/46_useradd-G_UID_duplicate/config/etc useradd/46_useradd-G_UID_duplicate/config/etc/default useradd/46_useradd-G_UID_duplicate/data useradd/47_useradd-G_UID_name_duplicate useradd/47_useradd-G_UID_name_duplicate/config useradd/47_useradd-G_UID_name_duplicate/config/etc useradd/47_useradd-G_UID_name_duplicate/config/etc/default useradd/47_useradd-G_UID_name_duplicate/data useradd/48_useradd-G_name_duplicate useradd/48_useradd-G_name_duplicate/config useradd/48_useradd-G_name_duplicate/config/etc useradd/48_useradd-G_name_duplicate/config/etc/default useradd/48_useradd-G_name_duplicate/data useradd/49_useradd-G_invalid_group useradd/49_useradd-G_invalid_group/config useradd/49_useradd-G_invalid_group/config/etc useradd/49_useradd-G_invalid_group/config/etc/default useradd/49_useradd-G_invalid_group/data useradd/50_useradd-r useradd/50_useradd-r/config useradd/50_useradd-r/config/etc useradd/50_useradd-r/config/etc/default useradd/50_useradd-r/data useradd/51_useradd_already_exist useradd/51_useradd_already_exist/config useradd/51_useradd_already_exist/config/etc useradd/51_useradd_already_exist/config/etc/default useradd/51_useradd_already_exist/data useradd/52_useradd-U_group_already_exist useradd/52_useradd-U_group_already_exist/config useradd/52_useradd-U_group_already_exist/config/etc useradd/52_useradd-U_group_already_exist/config/etc/default useradd/52_useradd-U_group_already_exist/data useradd/53_useradd-G_empty useradd/53_useradd-G_empty/config useradd/53_useradd-G_empty/config/etc useradd/53_useradd-G_empty/config/etc/default useradd/53_useradd-G_empty/data useradd/54_useradd_no_shadow_file useradd/54_useradd_no_shadow_file/config useradd/54_useradd_no_shadow_file/config/etc useradd/54_useradd_no_shadow_file/config/etc/default useradd/54_useradd_no_shadow_file/data useradd/55_useradd_no_gshadow_file useradd/55_useradd_no_gshadow_file/config useradd/55_useradd_no_gshadow_file/config/etc useradd/55_useradd_no_gshadow_file/config/etc/default useradd/55_useradd_no_gshadow_file/data useradd/56_useradd_gshadow_entry_without_group_entry useradd/56_useradd_gshadow_entry_without_group_entry/config useradd/56_useradd_gshadow_entry_without_group_entry/config/etc useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/default useradd/56_useradd_gshadow_entry_without_group_entry/data useradd/57_useradd_usage-D_not_first_option useradd/57_useradd_usage-D_not_first_option/config useradd/57_useradd_usage-D_not_first_option/config/etc useradd/57_useradd_usage-D_not_first_option/config/etc/default useradd/57_useradd_usage-D_not_first_option/data useradd/58_useradd-e_empty useradd/58_useradd-e_empty/config useradd/58_useradd-e_empty/config/etc useradd/58_useradd-e_empty/config/etc/default useradd/58_useradd-e_empty/data useradd/59_useradd-e-1-f-1 useradd/59_useradd-e-1-f-1/config useradd/59_useradd-e-1-f-1/config/etc useradd/59_useradd-e-1-f-1/config/etc/default useradd/59_useradd-e-1-f-1/data useradd/60_useradd-e-1-f-1_no_shadow_file useradd/60_useradd-e-1-f-1_no_shadow_file/config useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/default useradd/60_useradd-e-1-f-1_no_shadow_file/data useradd/61_useradd-K useradd/61_useradd-K/config useradd/61_useradd-K/config/etc useradd/61_useradd-K/config/etc/default useradd/61_useradd-K/data useradd/62_useradd-p useradd/62_useradd-p/config useradd/62_useradd-p/config/etc useradd/62_useradd-p/config/etc/default useradd/62_useradd-p/data useradd/63_useradd-s useradd/63_useradd-s/config useradd/63_useradd-s/config/etc useradd/63_useradd-s/config/etc/default useradd/63_useradd-s/data useradd/64_useradd_locked_passwd useradd/64_useradd_locked_passwd/config useradd/64_useradd_locked_passwd/config/etc useradd/64_useradd_locked_passwd/config/etc/default useradd/64_useradd_locked_passwd/data useradd/65_useradd_locked_group useradd/65_useradd_locked_group/config useradd/65_useradd_locked_group/config/etc useradd/65_useradd_locked_group/config/etc/default useradd/65_useradd_locked_group/data useradd/66_useradd_locked_shadow useradd/66_useradd_locked_shadow/config useradd/66_useradd_locked_shadow/config/etc useradd/66_useradd_locked_shadow/config/etc/default useradd/66_useradd_locked_shadow/data useradd/67_useradd_locked_gshadow useradd/67_useradd_locked_gshadow/config useradd/67_useradd_locked_gshadow/config/etc useradd/67_useradd_locked_gshadow/config/etc/default useradd/67_useradd_locked_gshadow/data useradd/68_useradd-s_empty useradd/68_useradd-s_empty/config useradd/68_useradd-s_empty/config/etc useradd/68_useradd-s_empty/config/etc/default useradd/68_useradd-s_empty/data userdel userdel/01_userdel_usage userdel/01_userdel_usage/config userdel/01_userdel_usage/config/etc userdel/01_userdel_usage/config/etc/default userdel/01_userdel_usage/data userdel/02_userdel_usage_invalid_option userdel/02_userdel_usage_invalid_option/config userdel/02_userdel_usage_invalid_option/config/etc userdel/02_userdel_usage_invalid_option/config/etc/default userdel/02_userdel_usage_invalid_option/data userdel/03_userdel_usage_no_users userdel/03_userdel_usage_no_users/config userdel/03_userdel_usage_no_users/config/etc userdel/03_userdel_usage_no_users/config/etc/default userdel/03_userdel_usage_no_users/data userdel/04_userdel_usage_2_users userdel/04_userdel_usage_2_users/config userdel/04_userdel_usage_2_users/config/etc userdel/04_userdel_usage_2_users/config/etc/default userdel/04_userdel_usage_2_users/data userdel/05_userdel_no_USERGROUPS_ENAB userdel/05_userdel_no_USERGROUPS_ENAB/config userdel/05_userdel_no_USERGROUPS_ENAB/config/etc userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/default userdel/05_userdel_no_USERGROUPS_ENAB/data userdel/06_userdel_no_usergroup userdel/06_userdel_no_usergroup/config userdel/06_userdel_no_usergroup/config/etc userdel/06_userdel_no_usergroup/config/etc/default userdel/06_userdel_no_usergroup/data userdel/07_userdel_usergroup_not_primary userdel/07_userdel_usergroup_not_primary/config userdel/07_userdel_usergroup_not_primary/config/etc userdel/07_userdel_usergroup_not_primary/config/etc/default userdel/07_userdel_usergroup_not_primary/data userdel/08_userdel_usergroup_with_other_members userdel/08_userdel_usergroup_with_other_members/config userdel/08_userdel_usergroup_with_other_members/config/etc userdel/08_userdel_usergroup_with_other_members/config/etc/default userdel/08_userdel_usergroup_with_other_members/data userdel/09_userdel_usergroup_no_other_members_in_gshadow userdel/09_userdel_usergroup_no_other_members_in_gshadow/config userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/default userdel/09_userdel_usergroup_no_other_members_in_gshadow/data

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Sat Sep 24 07:27:40 UTC 2011


Author: nekral-guest
Date: 2011-09-24 07:27:38 +0000 (Sat, 24 Sep 2011)
New Revision: 3502

Added:
   debian/trunk/tests/usertools/useradd/
   debian/trunk/tests/usertools/useradd/01_useradd_usage/
   debian/trunk/tests/usertools/useradd/01_useradd_usage/config.txt
   debian/trunk/tests/usertools/useradd/01_useradd_usage/config/
   debian/trunk/tests/usertools/useradd/01_useradd_usage/config/etc/
   debian/trunk/tests/usertools/useradd/01_useradd_usage/config/etc/default/
   debian/trunk/tests/usertools/useradd/01_useradd_usage/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/01_useradd_usage/config/etc/group
   debian/trunk/tests/usertools/useradd/01_useradd_usage/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/01_useradd_usage/config/etc/passwd
   debian/trunk/tests/usertools/useradd/01_useradd_usage/config/etc/shadow
   debian/trunk/tests/usertools/useradd/01_useradd_usage/data/
   debian/trunk/tests/usertools/useradd/01_useradd_usage/data/usage.out
   debian/trunk/tests/usertools/useradd/01_useradd_usage/useradd.test
   debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/
   debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config.txt
   debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config/
   debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/
   debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/default/
   debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/group
   debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/passwd
   debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/shadow
   debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/data/
   debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/data/usage.out
   debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/useradd.test
   debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/
   debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config.txt
   debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config/
   debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config/etc/
   debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config/etc/default/
   debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config/etc/group
   debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config/etc/passwd
   debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config/etc/shadow
   debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/data/
   debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/data/usage.out
   debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/useradd.test
   debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/
   debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config.txt
   debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config/
   debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config/etc/
   debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config/etc/default/
   debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config/etc/group
   debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config/etc/passwd
   debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config/etc/shadow
   debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/data/
   debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/data/usage.out
   debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/useradd.test
   debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/
   debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config.txt
   debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config/
   debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/
   debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/default/
   debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/group
   debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/passwd
   debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/shadow
   debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/data/
   debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/data/usage.out
   debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/useradd.test
   debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/
   debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config.txt
   debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config/
   debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/
   debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/default/
   debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/group
   debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/passwd
   debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/shadow
   debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/data/
   debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/data/usage.out
   debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/useradd.test
   debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/
   debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config.txt
   debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config/
   debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/
   debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/default/
   debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/group
   debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/passwd
   debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/shadow
   debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/data/
   debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/data/usage.out
   debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/useradd.test
   debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/
   debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config.txt
   debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config/
   debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/
   debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/default/
   debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/group
   debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/passwd
   debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/shadow
   debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/data/
   debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/data/usage.out
   debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/useradd.test
   debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/
   debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config.txt
   debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config/
   debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/
   debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/default/
   debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/group
   debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/passwd
   debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/shadow
   debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/data/
   debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/data/usage.out
   debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/useradd.test
   debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/
   debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config.txt
   debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config/
   debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/
   debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/default/
   debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/group
   debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/passwd
   debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/shadow
   debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/data/
   debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/data/usage.out
   debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/useradd.test
   debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/
   debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config.txt
   debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config/
   debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/
   debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/default/
   debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/group
   debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/passwd
   debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/shadow
   debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/data/
   debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/data/usage.out
   debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/useradd.test
   debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/
   debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config.txt
   debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config/
   debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/
   debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/default/
   debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/group
   debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/passwd
   debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/shadow
   debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/data/
   debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/data/usage.out
   debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/useradd.test
   debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/
   debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config.txt
   debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config/
   debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/
   debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/default/
   debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/group
   debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/passwd
   debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/shadow
   debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/data/
   debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/data/usage.out
   debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/useradd.test
   debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/
   debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config.txt
   debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config/
   debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/
   debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/default/
   debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/group
   debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/passwd
   debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/shadow
   debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/data/
   debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/data/usage.out
   debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/useradd.test
   debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/
   debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config.txt
   debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/
   debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/
   debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/default/
   debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/group
   debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/passwd
   debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/shadow
   debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/data/
   debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/data/usage.out
   debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/useradd.test
   debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/
   debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config.txt
   debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config/
   debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/
   debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/default/
   debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/group
   debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/passwd
   debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/shadow
   debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/data/
   debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/data/usage.out
   debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/useradd.test
   debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/
   debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config.txt
   debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config/
   debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/
   debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/default/
   debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/group
   debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/passwd
   debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/shadow
   debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/data/
   debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/data/usage.out
   debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/useradd.test
   debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/
   debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config.txt
   debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/
   debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/
   debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/default/
   debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/group
   debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/passwd
   debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/shadow
   debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/data/
   debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/data/usage.out
   debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/useradd.test
   debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/
   debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config.txt
   debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config/
   debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/
   debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/default/
   debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/group
   debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/passwd
   debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/shadow
   debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/data/
   debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/data/usage.out
   debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/useradd.test
   debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/
   debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config.txt
   debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config/
   debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/
   debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/default/
   debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/group
   debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/passwd
   debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/shadow
   debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/data/
   debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/data/usage.out
   debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/useradd.test
   debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/
   debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config.txt
   debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config/
   debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/
   debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/default/
   debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/group
   debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/passwd
   debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/shadow
   debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/data/
   debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/data/usage.out
   debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/useradd.test
   debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/
   debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config.txt
   debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config/
   debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/
   debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/default/
   debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/group
   debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/passwd
   debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/shadow
   debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/data/
   debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/data/usage.out
   debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/useradd.test
   debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/
   debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config.txt
   debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config/
   debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/
   debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/default/
   debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/group
   debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/passwd
   debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/shadow
   debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/data/
   debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/data/usage.out
   debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/useradd.test
   debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/
   debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config.txt
   debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config/
   debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/
   debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/default/
   debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/group
   debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/passwd
   debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/shadow
   debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/data/
   debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/data/usage.out
   debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/useradd.test
   debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/
   debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config.txt
   debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config/
   debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/
   debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/default/
   debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/group
   debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/passwd
   debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/shadow
   debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/data/
   debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/data/usage.out
   debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/useradd.test
   debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/
   debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config.txt
   debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config/
   debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/
   debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/default/
   debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/group
   debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/passwd
   debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/shadow
   debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/data/
   debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/data/usage.out
   debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/useradd.test
   debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/
   debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config.txt
   debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config/
   debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/
   debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/default/
   debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/group
   debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/passwd
   debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/shadow
   debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/data/
   debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/data/usage.out
   debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/useradd.test
   debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/
   debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config.txt
   debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config/
   debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/
   debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/default/
   debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/group
   debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/passwd
   debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/shadow
   debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/data/
   debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/data/usage.out
   debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/useradd.test
   debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/
   debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config.txt
   debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config/
   debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/
   debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/default/
   debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/group
   debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/passwd
   debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/shadow
   debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/data/
   debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/data/usage.out
   debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/useradd.test
   debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/
   debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config.txt
   debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config/
   debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/
   debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/default/
   debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/group
   debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/passwd
   debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/shadow
   debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/data/
   debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/data/usage.out
   debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/useradd.test
   debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/
   debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config.txt
   debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config/
   debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/
   debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/default/
   debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/group
   debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/passwd
   debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/shadow
   debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/data/
   debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/data/usage.out
   debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/useradd.test
   debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/
   debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config.txt
   debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config/
   debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/
   debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/default/
   debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/group
   debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/passwd
   debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/shadow
   debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/data/
   debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/data/usage.out
   debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/useradd.test
   debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/
   debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config.txt
   debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config/
   debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/
   debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/default/
   debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/group
   debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/passwd
   debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/shadow
   debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/data/
   debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/data/usage.out
   debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/useradd.test
   debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/
   debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config.txt
   debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config/
   debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/
   debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/default/
   debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/group
   debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/passwd
   debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/shadow
   debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/data/
   debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/data/passwd
   debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/data/shadow
   debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/useradd.test
   debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/
   debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config.txt
   debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config/
   debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/
   debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/default/
   debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/group
   debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/passwd
   debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/shadow
   debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/data/
   debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/data/passwd
   debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/data/shadow
   debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/useradd.test
   debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/
   debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config.txt
   debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/
   debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/
   debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/default/
   debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/group
   debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/passwd
   debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/shadow
   debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/data/
   debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/data/passwd
   debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/data/shadow
   debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/data/usage.out
   debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/useradd.test
   debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/
   debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config.txt
   debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/
   debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/
   debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/default/
   debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/group
   debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/passwd
   debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/shadow
   debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/data/
   debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/data/passwd
   debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/data/shadow
   debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/data/usage.out
   debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/useradd.test
   debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/
   debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config.txt
   debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config/
   debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/
   debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/default/
   debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/group
   debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/passwd
   debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/shadow
   debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/data/
   debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/data/passwd
   debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/data/shadow
   debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/useradd.test
   debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/
   debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config.txt
   debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/
   debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/
   debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/default/
   debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/group
   debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/passwd
   debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/shadow
   debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/data/
   debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/data/passwd
   debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/data/shadow
   debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/data/usage.out
   debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/useradd.test
   debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/
   debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config.txt
   debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/
   debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/
   debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/default/
   debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/group
   debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/passwd
   debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/shadow
   debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/data/
   debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/data/passwd
   debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/data/shadow
   debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/data/usage.out
   debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/useradd.test
   debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/
   debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config.txt
   debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config/
   debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/
   debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/default/
   debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/group
   debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/passwd
   debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/shadow
   debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/data/
   debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/data/defaults
   debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/useradd.test
   debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/
   debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config.txt
   debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/
   debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/
   debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/default/
   debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/group
   debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/passwd
   debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/shadow
   debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/data/
   debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/data/defaults
   debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/useradd.test
   debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/
   debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config.txt
   debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config/
   debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/
   debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/default/
   debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/group
   debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/passwd
   debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/shadow
   debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/data/
   debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/data/useradd
   debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/useradd.test
   debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/
   debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config.txt
   debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config/
   debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config/etc/
   debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config/etc/default/
   debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config/etc/group
   debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config/etc/passwd
   debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config/etc/shadow
   debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/data/
   debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/data/useradd
   debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/useradd.test
   debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/
   debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config.txt
   debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config/
   debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config/etc/
   debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config/etc/default/
   debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config/etc/group
   debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config/etc/passwd
   debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config/etc/shadow
   debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/data/
   debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/data/group
   debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/data/gshadow
   debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/data/passwd
   debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/data/shadow
   debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/useradd.test
   debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/
   debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config.txt
   debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config/
   debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/
   debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/default/
   debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/group
   debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/passwd
   debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/shadow
   debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/data/
   debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/data/group
   debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/data/gshadow
   debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/data/passwd
   debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/data/shadow
   debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/useradd.test
   debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/
   debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config.txt
   debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/
   debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/
   debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/default/
   debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/group
   debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/passwd
   debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/shadow
   debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/data/
   debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/data/group
   debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/data/gshadow
   debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/data/passwd
   debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/data/shadow
   debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/useradd.test
   debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/
   debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config.txt
   debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config/
   debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/
   debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/default/
   debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/group
   debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/passwd
   debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/shadow
   debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/data/
   debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/data/group
   debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/data/gshadow
   debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/data/passwd
   debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/data/shadow
   debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/useradd.test
   debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/
   debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config.txt
   debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config/
   debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/
   debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/default/
   debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/group
   debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/passwd
   debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/shadow
   debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/data/
   debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/data/usage.out
   debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/useradd.test
   debian/trunk/tests/usertools/useradd/50_useradd-r/
   debian/trunk/tests/usertools/useradd/50_useradd-r/config.txt
   debian/trunk/tests/usertools/useradd/50_useradd-r/config/
   debian/trunk/tests/usertools/useradd/50_useradd-r/config/etc/
   debian/trunk/tests/usertools/useradd/50_useradd-r/config/etc/default/
   debian/trunk/tests/usertools/useradd/50_useradd-r/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/50_useradd-r/config/etc/group
   debian/trunk/tests/usertools/useradd/50_useradd-r/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/50_useradd-r/config/etc/passwd
   debian/trunk/tests/usertools/useradd/50_useradd-r/config/etc/shadow
   debian/trunk/tests/usertools/useradd/50_useradd-r/data/
   debian/trunk/tests/usertools/useradd/50_useradd-r/data/group
   debian/trunk/tests/usertools/useradd/50_useradd-r/data/gshadow
   debian/trunk/tests/usertools/useradd/50_useradd-r/data/passwd
   debian/trunk/tests/usertools/useradd/50_useradd-r/data/shadow
   debian/trunk/tests/usertools/useradd/50_useradd-r/useradd.test
   debian/trunk/tests/usertools/useradd/51_useradd_already_exist/
   debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config.txt
   debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config/
   debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config/etc/
   debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config/etc/default/
   debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config/etc/group
   debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config/etc/passwd
   debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config/etc/shadow
   debian/trunk/tests/usertools/useradd/51_useradd_already_exist/data/
   debian/trunk/tests/usertools/useradd/51_useradd_already_exist/data/usage.out
   debian/trunk/tests/usertools/useradd/51_useradd_already_exist/useradd.test
   debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/
   debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config.txt
   debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config/
   debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/
   debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/default/
   debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/group
   debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/passwd
   debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/shadow
   debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/data/
   debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/data/usage.out
   debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/useradd.test
   debian/trunk/tests/usertools/useradd/53_useradd-G_empty/
   debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config.txt
   debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config/
   debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config/etc/
   debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config/etc/default/
   debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config/etc/group
   debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config/etc/passwd
   debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config/etc/shadow
   debian/trunk/tests/usertools/useradd/53_useradd-G_empty/data/
   debian/trunk/tests/usertools/useradd/53_useradd-G_empty/data/group
   debian/trunk/tests/usertools/useradd/53_useradd-G_empty/data/gshadow
   debian/trunk/tests/usertools/useradd/53_useradd-G_empty/data/passwd
   debian/trunk/tests/usertools/useradd/53_useradd-G_empty/data/shadow
   debian/trunk/tests/usertools/useradd/53_useradd-G_empty/useradd.test
   debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/
   debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config.txt
   debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config/
   debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/
   debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/default/
   debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/group
   debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/passwd
   debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/shadow
   debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/data/
   debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/data/group
   debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/data/gshadow
   debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/data/passwd
   debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/useradd.test
   debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/
   debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config.txt
   debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config/
   debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/
   debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/default/
   debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/group
   debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/passwd
   debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/shadow
   debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/data/
   debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/data/group
   debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/data/passwd
   debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/data/shadow
   debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/useradd.test
   debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/
   debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config.txt
   debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/
   debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/
   debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/default/
   debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/group
   debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/passwd
   debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/shadow
   debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/data/
   debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/data/group
   debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/data/gshadow
   debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/data/passwd
   debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/data/shadow
   debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/useradd.test
   debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/
   debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config.txt
   debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/
   debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/
   debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/default/
   debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/group
   debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/passwd
   debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/shadow
   debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/data/
   debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/data/usage.out
   debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/useradd.test
   debian/trunk/tests/usertools/useradd/58_useradd-e_empty/
   debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config.txt
   debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config/
   debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config/etc/
   debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config/etc/default/
   debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config/etc/group
   debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config/etc/passwd
   debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config/etc/shadow
   debian/trunk/tests/usertools/useradd/58_useradd-e_empty/data/
   debian/trunk/tests/usertools/useradd/58_useradd-e_empty/data/group
   debian/trunk/tests/usertools/useradd/58_useradd-e_empty/data/gshadow
   debian/trunk/tests/usertools/useradd/58_useradd-e_empty/data/passwd
   debian/trunk/tests/usertools/useradd/58_useradd-e_empty/data/shadow
   debian/trunk/tests/usertools/useradd/58_useradd-e_empty/useradd.test
   debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/
   debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config.txt
   debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config/
   debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/
   debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/default/
   debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/group
   debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/passwd
   debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/shadow
   debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/data/
   debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/data/group
   debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/data/gshadow
   debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/data/passwd
   debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/data/shadow
   debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/useradd.test
   debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/
   debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config.txt
   debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/
   debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/
   debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/default/
   debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/group
   debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/passwd
   debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/shadow
   debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/data/
   debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/data/group
   debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/data/gshadow
   debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/data/passwd
   debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/useradd.test
   debian/trunk/tests/usertools/useradd/61_useradd-K/
   debian/trunk/tests/usertools/useradd/61_useradd-K/config.txt
   debian/trunk/tests/usertools/useradd/61_useradd-K/config/
   debian/trunk/tests/usertools/useradd/61_useradd-K/config/etc/
   debian/trunk/tests/usertools/useradd/61_useradd-K/config/etc/default/
   debian/trunk/tests/usertools/useradd/61_useradd-K/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/61_useradd-K/config/etc/group
   debian/trunk/tests/usertools/useradd/61_useradd-K/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/61_useradd-K/config/etc/passwd
   debian/trunk/tests/usertools/useradd/61_useradd-K/config/etc/shadow
   debian/trunk/tests/usertools/useradd/61_useradd-K/data/
   debian/trunk/tests/usertools/useradd/61_useradd-K/data/group
   debian/trunk/tests/usertools/useradd/61_useradd-K/data/gshadow
   debian/trunk/tests/usertools/useradd/61_useradd-K/data/passwd
   debian/trunk/tests/usertools/useradd/61_useradd-K/data/shadow
   debian/trunk/tests/usertools/useradd/61_useradd-K/useradd.test
   debian/trunk/tests/usertools/useradd/62_useradd-p/
   debian/trunk/tests/usertools/useradd/62_useradd-p/config.txt
   debian/trunk/tests/usertools/useradd/62_useradd-p/config/
   debian/trunk/tests/usertools/useradd/62_useradd-p/config/etc/
   debian/trunk/tests/usertools/useradd/62_useradd-p/config/etc/default/
   debian/trunk/tests/usertools/useradd/62_useradd-p/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/62_useradd-p/config/etc/group
   debian/trunk/tests/usertools/useradd/62_useradd-p/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/62_useradd-p/config/etc/passwd
   debian/trunk/tests/usertools/useradd/62_useradd-p/config/etc/shadow
   debian/trunk/tests/usertools/useradd/62_useradd-p/data/
   debian/trunk/tests/usertools/useradd/62_useradd-p/data/group
   debian/trunk/tests/usertools/useradd/62_useradd-p/data/gshadow
   debian/trunk/tests/usertools/useradd/62_useradd-p/data/passwd
   debian/trunk/tests/usertools/useradd/62_useradd-p/data/shadow
   debian/trunk/tests/usertools/useradd/62_useradd-p/useradd.test
   debian/trunk/tests/usertools/useradd/63_useradd-s/
   debian/trunk/tests/usertools/useradd/63_useradd-s/config.txt
   debian/trunk/tests/usertools/useradd/63_useradd-s/config/
   debian/trunk/tests/usertools/useradd/63_useradd-s/config/etc/
   debian/trunk/tests/usertools/useradd/63_useradd-s/config/etc/default/
   debian/trunk/tests/usertools/useradd/63_useradd-s/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/63_useradd-s/config/etc/group
   debian/trunk/tests/usertools/useradd/63_useradd-s/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/63_useradd-s/config/etc/passwd
   debian/trunk/tests/usertools/useradd/63_useradd-s/config/etc/shadow
   debian/trunk/tests/usertools/useradd/63_useradd-s/data/
   debian/trunk/tests/usertools/useradd/63_useradd-s/data/group
   debian/trunk/tests/usertools/useradd/63_useradd-s/data/gshadow
   debian/trunk/tests/usertools/useradd/63_useradd-s/data/passwd
   debian/trunk/tests/usertools/useradd/63_useradd-s/data/shadow
   debian/trunk/tests/usertools/useradd/63_useradd-s/useradd.test
   debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/
   debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config.txt
   debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config/
   debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config/etc/
   debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config/etc/default/
   debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config/etc/group
   debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config/etc/passwd
   debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config/etc/shadow
   debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/data/
   debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/data/useradd.err
   debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/useradd.test
   debian/trunk/tests/usertools/useradd/65_useradd_locked_group/
   debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config.txt
   debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config/
   debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config/etc/
   debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config/etc/default/
   debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config/etc/group
   debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config/etc/passwd
   debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config/etc/shadow
   debian/trunk/tests/usertools/useradd/65_useradd_locked_group/data/
   debian/trunk/tests/usertools/useradd/65_useradd_locked_group/data/useradd.err
   debian/trunk/tests/usertools/useradd/65_useradd_locked_group/useradd.test
   debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/
   debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config.txt
   debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config/
   debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config/etc/
   debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config/etc/default/
   debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config/etc/group
   debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config/etc/passwd
   debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config/etc/shadow
   debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/data/
   debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/data/useradd.err
   debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/useradd.test
   debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/
   debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config.txt
   debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config/
   debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/
   debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/default/
   debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/group
   debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/passwd
   debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/shadow
   debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/data/
   debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/data/useradd.err
   debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/useradd.test
   debian/trunk/tests/usertools/useradd/68_useradd-s_empty/
   debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config.txt
   debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config/
   debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config/etc/
   debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config/etc/default/
   debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config/etc/default/useradd
   debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config/etc/group
   debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config/etc/gshadow
   debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config/etc/passwd
   debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config/etc/shadow
   debian/trunk/tests/usertools/useradd/68_useradd-s_empty/data/
   debian/trunk/tests/usertools/useradd/68_useradd-s_empty/data/group
   debian/trunk/tests/usertools/useradd/68_useradd-s_empty/data/gshadow
   debian/trunk/tests/usertools/useradd/68_useradd-s_empty/data/passwd
   debian/trunk/tests/usertools/useradd/68_useradd-s_empty/data/shadow
   debian/trunk/tests/usertools/useradd/68_useradd-s_empty/useradd.test
   debian/trunk/tests/usertools/userdel/
   debian/trunk/tests/usertools/userdel/01_userdel_usage/
   debian/trunk/tests/usertools/userdel/01_userdel_usage/config.txt
   debian/trunk/tests/usertools/userdel/01_userdel_usage/config/
   debian/trunk/tests/usertools/userdel/01_userdel_usage/config/etc/
   debian/trunk/tests/usertools/userdel/01_userdel_usage/config/etc/default/
   debian/trunk/tests/usertools/userdel/01_userdel_usage/config/etc/default/useradd
   debian/trunk/tests/usertools/userdel/01_userdel_usage/config/etc/group
   debian/trunk/tests/usertools/userdel/01_userdel_usage/config/etc/gshadow
   debian/trunk/tests/usertools/userdel/01_userdel_usage/config/etc/passwd
   debian/trunk/tests/usertools/userdel/01_userdel_usage/config/etc/shadow
   debian/trunk/tests/usertools/userdel/01_userdel_usage/data/
   debian/trunk/tests/usertools/userdel/01_userdel_usage/data/usage.out
   debian/trunk/tests/usertools/userdel/01_userdel_usage/userdel.test
   debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/
   debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config.txt
   debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config/
   debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/
   debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/default/
   debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/default/useradd
   debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/group
   debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/gshadow
   debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/passwd
   debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/shadow
   debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/data/
   debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/data/usage.out
   debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/userdel.test
   debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/
   debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config.txt
   debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config/
   debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config/etc/
   debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config/etc/default/
   debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config/etc/default/useradd
   debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config/etc/group
   debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config/etc/gshadow
   debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config/etc/passwd
   debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config/etc/shadow
   debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/data/
   debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/data/usage.out
   debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/userdel.test
   debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/
   debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config.txt
   debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config/
   debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config/etc/
   debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config/etc/default/
   debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config/etc/default/useradd
   debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config/etc/group
   debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config/etc/gshadow
   debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config/etc/passwd
   debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config/etc/shadow
   debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/data/
   debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/data/usage.out
   debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/userdel.test
   debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/
   debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config.txt
   debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/
   debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/
   debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/default/
   debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/default/useradd
   debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/group
   debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/gshadow
   debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/login.defs
   debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/passwd
   debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/shadow
   debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/data/
   debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/data/group
   debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/data/gshadow
   debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/data/passwd
   debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/data/shadow
   debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/userdel.test
   debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/
   debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config.txt
   debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/
   debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/
   debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/default/
   debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/default/useradd
   debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/group
   debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/gshadow
   debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/login.defs
   debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/passwd
   debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/shadow
   debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/data/
   debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/data/group
   debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/data/gshadow
   debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/data/passwd
   debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/data/shadow
   debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/userdel.test
   debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/
   debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config.txt
   debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/
   debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/
   debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/default/
   debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/default/useradd
   debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/group
   debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/gshadow
   debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/login.defs
   debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/passwd
   debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/shadow
   debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/data/
   debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/data/group
   debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/data/gshadow
   debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/data/passwd
   debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/data/shadow
   debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/data/userdel.out
   debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/userdel.test
   debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/
   debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config.txt
   debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/
   debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/
   debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/default/
   debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/default/useradd
   debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/group
   debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/gshadow
   debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/login.defs
   debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/passwd
   debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/shadow
   debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/
   debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/group
   debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/gshadow
   debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/passwd
   debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/shadow
   debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/userdel.out
   debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/userdel.test
   debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/
   debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config.txt
   debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/
   debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/
   debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/default/
   debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/default/useradd
   debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/group
   debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/gshadow
   debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/login.defs
   debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/passwd
   debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/shadow
   debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/
   debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/group
   debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/gshadow
   debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/passwd
   debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/shadow
   debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/userdel.out
   debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/userdel.test
Log:
Add tests for
 * userdel (9)
 * useradd (68)


Added: debian/trunk/tests/usertools/useradd/01_useradd_usage/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/01_useradd_usage/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/01_useradd_usage/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/01_useradd_usage/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/01_useradd_usage/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/01_useradd_usage/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/01_useradd_usage/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/01_useradd_usage/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/01_useradd_usage/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/01_useradd_usage/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/01_useradd_usage/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/01_useradd_usage/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/01_useradd_usage/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/01_useradd_usage/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/01_useradd_usage/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/01_useradd_usage/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/01_useradd_usage/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/01_useradd_usage/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/01_useradd_usage/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/01_useradd_usage/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/01_useradd_usage/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,32 @@
+Usage: useradd [options] LOGIN
+
+Options:
+  -b, --base-dir BASE_DIR       base directory for the home directory of the
+                                new account
+  -c, --comment COMMENT         GECOS field of the new account
+  -d, --home-dir HOME_DIR       home directory of the new account
+  -D, --defaults                print or change default useradd configuration
+  -e, --expiredate EXPIRE_DATE  expiration date of the new account
+  -f, --inactive INACTIVE       password inactivity period of the new account
+  -g, --gid GROUP               name or ID of the primary group of the new
+                                account
+  -G, --groups GROUPS           list of supplementary groups of the new
+                                account
+  -h, --help                    display this help message and exit
+  -k, --skel SKEL_DIR           use this alternative skeleton directory
+  -K, --key KEY=VALUE           override /etc/login.defs defaults
+  -l, --no-log-init             do not add the user to the lastlog and
+                                faillog databases
+  -m, --create-home             create the user's home directory
+  -M, --no-create-home          do not create the user's home directory
+  -N, --no-user-group           do not create a group with the same name as
+                                the user
+  -o, --non-unique              allow to create users with duplicate
+                                (non-unique) UID
+  -p, --password PASSWORD       encrypted password of the new account
+  -r, --system                  create a system account
+  -s, --shell SHELL             login shell of the new account
+  -u, --uid UID                 user ID of the new account
+  -U, --user-group              create a group with the same name as the user
+  -Z, --selinux-user SEUSER     use a specific SEUSER for the SELinux user mapping
+

Added: debian/trunk/tests/usertools/useradd/01_useradd_usage/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/01_useradd_usage/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/01_useradd_usage/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd 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 useradd usage (useradd -h)..."
+useradd -h >tmp/usage.out
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/01_useradd_usage/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,33 @@
+useradd: unrecognized option '--foo'
+Usage: useradd [options] LOGIN
+
+Options:
+  -b, --base-dir BASE_DIR       base directory for the home directory of the
+                                new account
+  -c, --comment COMMENT         GECOS field of the new account
+  -d, --home-dir HOME_DIR       home directory of the new account
+  -D, --defaults                print or change default useradd configuration
+  -e, --expiredate EXPIRE_DATE  expiration date of the new account
+  -f, --inactive INACTIVE       password inactivity period of the new account
+  -g, --gid GROUP               name or ID of the primary group of the new
+                                account
+  -G, --groups GROUPS           list of supplementary groups of the new
+                                account
+  -h, --help                    display this help message and exit
+  -k, --skel SKEL_DIR           use this alternative skeleton directory
+  -K, --key KEY=VALUE           override /etc/login.defs defaults
+  -l, --no-log-init             do not add the user to the lastlog and
+                                faillog databases
+  -m, --create-home             create the user's home directory
+  -M, --no-create-home          do not create the user's home directory
+  -N, --no-user-group           do not create a group with the same name as
+                                the user
+  -o, --non-unique              allow to create users with duplicate
+                                (non-unique) UID
+  -p, --password PASSWORD       encrypted password of the new account
+  -r, --system                  create a system account
+  -s, --shell SHELL             login shell of the new account
+  -u, --uid UID                 user ID of the new account
+  -U, --user-group              create a group with the same name as the user
+  -Z, --selinux-user SEUSER     use a specific SEUSER for the SELinux user mapping
+

Added: debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd displays its usage message when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd with an invalid option (useradd --foo)..."
+useradd --foo 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/02_useradd_usage_invalid_option/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,32 @@
+Usage: useradd [options] LOGIN
+
+Options:
+  -b, --base-dir BASE_DIR       base directory for the home directory of the
+                                new account
+  -c, --comment COMMENT         GECOS field of the new account
+  -d, --home-dir HOME_DIR       home directory of the new account
+  -D, --defaults                print or change default useradd configuration
+  -e, --expiredate EXPIRE_DATE  expiration date of the new account
+  -f, --inactive INACTIVE       password inactivity period of the new account
+  -g, --gid GROUP               name or ID of the primary group of the new
+                                account
+  -G, --groups GROUPS           list of supplementary groups of the new
+                                account
+  -h, --help                    display this help message and exit
+  -k, --skel SKEL_DIR           use this alternative skeleton directory
+  -K, --key KEY=VALUE           override /etc/login.defs defaults
+  -l, --no-log-init             do not add the user to the lastlog and
+                                faillog databases
+  -m, --create-home             create the user's home directory
+  -M, --no-create-home          do not create the user's home directory
+  -N, --no-user-group           do not create a group with the same name as
+                                the user
+  -o, --non-unique              allow to create users with duplicate
+                                (non-unique) UID
+  -p, --password PASSWORD       encrypted password of the new account
+  -r, --system                  create a system account
+  -s, --shell SHELL             login shell of the new account
+  -u, --uid UID                 user ID of the new account
+  -U, --user-group              create a group with the same name as the user
+  -Z, --selinux-user SEUSER     use a specific SEUSER for the SELinux user mapping
+

Added: debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd displays its usage message when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd without an user (useradd -f 12)..."
+useradd -f 12 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/03_useradd_usage_no_users/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,32 @@
+Usage: useradd [options] LOGIN
+
+Options:
+  -b, --base-dir BASE_DIR       base directory for the home directory of the
+                                new account
+  -c, --comment COMMENT         GECOS field of the new account
+  -d, --home-dir HOME_DIR       home directory of the new account
+  -D, --defaults                print or change default useradd configuration
+  -e, --expiredate EXPIRE_DATE  expiration date of the new account
+  -f, --inactive INACTIVE       password inactivity period of the new account
+  -g, --gid GROUP               name or ID of the primary group of the new
+                                account
+  -G, --groups GROUPS           list of supplementary groups of the new
+                                account
+  -h, --help                    display this help message and exit
+  -k, --skel SKEL_DIR           use this alternative skeleton directory
+  -K, --key KEY=VALUE           override /etc/login.defs defaults
+  -l, --no-log-init             do not add the user to the lastlog and
+                                faillog databases
+  -m, --create-home             create the user's home directory
+  -M, --no-create-home          do not create the user's home directory
+  -N, --no-user-group           do not create a group with the same name as
+                                the user
+  -o, --non-unique              allow to create users with duplicate
+                                (non-unique) UID
+  -p, --password PASSWORD       encrypted password of the new account
+  -r, --system                  create a system account
+  -s, --shell SHELL             login shell of the new account
+  -u, --uid UID                 user ID of the new account
+  -U, --user-group              create a group with the same name as the user
+  -Z, --selinux-user SEUSER     use a specific SEUSER for the SELinux user mapping
+

Added: debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd displays its usage message when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd with 2 users (useradd -f 12 bin nobody)..."
+useradd -f 12 bin nobody 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/04_useradd_usage_2_users/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+useradd: invalid base directory '/home/no:body'

Added: debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd reports an error when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd with an invalid argument (useradd -b '/home/no:body' nobody)..."
+useradd -b '/home/no:body' nobody 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/05_useradd_usage-b_invalid1/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,2 @@
+useradd: invalid base directory '/home/no
+body'

Added: debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd reports an error when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd with an invalid argument (useradd -b '/home/no
+body' nobody)..."
+useradd -b '/home/no
+body' nobody 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/06_useradd_usage-b_invalid2/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+useradd: invalid base directory 'home/nobody'

Added: debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd reports an error when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd with an invalid argument (useradd -b 'home/nobody' nobody)..."
+useradd -b 'home/nobody' nobody 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/07_useradd_usage-b_invalid3/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+useradd: invalid comment 'comm:ent'

Added: debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd reports an error when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd with an invalid argument (useradd -c 'comm:ent' nobody)..."
+useradd -c 'comm:ent' nobody 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/08_useradd_usage-c_invalid1/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,2 @@
+useradd: invalid comment 'comm
+ent'

Added: debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd reports an error when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd with an invalid argument (useradd -c 'comm
+ent' nobody)..."
+useradd -c 'comm
+ent' nobody 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/09_useradd_usage-c_invalid2/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+useradd: invalid home directory '/home/no:body'

Added: debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd reports an error when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd with an invalid argument (useradd -d '/home/no:body' nobody)..."
+useradd -d '/home/no:body' nobody 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/10_useradd_usage-d_invalid1/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,2 @@
+useradd: invalid home directory '/home/no
+body'

Added: debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd reports an error when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd with an invalid argument (useradd -d '/home/no
+body' nobody)..."
+useradd -d '/home/no
+body' nobody 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/11_useradd_usage-d_invalid2/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+useradd: invalid home directory 'home/nobody'

Added: debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd reports an error when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd with an invalid argument (useradd -d 'home/nobody' nobody)..."
+useradd -d 'home/nobody' nobody 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/12_useradd_usage-d_invalid3/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+useradd: invalid date '2011-09-09-11'

Added: debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd reports an error when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd with an invalid argument (useradd -e '2011-09-09-11' nobody)..."
+useradd -e '2011-09-09-11' nobody 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/13_useradd_usage-e_invalid1/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+useradd: invalid date '1900-09-11'

Added: debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd reports an error when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd with an invalid argument (useradd -e '1900-09-11' nobody)..."
+useradd -e '1900-09-11' nobody 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/14_useradd_usage-e_invalid2/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+useradd: shadow passwords required for -e

Added: debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd reports an error when called incorrectly"
+
+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 "Call useradd with the -e option (useradd -e '2011-09-11' nobody)..."
+useradd -e '2011-09-11' nobody 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/15_useradd_usage-e_no_shadow_file/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+useradd: invalid numeric argument '2011f'

Added: debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd reports an error when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd with an invalid argument (useradd -f '2011f' nobody)..."
+useradd -f '2011f' nobody 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/16_useradd_usage-f_invalid1/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+useradd: invalid numeric argument '-2'

Added: debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd reports an error when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd with an invalid argument (useradd -f '-2' nobody)..."
+useradd -f '-2' nobody 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/17_useradd_usage-f_invalid2/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+useradd: shadow passwords required for -f

Added: debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd reports an error when called incorrectly"
+
+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 "Call useradd with the -f option (useradd -f '12' nobody)..."
+useradd -f '12' nobody 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/18_useradd_usage-f_no_shadow_file/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+useradd: -K requires KEY=VALUE

Added: debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd reports an error when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd with an invalid argument (useradd -K 'VALUE' nobody)..."
+useradd -K 'VALUE' nobody 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/19_useradd_usage-K_invalid1/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+configuration error - unknown item 'KEY' (notify administrator)

Added: debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd reports an error when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd with an invalid argument (useradd -O 'KEY=VALUE' nobody)..."
+useradd -O 'KEY=VALUE' nobody 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/20_useradd_usage-O_invalid2/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+useradd: invalid field 'no:body'

Added: debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd reports an error when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd with an invalid argument (useradd -p 'no:body' nobody)..."
+useradd -p 'no:body' nobody 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/21_useradd_usage-p_invalid1/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,2 @@
+useradd: invalid field 'no
+body'

Added: debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd reports an error when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd with an invalid argument (useradd -p 'no
+body' nobody)..."
+useradd -p 'no
+body' nobody 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/22_useradd_usage-p_invalid2/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+useradd: invalid shell '/home/no:body'

Added: debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd reports an error when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd with an invalid argument (useradd -s '/home/no:body' nobody)..."
+useradd -s '/home/no:body' nobody 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/23_useradd_usage-s_invalid1/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,2 @@
+useradd: invalid shell '/home/no
+body'

Added: debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd reports an error when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd with an invalid argument (useradd -s '/home/no
+body' nobody)..."
+useradd -s '/home/no
+body' nobody 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/24_useradd_usage-s_invalid2/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+useradd: invalid shell 'home/nobody'

Added: debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd reports an error when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd with an invalid argument (useradd -s 'home/nobody' nobody)..."
+useradd -s 'home/nobody' nobody 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/25_useradd_usage-s_invalid3/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::/nonexistent:/bin/sh

Added: debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,33 @@
+useradd: -o flag is only allowed with the -u flag
+Usage: useradd [options] LOGIN
+
+Options:
+  -b, --base-dir BASE_DIR       base directory for the home directory of the
+                                new account
+  -c, --comment COMMENT         GECOS field of the new account
+  -d, --home-dir HOME_DIR       home directory of the new account
+  -D, --defaults                print or change default useradd configuration
+  -e, --expiredate EXPIRE_DATE  expiration date of the new account
+  -f, --inactive INACTIVE       password inactivity period of the new account
+  -g, --gid GROUP               name or ID of the primary group of the new
+                                account
+  -G, --groups GROUPS           list of supplementary groups of the new
+                                account
+  -h, --help                    display this help message and exit
+  -k, --skel SKEL_DIR           use this alternative skeleton directory
+  -K, --key KEY=VALUE           override /etc/login.defs defaults
+  -l, --no-log-init             do not add the user to the lastlog and
+                                faillog databases
+  -m, --create-home             create the user's home directory
+  -M, --no-create-home          do not create the user's home directory
+  -N, --no-user-group           do not create a group with the same name as
+                                the user
+  -o, --non-unique              allow to create users with duplicate
+                                (non-unique) UID
+  -p, --password PASSWORD       encrypted password of the new account
+  -r, --system                  create a system account
+  -s, --shell SHELL             login shell of the new account
+  -u, --uid UID                 user ID of the new account
+  -U, --user-group              create a group with the same name as the user
+  -Z, --selinux-user SEUSER     use a specific SEUSER for the SELinux user mapping
+

Added: debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd rejects -o without -u"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Allow duplicate UID without UID (useradd -o foo)..."
+useradd -o foo 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/26_useradd_usage-o_without-u/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::/nonexistent:/bin/sh

Added: debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,33 @@
+useradd: -k flag is only allowed with the -m flag
+Usage: useradd [options] LOGIN
+
+Options:
+  -b, --base-dir BASE_DIR       base directory for the home directory of the
+                                new account
+  -c, --comment COMMENT         GECOS field of the new account
+  -d, --home-dir HOME_DIR       home directory of the new account
+  -D, --defaults                print or change default useradd configuration
+  -e, --expiredate EXPIRE_DATE  expiration date of the new account
+  -f, --inactive INACTIVE       password inactivity period of the new account
+  -g, --gid GROUP               name or ID of the primary group of the new
+                                account
+  -G, --groups GROUPS           list of supplementary groups of the new
+                                account
+  -h, --help                    display this help message and exit
+  -k, --skel SKEL_DIR           use this alternative skeleton directory
+  -K, --key KEY=VALUE           override /etc/login.defs defaults
+  -l, --no-log-init             do not add the user to the lastlog and
+                                faillog databases
+  -m, --create-home             create the user's home directory
+  -M, --no-create-home          do not create the user's home directory
+  -N, --no-user-group           do not create a group with the same name as
+                                the user
+  -o, --non-unique              allow to create users with duplicate
+                                (non-unique) UID
+  -p, --password PASSWORD       encrypted password of the new account
+  -r, --system                  create a system account
+  -s, --shell SHELL             login shell of the new account
+  -u, --uid UID                 user ID of the new account
+  -U, --user-group              create a group with the same name as the user
+  -Z, --selinux-user SEUSER     use a specific SEUSER for the SELinux user mapping
+

Added: debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd rejects -k without -m"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Copy skeleton without creating home dir (useradd -k foo)..."
+useradd -k foo 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/27_useradd_usage-k_without-m/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::/nonexistent:/bin/sh

Added: debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,33 @@
+useradd: options -U and -g conflict
+Usage: useradd [options] LOGIN
+
+Options:
+  -b, --base-dir BASE_DIR       base directory for the home directory of the
+                                new account
+  -c, --comment COMMENT         GECOS field of the new account
+  -d, --home-dir HOME_DIR       home directory of the new account
+  -D, --defaults                print or change default useradd configuration
+  -e, --expiredate EXPIRE_DATE  expiration date of the new account
+  -f, --inactive INACTIVE       password inactivity period of the new account
+  -g, --gid GROUP               name or ID of the primary group of the new
+                                account
+  -G, --groups GROUPS           list of supplementary groups of the new
+                                account
+  -h, --help                    display this help message and exit
+  -k, --skel SKEL_DIR           use this alternative skeleton directory
+  -K, --key KEY=VALUE           override /etc/login.defs defaults
+  -l, --no-log-init             do not add the user to the lastlog and
+                                faillog databases
+  -m, --create-home             create the user's home directory
+  -M, --no-create-home          do not create the user's home directory
+  -N, --no-user-group           do not create a group with the same name as
+                                the user
+  -o, --non-unique              allow to create users with duplicate
+                                (non-unique) UID
+  -p, --password PASSWORD       encrypted password of the new account
+  -r, --system                  create a system account
+  -s, --shell SHELL             login shell of the new account
+  -u, --uid UID                 user ID of the new account
+  -U, --user-group              create a group with the same name as the user
+  -Z, --selinux-user SEUSER     use a specific SEUSER for the SELinux user mapping
+

Added: debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd rejects -U with -g"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Usergroup and fixed group (useradd -U -g 100 foo)..."
+useradd -U -g 100 foo 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/28_useradd_usage-U_with-g/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::/nonexistent:/bin/sh

Added: debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,33 @@
+useradd: options -U and -N conflict
+Usage: useradd [options] LOGIN
+
+Options:
+  -b, --base-dir BASE_DIR       base directory for the home directory of the
+                                new account
+  -c, --comment COMMENT         GECOS field of the new account
+  -d, --home-dir HOME_DIR       home directory of the new account
+  -D, --defaults                print or change default useradd configuration
+  -e, --expiredate EXPIRE_DATE  expiration date of the new account
+  -f, --inactive INACTIVE       password inactivity period of the new account
+  -g, --gid GROUP               name or ID of the primary group of the new
+                                account
+  -G, --groups GROUPS           list of supplementary groups of the new
+                                account
+  -h, --help                    display this help message and exit
+  -k, --skel SKEL_DIR           use this alternative skeleton directory
+  -K, --key KEY=VALUE           override /etc/login.defs defaults
+  -l, --no-log-init             do not add the user to the lastlog and
+                                faillog databases
+  -m, --create-home             create the user's home directory
+  -M, --no-create-home          do not create the user's home directory
+  -N, --no-user-group           do not create a group with the same name as
+                                the user
+  -o, --non-unique              allow to create users with duplicate
+                                (non-unique) UID
+  -p, --password PASSWORD       encrypted password of the new account
+  -r, --system                  create a system account
+  -s, --shell SHELL             login shell of the new account
+  -u, --uid UID                 user ID of the new account
+  -U, --user-group              create a group with the same name as the user
+  -Z, --selinux-user SEUSER     use a specific SEUSER for the SELinux user mapping
+

Added: debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd rejects -U with -N"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Usergroup and no usergroup (useradd -U -N foo)..."
+useradd -U -N foo 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/29_useradd_usage-U_with-N/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::/nonexistent:/bin/sh

Added: debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,33 @@
+useradd: options -m and -M conflict
+Usage: useradd [options] LOGIN
+
+Options:
+  -b, --base-dir BASE_DIR       base directory for the home directory of the
+                                new account
+  -c, --comment COMMENT         GECOS field of the new account
+  -d, --home-dir HOME_DIR       home directory of the new account
+  -D, --defaults                print or change default useradd configuration
+  -e, --expiredate EXPIRE_DATE  expiration date of the new account
+  -f, --inactive INACTIVE       password inactivity period of the new account
+  -g, --gid GROUP               name or ID of the primary group of the new
+                                account
+  -G, --groups GROUPS           list of supplementary groups of the new
+                                account
+  -h, --help                    display this help message and exit
+  -k, --skel SKEL_DIR           use this alternative skeleton directory
+  -K, --key KEY=VALUE           override /etc/login.defs defaults
+  -l, --no-log-init             do not add the user to the lastlog and
+                                faillog databases
+  -m, --create-home             create the user's home directory
+  -M, --no-create-home          do not create the user's home directory
+  -N, --no-user-group           do not create a group with the same name as
+                                the user
+  -o, --non-unique              allow to create users with duplicate
+                                (non-unique) UID
+  -p, --password PASSWORD       encrypted password of the new account
+  -r, --system                  create a system account
+  -s, --shell SHELL             login shell of the new account
+  -u, --uid UID                 user ID of the new account
+  -U, --user-group              create a group with the same name as the user
+  -Z, --selinux-user SEUSER     use a specific SEUSER for the SELinux user mapping
+

Added: debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd rejects -m with -M"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create and do not create home directory (useradd -M -m foo)..."
+useradd -M -m foo 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/30_useradd_usage-m_with-M/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,32 @@
+Usage: useradd [options] LOGIN
+
+Options:
+  -b, --base-dir BASE_DIR       base directory for the home directory of the
+                                new account
+  -c, --comment COMMENT         GECOS field of the new account
+  -d, --home-dir HOME_DIR       home directory of the new account
+  -D, --defaults                print or change default useradd configuration
+  -e, --expiredate EXPIRE_DATE  expiration date of the new account
+  -f, --inactive INACTIVE       password inactivity period of the new account
+  -g, --gid GROUP               name or ID of the primary group of the new
+                                account
+  -G, --groups GROUPS           list of supplementary groups of the new
+                                account
+  -h, --help                    display this help message and exit
+  -k, --skel SKEL_DIR           use this alternative skeleton directory
+  -K, --key KEY=VALUE           override /etc/login.defs defaults
+  -l, --no-log-init             do not add the user to the lastlog and
+                                faillog databases
+  -m, --create-home             create the user's home directory
+  -M, --no-create-home          do not create the user's home directory
+  -N, --no-user-group           do not create a group with the same name as
+                                the user
+  -o, --non-unique              allow to create users with duplicate
+                                (non-unique) UID
+  -p, --password PASSWORD       encrypted password of the new account
+  -r, --system                  create a system account
+  -s, --shell SHELL             login shell of the new account
+  -u, --uid UID                 user ID of the new account
+  -U, --user-group              create a group with the same name as the user
+  -Z, --selinux-user SEUSER     use a specific SEUSER for the SELinux user mapping
+

Added: debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd displays its usage message when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Set defaulkt with useradd and specify an user (useradd -D nobody)..."
+useradd -D nobody 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/31_useradd_usage_user_with-D/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::/nonexistent:/bin/sh

Added: debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,32 @@
+Usage: useradd [options] LOGIN
+
+Options:
+  -b, --base-dir BASE_DIR       base directory for the home directory of the
+                                new account
+  -c, --comment COMMENT         GECOS field of the new account
+  -d, --home-dir HOME_DIR       home directory of the new account
+  -D, --defaults                print or change default useradd configuration
+  -e, --expiredate EXPIRE_DATE  expiration date of the new account
+  -f, --inactive INACTIVE       password inactivity period of the new account
+  -g, --gid GROUP               name or ID of the primary group of the new
+                                account
+  -G, --groups GROUPS           list of supplementary groups of the new
+                                account
+  -h, --help                    display this help message and exit
+  -k, --skel SKEL_DIR           use this alternative skeleton directory
+  -K, --key KEY=VALUE           override /etc/login.defs defaults
+  -l, --no-log-init             do not add the user to the lastlog and
+                                faillog databases
+  -m, --create-home             create the user's home directory
+  -M, --no-create-home          do not create the user's home directory
+  -N, --no-user-group           do not create a group with the same name as
+                                the user
+  -o, --non-unique              allow to create users with duplicate
+                                (non-unique) UID
+  -p, --password PASSWORD       encrypted password of the new account
+  -r, --system                  create a system account
+  -s, --shell SHELL             login shell of the new account
+  -u, --uid UID                 user ID of the new account
+  -U, --user-group              create a group with the same name as the user
+  -Z, --selinux-user SEUSER     use a specific SEUSER for the SELinux user mapping
+

Added: debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd rejects -m with -M"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+for opt in "-u 1010" "-G nogroup" "-d /home/foo" "-c comment" "-m"
+do
+	echo -n "Call useradd -D with option $opt (useradd -D $opt)..."
+	useradd -D $opt 2>tmp/usage.out && exit 1 || {
+		status=$?
+	}
+
+	echo "OK"
+
+	echo -n "Check returned status ($status)..."
+	test "$status" = "2"
+	echo "OK"
+
+	echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/32_useradd_usage-D_with_other/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+useradd: invalid user name 'user:name'

Added: debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd checks the username validity"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd with an invalid username (useradd user:name)..."
+useradd user:name 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/33_useradd_usage_invalid_username/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/data/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:10::/tmp/foo:/bin/foobar

Added: debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/data/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!:@TODAY@:0:99999:7:12:13849:

Added: debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd uses the GROUP default value"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create user foo, without usergroup (useradd -N foo)..."
+useradd -N foo
+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
+


Property changes on: debian/trunk/tests/usertools/useradd/34_useradd_default_GROUP_GID/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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=nogroup
+#
+# 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

Added: debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/data/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:65534::/tmp/foo:/bin/foobar

Added: debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/data/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!:@TODAY@:0:99999:7:12:13849:

Added: debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd uses the GROUP default value"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create user foo, without usergroup (useradd -N foo)..."
+useradd -N foo
+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
+


Property changes on: debian/trunk/tests/usertools/useradd/35_useradd_default_GROUP_name/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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=3000
+#
+# 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

Added: debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/data/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:100::/tmp/foo:/bin/foobar

Added: debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/data/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!:@TODAY@:0:99999:7:12:13849:

Added: debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,2 @@
+useradd: group '3000' does not exist
+useradd: the GROUP= configuration in /etc/default/useradd will be ignored

Added: debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd uses the GROUP default value"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create user foo, without usergroup (useradd -N foo)..."
+useradd -N foo 2>tmp/usage.out
+echo "OK"
+
+echo "useradd 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 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
+


Property changes on: debian/trunk/tests/usertools/useradd/36_useradd_default_GROUP_invalid_GID/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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=invalidgroup
+#
+# 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

Added: debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/data/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:100::/tmp/foo:/bin/foobar

Added: debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/data/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!:@TODAY@:0:99999:7:12:13849:

Added: debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,2 @@
+useradd: group 'invalidgroup' does not exist
+useradd: the GROUP= configuration in /etc/default/useradd will be ignored

Added: debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd uses the GROUP default value"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create user foo, without usergroup (useradd -N foo)..."
+useradd -N foo 2>tmp/usage.out
+echo "OK"
+
+echo "useradd 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 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
+


Property changes on: debian/trunk/tests/usertools/useradd/37_useradd_default_GROUP_invalid_name/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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=42
+#
+# 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

Added: debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/data/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:10::/tmp/foo:/bin/foobar

Added: debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/data/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!:@TODAY@:0:99999:7:42:13849:

Added: debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd uses the INACT default value"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create user foo, without usergroup (useradd -N foo)..."
+useradd -N foo
+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
+


Property changes on: debian/trunk/tests/usertools/useradd/38_useradd_default_INACTIVE/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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=1a
+#
+# 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

Added: debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/data/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:10::/tmp/foo:/bin/foobar

Added: debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/data/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!:@TODAY@:0:99999:7::13849:

Added: debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,2 @@
+useradd: invalid numeric argument '1a'
+useradd: the INACTIVE= configuration in /etc/default/useradd will be ignored

Added: debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd uses the GROUP default value"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create user foo, without usergroup (useradd -N foo)..."
+useradd -N foo 2>tmp/usage.out
+echo "OK"
+
+echo "useradd 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 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
+


Property changes on: debian/trunk/tests/usertools/useradd/39_useradd_default_INACTIVE_invalid1/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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=-2
+#
+# 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

Added: debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/data/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:10::/tmp/foo:/bin/foobar

Added: debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/data/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!:@TODAY@:0:99999:7::13849:

Added: debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,2 @@
+useradd: invalid numeric argument '-2'
+useradd: the INACTIVE= configuration in /etc/default/useradd will be ignored

Added: debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd uses the GROUP default value"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create user foo, without usergroup (useradd -N foo)..."
+useradd -N foo 2>tmp/usage.out
+echo "OK"
+
+echo "useradd 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 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
+


Property changes on: debian/trunk/tests/usertools/useradd/40_useradd_default_INACTIVE_invalid2/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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=42
+#
+# 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=
+#
+# Defines whether the mail spool should be created while
+# creating the account
+# CREATE_MAIL_SPOOL=yes

Added: debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/data/defaults
===================================================================
--- debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/data/defaults	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/data/defaults	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,7 @@
+GROUP=10
+HOME=/tmp
+INACTIVE=42
+EXPIRE=2007-12-02
+SHELL=/bin/foobar
+SKEL=/etc/skel
+CREATE_MAIL_SPOOL=no

Added: debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd uses the defautl SKEL value is SKEL is set to empty"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Get default value (useradd -D)..."
+useradd -D >tmp/defaults
+echo "OK"
+
+echo "useradd reported:"
+echo "======================================================================="
+cat tmp/defaults
+echo "======================================================================="
+echo -n "Check the usage message..."
+diff -au data/defaults tmp/defaults
+echo "usage message OK."
+rm -f tmp/defaults
+
+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
+


Property changes on: debian/trunk/tests/usertools/useradd/41_useradd_default_default_SKEL/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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=42
+#
+# 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=
+#
+# Defines whether the mail spool should be created while
+# creating the account
+CREATE_MAIL_SPOOL=

Added: debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/data/defaults
===================================================================
--- debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/data/defaults	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/data/defaults	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,7 @@
+GROUP=10
+HOME=/tmp
+INACTIVE=42
+EXPIRE=2007-12-02
+SHELL=/bin/foobar
+SKEL=/etc/skel
+CREATE_MAIL_SPOOL=no

Added: debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd uses the defautl SKEL value is SKEL is set to empty"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Get default value (useradd -D)..."
+useradd -D >tmp/defaults
+echo "OK"
+
+echo "useradd reported:"
+echo "======================================================================="
+cat tmp/defaults
+echo "======================================================================="
+echo -n "Check the usage message..."
+diff -au data/defaults tmp/defaults
+echo "usage message OK."
+rm -f tmp/defaults
+
+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
+


Property changes on: debian/trunk/tests/usertools/useradd/42_useradd_default_default_CREATE_MAIL_SPOOL/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,37 @@
+# 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=42
+#
+# 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=
+#
+# Defines whether the mail spool should be created while
+# creating the account
+CREATE_MAIL_SPOOL=
+# 
\ No newline at end of file

Added: debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/data/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/data/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/data/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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/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=/toto
+#
+# The number of days after a password expires until the account 
+# is permanently disabled
+INACTIVE=42
+#
+# 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=
+#
+# Defines whether the mail spool should be created while
+# creating the account
+CREATE_MAIL_SPOOL=no
+# 
+SKEL=/etc/skel

Added: debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd accepts a line with no eol at eof"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Set a default value (useradd -D -b /toto)..."
+useradd -D -b /toto
+echo "OK"
+
+echo -n "Check the default file..."
+diff -Nau data/useradd /etc/default/useradd
+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
+


Property changes on: debian/trunk/tests/usertools/useradd/43_useradd_default_no_final_eol/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,37 @@
+# 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=42
+#
+# 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=
+#
+# Defines whether the mail spool should be created while
+# creating the account
+CREATE_MAIL_SPOOL=
+# 
\ No newline at end of file

Added: debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/data/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/data/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/data/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,8 @@
+# useradd defaults file
+GROUP=100
+HOME=/toto
+INACTIVE=-1
+EXPIRE=
+SHELL=
+SKEL=/etc/skel
+CREATE_MAIL_SPOOL=no

Added: debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd can create a defaults file"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Delete the defaults file..."
+rm -f /etc/default/useradd
+echo "OK"
+
+echo -n "Set a default value (useradd -D -b /toto)..."
+useradd -D -b /toto
+echo "OK"
+
+echo -n "Check the default file..."
+diff -Nau data/useradd /etc/default/useradd
+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
+


Property changes on: debian/trunk/tests/usertools/useradd/44_useradd_default_no_file/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/data/group
===================================================================
--- debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/data/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:foo
+sys:x:3:
+adm:x:4:foo
+tty:x:5:
+disk:x:6:
+lp:x:7:
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:foo
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:
+voice:x:22:
+cdrom:x:24:foo
+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:

Added: debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/data/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/data/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::foo
+sys:*::
+adm:*::foo
+tty:*::
+disk:*::
+lp:*::
+mail:*::
+news:*::
+uucp:*::
+man:*::foo
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*::
+voice:*::
+cdrom:*::foo
+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:!::

Added: debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/data/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::/tmp/foo:/bin/foobar

Added: debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/data/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!:@TODAY@:0:99999:7:12:13849:

Added: debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd adds the user to specified groups"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create user foo in groups (useradd -G bin,adm,12,cdrom foo)..."
+useradd -G bin,adm,12,cdrom foo
+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 data/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 data/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/useradd/45_useradd-G_UID_name/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/data/group
===================================================================
--- debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/data/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:foo
+sys:x:3:
+adm:x:4:foo
+tty:x:5:
+disk:x:6:
+lp:x:7:
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:foo
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:
+voice:x:22:
+cdrom:x:24:foo
+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:

Added: debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/data/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/data/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::foo
+sys:*::
+adm:*::foo
+tty:*::
+disk:*::
+lp:*::
+mail:*::
+news:*::
+uucp:*::
+man:*::foo
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*::
+voice:*::
+cdrom:*::foo
+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:!::

Added: debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/data/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::/tmp/foo:/bin/foobar

Added: debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/data/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!:@TODAY@:0:99999:7:12:13849:

Added: debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd adds the user to specified groups (once)"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create user foo in groups (useradd -G bin,adm,12,cdrom,12 foo)..."
+useradd -G bin,adm,12,cdrom,12 foo
+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 data/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 data/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/useradd/46_useradd-G_UID_duplicate/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/data/group
===================================================================
--- debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/data/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:foo
+sys:x:3:
+adm:x:4:foo
+tty:x:5:
+disk:x:6:
+lp:x:7:
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:foo
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:
+voice:x:22:
+cdrom:x:24:foo
+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:

Added: debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/data/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/data/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::foo
+sys:*::
+adm:*::foo
+tty:*::
+disk:*::
+lp:*::
+mail:*::
+news:*::
+uucp:*::
+man:*::foo
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*::
+voice:*::
+cdrom:*::foo
+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:!::

Added: debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/data/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::/tmp/foo:/bin/foobar

Added: debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/data/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!:@TODAY@:0:99999:7:12:13849:

Added: debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd adds the user to specified groups (once)"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create user foo in groups (useradd -G bin,adm,12,cdrom,man foo)..."
+useradd -G bin,adm,12,cdrom,man foo
+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 data/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 data/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/useradd/47_useradd-G_UID_name_duplicate/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/data/group
===================================================================
--- debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/data/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:foo
+sys:x:3:
+adm:x:4:foo
+tty:x:5:
+disk:x:6:
+lp:x:7:
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:foo
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:
+voice:x:22:
+cdrom:x:24:foo
+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:

Added: debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/data/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/data/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::foo
+sys:*::
+adm:*::foo
+tty:*::
+disk:*::
+lp:*::
+mail:*::
+news:*::
+uucp:*::
+man:*::foo
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*::
+voice:*::
+cdrom:*::foo
+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:!::

Added: debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/data/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::/tmp/foo:/bin/foobar

Added: debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/data/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!:@TODAY@:0:99999:7:12:13849:

Added: debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd adds the user to specified groups (once)"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create user foo in groups (useradd -G bin,adm,12,cdrom,adm foo)..."
+useradd -G bin,adm,12,cdrom,adm foo
+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 data/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 data/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/useradd/48_useradd-G_name_duplicate/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+useradd: group 'cdromm' does not exist

Added: debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd check the validity of groups"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create user foo in groups with an invalid group (useradd -G bin,adm,12,cdromm,adm foo)..."
+useradd -G bin,adm,12,cdromm,adm foo 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "6"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/49_useradd-G_invalid_group/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/50_useradd-r/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/50_useradd-r/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/50_useradd-r/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/50_useradd-r/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/50_useradd-r/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/50_useradd-r/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/50_useradd-r/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/50_useradd-r/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/50_useradd-r/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/50_useradd-r/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/50_useradd-r/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/50_useradd-r/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/50_useradd-r/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/50_useradd-r/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/50_useradd-r/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/50_useradd-r/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/50_useradd-r/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/50_useradd-r/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/50_useradd-r/data/group
===================================================================
--- debian/trunk/tests/usertools/useradd/50_useradd-r/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/50_useradd-r/data/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:999:

Added: debian/trunk/tests/usertools/useradd/50_useradd-r/data/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/50_useradd-r/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/50_useradd-r/data/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!::

Added: debian/trunk/tests/usertools/useradd/50_useradd-r/data/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/50_useradd-r/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/50_useradd-r/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:101:999::/tmp/foo:/bin/foobar

Added: debian/trunk/tests/usertools/useradd/50_useradd-r/data/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/50_useradd-r/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/50_useradd-r/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!:@TODAY@::::::

Added: debian/trunk/tests/usertools/useradd/50_useradd-r/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/50_useradd-r/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/50_useradd-r/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd can create system users"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create system user foo (useradd -r foo)..."
+useradd -r foo
+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 data/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 data/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/useradd/50_useradd-r/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!::

Added: debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::/nonexistent:/bin/sh

Added: debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/51_useradd_already_exist/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/51_useradd_already_exist/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/51_useradd_already_exist/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/51_useradd_already_exist/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+useradd: user 'foo' already exists

Added: debian/trunk/tests/usertools/useradd/51_useradd_already_exist/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/51_useradd_already_exist/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/51_useradd_already_exist/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd checks ifthe requested new user already exist"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd with an existing user (useradd foo)..."
+useradd foo 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "9"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/51_useradd_already_exist/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!::

Added: debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+useradd: group foo exists - if you want to add this user to that group, use -g.

Added: debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd -U checks if a group with the same name already exist"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd -U with an existing group (useradd -U foo)..."
+useradd -U foo 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "9"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/52_useradd-U_group_already_exist/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/53_useradd-G_empty/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/53_useradd-G_empty/data/group
===================================================================
--- debian/trunk/tests/usertools/useradd/53_useradd-G_empty/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/53_useradd-G_empty/data/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/53_useradd-G_empty/data/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/53_useradd-G_empty/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/53_useradd-G_empty/data/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!::

Added: debian/trunk/tests/usertools/useradd/53_useradd-G_empty/data/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/53_useradd-G_empty/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/53_useradd-G_empty/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::/tmp/foo:/bin/foobar

Added: debian/trunk/tests/usertools/useradd/53_useradd-G_empty/data/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/53_useradd-G_empty/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/53_useradd-G_empty/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!:@TODAY@:0:99999:7:12:13849:

Added: debian/trunk/tests/usertools/useradd/53_useradd-G_empty/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/53_useradd-G_empty/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/53_useradd-G_empty/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd accepts empty list of groups"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create user foo with empty group list (useradd -G "" foo)..."
+useradd -G "" foo
+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 data/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 data/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/useradd/53_useradd-G_empty/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/data/group
===================================================================
--- debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/data/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:foo
+sys:x:3:
+adm:x:4:foo
+tty:x:5:
+disk:x:6:
+lp:x:7:
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:foo
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:
+voice:x:22:
+cdrom:x:24:foo
+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:

Added: debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/data/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/data/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::foo
+sys:*::
+adm:*::foo
+tty:*::
+disk:*::
+lp:*::
+mail:*::
+news:*::
+uucp:*::
+man:*::foo
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*::
+voice:*::
+cdrom:*::foo
+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:!::

Added: debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/data/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!:1000:1000::/tmp/foo:/bin/foobar

Added: debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd adds the user even if /etc/shadow is missing"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Delete /etc/shadow..."
+rm -f /etc/shadow
+echo "OK"
+
+echo -n "Create user foo in groups (useradd -G bin,adm,12,cdrom foo)..."
+useradd -G bin,adm,12,cdrom foo
+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 data/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 data/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/useradd/54_useradd_no_shadow_file/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/data/group
===================================================================
--- debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/data/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:foo
+sys:x:3:
+adm:x:4:foo
+tty:x:5:
+disk:x:6:
+lp:x:7:
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:foo
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:
+voice:x:22:
+cdrom:x:24:foo
+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:!:1000:

Added: debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/data/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::/tmp/foo:/bin/foobar

Added: debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/data/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!:@TODAY@:0:99999:7:12:13849:

Added: debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd adds the user and groups even if /etc/gshadow is missing"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Delete /etc/gshadow..."
+rm -f /etc/gshadow
+echo "OK"
+
+echo -n "Create user foo in groups (useradd -G bin,adm,12,cdrom foo)..."
+useradd -G bin,adm,12,cdrom foo
+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 data/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..."
+test ! -f /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/useradd/55_useradd_no_gshadow_file/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::
+test:x::

Added: debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/data/group
===================================================================
--- debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/data/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:foo
+sys:x:3:
+adm:x:4:foo
+tty:x:5:
+disk:x:6:
+lp:x:7:
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:foo
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:
+voice:x:22:
+cdrom:x:24:foo
+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:

Added: debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/data/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/data/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,43 @@
+root:*::
+daemon:*::
+bin:*::foo
+sys:*::
+adm:*::foo
+tty:*::
+disk:*::
+lp:*::
+mail:*::
+news:*::
+uucp:*::
+man:*::foo
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*::
+voice:*::
+cdrom:*::foo
+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::
+test:x::
+foo:!::

Added: debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/data/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::/tmp/foo:/bin/foobar

Added: debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/data/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!:@TODAY@:0:99999:7:12:13849:

Added: debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd adds the user and groups even if /etc/gshadow is missing"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create user foo in groups (useradd -G bin,adm,12,cdrom foo)..."
+useradd -G bin,adm,12,cdrom foo
+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 data/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 data/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/useradd/56_useradd_gshadow_entry_without_group_entry/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,32 @@
+Usage: useradd [options] LOGIN
+
+Options:
+  -b, --base-dir BASE_DIR       base directory for the home directory of the
+                                new account
+  -c, --comment COMMENT         GECOS field of the new account
+  -d, --home-dir HOME_DIR       home directory of the new account
+  -D, --defaults                print or change default useradd configuration
+  -e, --expiredate EXPIRE_DATE  expiration date of the new account
+  -f, --inactive INACTIVE       password inactivity period of the new account
+  -g, --gid GROUP               name or ID of the primary group of the new
+                                account
+  -G, --groups GROUPS           list of supplementary groups of the new
+                                account
+  -h, --help                    display this help message and exit
+  -k, --skel SKEL_DIR           use this alternative skeleton directory
+  -K, --key KEY=VALUE           override /etc/login.defs defaults
+  -l, --no-log-init             do not add the user to the lastlog and
+                                faillog databases
+  -m, --create-home             create the user's home directory
+  -M, --no-create-home          do not create the user's home directory
+  -N, --no-user-group           do not create a group with the same name as
+                                the user
+  -o, --non-unique              allow to create users with duplicate
+                                (non-unique) UID
+  -p, --password PASSWORD       encrypted password of the new account
+  -r, --system                  create a system account
+  -s, --shell SHELL             login shell of the new account
+  -u, --uid UID                 user ID of the new account
+  -U, --user-group              create a group with the same name as the user
+  -Z, --selinux-user SEUSER     use a specific SEUSER for the SELinux user mapping
+

Added: debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd reports an error when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call useradd with -D as second option (useradd -f 12 -D)..."
+useradd -f 12 -D 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "useradd 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
+


Property changes on: debian/trunk/tests/usertools/useradd/57_useradd_usage-D_not_first_option/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/58_useradd-e_empty/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/58_useradd-e_empty/data/group
===================================================================
--- debian/trunk/tests/usertools/useradd/58_useradd-e_empty/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/58_useradd-e_empty/data/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/58_useradd-e_empty/data/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/58_useradd-e_empty/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/58_useradd-e_empty/data/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!::

Added: debian/trunk/tests/usertools/useradd/58_useradd-e_empty/data/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/58_useradd-e_empty/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/58_useradd-e_empty/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::/tmp/foo:/bin/foobar

Added: debian/trunk/tests/usertools/useradd/58_useradd-e_empty/data/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/58_useradd-e_empty/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/58_useradd-e_empty/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!:@TODAY@:0:99999:7:12::

Added: debian/trunk/tests/usertools/useradd/58_useradd-e_empty/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/58_useradd-e_empty/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/58_useradd-e_empty/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd accepts empty list of groups"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create user foo without expiry (useradd -e "" foo)..."
+useradd -e "" foo
+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 data/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 data/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/useradd/58_useradd-e_empty/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/data/group
===================================================================
--- debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/data/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/data/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/data/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!::

Added: debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/data/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::/tmp/foo:/bin/foobar

Added: debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/data/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!:@TODAY@:0:99999:7:::

Added: debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd accepts -1 as expiry and inactivity"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create user foo without expiry (useradd -e -1 -f -1 foo)..."
+useradd -e -1 -f -1 foo
+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 data/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 data/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/useradd/59_useradd-e-1-f-1/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/data/group
===================================================================
--- debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/data/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/data/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/data/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!::

Added: debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/data/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::/tmp/foo:/bin/foobar

Added: debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd accepts -1 as expiry and inactivity"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Delete /etc/shadow..."
+rm -f /etc/shadow
+echo "OK"
+
+echo -n "Create user foo without expiry (useradd -e -1 -f -1 foo)..."
+useradd -e -1 -f -1 foo
+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 data/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 data/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/useradd/60_useradd-e-1-f-1_no_shadow_file/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/61_useradd-K/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/61_useradd-K/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/61_useradd-K/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/61_useradd-K/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/61_useradd-K/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/61_useradd-K/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/61_useradd-K/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/61_useradd-K/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/61_useradd-K/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/61_useradd-K/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/61_useradd-K/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/61_useradd-K/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/61_useradd-K/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/61_useradd-K/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/61_useradd-K/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/61_useradd-K/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/61_useradd-K/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/61_useradd-K/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/61_useradd-K/data/group
===================================================================
--- debian/trunk/tests/usertools/useradd/61_useradd-K/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/61_useradd-K/data/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/61_useradd-K/data/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/61_useradd-K/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/61_useradd-K/data/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!::

Added: debian/trunk/tests/usertools/useradd/61_useradd-K/data/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/61_useradd-K/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/61_useradd-K/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::/tmp/foo:/bin/foobar

Added: debian/trunk/tests/usertools/useradd/61_useradd-K/data/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/61_useradd-K/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/61_useradd-K/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!:@TODAY@:0:42:7:12:13849:

Added: debian/trunk/tests/usertools/useradd/61_useradd-K/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/61_useradd-K/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/61_useradd-K/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd uses -K options"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create user foo and set option with -K (useradd -K PASS_MAX_DAYS=42 foo)..."
+useradd -K PASS_MAX_DAYS=42 foo
+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 data/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 data/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/useradd/61_useradd-K/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/62_useradd-p/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/62_useradd-p/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/62_useradd-p/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/62_useradd-p/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/62_useradd-p/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/62_useradd-p/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/62_useradd-p/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/62_useradd-p/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/62_useradd-p/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/62_useradd-p/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/62_useradd-p/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/62_useradd-p/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/62_useradd-p/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/62_useradd-p/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/62_useradd-p/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/62_useradd-p/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/62_useradd-p/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/62_useradd-p/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/62_useradd-p/data/group
===================================================================
--- debian/trunk/tests/usertools/useradd/62_useradd-p/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/62_useradd-p/data/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/62_useradd-p/data/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/62_useradd-p/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/62_useradd-p/data/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!::

Added: debian/trunk/tests/usertools/useradd/62_useradd-p/data/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/62_useradd-p/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/62_useradd-p/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::/tmp/foo:/bin/foobar

Added: debian/trunk/tests/usertools/useradd/62_useradd-p/data/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/62_useradd-p/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/62_useradd-p/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:fooPass:@TODAY@:0:99999:7:12:13849:

Added: debian/trunk/tests/usertools/useradd/62_useradd-p/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/62_useradd-p/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/62_useradd-p/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "The -p option can set the password"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create user foo and set password (useradd -p fooPass foo)..."
+useradd -p fooPass foo
+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 data/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 data/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/useradd/62_useradd-p/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/63_useradd-s/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/63_useradd-s/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/63_useradd-s/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/63_useradd-s/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/63_useradd-s/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/63_useradd-s/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/63_useradd-s/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/63_useradd-s/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/63_useradd-s/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/63_useradd-s/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/63_useradd-s/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/63_useradd-s/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/63_useradd-s/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/63_useradd-s/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/63_useradd-s/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/63_useradd-s/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/63_useradd-s/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/63_useradd-s/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/63_useradd-s/data/group
===================================================================
--- debian/trunk/tests/usertools/useradd/63_useradd-s/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/63_useradd-s/data/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/63_useradd-s/data/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/63_useradd-s/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/63_useradd-s/data/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!::

Added: debian/trunk/tests/usertools/useradd/63_useradd-s/data/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/63_useradd-s/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/63_useradd-s/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::/tmp/foo:*/bin/dash

Added: debian/trunk/tests/usertools/useradd/63_useradd-s/data/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/63_useradd-s/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/63_useradd-s/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!:@TODAY@:0:99999:7:12:13849:

Added: debian/trunk/tests/usertools/useradd/63_useradd-s/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/63_useradd-s/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/63_useradd-s/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "The -s option can change the default shell"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create user foo and set shell (useradd -s \"*/bin/dash\" foo)..."
+useradd -s "*/bin/dash" foo
+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 data/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 data/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/useradd/63_useradd-s/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,41 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root
+tty:x:5:
+disk:x:6:
+lp:x:7: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:
+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:

Added: debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,41 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root
+tty:*::
+disk:*::
+lp:*::root
+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::

Added: debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/config.txt
===================================================================
Added: debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/data/useradd.err
===================================================================
--- debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/data/useradd.err	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/data/useradd.err	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,2 @@
+useradd: existing lock file /etc/passwd.lock without a PID
+useradd: cannot lock /etc/passwd; try again later.

Added: debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd -G 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 "Add user foo (useradd foo)..."
+useradd foo 2>tmp/useradd.err && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+rm -f /etc/passwd.lock
+
+echo -n "Check returned status ($status)..."
+test "$status" = "1"
+echo "OK"
+
+echo "useradd reported:"
+echo "======================================================================="
+cat tmp/useradd.err
+echo "======================================================================="
+echo -n "Check that there were a failure message..."
+diff -au data/useradd.err tmp/useradd.err
+echo "error message OK."
+rm -f tmp/useradd.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
+


Property changes on: debian/trunk/tests/usertools/useradd/64_useradd_locked_passwd/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,41 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root
+tty:x:5:
+disk:x:6:
+lp:x:7: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:
+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:

Added: debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,41 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root
+tty:*::
+disk:*::
+lp:*::root
+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::

Added: debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/65_useradd_locked_group/config.txt
===================================================================
Added: debian/trunk/tests/usertools/useradd/65_useradd_locked_group/data/useradd.err
===================================================================
--- debian/trunk/tests/usertools/useradd/65_useradd_locked_group/data/useradd.err	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/65_useradd_locked_group/data/useradd.err	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,2 @@
+useradd: existing lock file /etc/group.lock without a PID
+useradd: cannot lock /etc/group; try again later.

Added: debian/trunk/tests/usertools/useradd/65_useradd_locked_group/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/65_useradd_locked_group/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/65_useradd_locked_group/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd -G 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 "Add user foo (useradd foo)..."
+useradd foo 2>tmp/useradd.err && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+rm -f /etc/group.lock
+
+echo -n "Check returned status ($status)..."
+test "$status" = "10"
+echo "OK"
+
+echo "useradd reported:"
+echo "======================================================================="
+cat tmp/useradd.err
+echo "======================================================================="
+echo -n "Check that there were a failure message..."
+diff -au data/useradd.err tmp/useradd.err
+echo "error message OK."
+rm -f tmp/useradd.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
+


Property changes on: debian/trunk/tests/usertools/useradd/65_useradd_locked_group/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,41 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root
+tty:x:5:
+disk:x:6:
+lp:x:7: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:
+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:

Added: debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,41 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root
+tty:*::
+disk:*::
+lp:*::root
+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::

Added: debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/config.txt
===================================================================
Added: debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/data/useradd.err
===================================================================
--- debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/data/useradd.err	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/data/useradd.err	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,2 @@
+useradd: existing lock file /etc/shadow.lock without a PID
+useradd: cannot lock /etc/shadow; try again later.

Added: debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd -G 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 "Add user foo (useradd foo)..."
+useradd foo 2>tmp/useradd.err && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+rm -f /etc/shadow.lock
+
+echo -n "Check returned status ($status)..."
+test "$status" = "1"
+echo "OK"
+
+echo "useradd reported:"
+echo "======================================================================="
+cat tmp/useradd.err
+echo "======================================================================="
+echo -n "Check that there were a failure message..."
+diff -au data/useradd.err tmp/useradd.err
+echo "error message OK."
+rm -f tmp/useradd.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
+


Property changes on: debian/trunk/tests/usertools/useradd/66_useradd_locked_shadow/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,41 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root
+tty:x:5:
+disk:x:6:
+lp:x:7: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:
+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:

Added: debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,41 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root
+tty:*::
+disk:*::
+lp:*::root
+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::

Added: debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/config.txt
===================================================================
Added: debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/data/useradd.err
===================================================================
--- debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/data/useradd.err	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/data/useradd.err	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,2 @@
+useradd: existing lock file /etc/gshadow.lock without a PID
+useradd: cannot lock /etc/gshadow; try again later.

Added: debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "useradd -G 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 "Add user foo (useradd foo)..."
+useradd foo 2>tmp/useradd.err && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+rm -f /etc/gshadow.lock
+
+echo -n "Check returned status ($status)..."
+test "$status" = "10"
+echo "OK"
+
+echo "useradd reported:"
+echo "======================================================================="
+cat tmp/useradd.err
+echo "======================================================================="
+echo -n "Check that there were a failure message..."
+diff -au data/useradd.err tmp/useradd.err
+echo "error message OK."
+rm -f tmp/useradd.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
+


Property changes on: debian/trunk/tests/usertools/useradd/67_useradd_locked_gshadow/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config.txt
===================================================================
--- debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/68_useradd-s_empty/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/useradd/68_useradd-s_empty/data/group
===================================================================
--- debian/trunk/tests/usertools/useradd/68_useradd-s_empty/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/68_useradd-s_empty/data/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/useradd/68_useradd-s_empty/data/gshadow
===================================================================
--- debian/trunk/tests/usertools/useradd/68_useradd-s_empty/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/68_useradd-s_empty/data/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!::

Added: debian/trunk/tests/usertools/useradd/68_useradd-s_empty/data/passwd
===================================================================
--- debian/trunk/tests/usertools/useradd/68_useradd-s_empty/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/68_useradd-s_empty/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::/tmp/foo:

Added: debian/trunk/tests/usertools/useradd/68_useradd-s_empty/data/shadow
===================================================================
--- debian/trunk/tests/usertools/useradd/68_useradd-s_empty/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/68_useradd-s_empty/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:!:@TODAY@:0:99999:7:12:13849:

Added: debian/trunk/tests/usertools/useradd/68_useradd-s_empty/useradd.test
===================================================================
--- debian/trunk/tests/usertools/useradd/68_useradd-s_empty/useradd.test	                        (rev 0)
+++ debian/trunk/tests/usertools/useradd/68_useradd-s_empty/useradd.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "The -s option can set an empty shell"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create user foo and set empty shell (useradd -s \"\" foo)..."
+useradd -s "" foo
+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 data/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 data/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/useradd/68_useradd-s_empty/useradd.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/userdel/01_userdel_usage/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/userdel/01_userdel_usage/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/01_userdel_usage/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/userdel/01_userdel_usage/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/userdel/01_userdel_usage/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/01_userdel_usage/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/userdel/01_userdel_usage/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/userdel/01_userdel_usage/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/01_userdel_usage/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/userdel/01_userdel_usage/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/userdel/01_userdel_usage/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/01_userdel_usage/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/userdel/01_userdel_usage/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/userdel/01_userdel_usage/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/01_userdel_usage/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/userdel/01_userdel_usage/config.txt
===================================================================
--- debian/trunk/tests/usertools/userdel/01_userdel_usage/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/01_userdel_usage/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/userdel/01_userdel_usage/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/userdel/01_userdel_usage/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/01_userdel_usage/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,8 @@
+Usage: userdel [options] LOGIN
+
+Options:
+  -f, --force                   force removal of files,
+                                even if not owned by user
+  -h, --help                    display this help message and exit
+  -r, --remove                  remove home directory and mail spool
+

Added: debian/trunk/tests/usertools/userdel/01_userdel_usage/userdel.test
===================================================================
--- debian/trunk/tests/usertools/userdel/01_userdel_usage/userdel.test	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/01_userdel_usage/userdel.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "userdel 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 userdel usage (userdel -h)..."
+userdel -h >tmp/usage.out
+echo "OK"
+
+echo "userdel 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
+


Property changes on: debian/trunk/tests/usertools/userdel/01_userdel_usage/userdel.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config.txt
===================================================================
--- debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,9 @@
+userdel: unrecognized option '--foo'
+Usage: userdel [options] LOGIN
+
+Options:
+  -f, --force                   force removal of files,
+                                even if not owned by user
+  -h, --help                    display this help message and exit
+  -r, --remove                  remove home directory and mail spool
+

Added: debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/userdel.test
===================================================================
--- debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/userdel.test	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/userdel.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "userdel displays its usage message when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call userdel with an invalid option (userdel --foo)..."
+userdel --foo 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "userdel 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
+


Property changes on: debian/trunk/tests/usertools/userdel/02_userdel_usage_invalid_option/userdel.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config.txt
===================================================================
--- debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,8 @@
+Usage: userdel [options] LOGIN
+
+Options:
+  -f, --force                   force removal of files,
+                                even if not owned by user
+  -h, --help                    display this help message and exit
+  -r, --remove                  remove home directory and mail spool
+

Added: debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/userdel.test
===================================================================
--- debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/userdel.test	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/userdel.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "userdel displays its usage message when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call userdel without an user (userdel -f)..."
+userdel -f 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "userdel 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
+


Property changes on: debian/trunk/tests/usertools/userdel/03_userdel_usage_no_users/userdel.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:

Added: debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::

Added: debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::

Added: debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config.txt
===================================================================
--- debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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)

Added: debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/data/usage.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,8 @@
+Usage: userdel [options] LOGIN
+
+Options:
+  -f, --force                   force removal of files,
+                                even if not owned by user
+  -h, --help                    display this help message and exit
+  -r, --remove                  remove home directory and mail spool
+

Added: debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/userdel.test
===================================================================
--- debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/userdel.test	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/userdel.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "userdel displays its usage message when called incorrectly"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Call userdel with 2 users (userdel -f bin nobody)..."
+userdel -f bin nobody 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "userdel 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
+


Property changes on: debian/trunk/tests/usertools/userdel/04_userdel_usage_2_users/userdel.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:
+foo2:x:1001:

Added: debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:*::
+foo2:*::

Added: debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/login.defs
===================================================================
--- debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/login.defs	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/login.defs	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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 no
+
+#
+# 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
+
+
+

Added: debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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
+foo:x:1000:1000:::/bin/false
+foo2:x:1001:1001:::/bin/false

Added: debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::
+foo:!:12977:0:99999:7:::
+foo2:!:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config.txt
===================================================================
--- debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+user foo, in group users according to /etc/group only

Added: debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/data/group
===================================================================
--- debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/data/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:
+foo2:x:1001:

Added: debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/data/gshadow
===================================================================
--- debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/data/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:*::
+foo2:*::

Added: debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/data/passwd
===================================================================
--- debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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
+foo2:x:1001:1001:::/bin/false

Added: debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/data/shadow
===================================================================
--- debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::
+foo2:!:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/userdel.test
===================================================================
--- debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/userdel.test	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/userdel.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "userdel does not remove the user's group if USERGROUPS_ENAB is disabled"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Delete user foo (userdel foo)..."
+userdel foo
+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 data/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 data/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/userdel/05_userdel_no_USERGROUPS_ENAB/userdel.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:
+foo1:x:1000:
+foo2:x:1001:

Added: debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::
+foo1:*::
+foo2:*::

Added: debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/login.defs
===================================================================
--- debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/login.defs	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/login.defs	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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
+
+
+

Added: debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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
+foo:x:1000:1000:::/bin/false
+foo2:x:1001:1001:::/bin/false

Added: debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::
+foo:!:12977:0:99999:7:::
+foo2:!:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config.txt
===================================================================
--- debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+user foo, in group users according to /etc/group only

Added: debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/data/group
===================================================================
--- debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/data/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:
+foo1:x:1000:
+foo2:x:1001:

Added: debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/data/gshadow
===================================================================
--- debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/data/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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::
+foo1:*::
+foo2:*::

Added: debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/data/passwd
===================================================================
--- debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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
+foo2:x:1001:1001:::/bin/false

Added: debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/data/shadow
===================================================================
--- debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::
+foo2:!:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/userdel.test
===================================================================
--- debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/userdel.test	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/userdel.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "userdel does not remove the user's group if it has a different name"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Delete user foo (userdel foo)..."
+userdel foo
+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 data/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 data/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/userdel/06_userdel_no_usergroup/userdel.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1002:
+foo1:x:1000:
+foo2:x:1001:

Added: debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,44 @@
+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:*::
+foo1:*::
+foo2:*::

Added: debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/login.defs
===================================================================
--- debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/login.defs	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/login.defs	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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
+
+
+

Added: debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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
+foo:x:1000:1000:::/bin/false
+foo2:x:1001:1001:::/bin/false

Added: debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::
+foo:!:12977:0:99999:7:::
+foo2:!:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config.txt
===================================================================
--- debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+user foo, in group users according to /etc/group only

Added: debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/data/group
===================================================================
--- debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/data/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:
+foo:x:1002:
+foo1:x:1000:
+foo2:x:1001:

Added: debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/data/gshadow
===================================================================
--- debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/data/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,44 @@
+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:*::
+foo1:*::
+foo2:*::

Added: debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/data/passwd
===================================================================
--- debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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
+foo2:x:1001:1001:::/bin/false

Added: debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/data/shadow
===================================================================
--- debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::
+foo2:!:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/data/userdel.out
===================================================================
--- debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/data/userdel.out	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/data/userdel.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+userdel: group foo not removed because it is not the primary group of user foo.

Added: debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/userdel.test
===================================================================
--- debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/userdel.test	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/userdel.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "userdel does not remove the user's group if it has a different name"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Delete user foo (userdel foo)..."
+userdel foo 2>tmp/userdel.out
+echo "OK"
+
+echo "userdel reported:"
+echo "======================================================================="
+cat tmp/userdel.out
+echo "======================================================================="
+echo -n "Check the usage message..."
+diff -au data/userdel.out tmp/userdel.out
+echo "usage message OK."
+rm -f tmp/userdel.out
+
+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 data/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 data/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/userdel/07_userdel_usergroup_not_primary/userdel.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:foo2
+foo2:x:1001:

Added: debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:*::foo2
+foo2:*::

Added: debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/login.defs
===================================================================
--- debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/login.defs	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/login.defs	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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
+
+
+

Added: debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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
+foo:x:1000:1000:::/bin/false
+foo2:x:1001:1001:::/bin/false

Added: debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::
+foo:!:12977:0:99999:7:::
+foo2:!:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config.txt
===================================================================
--- debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+user foo, in group users according to /etc/group only

Added: debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/group
===================================================================
--- debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:foo2
+foo2:x:1001:

Added: debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/gshadow
===================================================================
--- debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:*::foo2
+foo2:*::

Added: debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/passwd
===================================================================
--- debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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
+foo2:x:1001:1001:::/bin/false

Added: debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/shadow
===================================================================
--- debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::
+foo2:!:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/userdel.out
===================================================================
--- debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/userdel.out	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/data/userdel.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+userdel: group foo not removed because it has other members.

Added: debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/userdel.test
===================================================================
--- debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/userdel.test	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/userdel.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "userdel does not remove the user's group if is has other members"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Delete user foo (userdel foo)..."
+userdel foo 2>tmp/userdel.out
+echo "OK"
+
+echo "userdel reported:"
+echo "======================================================================="
+cat tmp/userdel.out
+echo "======================================================================="
+echo -n "Check the usage message..."
+diff -au data/userdel.out tmp/userdel.out
+echo "usage message OK."
+rm -f tmp/userdel.out
+
+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 data/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 data/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/userdel/08_userdel_usergroup_with_other_members/userdel.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/default/useradd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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

Added: debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:foo2
+foo2:x:1001:

Added: debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:*::
+foo2:*::

Added: debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/login.defs
===================================================================
--- debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/login.defs	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/login.defs	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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
+
+
+

Added: debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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
+foo:x:1000:1000:::/bin/false
+foo2:x:1001:1001:::/bin/false

Added: debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config/etc/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::
+foo:!:12977:0:99999:7:::
+foo2:!:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config.txt
===================================================================
--- debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/config.txt	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+user foo, in group users according to /etc/group only

Added: debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/group
===================================================================
--- debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/group	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:foo2
+foo2:x:1001:

Added: debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/gshadow
===================================================================
--- debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/gshadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:*::
+foo2:*::

Added: debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/passwd
===================================================================
--- debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/passwd	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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
+foo2:x:1001:1001:::/bin/false

Added: debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/shadow
===================================================================
--- debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/shadow	2011-09-24 07:27:38 UTC (rev 3502)
@@ -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:::
+foo2:!:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/userdel.out
===================================================================
--- debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/userdel.out	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/data/userdel.out	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1 @@
+userdel: group foo not removed because it has other members.

Added: debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/userdel.test
===================================================================
--- debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/userdel.test	                        (rev 0)
+++ debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/userdel.test	2011-09-24 07:27:38 UTC (rev 3502)
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "userdel does not remove the user's group from gshadow if there were no additional members in gshadow but there were in group"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Delete user foo (userdel foo)..."
+userdel foo 2>tmp/userdel.out
+echo "OK"
+
+echo "userdel reported:"
+echo "======================================================================="
+cat tmp/userdel.out
+echo "======================================================================="
+echo -n "Check the usage message..."
+diff -au data/userdel.out tmp/userdel.out
+echo "usage message OK."
+rm -f tmp/userdel.out
+
+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 data/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 data/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/userdel/09_userdel_usergroup_no_other_members_in_gshadow/userdel.test
___________________________________________________________________
Added: svn:executable
   + *




More information about the Pkg-shadow-commits mailing list