[Pkg-shadow-commits] r3399 - in debian/trunk/tests/usertools: . usermod usermod/01_usermod-p_no_shadow_file usermod/01_usermod-p_no_shadow_file/config usermod/01_usermod-p_no_shadow_file/config/etc usermod/01_usermod-p_no_shadow_file/config/etc/default usermod/01_usermod-p_no_shadow_file/data usermod/02_usermod-p_no_shadow_entry usermod/02_usermod-p_no_shadow_entry/config usermod/02_usermod-p_no_shadow_entry/config/etc usermod/02_usermod-p_no_shadow_entry/config/etc/default usermod/02_usermod-p_no_shadow_entry/data usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/default usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/data usermod/04_usermod_lock_already_locked_password1 usermod/04_usermod_lock_already_locked_password1/config usermod/04_usermod_lock_already_locked_password1/config/etc usermod/04_usermod_lock_already_locked_password1/config/etc/default usermod/05_usermod_lock_already_locked_password2 usermod/05_usermod_lock_already_locked_password2/config usermod/05_usermod_lock_already_locked_password2/config/etc usermod/05_usermod_lock_already_locked_password2/config/etc/default usermod/05_usermod_lock_already_locked_password2/data usermod/06_usermod_lock_already_locked_password3 usermod/06_usermod_lock_already_locked_password3/config usermod/06_usermod_lock_already_locked_password3/config/etc usermod/06_usermod_lock_already_locked_password3/config/etc/default usermod/06_usermod_lock_already_locked_password3/data usermod/07_usermod_unlock_already_unlocked_password1 usermod/07_usermod_unlock_already_unlocked_password1/config usermod/07_usermod_unlock_already_unlocked_password1/config/etc usermod/07_usermod_unlock_already_unlocked_password1/config/etc/default usermod/08_usermod_unlock_already_unlocked_password2 usermod/08_usermod_unlock_already_unlocked_password2/config usermod/08_usermod_unlock_already_unlocked_password2/config/etc usermod/08_usermod_unlock_already_unlocked_password2/config/etc/default usermod/08_usermod_unlock_already_unlocked_password2/data usermod/09_usermod_unlock_already_unlocked_password3 usermod/09_usermod_unlock_already_unlocked_password3/config usermod/09_usermod_unlock_already_unlocked_password3/config/etc usermod/09_usermod_unlock_already_unlocked_password3/config/etc/default usermod/10_usermod_usage usermod/10_usermod_usage/config usermod/10_usermod_usage/config/etc usermod/10_usermod_usage/config/etc/default usermod/10_usermod_usage/data usermod/11_usermod_usage_bad_option usermod/11_usermod_usage_bad_option/config usermod/11_usermod_usage_bad_option/config/etc usermod/11_usermod_usage_bad_option/config/etc/default usermod/11_usermod_usage_bad_option/data usermod/12_usermod_usage_bad-f usermod/12_usermod_usage_bad-f/config usermod/12_usermod_usage_bad-f/config/etc usermod/12_usermod_usage_bad-f/config/etc/default usermod/12_usermod_usage_bad-f/data usermod/13_usermod_usage_bad-f_negativ usermod/13_usermod_usage_bad-f_negativ/config usermod/13_usermod_usage_bad-f_negativ/config/etc usermod/13_usermod_usage_bad-f_negativ/config/etc/default usermod/13_usermod_usage_bad-f_negativ/data usermod/14_usermod_usage_no_options usermod/14_usermod_usage_no_options/config usermod/14_usermod_usage_no_options/config/etc usermod/14_usermod_usage_no_options/config/etc/default usermod/14_usermod_usage_no_options/data usermod/15_usermod_usage_no_user usermod/15_usermod_usage_no_user/config usermod/15_usermod_usage_no_user/config/etc usermod/15_usermod_usage_no_user/config/etc/default usermod/15_usermod_usage_no_user/data usermod/16_usermod_usage_-e_no_shadow_file usermod/16_usermod_usage_-e_no_shadow_file/config usermod/16_usermod_usage_-e_no_shadow_file/config/etc usermod/16_usermod_usage_-e_no_shadow_file/config/etc/default usermod/16_usermod_usage_-e_no_shadow_file/data usermod/17_usermod_usage_-f_no_shadow_file usermod/17_usermod_usage_-f_no_shadow_file/config usermod/17_usermod_usage_-f_no_shadow_file/config/etc usermod/17_usermod_usage_-f_no_shadow_file/config/etc/default usermod/17_usermod_usage_-f_no_shadow_file/data usermod/18_usermod_usage-L-p_exclusive usermod/18_usermod_usage-L-p_exclusive/config usermod/18_usermod_usage-L-p_exclusive/config/etc usermod/18_usermod_usage-L-p_exclusive/config/etc/default usermod/18_usermod_usage-L-p_exclusive/data usermod/19_usermod_usage-L-U_exclusive usermod/19_usermod_usage-L-U_exclusive/config usermod/19_usermod_usage-L-U_exclusive/config/etc usermod/19_usermod_usage-L-U_exclusive/config/etc/default usermod/19_usermod_usage-L-U_exclusive/data usermod/20_usermod_usage-p-U_exclusive usermod/20_usermod_usage-p-U_exclusive/config usermod/20_usermod_usage-p-U_exclusive/config/etc usermod/20_usermod_usage-p-U_exclusive/config/etc/default usermod/20_usermod_usage-p-U_exclusive/data usermod/21_usermod_rename_user_no_gshadow_file usermod/21_usermod_rename_user_no_gshadow_file/config usermod/21_usermod_rename_user_no_gshadow_file/config/etc usermod/21_usermod_rename_user_no_gshadow_file/config/etc/default usermod/21_usermod_rename_user_no_gshadow_file/data usermod/22_usermod_usage_rename_invalid_username usermod/22_usermod_usage_rename_invalid_username/config usermod/22_usermod_usage_rename_invalid_username/config/etc usermod/22_usermod_usage_rename_invalid_username/config/etc/default usermod/22_usermod_usage_rename_invalid_username/data usermod/23_usermod-e_date usermod/23_usermod-e_date/config usermod/23_usermod-e_date/config/etc usermod/23_usermod-e_date/config/etc/default usermod/23_usermod-e_date/data usermod/24_usermod-e_date usermod/24_usermod-e_date/config usermod/24_usermod-e_date/config/etc usermod/24_usermod-e_date/config/etc/default usermod/24_usermod-e_date/data usermod/25_usermod-e_empty_arg usermod/25_usermod-e_empty_arg/config usermod/25_usermod-e_empty_arg/config/etc usermod/25_usermod-e_empty_arg/config/etc/default usermod/25_usermod-e_empty_arg/data usermod/26_usermod-e-1 usermod/26_usermod-e-1/config usermod/26_usermod-e-1/config/etc usermod/26_usermod-e-1/config/etc/default usermod/26_usermod-e-1/data usermod/27_usermod-e_invalid1 usermod/27_usermod-e_invalid1/config usermod/27_usermod-e_invalid1/config/etc usermod/27_usermod-e_invalid1/config/etc/default usermod/27_usermod-e_invalid1/data usermod/28_usermod-e_invalid2 usermod/28_usermod-e_invalid2/config usermod/28_usermod-e_invalid2/config/etc usermod/28_usermod-e_invalid2/config/etc/default usermod/28_usermod-e_invalid2/data usermod/29_usermod_no_changes usermod/29_usermod_no_changes/config usermod/29_usermod_no_changes/config/etc usermod/29_usermod_no_changes/config/etc/default usermod/29_usermod_no_changes/data usermod/30_usermod_usage-a_without-G usermod/30_usermod_usage-a_without-G/config usermod/30_usermod_usage-a_without-G/config/etc usermod/30_usermod_usage-a_without-G/config/etc/default usermod/30_usermod_usage-a_without-G/data usermod/31_usermod_usage-o_without-u usermod/31_usermod_usage-o_without-u/config usermod/31_usermod_usage-o_without-u/config/etc usermod/31_usermod_usage-o_without-u/config/etc/default usermod/31_usermod_usage-o_without-u/data usermod/32_usermod_usage-m_without-d usermod/32_usermod_usage-m_without-d/config usermod/32_usermod_usage-m_without-d/config/etc usermod/32_usermod_usage-m_without-d/config/etc/default usermod/32_usermod_usage-m_without-d/data usermod/33_usermod_change_shell usermod/33_usermod_change_shell/config usermod/33_usermod_change_shell/config/etc usermod/33_usermod_change_shell/config/etc/default usermod/33_usermod_change_shell/data usermod/34_usermod-e_date_no_shadow_entry usermod/34_usermod-e_date_no_shadow_entry/config usermod/34_usermod-e_date_no_shadow_entry/config/etc usermod/34_usermod-e_date_no_shadow_entry/config/etc/default usermod/34_usermod-e_date_no_shadow_entry/data usermod/35_usermod-f_no_shadow_entry usermod/35_usermod-f_no_shadow_entry/config usermod/35_usermod-f_no_shadow_entry/config/etc usermod/35_usermod-f_no_shadow_entry/config/etc/default usermod/35_usermod-f_no_shadow_entry/data usermod/36_usermod_move_homedir_existing_dir usermod/36_usermod_move_homedir_existing_dir/config usermod/36_usermod_move_homedir_existing_dir/config/etc usermod/36_usermod_move_homedir_existing_dir/config/etc/default usermod/36_usermod_move_homedir_existing_dir/data usermod/37_usermod_move_nonexistent_homedir usermod/37_usermod_move_nonexistent_homedir/config usermod/37_usermod_move_nonexistent_homedir/config/etc usermod/37_usermod_move_nonexistent_homedir/config/etc/default usermod/37_usermod_move_nonexistent_homedir/data usermod/38_usermod-u_lastlog_not_created usermod/38_usermod-u_lastlog_not_created/config usermod/38_usermod-u_lastlog_not_created/config/etc usermod/38_usermod-u_lastlog_not_created/config/etc/default usermod/38_usermod-u_lastlog_not_created/data usermod/39_usermod-u_copy_lastlog_entry usermod/39_usermod-u_copy_lastlog_entry/config usermod/39_usermod-u_copy_lastlog_entry/config/etc usermod/39_usermod-u_copy_lastlog_entry/config/etc/default usermod/39_usermod-u_copy_lastlog_entry/data usermod/40_usermod-u_reset_new_lastlog_entry usermod/40_usermod-u_reset_new_lastlog_entry/config usermod/40_usermod-u_reset_new_lastlog_entry/config/etc usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/default usermod/40_usermod-u_reset_new_lastlog_entry/data usermod/41_usermod-u_faillog_not_created usermod/41_usermod-u_faillog_not_created/config usermod/41_usermod-u_faillog_not_created/config/etc usermod/41_usermod-u_faillog_not_created/config/etc/default usermod/41_usermod-u_faillog_not_created/data usermod/42_usermod-u_copy_faillog_entry usermod/42_usermod-u_copy_faillog_entry/config usermod/42_usermod-u_copy_faillog_entry/config/etc usermod/42_usermod-u_copy_faillog_entry/config/etc/default usermod/42_usermod-u_copy_faillog_entry/config/etc/pam.d usermod/42_usermod-u_copy_faillog_entry/data usermod/43_usermod-u_reset_new_faillog_entry usermod/43_usermod-u_reset_new_faillog_entry/config usermod/43_usermod-u_reset_new_faillog_entry/config/etc usermod/43_usermod-u_reset_new_faillog_entry/config/etc/default usermod/43_usermod-u_reset_new_faillog_entry/config/etc/pam.d usermod/43_usermod-u_reset_new_faillog_entry/data usermod/44_usermod-l_move_mailbox usermod/44_usermod-l_move_mailbox/config usermod/44_usermod-l_move_mailbox/config/etc usermod/44_usermod-l_move_mailbox/config/etc/default usermod/44_usermod-l_move_mailbox/data usermod/45_usermod-u_change_mailbox_owner usermod/45_usermod-u_change_mailbox_owner/config usermod/45_usermod-u_change_mailbox_owner/config/etc usermod/45_usermod-u_change_mailbox_owner/config/etc/default usermod/45_usermod-u_change_mailbox_owner/data usermod/46_usermod-u_checks_mailbox_owner usermod/46_usermod-u_checks_mailbox_owner/config usermod/46_usermod-u_checks_mailbox_owner/config/etc usermod/46_usermod-u_checks_mailbox_owner/config/etc/default usermod/46_usermod-u_checks_mailbox_owner/data usermod/47_usermod-u_default_maildir usermod/47_usermod-u_default_maildir/config usermod/47_usermod-u_default_maildir/config/etc usermod/47_usermod-u_default_maildir/config/etc/default usermod/47_usermod-u_default_maildir/data usermod/48_usermod-u_MAIL_FILE usermod/48_usermod-u_MAIL_FILE/config usermod/48_usermod-u_MAIL_FILE/config/etc usermod/48_usermod-u_MAIL_FILE/config/etc/default usermod/48_usermod-u_MAIL_FILE/data usermod/49_usermod_change_gid+move_homedir_other_device usermod/49_usermod_change_gid+move_homedir_other_device/config usermod/49_usermod_change_gid+move_homedir_other_device/config/etc usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/default usermod/49_usermod_change_gid+move_homedir_other_device/data usermod/50_usermod_change_uid+move_homedir usermod/50_usermod_change_uid+move_homedir/config usermod/50_usermod_change_uid+move_homedir/config/etc usermod/50_usermod_change_uid+move_homedir/config/etc/default usermod/50_usermod_change_uid+move_homedir/data usermod/51_usermod_change_gid+move_homedir usermod/51_usermod_change_gid+move_homedir/config usermod/51_usermod_change_gid+move_homedir/config/etc usermod/51_usermod_change_gid+move_homedir/config/etc/default usermod/51_usermod_change_gid+move_homedir/data

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Thu Jul 14 16:19:28 UTC 2011


Author: nekral-guest
Date: 2011-07-14 16:19:27 +0000 (Thu, 14 Jul 2011)
New Revision: 3399

Added:
   debian/trunk/tests/usertools/usermod/
   debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/
   debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config.txt
   debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config/
   debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/
   debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/default/
   debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/group
   debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/passwd
   debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/shadow
   debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/data/
   debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/data/passwd
   debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/usermod.test
   debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/
   debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config.txt
   debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/
   debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/
   debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/default/
   debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/group
   debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/passwd
   debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/shadow
   debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/data/
   debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/data/passwd
   debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/usermod.test
   debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/
   debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config.txt
   debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/
   debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/
   debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/default/
   debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/group
   debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/passwd
   debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/shadow
   debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/data/
   debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/data/passwd
   debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/data/shadow
   debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/usermod.test
   debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/
   debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config.txt
   debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/
   debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/
   debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/default/
   debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/group
   debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/passwd
   debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/shadow
   debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/data/
   debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/usermod.test
   debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/
   debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config.txt
   debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/
   debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/
   debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/default/
   debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/group
   debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/passwd
   debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/shadow
   debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/data/
   debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/data/shadow
   debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/usermod.test
   debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/
   debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config.txt
   debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/
   debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/
   debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/default/
   debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/group
   debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/passwd
   debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/shadow
   debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/data/
   debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/data/passwd
   debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/usermod.test
   debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/
   debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config.txt
   debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/
   debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/
   debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/default/
   debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/group
   debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/passwd
   debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/shadow
   debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/data/
   debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/usermod.test
   debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/
   debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config.txt
   debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/
   debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/
   debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/default/
   debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/group
   debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/passwd
   debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/shadow
   debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/data/
   debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/data/shadow
   debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/usermod.test
   debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/
   debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config.txt
   debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/
   debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/
   debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/default/
   debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/group
   debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/passwd
   debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/shadow
   debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/data/
   debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/usermod.test
   debian/trunk/tests/usertools/usermod/10_usermod_usage/
   debian/trunk/tests/usertools/usermod/10_usermod_usage/config.txt
   debian/trunk/tests/usertools/usermod/10_usermod_usage/config/
   debian/trunk/tests/usertools/usermod/10_usermod_usage/config/etc/
   debian/trunk/tests/usertools/usermod/10_usermod_usage/config/etc/default/
   debian/trunk/tests/usertools/usermod/10_usermod_usage/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/10_usermod_usage/config/etc/group
   debian/trunk/tests/usertools/usermod/10_usermod_usage/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/10_usermod_usage/config/etc/passwd
   debian/trunk/tests/usertools/usermod/10_usermod_usage/config/etc/shadow
   debian/trunk/tests/usertools/usermod/10_usermod_usage/data/
   debian/trunk/tests/usertools/usermod/10_usermod_usage/data/usage.out
   debian/trunk/tests/usertools/usermod/10_usermod_usage/usermod.test
   debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/
   debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/config.txt
   debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/config/
   debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/config/etc/
   debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/config/etc/default/
   debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/config/etc/group
   debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/config/etc/passwd
   debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/config/etc/shadow
   debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/data/
   debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/data/usage.out
   debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/usermod.test
   debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/
   debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/config.txt
   debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/config/
   debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/config/etc/
   debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/config/etc/default/
   debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/config/etc/group
   debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/config/etc/passwd
   debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/config/etc/shadow
   debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/data/
   debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/data/usermod.err
   debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/usermod.test
   debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/
   debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config.txt
   debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config/
   debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config/etc/
   debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config/etc/default/
   debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config/etc/group
   debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config/etc/passwd
   debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config/etc/shadow
   debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/data/
   debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/data/usermod.err
   debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/usermod.test
   debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/
   debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/config.txt
   debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/config/
   debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/config/etc/
   debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/config/etc/default/
   debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/config/etc/group
   debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/config/etc/passwd
   debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/config/etc/shadow
   debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/data/
   debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/data/usage.out
   debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/usermod.test
   debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/
   debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/config.txt
   debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/config/
   debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/config/etc/
   debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/config/etc/default/
   debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/config/etc/group
   debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/config/etc/passwd
   debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/config/etc/shadow
   debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/data/
   debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/data/usage.out
   debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/usermod.test
   debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/
   debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config.txt
   debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config/
   debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/
   debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/default/
   debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/group
   debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/passwd
   debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/shadow
   debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/data/
   debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/data/usage.out
   debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/usermod.test
   debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/
   debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config.txt
   debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config/
   debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/
   debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/default/
   debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/group
   debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/passwd
   debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/shadow
   debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/data/
   debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/data/usage.out
   debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/usermod.test
   debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/
   debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config.txt
   debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config/
   debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config/etc/
   debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config/etc/default/
   debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config/etc/group
   debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config/etc/passwd
   debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config/etc/shadow
   debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/data/
   debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/data/usage.out
   debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/usermod.test
   debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/
   debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config.txt
   debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config/
   debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config/etc/
   debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config/etc/default/
   debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config/etc/group
   debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config/etc/passwd
   debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config/etc/shadow
   debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/data/
   debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/data/usage.out
   debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/usermod.test
   debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/
   debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config.txt
   debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config/
   debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config/etc/
   debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config/etc/default/
   debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config/etc/group
   debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config/etc/passwd
   debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config/etc/shadow
   debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/data/
   debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/data/usage.out
   debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/usermod.test
   debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/
   debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config.txt
   debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/
   debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/
   debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/default/
   debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/group
   debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/passwd
   debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/shadow
   debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/data/
   debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/data/group
   debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/data/passwd
   debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/data/shadow
   debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/usermod.test
   debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/
   debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config.txt
   debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config/
   debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config/etc/
   debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config/etc/default/
   debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config/etc/group
   debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config/etc/passwd
   debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config/etc/shadow
   debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/data/
   debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/data/usage.out
   debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/usermod.test
   debian/trunk/tests/usertools/usermod/23_usermod-e_date/
   debian/trunk/tests/usertools/usermod/23_usermod-e_date/config.txt
   debian/trunk/tests/usertools/usermod/23_usermod-e_date/config/
   debian/trunk/tests/usertools/usermod/23_usermod-e_date/config/etc/
   debian/trunk/tests/usertools/usermod/23_usermod-e_date/config/etc/default/
   debian/trunk/tests/usertools/usermod/23_usermod-e_date/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/23_usermod-e_date/config/etc/group
   debian/trunk/tests/usertools/usermod/23_usermod-e_date/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/23_usermod-e_date/config/etc/passwd
   debian/trunk/tests/usertools/usermod/23_usermod-e_date/config/etc/shadow
   debian/trunk/tests/usertools/usermod/23_usermod-e_date/data/
   debian/trunk/tests/usertools/usermod/23_usermod-e_date/data/shadow
   debian/trunk/tests/usertools/usermod/23_usermod-e_date/usermod.test
   debian/trunk/tests/usertools/usermod/24_usermod-e_date/
   debian/trunk/tests/usertools/usermod/24_usermod-e_date/config.txt
   debian/trunk/tests/usertools/usermod/24_usermod-e_date/config/
   debian/trunk/tests/usertools/usermod/24_usermod-e_date/config/etc/
   debian/trunk/tests/usertools/usermod/24_usermod-e_date/config/etc/default/
   debian/trunk/tests/usertools/usermod/24_usermod-e_date/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/24_usermod-e_date/config/etc/group
   debian/trunk/tests/usertools/usermod/24_usermod-e_date/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/24_usermod-e_date/config/etc/passwd
   debian/trunk/tests/usertools/usermod/24_usermod-e_date/config/etc/shadow
   debian/trunk/tests/usertools/usermod/24_usermod-e_date/data/
   debian/trunk/tests/usertools/usermod/24_usermod-e_date/data/shadow
   debian/trunk/tests/usertools/usermod/24_usermod-e_date/usermod.test
   debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/
   debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config.txt
   debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config/
   debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/
   debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/default/
   debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/group
   debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/passwd
   debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/shadow
   debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/data/
   debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/data/shadow
   debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/usermod.test
   debian/trunk/tests/usertools/usermod/26_usermod-e-1/
   debian/trunk/tests/usertools/usermod/26_usermod-e-1/config.txt
   debian/trunk/tests/usertools/usermod/26_usermod-e-1/config/
   debian/trunk/tests/usertools/usermod/26_usermod-e-1/config/etc/
   debian/trunk/tests/usertools/usermod/26_usermod-e-1/config/etc/default/
   debian/trunk/tests/usertools/usermod/26_usermod-e-1/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/26_usermod-e-1/config/etc/group
   debian/trunk/tests/usertools/usermod/26_usermod-e-1/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/26_usermod-e-1/config/etc/passwd
   debian/trunk/tests/usertools/usermod/26_usermod-e-1/config/etc/shadow
   debian/trunk/tests/usertools/usermod/26_usermod-e-1/data/
   debian/trunk/tests/usertools/usermod/26_usermod-e-1/data/shadow
   debian/trunk/tests/usertools/usermod/26_usermod-e-1/usermod.test
   debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/
   debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config.txt
   debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config/
   debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config/etc/
   debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config/etc/default/
   debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config/etc/group
   debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config/etc/passwd
   debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config/etc/shadow
   debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/data/
   debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/data/usermod.err
   debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/usermod.test
   debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/
   debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config.txt
   debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config/
   debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config/etc/
   debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config/etc/default/
   debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config/etc/group
   debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config/etc/passwd
   debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config/etc/shadow
   debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/data/
   debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/data/usermod.err
   debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/usermod.test
   debian/trunk/tests/usertools/usermod/29_usermod_no_changes/
   debian/trunk/tests/usertools/usermod/29_usermod_no_changes/config.txt
   debian/trunk/tests/usertools/usermod/29_usermod_no_changes/config/
   debian/trunk/tests/usertools/usermod/29_usermod_no_changes/config/etc/
   debian/trunk/tests/usertools/usermod/29_usermod_no_changes/config/etc/default/
   debian/trunk/tests/usertools/usermod/29_usermod_no_changes/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/29_usermod_no_changes/config/etc/group
   debian/trunk/tests/usertools/usermod/29_usermod_no_changes/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/29_usermod_no_changes/config/etc/passwd
   debian/trunk/tests/usertools/usermod/29_usermod_no_changes/config/etc/shadow
   debian/trunk/tests/usertools/usermod/29_usermod_no_changes/data/
   debian/trunk/tests/usertools/usermod/29_usermod_no_changes/data/usermod.err
   debian/trunk/tests/usertools/usermod/29_usermod_no_changes/usermod.test
   debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/
   debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/config.txt
   debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/config/
   debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/config/etc/
   debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/config/etc/default/
   debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/config/etc/group
   debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/config/etc/passwd
   debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/config/etc/shadow
   debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/data/
   debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/data/usage.out
   debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/usermod.test
   debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/
   debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/config.txt
   debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/config/
   debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/config/etc/
   debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/config/etc/default/
   debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/config/etc/group
   debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/config/etc/passwd
   debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/config/etc/shadow
   debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/data/
   debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/data/usage.out
   debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/usermod.test
   debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/
   debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/config.txt
   debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/config/
   debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/config/etc/
   debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/config/etc/default/
   debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/config/etc/group
   debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/config/etc/passwd
   debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/config/etc/shadow
   debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/data/
   debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/data/usage.out
   debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/usermod.test
   debian/trunk/tests/usertools/usermod/33_usermod_change_shell/
   debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config.txt
   debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config/
   debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config/etc/
   debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config/etc/default/
   debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config/etc/group
   debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config/etc/passwd
   debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config/etc/shadow
   debian/trunk/tests/usertools/usermod/33_usermod_change_shell/data/
   debian/trunk/tests/usertools/usermod/33_usermod_change_shell/data/passwd
   debian/trunk/tests/usertools/usermod/33_usermod_change_shell/usermod.test
   debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/
   debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config.txt
   debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/
   debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/
   debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/default/
   debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/group
   debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/passwd
   debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/shadow
   debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/data/
   debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/data/shadow
   debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/usermod.test
   debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/
   debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config.txt
   debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/
   debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/
   debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/default/
   debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/group
   debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/passwd
   debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/shadow
   debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/data/
   debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/data/shadow
   debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/usermod.test
   debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/
   debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config.txt
   debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/
   debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/
   debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/default/
   debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/group
   debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/passwd
   debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/shadow
   debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/data/
   debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/data/home_ls-a
   debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/data/home_ls-a2
   debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/data/passwd
   debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/data/usermod.err
   debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/usermod.test
   debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/
   debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config.txt
   debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/
   debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/
   debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/default/
   debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/group
   debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/passwd
   debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/shadow
   debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/data/
   debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/data/passwd
   debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/usermod.test
   debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/
   debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config.txt
   debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/
   debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/
   debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/default/
   debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/group
   debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/passwd
   debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/shadow
   debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/data/
   debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/data/passwd
   debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/usermod.test
   debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/
   debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config.txt
   debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/
   debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/
   debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/default/
   debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/group
   debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/passwd
   debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/shadow
   debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/data/
   debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/data/passwd
   debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/login.exp
   debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/usermod.test
   debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/
   debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config.txt
   debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/
   debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/
   debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/default/
   debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/group
   debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/passwd
   debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/shadow
   debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/data/
   debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/data/group
   debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/data/gshadow
   debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/data/passwd
   debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/data/shadow
   debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/login.exp
   debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/usermod.test
   debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/
   debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config.txt
   debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config/
   debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/
   debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/default/
   debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/group
   debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/passwd
   debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/shadow
   debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/data/
   debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/data/group
   debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/data/gshadow
   debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/data/passwd
   debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/data/shadow
   debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/usermod.test
   debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/
   debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config.txt
   debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/
   debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/
   debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/default/
   debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/group
   debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/pam.d/
   debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/pam.d/login
   debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/passwd
   debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/shadow
   debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/data/
   debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/data/group
   debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/data/gshadow
   debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/data/passwd
   debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/data/shadow
   debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/login.exp
   debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/usermod.test
   debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/
   debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config.txt
   debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/
   debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/
   debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/default/
   debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/group
   debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/pam.d/
   debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/pam.d/login
   debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/passwd
   debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/shadow
   debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/data/
   debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/data/group
   debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/data/gshadow
   debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/data/passwd
   debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/data/shadow
   debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/login.exp
   debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/usermod.test
   debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/
   debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config.txt
   debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config/
   debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/
   debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/default/
   debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/group
   debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/passwd
   debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/shadow
   debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/data/
   debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/data/mailbox.perms
   debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/data/passwd
   debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/data/shadow
   debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/test
   debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/usermod.test
   debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/
   debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config.txt
   debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/
   debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/
   debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/default/
   debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/group
   debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/passwd
   debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/shadow
   debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/data/
   debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/data/mailbox.perms
   debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/data/passwd
   debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/usermod.test
   debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/
   debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config.txt
   debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/
   debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/
   debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/default/
   debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/group
   debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/passwd
   debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/shadow
   debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/data/
   debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/data/mailbox.perms
   debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/data/passwd
   debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/data/usermod.err
   debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/usermod.test
   debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/
   debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config.txt
   debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/
   debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/
   debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/default/
   debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/group
   debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/login.defs
   debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/passwd
   debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/shadow
   debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/data/
   debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/data/mailbox.perms
   debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/data/passwd
   debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/usermod.test
   debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/
   debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config.txt
   debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/
   debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/
   debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/default/
   debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/group
   debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/login.defs
   debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/passwd
   debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/shadow
   debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/data/
   debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/data/mailbox.perms
   debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/data/passwd
   debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/usermod.test
   debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/
   debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config.txt
   debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/
   debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/
   debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/default/
   debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/group
   debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/passwd
   debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/shadow
   debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/data/
   debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/data/home_ls-a
   debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/data/passwd
   debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/usermod.test
   debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/
   debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/config.txt
   debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/
   debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/
   debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/default/
   debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/group
   debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/passwd
   debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/shadow
   debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/data/
   debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/data/home_ls-a
   debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/data/passwd
   debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/usermod.test
   debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/
   debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config.txt
   debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/
   debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/
   debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/default/
   debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/default/useradd
   debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/group
   debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/gshadow
   debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/passwd
   debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/shadow
   debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/data/
   debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/data/home_ls-a
   debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/data/passwd
   debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/usermod.test
Log:
Added tests for usermod.


Added: debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/01_usermod-p_no_shadow_file/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:blahblahblah:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/01_usermod-p_no_shadow_file/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,2 @@
+user foo exists, UID 1000
+user foo2 exists, UID 1001

Added: debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/data/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/data/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:foopass:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/01_usermod-p_no_shadow_file/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod does not require a shadow file"
+
+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 "done"
+
+echo -n "Change the user's password (usermod -p foopass foo)..."
+usermod -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 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/usermod/01_usermod-p_no_shadow_file/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/02_usermod-p_no_shadow_entry/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:blahblahblah:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/02_usermod-p_no_shadow_entry/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,2 @@
+user foo exists, UID 1000
+user foo2 exists, UID 1001

Added: debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/data/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/data/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:foopass:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/02_usermod-p_no_shadow_entry/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod does not require a shadow entry"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Change the user's password (usermod -p foopass foo)..."
+usermod -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 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/usermod/02_usermod-p_no_shadow_entry/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,2 @@
+user foo exists, UID 1000
+user foo2 exists, UID 1001

Added: debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/data/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/data/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:foopass:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/data/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/data/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:::

Added: debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod does not require a shadow entry"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Change the user's password (usermod -p foopass foo)..."
+usermod -p foopass foo
+echo "OK"
+
+echo -n "Check the passwd file..."
+../../../common/compare_file.pl config/etc/passwd /etc/passwd
+echo "OK"
+echo -n "Check the group file..."
+../../../common/compare_file.pl config/etc/group /etc/group
+echo "OK"
+echo -n "Check the shadow file..."
+../../../common/compare_file.pl data/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/usermod/03_usermod-p_no_shadow_entry_but_shadow_enabled/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/04_usermod_lock_already_locked_password1/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:!oldpass:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,2 @@
+user foo exists, UID 1000
+user foo2 exists, UID 1001

Added: debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/04_usermod_lock_already_locked_password1/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod does not fail to lock an already locked password"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Lock foo's password (usermod -L foo)..."
+usermod -L foo
+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/usermod/04_usermod_lock_already_locked_password1/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/05_usermod_lock_already_locked_password2/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:!blahblahblah:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:blahblahblah:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,2 @@
+user foo exists, UID 1000
+user foo2 exists, UID 1001

Added: debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/data/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/data/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:!blahblahblah:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/05_usermod_lock_already_locked_password2/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod does not fail to lock an already locked password"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Lock foo's password (usermod -L foo)..."
+usermod -L foo
+echo "OK"
+
+echo -n "Check the passwd file..."
+../../../common/compare_file.pl config/etc/passwd /etc/passwd
+echo "OK"
+echo -n "Check the group file..."
+../../../common/compare_file.pl config/etc/group /etc/group
+echo "OK"
+echo -n "Check the shadow file..."
+../../../common/compare_file.pl data/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


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

Added: debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/06_usermod_lock_already_locked_password3/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:!blahblahblah:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/06_usermod_lock_already_locked_password3/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,2 @@
+user foo exists, UID 1000
+user foo2 exists, UID 1001

Added: debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/data/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/data/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:foopass:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/06_usermod_lock_already_locked_password3/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod does not fail to lock an already locked password"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Lock foo's password (usermod -L foo)..."
+usermod -L foo
+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/usermod/06_usermod_lock_already_locked_password3/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:blahblahblah:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,2 @@
+user foo exists, UID 1000
+user foo2 exists, UID 1001

Added: debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/07_usermod_unlock_already_unlocked_password1/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod does not fail to unlock an already unlocked password"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Unlock foo's password (usermod -U foo)..."
+usermod -U foo
+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/usermod/07_usermod_unlock_already_unlocked_password1/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:blahblahblah:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:!unusedblahblahblah:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,2 @@
+user foo exists, UID 1000
+user foo2 exists, UID 1001

Added: debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/data/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/data/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:unusedblahblahblah:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/08_usermod_unlock_already_unlocked_password2/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod does not fail to unlock an already unlocked password"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Unlock foo's password (usermod -U foo)..."
+usermod -U foo
+echo "OK"
+
+echo -n "Check the passwd file..."
+../../../common/compare_file.pl config/etc/passwd /etc/passwd
+echo "OK"
+echo -n "Check the group file..."
+../../../common/compare_file.pl config/etc/group /etc/group
+echo "OK"
+echo -n "Check the shadow file..."
+../../../common/compare_file.pl data/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


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

Added: debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:blahblahblah:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/09_usermod_unlock_already_unlocked_password3/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,2 @@
+user foo exists, UID 1000
+user foo2 exists, UID 1001

Added: debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/09_usermod_unlock_already_unlocked_password3/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod does not fail to unlock an already unlocked password"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Unlock foo's password (usermod -U foo)..."
+usermod -U foo
+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/usermod/09_usermod_unlock_already_unlocked_password3/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/10_usermod_usage/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/10_usermod_usage/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/10_usermod_usage/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/10_usermod_usage/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/10_usermod_usage/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/10_usermod_usage/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/10_usermod_usage/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/10_usermod_usage/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/10_usermod_usage/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/10_usermod_usage/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/10_usermod_usage/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/10_usermod_usage/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/10_usermod_usage/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/10_usermod_usage/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/10_usermod_usage/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/10_usermod_usage/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/10_usermod_usage/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/10_usermod_usage/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/10_usermod_usage/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/usermod/10_usermod_usage/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/10_usermod_usage/data/usage.out	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,25 @@
+Usage: usermod [options] LOGIN
+
+Options:
+  -c, --comment COMMENT         new value of the GECOS field
+  -d, --home HOME_DIR           new home directory for the user account
+  -e, --expiredate EXPIRE_DATE  set account expiration date to EXPIRE_DATE
+  -f, --inactive INACTIVE       set password inactive after expiration
+                                to INACTIVE
+  -g, --gid GROUP               force use GROUP as new primary group
+  -G, --groups GROUPS           new list of supplementary GROUPS
+  -a, --append                  append the user to the supplemental GROUPS
+                                mentioned by the -G option without removing
+                                him/her from other groups
+  -h, --help                    display this help message and exit
+  -l, --login NEW_LOGIN         new value of the login name
+  -L, --lock                    lock the user account
+  -m, --move-home               move contents of the home directory to the
+                                new location (use only with -d)
+  -o, --non-unique              allow using duplicate (non-unique) UID
+  -p, --password PASSWORD       use encrypted password for the new password
+  -s, --shell SHELL             new login shell for the user account
+  -u, --uid UID                 new UID for the user account
+  -U, --unlock                  unlock the user account
+  -Z, --selinux-user            new SELinux user mapping for the user account
+

Added: debian/trunk/tests/usertools/usermod/10_usermod_usage/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/10_usermod_usage/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/10_usermod_usage/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod 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 usermod usage (usermod -h)..."
+usermod -h >tmp/usage.out
+echo "OK"
+
+echo "usermod 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/usermod/10_usermod_usage/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/11_usermod_usage_bad_option/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/11_usermod_usage_bad_option/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/11_usermod_usage_bad_option/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/11_usermod_usage_bad_option/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/11_usermod_usage_bad_option/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/11_usermod_usage_bad_option/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/data/usage.out	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,26 @@
+usermod: unrecognized option '--foo'
+Usage: usermod [options] LOGIN
+
+Options:
+  -c, --comment COMMENT         new value of the GECOS field
+  -d, --home HOME_DIR           new home directory for the user account
+  -e, --expiredate EXPIRE_DATE  set account expiration date to EXPIRE_DATE
+  -f, --inactive INACTIVE       set password inactive after expiration
+                                to INACTIVE
+  -g, --gid GROUP               force use GROUP as new primary group
+  -G, --groups GROUPS           new list of supplementary GROUPS
+  -a, --append                  append the user to the supplemental GROUPS
+                                mentioned by the -G option without removing
+                                him/her from other groups
+  -h, --help                    display this help message and exit
+  -l, --login NEW_LOGIN         new value of the login name
+  -L, --lock                    lock the user account
+  -m, --move-home               move contents of the home directory to the
+                                new location (use only with -d)
+  -o, --non-unique              allow using duplicate (non-unique) UID
+  -p, --password PASSWORD       use encrypted password for the new password
+  -s, --shell SHELL             new login shell for the user account
+  -u, --uid UID                 new UID for the user account
+  -U, --unlock                  unlock the user account
+  -Z, --selinux-user            new SELinux user mapping for the user account
+

Added: debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/11_usermod_usage_bad_option/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod displays its usage message in case on non recognized option"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Get usermod usage (usermod -h)..."
+usermod --foo 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "usermod 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/usermod/11_usermod_usage_bad_option/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/12_usermod_usage_bad-f/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/12_usermod_usage_bad-f/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/12_usermod_usage_bad-f/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/12_usermod_usage_bad-f/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/12_usermod_usage_bad-f/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/12_usermod_usage_bad-f/data/usermod.err
===================================================================
--- debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/data/usermod.err	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/data/usermod.err	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+usermod: invalid numeric argument 'bar'

Added: debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/12_usermod_usage_bad-f/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod checks that the number of inactive days is a number"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Use -f without a number (usermod -f bar foo)..."
+usermod -f bar foo 2>tmp/usermod.err && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "usermod reported:"
+echo "======================================================================="
+cat tmp/usermod.err
+echo "======================================================================="
+echo -n "Check the usage message..."
+diff -au data/usermod.err tmp/usermod.err
+echo "usage message OK."
+rm -f tmp/usermod.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/usermod/12_usermod_usage_bad-f/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/13_usermod_usage_bad-f_negativ/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/13_usermod_usage_bad-f_negativ/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/13_usermod_usage_bad-f_negativ/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/13_usermod_usage_bad-f_negativ/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/13_usermod_usage_bad-f_negativ/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/13_usermod_usage_bad-f_negativ/data/usermod.err
===================================================================
--- debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/data/usermod.err	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/data/usermod.err	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+usermod: invalid numeric argument '-2'

Added: debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/13_usermod_usage_bad-f_negativ/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod displays its usage message in case when -f receive a wrong number"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Set number of inactive days to -2 (usermod -f -2)..."
+usermod -f -2 foo 2>tmp/usermod.err && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "usermod reported:"
+echo "======================================================================="
+cat tmp/usermod.err
+echo "======================================================================="
+echo -n "Check the usage message..."
+diff -au data/usermod.err tmp/usermod.err
+echo "usage message OK."
+rm -f tmp/usermod.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/usermod/13_usermod_usage_bad-f_negativ/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/14_usermod_usage_no_options/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/14_usermod_usage_no_options/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/14_usermod_usage_no_options/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/14_usermod_usage_no_options/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/14_usermod_usage_no_options/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/14_usermod_usage_no_options/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/data/usage.out	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,26 @@
+usermod: no options
+Usage: usermod [options] LOGIN
+
+Options:
+  -c, --comment COMMENT         new value of the GECOS field
+  -d, --home HOME_DIR           new home directory for the user account
+  -e, --expiredate EXPIRE_DATE  set account expiration date to EXPIRE_DATE
+  -f, --inactive INACTIVE       set password inactive after expiration
+                                to INACTIVE
+  -g, --gid GROUP               force use GROUP as new primary group
+  -G, --groups GROUPS           new list of supplementary GROUPS
+  -a, --append                  append the user to the supplemental GROUPS
+                                mentioned by the -G option without removing
+                                him/her from other groups
+  -h, --help                    display this help message and exit
+  -l, --login NEW_LOGIN         new value of the login name
+  -L, --lock                    lock the user account
+  -m, --move-home               move contents of the home directory to the
+                                new location (use only with -d)
+  -o, --non-unique              allow using duplicate (non-unique) UID
+  -p, --password PASSWORD       use encrypted password for the new password
+  -s, --shell SHELL             new login shell for the user account
+  -u, --uid UID                 new UID for the user account
+  -U, --unlock                  unlock the user account
+  -Z, --selinux-user            new SELinux user mapping for the user account
+

Added: debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/14_usermod_usage_no_options/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod checks that there is actually something to change"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Change user foo (usermod foo)..."
+usermod foo 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "usermod 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/usermod/14_usermod_usage_no_options/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/15_usermod_usage_no_user/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/15_usermod_usage_no_user/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/15_usermod_usage_no_user/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/15_usermod_usage_no_user/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/15_usermod_usage_no_user/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/15_usermod_usage_no_user/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/data/usage.out	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,25 @@
+Usage: usermod [options] LOGIN
+
+Options:
+  -c, --comment COMMENT         new value of the GECOS field
+  -d, --home HOME_DIR           new home directory for the user account
+  -e, --expiredate EXPIRE_DATE  set account expiration date to EXPIRE_DATE
+  -f, --inactive INACTIVE       set password inactive after expiration
+                                to INACTIVE
+  -g, --gid GROUP               force use GROUP as new primary group
+  -G, --groups GROUPS           new list of supplementary GROUPS
+  -a, --append                  append the user to the supplemental GROUPS
+                                mentioned by the -G option without removing
+                                him/her from other groups
+  -h, --help                    display this help message and exit
+  -l, --login NEW_LOGIN         new value of the login name
+  -L, --lock                    lock the user account
+  -m, --move-home               move contents of the home directory to the
+                                new location (use only with -d)
+  -o, --non-unique              allow using duplicate (non-unique) UID
+  -p, --password PASSWORD       use encrypted password for the new password
+  -s, --shell SHELL             new login shell for the user account
+  -u, --uid UID                 new UID for the user account
+  -U, --unlock                  unlock the user account
+  -Z, --selinux-user            new SELinux user mapping for the user account
+

Added: debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/15_usermod_usage_no_user/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod checks that the user to be changed is provided"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Change a user name (usermod -l bar)..."
+usermod -l bar 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "usermod 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/usermod/15_usermod_usage_no_user/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/16_usermod_usage_-e_no_shadow_file/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/16_usermod_usage_-e_no_shadow_file/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/data/usage.out	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+usermod: shadow passwords required for -e and -f

Added: debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/16_usermod_usage_-e_no_shadow_file/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod checks that the shadow file exist for option -e"
+
+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 "done"
+
+echo -n "Change expire date (usermod -e 10 foo)..."
+usermod -e 10 foo 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "usermod 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/usermod/16_usermod_usage_-e_no_shadow_file/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/17_usermod_usage_-f_no_shadow_file/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/17_usermod_usage_-f_no_shadow_file/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/data/usage.out	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+usermod: shadow passwords required for -e and -f

Added: debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/17_usermod_usage_-f_no_shadow_file/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod checks that the shadow file exist for option -f"
+
+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 "done"
+
+echo -n "Change number of inactive days (usermod -f 10 foo)..."
+usermod -f 10 foo 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "usermod 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/usermod/17_usermod_usage_-f_no_shadow_file/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/18_usermod_usage-L-p_exclusive/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/18_usermod_usage-L-p_exclusive/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/18_usermod_usage-L-p_exclusive/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/18_usermod_usage-L-p_exclusive/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/18_usermod_usage-L-p_exclusive/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/18_usermod_usage-L-p_exclusive/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/data/usage.out	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,26 @@
+usermod: the -L, -p, and -U flags are exclusive
+Usage: usermod [options] LOGIN
+
+Options:
+  -c, --comment COMMENT         new value of the GECOS field
+  -d, --home HOME_DIR           new home directory for the user account
+  -e, --expiredate EXPIRE_DATE  set account expiration date to EXPIRE_DATE
+  -f, --inactive INACTIVE       set password inactive after expiration
+                                to INACTIVE
+  -g, --gid GROUP               force use GROUP as new primary group
+  -G, --groups GROUPS           new list of supplementary GROUPS
+  -a, --append                  append the user to the supplemental GROUPS
+                                mentioned by the -G option without removing
+                                him/her from other groups
+  -h, --help                    display this help message and exit
+  -l, --login NEW_LOGIN         new value of the login name
+  -L, --lock                    lock the user account
+  -m, --move-home               move contents of the home directory to the
+                                new location (use only with -d)
+  -o, --non-unique              allow using duplicate (non-unique) UID
+  -p, --password PASSWORD       use encrypted password for the new password
+  -s, --shell SHELL             new login shell for the user account
+  -u, --uid UID                 new UID for the user account
+  -U, --unlock                  unlock the user account
+  -Z, --selinux-user            new SELinux user mapping for the user account
+

Added: debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/18_usermod_usage-L-p_exclusive/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod checks that -L and -p are not provided at the same time"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Change an lock password (usermod -L -p newpass foo)..."
+usermod -L -p newpass foo 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "usermod 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/usermod/18_usermod_usage-L-p_exclusive/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/19_usermod_usage-L-U_exclusive/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/19_usermod_usage-L-U_exclusive/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/19_usermod_usage-L-U_exclusive/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/19_usermod_usage-L-U_exclusive/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/19_usermod_usage-L-U_exclusive/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/19_usermod_usage-L-U_exclusive/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/data/usage.out	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,26 @@
+usermod: the -L, -p, and -U flags are exclusive
+Usage: usermod [options] LOGIN
+
+Options:
+  -c, --comment COMMENT         new value of the GECOS field
+  -d, --home HOME_DIR           new home directory for the user account
+  -e, --expiredate EXPIRE_DATE  set account expiration date to EXPIRE_DATE
+  -f, --inactive INACTIVE       set password inactive after expiration
+                                to INACTIVE
+  -g, --gid GROUP               force use GROUP as new primary group
+  -G, --groups GROUPS           new list of supplementary GROUPS
+  -a, --append                  append the user to the supplemental GROUPS
+                                mentioned by the -G option without removing
+                                him/her from other groups
+  -h, --help                    display this help message and exit
+  -l, --login NEW_LOGIN         new value of the login name
+  -L, --lock                    lock the user account
+  -m, --move-home               move contents of the home directory to the
+                                new location (use only with -d)
+  -o, --non-unique              allow using duplicate (non-unique) UID
+  -p, --password PASSWORD       use encrypted password for the new password
+  -s, --shell SHELL             new login shell for the user account
+  -u, --uid UID                 new UID for the user account
+  -U, --unlock                  unlock the user account
+  -Z, --selinux-user            new SELinux user mapping for the user account
+

Added: debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/19_usermod_usage-L-U_exclusive/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod checks that -L and -U are not provided at the same time"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Lock an unlock password (usermod -L -U foo)..."
+usermod -L -U foo 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "usermod 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/usermod/19_usermod_usage-L-U_exclusive/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/20_usermod_usage-p-U_exclusive/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/20_usermod_usage-p-U_exclusive/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/20_usermod_usage-p-U_exclusive/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/20_usermod_usage-p-U_exclusive/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/20_usermod_usage-p-U_exclusive/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/20_usermod_usage-p-U_exclusive/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/data/usage.out	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,26 @@
+usermod: the -L, -p, and -U flags are exclusive
+Usage: usermod [options] LOGIN
+
+Options:
+  -c, --comment COMMENT         new value of the GECOS field
+  -d, --home HOME_DIR           new home directory for the user account
+  -e, --expiredate EXPIRE_DATE  set account expiration date to EXPIRE_DATE
+  -f, --inactive INACTIVE       set password inactive after expiration
+                                to INACTIVE
+  -g, --gid GROUP               force use GROUP as new primary group
+  -G, --groups GROUPS           new list of supplementary GROUPS
+  -a, --append                  append the user to the supplemental GROUPS
+                                mentioned by the -G option without removing
+                                him/her from other groups
+  -h, --help                    display this help message and exit
+  -l, --login NEW_LOGIN         new value of the login name
+  -L, --lock                    lock the user account
+  -m, --move-home               move contents of the home directory to the
+                                new location (use only with -d)
+  -o, --non-unique              allow using duplicate (non-unique) UID
+  -p, --password PASSWORD       use encrypted password for the new password
+  -s, --shell SHELL             new login shell for the user account
+  -u, --uid UID                 new UID for the user account
+  -U, --unlock                  unlock the user account
+  -Z, --selinux-user            new SELinux user mapping for the user account
+

Added: debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/20_usermod_usage-p-U_exclusive/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod checks that -U and -p are not provided at the same time"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Change an unlock password (usermod -U -p newpass foo)..."
+usermod -U -p newpass foo 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "usermod 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/usermod/20_usermod_usage-p-U_exclusive/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/21_usermod_rename_user_no_gshadow_file/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,6 @@
+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/usermod/21_usermod_rename_user_no_gshadow_file/data/group
===================================================================
--- debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/data/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo2
+tty:x:5:
+disk:x:6:
+lp:x:7:root,foo2
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo2
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo2
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo2
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/data/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/data/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/data/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/data/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/21_usermod_rename_user_no_gshadow_file/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/21_usermod_rename_user_no_gshadow_file/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod rename the user in the lists of members, when an user is renamed with -l"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Remove /etc/gshadow..."
+rm -f /etc/gshadow
+echo "done"
+
+echo -n "Rename user foo (usermod -l foo2 foo)..."
+usermod -l foo2 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/usermod/21_usermod_rename_user_no_gshadow_file/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/22_usermod_usage_rename_invalid_username/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/22_usermod_usage_rename_invalid_username/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/22_usermod_usage_rename_invalid_username/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/22_usermod_usage_rename_invalid_username/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/22_usermod_usage_rename_invalid_username/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/22_usermod_usage_rename_invalid_username/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/data/usage.out	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+usermod: invalid user name '2:bar'

Added: debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/22_usermod_usage_rename_invalid_username/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod checks the validity of a new username"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Rename with invalid username (usermod -l 2bar foo)..."
+usermod -l 2:bar foo 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "usermod 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/usermod/22_usermod_usage_rename_invalid_username/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/23_usermod-e_date/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/23_usermod-e_date/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/23_usermod-e_date/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/23_usermod-e_date/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/23_usermod-e_date/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/23_usermod-e_date/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/23_usermod-e_date/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/23_usermod-e_date/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/23_usermod-e_date/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/23_usermod-e_date/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/23_usermod-e_date/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/23_usermod-e_date/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/23_usermod-e_date/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/23_usermod-e_date/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/23_usermod-e_date/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:blahblah:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/usermod/23_usermod-e_date/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/23_usermod-e_date/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/23_usermod-e_date/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,2 @@
+user foo exists, UID 1000
+user foo2 exists, UID 1001

Added: debian/trunk/tests/usertools/usermod/23_usermod-e_date/data/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/23_usermod-e_date/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/23_usermod-e_date/data/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:blahblah:12977:0:99999:7::15320:

Added: debian/trunk/tests/usertools/usermod/23_usermod-e_date/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/23_usermod-e_date/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/23_usermod-e_date/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod can set the expiry date"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Change the user's expiry date (usermod -e 2011-12-12 foo)..."
+usermod -e 2011-12-12 foo
+echo "OK"
+
+echo -n "Check the passwd file..."
+../../../common/compare_file.pl config/etc/passwd /etc/passwd
+echo "OK"
+echo -n "Check the group file..."
+../../../common/compare_file.pl config/etc/group /etc/group
+echo "OK"
+echo -n "Check the shadow file..."
+../../../common/compare_file.pl data/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/usermod/23_usermod-e_date/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/24_usermod-e_date/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/24_usermod-e_date/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/24_usermod-e_date/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/24_usermod-e_date/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/24_usermod-e_date/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/24_usermod-e_date/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/24_usermod-e_date/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/24_usermod-e_date/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/24_usermod-e_date/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/24_usermod-e_date/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/24_usermod-e_date/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/24_usermod-e_date/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/24_usermod-e_date/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/24_usermod-e_date/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/24_usermod-e_date/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:blahblah:12977:0:99999:7::42:

Added: debian/trunk/tests/usertools/usermod/24_usermod-e_date/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/24_usermod-e_date/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/24_usermod-e_date/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,2 @@
+user foo exists, UID 1000
+user foo2 exists, UID 1001

Added: debian/trunk/tests/usertools/usermod/24_usermod-e_date/data/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/24_usermod-e_date/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/24_usermod-e_date/data/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:blahblah:12977:0:99999:7::42424:

Added: debian/trunk/tests/usertools/usermod/24_usermod-e_date/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/24_usermod-e_date/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/24_usermod-e_date/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod can set the expiry date (number of days)"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Change the user's expiry date (usermod -e 42424 foo)..."
+usermod -e 42424 foo
+echo "OK"
+
+echo -n "Check the passwd file..."
+../../../common/compare_file.pl config/etc/passwd /etc/passwd
+echo "OK"
+echo -n "Check the group file..."
+../../../common/compare_file.pl config/etc/group /etc/group
+echo "OK"
+echo -n "Check the shadow file..."
+../../../common/compare_file.pl data/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/usermod/24_usermod-e_date/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/25_usermod-e_empty_arg/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:blahblah:12977:0:99999:7::2:

Added: debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,2 @@
+user foo exists, UID 1000
+user foo2 exists, UID 1001

Added: debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/data/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/data/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:blahblah:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod can disable the expiry date"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Disable the user's expiry date (usermod -e '' foo)..."
+usermod -e '' foo
+echo "OK"
+
+echo -n "Check the passwd file..."
+../../../common/compare_file.pl config/etc/passwd /etc/passwd
+echo "OK"
+echo -n "Check the group file..."
+../../../common/compare_file.pl config/etc/group /etc/group
+echo "OK"
+echo -n "Check the shadow file..."
+../../../common/compare_file.pl data/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/usermod/25_usermod-e_empty_arg/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/26_usermod-e-1/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/26_usermod-e-1/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/26_usermod-e-1/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/26_usermod-e-1/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/26_usermod-e-1/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/26_usermod-e-1/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/26_usermod-e-1/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/26_usermod-e-1/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/26_usermod-e-1/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/26_usermod-e-1/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/26_usermod-e-1/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/26_usermod-e-1/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/26_usermod-e-1/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/26_usermod-e-1/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/26_usermod-e-1/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:blahblah:12977:0:99999:7::2:

Added: debian/trunk/tests/usertools/usermod/26_usermod-e-1/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/26_usermod-e-1/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/26_usermod-e-1/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,2 @@
+user foo exists, UID 1000
+user foo2 exists, UID 1001

Added: debian/trunk/tests/usertools/usermod/26_usermod-e-1/data/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/26_usermod-e-1/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/26_usermod-e-1/data/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:blahblah:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/usermod/26_usermod-e-1/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/26_usermod-e-1/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/26_usermod-e-1/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod can disable the expiry date"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Disable the user's expiry date (usermod -e -1 foo)..."
+usermod -e -1 foo
+echo "OK"
+
+echo -n "Check the passwd file..."
+../../../common/compare_file.pl config/etc/passwd /etc/passwd
+echo "OK"
+echo -n "Check the group file..."
+../../../common/compare_file.pl config/etc/group /etc/group
+echo "OK"
+echo -n "Check the shadow file..."
+../../../common/compare_file.pl data/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/usermod/26_usermod-e-1/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/27_usermod-e_invalid1/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:blahblah:12977:0:99999:7::2:

Added: debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,2 @@
+user foo exists, UID 1000
+user foo2 exists, UID 1001

Added: debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/data/usermod.err
===================================================================
--- debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/data/usermod.err	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/data/usermod.err	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+usermod: invalid date '-2'

Added: debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/27_usermod-e_invalid1/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod checks the validity of the expiry argument"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Disable the user's expiry date (usermod -e -2 foo)..."
+usermod -e -2 foo 2>tmp/usermod.err && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "usermod reported:"
+echo "======================================================================="
+cat tmp/usermod.err
+echo "======================================================================="
+echo -n "Check the usage message..."
+diff -au data/usermod.err tmp/usermod.err
+echo "usage message OK."
+rm -f tmp/usermod.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/usermod/27_usermod-e_invalid1/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/28_usermod-e_invalid2/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:blahblah:12977:0:99999:7::2:

Added: debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,2 @@
+user foo exists, UID 1000
+user foo2 exists, UID 1001

Added: debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/data/usermod.err
===================================================================
--- debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/data/usermod.err	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/data/usermod.err	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+usermod: invalid date 'bar'

Added: debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/28_usermod-e_invalid2/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod checks the validity of the expiry argument"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Disable the user's expiry date (usermod -e bar foo)..."
+usermod -e bar foo 2>tmp/usermod.err && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "3"
+echo "OK"
+
+echo "usermod reported:"
+echo "======================================================================="
+cat tmp/usermod.err
+echo "======================================================================="
+echo -n "Check the usage message..."
+diff -au data/usermod.err tmp/usermod.err
+echo "usage message OK."
+rm -f tmp/usermod.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/usermod/28_usermod-e_invalid2/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/29_usermod_no_changes/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/29_usermod_no_changes/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/29_usermod_no_changes/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/29_usermod_no_changes/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/29_usermod_no_changes/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/29_usermod_no_changes/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/29_usermod_no_changes/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/29_usermod_no_changes/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/29_usermod_no_changes/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/29_usermod_no_changes/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/29_usermod_no_changes/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/29_usermod_no_changes/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:GeCoS:/nonexistent:/bin/sh

Added: debian/trunk/tests/usertools/usermod/29_usermod_no_changes/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/29_usermod_no_changes/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/29_usermod_no_changes/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:oldpass:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/usermod/29_usermod_no_changes/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/29_usermod_no_changes/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/29_usermod_no_changes/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/29_usermod_no_changes/data/usermod.err
===================================================================
--- debian/trunk/tests/usertools/usermod/29_usermod_no_changes/data/usermod.err	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/29_usermod_no_changes/data/usermod.err	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+usermod: no changes

Added: debian/trunk/tests/usertools/usermod/29_usermod_no_changes/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/29_usermod_no_changes/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/29_usermod_no_changes/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod detects when no real changes are requested"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Perform non changes (usermod -l foo -c GeCoS -e -1 -f -1 -u 1000 -d /nonexistent -s /bin/sh foo)..."
+usermod -l foo -c GeCoS -e -1 -f -1 -u 1000 -d /nonexistent -s /bin/sh foo 2>tmp/usermod.err
+echo "OK"
+
+echo "usermod reported:"
+echo "======================================================================="
+cat tmp/usermod.err
+echo "======================================================================="
+echo -n "Check the usage message..."
+diff -au data/usermod.err tmp/usermod.err
+echo "usage message OK."
+rm -f tmp/usermod.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/usermod/29_usermod_no_changes/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/30_usermod_usage-a_without-G/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/30_usermod_usage-a_without-G/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/30_usermod_usage-a_without-G/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/30_usermod_usage-a_without-G/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/30_usermod_usage-a_without-G/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/30_usermod_usage-a_without-G/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/data/usage.out	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,26 @@
+usermod: -a flag is only allowed with the -G flag
+Usage: usermod [options] LOGIN
+
+Options:
+  -c, --comment COMMENT         new value of the GECOS field
+  -d, --home HOME_DIR           new home directory for the user account
+  -e, --expiredate EXPIRE_DATE  set account expiration date to EXPIRE_DATE
+  -f, --inactive INACTIVE       set password inactive after expiration
+                                to INACTIVE
+  -g, --gid GROUP               force use GROUP as new primary group
+  -G, --groups GROUPS           new list of supplementary GROUPS
+  -a, --append                  append the user to the supplemental GROUPS
+                                mentioned by the -G option without removing
+                                him/her from other groups
+  -h, --help                    display this help message and exit
+  -l, --login NEW_LOGIN         new value of the login name
+  -L, --lock                    lock the user account
+  -m, --move-home               move contents of the home directory to the
+                                new location (use only with -d)
+  -o, --non-unique              allow using duplicate (non-unique) UID
+  -p, --password PASSWORD       use encrypted password for the new password
+  -s, --shell SHELL             new login shell for the user account
+  -u, --uid UID                 new UID for the user account
+  -U, --unlock                  unlock the user account
+  -Z, --selinux-user            new SELinux user mapping for the user account
+

Added: debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/30_usermod_usage-a_without-G/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod rejects -a without -G"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Append groups without groups (usermod -a foo)..."
+usermod -a foo 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "usermod 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/usermod/30_usermod_usage-a_without-G/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/31_usermod_usage-o_without-u/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/31_usermod_usage-o_without-u/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/31_usermod_usage-o_without-u/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/31_usermod_usage-o_without-u/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/31_usermod_usage-o_without-u/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/31_usermod_usage-o_without-u/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/data/usage.out	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,26 @@
+usermod: -o flag is only allowed with the -u flag
+Usage: usermod [options] LOGIN
+
+Options:
+  -c, --comment COMMENT         new value of the GECOS field
+  -d, --home HOME_DIR           new home directory for the user account
+  -e, --expiredate EXPIRE_DATE  set account expiration date to EXPIRE_DATE
+  -f, --inactive INACTIVE       set password inactive after expiration
+                                to INACTIVE
+  -g, --gid GROUP               force use GROUP as new primary group
+  -G, --groups GROUPS           new list of supplementary GROUPS
+  -a, --append                  append the user to the supplemental GROUPS
+                                mentioned by the -G option without removing
+                                him/her from other groups
+  -h, --help                    display this help message and exit
+  -l, --login NEW_LOGIN         new value of the login name
+  -L, --lock                    lock the user account
+  -m, --move-home               move contents of the home directory to the
+                                new location (use only with -d)
+  -o, --non-unique              allow using duplicate (non-unique) UID
+  -p, --password PASSWORD       use encrypted password for the new password
+  -s, --shell SHELL             new login shell for the user account
+  -u, --uid UID                 new UID for the user account
+  -U, --unlock                  unlock the user account
+  -Z, --selinux-user            new SELinux user mapping for the user account
+

Added: debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/31_usermod_usage-o_without-u/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,55 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod rejects -o without -u"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Append groups without groups (usermod -o foo)..."
+usermod -o foo 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "usermod 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/usermod/31_usermod_usage-o_without-u/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/32_usermod_usage-m_without-d/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/32_usermod_usage-m_without-d/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/32_usermod_usage-m_without-d/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/32_usermod_usage-m_without-d/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/32_usermod_usage-m_without-d/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/32_usermod_usage-m_without-d/data/usage.out
===================================================================
--- debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/data/usage.out	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/data/usage.out	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,26 @@
+usermod: -m flag is only allowed with the -d flag
+Usage: usermod [options] LOGIN
+
+Options:
+  -c, --comment COMMENT         new value of the GECOS field
+  -d, --home HOME_DIR           new home directory for the user account
+  -e, --expiredate EXPIRE_DATE  set account expiration date to EXPIRE_DATE
+  -f, --inactive INACTIVE       set password inactive after expiration
+                                to INACTIVE
+  -g, --gid GROUP               force use GROUP as new primary group
+  -G, --groups GROUPS           new list of supplementary GROUPS
+  -a, --append                  append the user to the supplemental GROUPS
+                                mentioned by the -G option without removing
+                                him/her from other groups
+  -h, --help                    display this help message and exit
+  -l, --login NEW_LOGIN         new value of the login name
+  -L, --lock                    lock the user account
+  -m, --move-home               move contents of the home directory to the
+                                new location (use only with -d)
+  -o, --non-unique              allow using duplicate (non-unique) UID
+  -p, --password PASSWORD       use encrypted password for the new password
+  -s, --shell SHELL             new login shell for the user account
+  -u, --uid UID                 new UID for the user account
+  -U, --unlock                  unlock the user account
+  -Z, --selinux-user            new SELinux user mapping for the user account
+

Added: debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/32_usermod_usage-m_without-d/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod rejects -m without -d"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Move home without new home (usermod -m foo)..."
+usermod -m foo 2>tmp/usage.out && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "2"
+echo "OK"
+
+echo "usermod 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/usermod/32_usermod_usage-m_without-d/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/33_usermod_change_shell/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:blahblah:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/33_usermod_change_shell/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,2 @@
+user foo exists, UID 1000
+user foo2 exists, UID 1001

Added: debian/trunk/tests/usertools/usermod/33_usermod_change_shell/data/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/33_usermod_change_shell/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/33_usermod_change_shell/data/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/bash

Added: debian/trunk/tests/usertools/usermod/33_usermod_change_shell/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/33_usermod_change_shell/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/33_usermod_change_shell/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod can change the shell"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Change the user's shell (usermod -s /bin/bash foo)..."
+usermod -s /bin/bash 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 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/usermod/33_usermod_change_shell/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/34_usermod-e_date_no_shadow_entry/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:oldpass:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/34_usermod-e_date_no_shadow_entry/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,2 @@
+user foo exists, UID 1000
+user foo2 exists, UID 1001

Added: debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/data/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/data/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:oldpass:@TODAY@:0:99999:7::15320:

Added: debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod create a shadow entry to set the expiry date"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Change the user's expiry date (usermod -e 2011-12-12 foo)..."
+usermod -e 2011-12-12 foo
+echo "OK"
+
+echo -n "Check the passwd file..."
+../../../common/compare_file.pl config/etc/passwd /etc/passwd
+echo "OK"
+echo -n "Check the group file..."
+../../../common/compare_file.pl config/etc/group /etc/group
+echo "OK"
+echo -n "Check the shadow file..."
+../../../common/compare_file.pl data/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/usermod/34_usermod-e_date_no_shadow_entry/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/35_usermod-f_no_shadow_entry/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:oldpass:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/35_usermod-f_no_shadow_entry/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,2 @@
+user foo exists, UID 1000
+user foo2 exists, UID 1001

Added: debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/data/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/data/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:oldpass:@TODAY@:0:99999:7:42::

Added: debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod create a shadow entry to set the number of inactive days"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Change the user's number of inactive days (usermod -f 42 foo)..."
+usermod -f 42 foo
+echo "OK"
+
+echo -n "Check the passwd file..."
+../../../common/compare_file.pl config/etc/passwd /etc/passwd
+echo "OK"
+echo -n "Check the group file..."
+../../../common/compare_file.pl config/etc/group /etc/group
+echo "OK"
+echo -n "Check the shadow file..."
+../../../common/compare_file.pl data/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/usermod/35_usermod-f_no_shadow_entry/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/36_usermod_move_homedir_existing_dir/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:
+adm:x:4:
+tty:x:5:
+disk:x:6:
+lp:x:7:
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/36_usermod_move_homedir_existing_dir/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/36_usermod_move_homedir_existing_dir/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+user foo exists

Added: debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/data/home_ls-a
===================================================================
--- debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/data/home_ls-a	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/data/home_ls-a	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,3 @@
+-rw-r--r-- foo:foo `/home/foo/toto'
+drwxr-xr-x foo:foo `/home/foo/.'
+drwxr-xr-x root:root `/home/foo/..'

Added: debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/data/home_ls-a2
===================================================================
--- debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/data/home_ls-a2	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/data/home_ls-a2	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,2 @@
+drwxr-xr-x root:root `/home/foo2/.'
+drwxr-xr-x root:root `/home/foo2/..'

Added: debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/data/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/data/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo2:/bin/false

Added: debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/data/usermod.err
===================================================================
--- debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/data/usermod.err	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/data/usermod.err	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+usermod: directory /home/foo2 exists

Added: debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/36_usermod_move_homedir_existing_dir/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,84 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod can move the user's home directory"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config; rm -rf /home/foo /home/foo2' 0
+
+change_config
+
+mkdir /home/foo
+echo toto > /home/foo/toto
+chown -R foo:foo /home/foo
+
+echo -n "Create /home/foo2"...
+mkdir /home/foo2
+echo "OK"
+
+echo -n "Change the user's home directory (usermod -m -d /home/foo2 foo)..."
+usermod -m -d /home/foo2 foo 2>tmp/usermod.err && exit 1 || {
+	status=$?
+}
+echo "OK"
+
+echo -n "Check returned status ($status)..."
+test "$status" = "12"
+echo "OK"
+
+echo "usermod reported:"
+echo "======================================================================="
+cat tmp/usermod.err
+echo "======================================================================="
+echo -n "Check the usage message..."
+diff -au data/usermod.err tmp/usermod.err
+echo "usage message OK."
+rm -f tmp/usermod.err
+
+echo "OK"
+
+echo -n "Check the passwd file..."
+../../../common/compare_file.pl data/passwd /etc/passwd
+echo "OK"
+echo -n "Check the group file..."
+../../../common/compare_file.pl config/etc/group /etc/group
+echo "OK"
+echo -n "Check the shadow file..."
+../../../common/compare_file.pl config/etc/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+echo -n "Check the user's home directory was not removed..."
+test -d /home/foo
+echo "OK"
+echo -n "Check the user's home directory was not moved..."
+test -d /home/foo2
+echo "OK"
+echo -n "Check content of /home/foo/..."
+stat --printf "%A %U:%G %N\n" /home/foo/* /home/foo/.* 2>/dev/null | sort > tmp/home_ls-a
+diff -rauN data/home_ls-a tmp/home_ls-a
+echo "OK"
+rm -f tmp/home_ls-a
+echo -n "Check content of /home/foo2/..."
+stat --printf "%A %U:%G %N\n" /home/foo2/* /home/foo2/.* 2>/dev/null | sort > tmp/home_ls-a2
+diff -rauN data/home_ls-a2 tmp/home_ls-a2
+echo "OK"
+rm -f tmp/home_ls-a2
+
+echo -n "Remove the home directories..."
+rm -rf /home/foo /home/foo2
+echo "done"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


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

Added: debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/37_usermod_move_nonexistent_homedir/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:
+adm:x:4:
+tty:x:5:
+disk:x:6:
+lp:x:7:
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/37_usermod_move_nonexistent_homedir/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/37_usermod_move_nonexistent_homedir/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+user foo exists

Added: debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/data/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/data/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo2:/bin/false

Added: debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/37_usermod_move_nonexistent_homedir/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod can move the user's home directory"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config; rm -rf /home/foo /home/foo2' 0
+
+change_config
+
+# Do not create the user's /home/foo home directory
+
+echo -n "Change the user's home directory (usermod -m -d /home/foo2 foo)..."
+usermod -m -d /home/foo2 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 config/etc/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+echo -n "Check the old user's home directory was not created..."
+test ! -d /home/foo
+echo "OK"
+echo -n "Check the new user's home directory was not created..."
+test ! -d /home/foo2
+echo "OK"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


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

Added: debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/38_usermod-u_lastlog_not_created/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/38_usermod-u_lastlog_not_created/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+user foo exists, UID 1000

Added: debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/data/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/data/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:4242:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod does not create /var/log/lastlog"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config; touch /var/log/lastlog' 0
+
+change_config
+
+echo -n "Remove /var/log/lastlog (it will not be restored)..."
+rm -f /var/log/lastlog
+echo "OK"
+
+echo -n "Change the user's UID (usermod -u 4242 foo)..."
+usermod -u 4242 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 config/etc/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+echo -n "Check that the /var/log/lastlog file was not created"...
+test ! -f /var/log/lastlog
+echo "OK"
+
+touch /var/log/lastlog
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/usermod/38_usermod-u_lastlog_not_created/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/39_usermod-u_copy_lastlog_entry/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/sh

Added: debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/39_usermod-u_copy_lastlog_entry/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+user foo exists, UID 1000

Added: debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/data/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/data/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:4242:1000::/home/foo:/bin/sh

Added: debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/login.exp
===================================================================
--- debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/login.exp	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/login.exp	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,13 @@
+#!/usr/bin/expect
+
+set timeout 2
+expect_after default {puts "\nFAIL"; exit 1}
+
+spawn /bin/bash
+expect "# "
+
+send "login -f foo\r"
+expect "$ "
+
+send "exit\r"
+exit 0


Property changes on: debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/login.exp
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,66 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod does not create /var/log/lastlog"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create an empty /var/log/lastlog (it will not be restored)..."
+touch /var/log/lastlog
+echo "OK"
+
+echo -n "Trigger a connection as foo..."
+./login.exp
+echo "OK"
+
+lastlog > tmp/lastlog.out
+
+echo "lastlog :"
+echo "======================================================================="
+cat tmp/lastlog.out
+echo "======================================================================="
+
+echo -n "Change the user's UID (usermod -u 4242 foo)..."
+usermod -u 4242 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 config/etc/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+
+lastlog > tmp/lastlog.out2
+
+echo "lastlog:"
+echo "======================================================================="
+cat tmp/lastlog.out2
+echo "======================================================================="
+
+echo -n "Check the lastlog message..."
+diff -au tmp/lastlog.out tmp/lastlog.out2
+echo "lastlog message OK."
+rm -f tmp/lastlog.out tmp/lastlog.out2
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/usermod/39_usermod-u_copy_lastlog_entry/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,43 @@
+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:
+foo:x:1000:
+bar:x:10000:

Added: debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+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::
+bar:*::

Added: debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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::/home/foo:/bin/sh
+bar:x:10000:10000::/home/bar:/bin/sh

Added: debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:::
+bar:!:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+user foo exists, UID 1000

Added: debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/data/group
===================================================================
--- debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/data/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+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:
+bar:x:10000:

Added: debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/data/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/data/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+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::
+bar:*::

Added: debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/data/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/data/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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
+bar:x:1000:10000::/home/bar:/bin/sh

Added: debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/data/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/data/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:::
+bar:!:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/login.exp
===================================================================
--- debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/login.exp	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/login.exp	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,13 @@
+#!/usr/bin/expect
+
+set timeout 2
+expect_after default {puts "\nFAIL"; exit 1}
+
+spawn /bin/bash
+expect "# "
+
+send "login -f foo\r"
+expect "$ "
+
+send "exit\r"
+exit 0


Property changes on: debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/login.exp
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,74 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod does not create /var/log/lastlog"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create an empty /var/log/lastlog (it will not be restored)..."
+touch /var/log/lastlog
+echo "OK"
+
+echo -n "Trigger a connection as foo..."
+./login.exp
+echo "OK"
+
+lastlog > tmp/lastlog.out
+
+echo "lastlog :"
+echo "======================================================================="
+cat tmp/lastlog.out
+echo "======================================================================="
+
+echo -n "Manually delete the user foo (to keep the lastlog entry)..."
+sed -e '/^foo:/d' -i /etc/passwd
+sed -e '/^foo:/d' -i /etc/shadow
+sed -e '/^foo:/d' -i /etc/group
+sed -e '/^foo:/d' -i /etc/gshadow
+echo "OK"
+
+echo -n "Change the user's UID to reuse foo's (usermod -u 1000 bar)..."
+usermod -u 1000 bar
+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"
+
+lastlog > tmp/lastlog.out2
+
+echo "lastlog:"
+echo "======================================================================="
+cat tmp/lastlog.out2
+echo "======================================================================="
+
+echo -n "Check the lastlog message..."
+sed -e '/^foo /d' -i tmp/lastlog.out
+diff -au tmp/lastlog.out tmp/lastlog.out2
+echo "lastlog message OK."
+rm -f tmp/lastlog.out tmp/lastlog.out2
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/usermod/40_usermod-u_reset_new_lastlog_entry/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/41_usermod-u_faillog_not_created/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/41_usermod-u_faillog_not_created/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+user foo exists, UID 1000

Added: debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/data/group
===================================================================
--- debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/data/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/data/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/data/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/data/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/data/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:4242:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/data/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/data/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/41_usermod-u_faillog_not_created/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod does not create /var/log/faillog"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config; touch /var/log/faillog' 0
+
+change_config
+
+echo -n "Remove /var/log/faillog (it will not be restored)..."
+rm -f /var/log/faillog
+echo "OK"
+
+echo -n "Change the user's UID (usermod -u 4242 foo)..."
+usermod -u 4242 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 config/etc/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+echo -n "Check that the /var/log/faillog file was not created"...
+test ! -f /var/log/faillog
+echo "OK"
+
+touch /var/log/faillog
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/usermod/41_usermod-u_faillog_not_created/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/42_usermod-u_copy_faillog_entry/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/pam.d/login
===================================================================
--- debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/pam.d/login	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/pam.d/login	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,111 @@
+#
+# The PAM configuration file for the Shadow `login' service
+#
+
+# Enforce a minimal delay in case of failure (in microseconds).
+# (Replaces the `FAIL_DELAY' setting from login.defs)
+# Note that other modules may require another minimal delay. (for example,
+# to disable any delay, you should add the nodelay option to pam_unix)
+auth       optional   pam_faildelay.so  delay=3000000
+
+# Outputs an issue file prior to each login prompt (Replaces the
+# ISSUE_FILE option from login.defs). Uncomment for use
+# auth       required   pam_issue.so issue=/etc/issue
+
+# Disallows root logins except on tty's listed in /etc/securetty
+# (Replaces the `CONSOLE' setting from login.defs)
+#
+# With the default control of this module:
+#   [success=ok new_authtok_reqd=ok ignore=ignore user_unknown=bad default=die]
+# root will not be prompted for a password on insecure lines.
+# if an invalid username is entered, a password is prompted (but login
+# will eventually be rejected)
+#
+# You can change it to a "requisite" module if you think root may mis-type
+# her login and should not be prompted for a password in that case. But
+# this will leave the system as vulnerable to user enumeration attacks.
+#
+# You can change it to a "required" module if you think it permits to
+# guess valid user names of your system (invalid user names are considered
+# as possibly being root on insecure lines), but root passwords may be
+# communicated over insecure lines.
+auth [success=ok new_authtok_reqd=ok ignore=ignore user_unknown=bad default=die] pam_securetty.so
+
+# Disallows other than root logins when /etc/nologin exists
+# (Replaces the `NOLOGINS_FILE' option from login.defs)
+auth       requisite  pam_nologin.so
+
+# Added to support faillog
+auth     required       pam_tally.so per_user
+
+
+# SELinux needs to be the first session rule. This ensures that any 
+# lingering context has been cleared. Without out this it is possible 
+# that a module could execute code in the wrong domain.
+# When the module is present, "required" would be sufficient (When SELinux
+# is disabled, this returns success.)
+session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so close
+
+# This module parses environment configuration file(s)
+# and also allows you to use an extended config
+# file /etc/security/pam_env.conf.
+# 
+# parsing /etc/environment needs "readenv=1"
+session       required   pam_env.so readenv=1
+# locale variables are also kept into /etc/default/locale in etch
+# reading this file *in addition to /etc/environment* does not hurt
+session       required   pam_env.so readenv=1 envfile=/etc/default/locale
+
+# Standard Un*x authentication.
+ at include common-auth
+
+# This allows certain extra groups to be granted to a user
+# based on things like time of day, tty, service, and user.
+# Please edit /etc/security/group.conf to fit your needs
+# (Replaces the `CONSOLE_GROUPS' option in login.defs)
+auth       optional   pam_group.so
+
+# Uncomment and edit /etc/security/time.conf if you need to set
+# time restrainst on logins.
+# (Replaces the `PORTTIME_CHECKS_ENAB' option from login.defs
+# as well as /etc/porttime)
+# account    requisite  pam_time.so
+
+# Uncomment and edit /etc/security/access.conf if you need to
+# set access limits.
+# (Replaces /etc/login.access file)
+# account  required       pam_access.so
+
+# Sets up user limits according to /etc/security/limits.conf
+# (Replaces the use of /etc/limits in old login)
+session    required   pam_limits.so
+
+# Prints the last login info upon succesful login
+# (Replaces the `LASTLOG_ENAB' option from login.defs)
+session    optional   pam_lastlog.so
+
+# Prints the motd upon succesful login
+# (Replaces the `MOTD_FILE' option in login.defs)
+session    optional   pam_motd.so
+
+# Prints the status of the user's mailbox upon succesful login
+# (Replaces the `MAIL_CHECK_ENAB' option from login.defs). 
+#
+# This also defines the MAIL environment variable
+# However, userdel also needs MAIL_DIR and MAIL_FILE variables
+# in /etc/login.defs to make sure that removing a user 
+# also removes the user's mail spool file.
+# See comments in /etc/login.defs
+session    optional   pam_mail.so standard
+
+# Standard Un*x account and session
+ at include common-account
+ at include common-session
+ at include common-password
+
+# SELinux needs to intervene at login time to ensure that the process
+# starts in the proper default security context. Only sessions which are
+# intended to run in the user's context should be run after this.
+session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so open
+# When the module is present, "required" would be sufficient (When SELinux
+# is disabled, this returns success.)

Added: debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/sh

Added: debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+user foo exists, UID 1000

Added: debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/data/group
===================================================================
--- debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/data/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:root
+adm:x:4:root,foo
+tty:x:5:
+disk:x:6:
+lp:x:7:foo,root
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:foo
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:foo
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/data/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/data/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:*::
+daemon:*::
+bin:*::
+sys:*::root
+adm:*::root,foo
+tty:*::foo
+disk:*:foo:
+lp:*::foo,root
+mail:*::
+news:*::
+uucp:*::
+man:*::
+proxy:*::
+kmem:*::
+dialout:*::
+fax:*:foo:foo
+voice:*::
+cdrom:*:foo:foo
+floppy:*::foo
+tape:*::
+sudo:*::
+audio:*::
+dip:*::
+www-data:*::
+backup:*::
+operator:*::
+list:*::
+irc:*::
+src:*::
+gnats:*::
+shadow:*::
+utmp:*::
+video:*::
+sasl:*::
+plugdev:*::
+staff:*::
+games:*::
+users:*::
+nogroup:*::
+crontab:x::
+Debian-exim:x::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/data/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/data/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:4242:1000::/home/foo:/bin/sh

Added: debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/data/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/data/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/42_usermod-u_copy_faillog_entry/login.exp
===================================================================
--- debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/login.exp	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/login.exp	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,17 @@
+#!/usr/bin/expect
+
+set timeout 5
+expect_after default {puts "\nFAIL"; exit 1}
+
+spawn /bin/bash
+expect "# "
+
+send "login foo\r"
+expect "Password: "
+sleep 0.1
+send "badpass\r"
+send_user "\n# password 'badpass' sent\n\n"
+expect "login: "
+
+send "exit\r"
+exit 0


Property changes on: debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/login.exp
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,66 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod does not create /var/log/faillog"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create an empty /var/log/faillog (it will not be restored)..."
+> /var/log/faillog
+echo "OK"
+
+echo -n "Trigger a connection as foo..."
+./login.exp
+echo "OK"
+
+faillog > tmp/faillog.out
+
+echo "faillog :"
+echo "======================================================================="
+cat tmp/faillog.out
+echo "======================================================================="
+
+echo -n "Change the user's UID (usermod -u 4242 foo)..."
+usermod -u 4242 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 config/etc/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+
+faillog > tmp/faillog.out2
+
+echo "faillog:"
+echo "======================================================================="
+cat tmp/faillog.out2
+echo "======================================================================="
+
+echo -n "Check the faillog message..."
+diff -au tmp/faillog.out tmp/faillog.out2
+echo "faillog message OK."
+rm -f tmp/faillog.out tmp/faillog.out2
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/usermod/42_usermod-u_copy_faillog_entry/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,43 @@
+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:
+foo:x:1000:
+bar:x:10000:

Added: debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+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::
+bar:*::

Added: debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/pam.d/login
===================================================================
--- debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/pam.d/login	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/pam.d/login	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,111 @@
+#
+# The PAM configuration file for the Shadow `login' service
+#
+
+# Enforce a minimal delay in case of failure (in microseconds).
+# (Replaces the `FAIL_DELAY' setting from login.defs)
+# Note that other modules may require another minimal delay. (for example,
+# to disable any delay, you should add the nodelay option to pam_unix)
+auth       optional   pam_faildelay.so  delay=3000000
+
+# Outputs an issue file prior to each login prompt (Replaces the
+# ISSUE_FILE option from login.defs). Uncomment for use
+# auth       required   pam_issue.so issue=/etc/issue
+
+# Disallows root logins except on tty's listed in /etc/securetty
+# (Replaces the `CONSOLE' setting from login.defs)
+#
+# With the default control of this module:
+#   [success=ok new_authtok_reqd=ok ignore=ignore user_unknown=bad default=die]
+# root will not be prompted for a password on insecure lines.
+# if an invalid username is entered, a password is prompted (but login
+# will eventually be rejected)
+#
+# You can change it to a "requisite" module if you think root may mis-type
+# her login and should not be prompted for a password in that case. But
+# this will leave the system as vulnerable to user enumeration attacks.
+#
+# You can change it to a "required" module if you think it permits to
+# guess valid user names of your system (invalid user names are considered
+# as possibly being root on insecure lines), but root passwords may be
+# communicated over insecure lines.
+auth [success=ok new_authtok_reqd=ok ignore=ignore user_unknown=bad default=die] pam_securetty.so
+
+# Disallows other than root logins when /etc/nologin exists
+# (Replaces the `NOLOGINS_FILE' option from login.defs)
+auth       requisite  pam_nologin.so
+
+# Added to support faillog
+auth     required       pam_tally.so per_user
+
+
+# SELinux needs to be the first session rule. This ensures that any 
+# lingering context has been cleared. Without out this it is possible 
+# that a module could execute code in the wrong domain.
+# When the module is present, "required" would be sufficient (When SELinux
+# is disabled, this returns success.)
+session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so close
+
+# This module parses environment configuration file(s)
+# and also allows you to use an extended config
+# file /etc/security/pam_env.conf.
+# 
+# parsing /etc/environment needs "readenv=1"
+session       required   pam_env.so readenv=1
+# locale variables are also kept into /etc/default/locale in etch
+# reading this file *in addition to /etc/environment* does not hurt
+session       required   pam_env.so readenv=1 envfile=/etc/default/locale
+
+# Standard Un*x authentication.
+ at include common-auth
+
+# This allows certain extra groups to be granted to a user
+# based on things like time of day, tty, service, and user.
+# Please edit /etc/security/group.conf to fit your needs
+# (Replaces the `CONSOLE_GROUPS' option in login.defs)
+auth       optional   pam_group.so
+
+# Uncomment and edit /etc/security/time.conf if you need to set
+# time restrainst on logins.
+# (Replaces the `PORTTIME_CHECKS_ENAB' option from login.defs
+# as well as /etc/porttime)
+# account    requisite  pam_time.so
+
+# Uncomment and edit /etc/security/access.conf if you need to
+# set access limits.
+# (Replaces /etc/login.access file)
+# account  required       pam_access.so
+
+# Sets up user limits according to /etc/security/limits.conf
+# (Replaces the use of /etc/limits in old login)
+session    required   pam_limits.so
+
+# Prints the last login info upon succesful login
+# (Replaces the `LASTLOG_ENAB' option from login.defs)
+session    optional   pam_lastlog.so
+
+# Prints the motd upon succesful login
+# (Replaces the `MOTD_FILE' option in login.defs)
+session    optional   pam_motd.so
+
+# Prints the status of the user's mailbox upon succesful login
+# (Replaces the `MAIL_CHECK_ENAB' option from login.defs). 
+#
+# This also defines the MAIL environment variable
+# However, userdel also needs MAIL_DIR and MAIL_FILE variables
+# in /etc/login.defs to make sure that removing a user 
+# also removes the user's mail spool file.
+# See comments in /etc/login.defs
+session    optional   pam_mail.so standard
+
+# Standard Un*x account and session
+ at include common-account
+ at include common-session
+ at include common-password
+
+# SELinux needs to intervene at login time to ensure that the process
+# starts in the proper default security context. Only sessions which are
+# intended to run in the user's context should be run after this.
+session [success=ok ignore=ignore module_unknown=ignore default=bad] pam_selinux.so open
+# When the module is present, "required" would be sufficient (When SELinux
+# is disabled, this returns success.)

Added: debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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::/home/foo:/bin/sh
+bar:x:10000:10000::/home/bar:/bin/sh

Added: debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:::
+bar:!:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+user foo exists, UID 1000

Added: debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/data/group
===================================================================
--- debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/data/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/data/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+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:
+bar:x:10000:

Added: debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/data/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/data/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/data/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+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::
+bar:*::

Added: debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/data/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/data/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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
+bar:x:1000:10000::/home/bar:/bin/sh

Added: debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/data/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/data/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:::
+bar:!:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/login.exp
===================================================================
--- debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/login.exp	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/login.exp	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,17 @@
+#!/usr/bin/expect
+
+set timeout 5
+expect_after default {puts "\nFAIL"; exit 1}
+
+spawn /bin/bash
+expect "# "
+
+send "login foo\r"
+expect "Password: "
+sleep 0.1
+send "badpass\r"
+send_user "\n# password 'badpass' sent\n\n"
+expect "login: "
+
+send "exit\r"
+exit 0


Property changes on: debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/login.exp
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,73 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod does not create /var/log/faillog"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config' 0
+
+change_config
+
+echo -n "Create an empty /var/log/faillog (it will not be restored)..."
+touch /var/log/faillog
+echo "OK"
+
+echo -n "Trigger a connection as foo..."
+./login.exp
+echo "OK"
+
+faillog > tmp/faillog.out
+
+echo "faillog :"
+echo "======================================================================="
+cat tmp/faillog.out
+echo "======================================================================="
+
+echo -n "Manually delete the user foo (to keep the faillog entry)..."
+sed -e '/^foo:/d' -i /etc/passwd
+sed -e '/^foo:/d' -i /etc/shadow
+sed -e '/^foo:/d' -i /etc/group
+sed -e '/^foo:/d' -i /etc/gshadow
+echo "OK"
+
+echo -n "Change the user's UID to reuse foo's (usermod -u 1000 bar)..."
+usermod -u 1000 bar
+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"
+
+faillog > tmp/faillog.out2
+
+echo "faillog:"
+echo "======================================================================="
+cat tmp/faillog.out2
+echo "======================================================================="
+
+echo -n "Check the faillog message..."
+c=$(cat tmp/faillog.out2 | wc -c)
+test $c = "0"
+echo "empty faillog OK."
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/usermod/43_usermod-u_reset_new_faillog_entry/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/44_usermod-l_move_mailbox/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+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:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+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::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/44_usermod-l_move_mailbox/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+user foo exists, UID 1000

Added: debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/data/mailbox.perms
===================================================================
--- debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/data/mailbox.perms	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/data/mailbox.perms	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+7 -rw-r--r-- bar:mail `/var/mail/bar'

Added: debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/data/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/data/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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
+bar:x:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/data/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/data/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/data/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:::
+bar:!:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/test
===================================================================
--- debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+toto

Added: debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod move the mailbox if it exists"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config; rm -f /var/mail/foo /var/mail/bar' 0
+
+change_config
+
+echo -n "Create foo mailbox /var/mail/foo ..."
+echo foobar > /var/mail/foo
+chown foo:mail /var/mail/foo
+echo "OK"
+
+echo -n "Change the user's name (usermod -l bar foo)..."
+usermod -l bar 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"
+echo -n "Check that the new mailbox was created..."
+test -f /var/mail/bar
+echo "OK"
+echo -n "Check that the old mailbox was removed..."
+test ! -f /var/mail/foo
+echo "OK"
+echo -n "Check permissions of the mailbox..."
+stat --printf "%s %A %U:%G %N\n" /var/mail/bar | sort > tmp/mailbox.perms
+diff -rauN data/mailbox.perms tmp/mailbox.perms
+echo "OK"
+rm -f tmp/mailbox.perms
+
+rm -f /var/mail/bar
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/usermod/44_usermod-l_move_mailbox/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/45_usermod-u_change_mailbox_owner/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+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:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+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::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/45_usermod-u_change_mailbox_owner/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+user foo exists, UID 1000

Added: debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/data/mailbox.perms
===================================================================
--- debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/data/mailbox.perms	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/data/mailbox.perms	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+-rw-r--r-- foo:mail `/var/mail/foo'

Added: debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/data/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/data/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:4242:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod changes the mailbox ownership"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config; rm -f /var/mail/foo' 0
+
+change_config
+
+echo -n "Create foo mailbox /var/mail/foo ..."
+touch /var/mail/foo
+chown foo:mail /var/mail/foo
+echo "OK"
+
+echo -n "Change the user's UID (usermod -u 4242 foo)..."
+usermod -u 4242 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 config/etc/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+echo -n "Check that the mailbox was moved..."
+test -f /var/mail/foo
+echo "OK"
+echo -n "Check permissions of the mailbox..."
+stat --printf "%A %U:%G %N\n" /var/mail/foo | sort > tmp/mailbox.perms
+diff -rauN data/mailbox.perms tmp/mailbox.perms
+echo "OK"
+rm -f tmp/mailbox.perms
+
+rm -f /var/mail/foo
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/usermod/45_usermod-u_change_mailbox_owner/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/46_usermod-u_checks_mailbox_owner/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,43 @@
+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:
+foo:x:1000:
+bar:x:1001:

Added: debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,43 @@
+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::
+foo:*::
+bar:*::

Added: debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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::/home/foo:/bin/false
+bar:x:1001:1001::/home/bar:/bin/false

Added: debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:::
+bar:!:12977:0:99999:7:::

Added: debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+user foo exists, UID 1000

Added: debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/data/mailbox.perms
===================================================================
--- debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/data/mailbox.perms	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/data/mailbox.perms	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+7 -rw-r--r-- bar:mail `/var/mail/foo'

Added: debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/data/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/data/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:4242:1000::/home/foo:/bin/false
+bar:x:1001:1001::/home/bar:/bin/false

Added: debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/data/usermod.err
===================================================================
--- debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/data/usermod.err	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/data/usermod.err	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+usermod: warning: /var/mail/foo not owned by foo

Added: debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,63 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod checks the mailbox ownership"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config; rm -f /var/mail/foo' 0
+
+change_config
+
+echo -n "Create foo mailbox /var/mail/foo ..."
+echo foobar> /var/mail/foo
+chown bar:mail /var/mail/foo
+echo "OK"
+
+echo -n "Change the user's UID (usermod -u 4242 foo)..."
+usermod -u 4242 foo 2>tmp/usermod.err
+echo "OK"
+
+echo "usermod reported:"
+echo "======================================================================="
+cat tmp/usermod.err
+echo "======================================================================="
+echo -n "Check the usage message..."
+diff -au data/usermod.err tmp/usermod.err
+echo "usage message OK."
+rm -f tmp/usermod.err
+
+echo -n "Check the passwd file..."
+../../../common/compare_file.pl data/passwd /etc/passwd
+echo "OK"
+echo -n "Check the group file..."
+../../../common/compare_file.pl config/etc/group /etc/group
+echo "OK"
+echo -n "Check the shadow file..."
+../../../common/compare_file.pl config/etc/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+echo -n "Check that the mailbox was moved..."
+test -f /var/mail/foo
+echo "OK"
+echo -n "Check permissions of the mailbox..."
+stat --printf "%s %A %U:%G %N\n" /var/mail/foo | sort > tmp/mailbox.perms
+diff -rauN data/mailbox.perms tmp/mailbox.perms
+echo "OK"
+rm -f tmp/mailbox.perms
+
+rm -f /var/mail/foo
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/usermod/46_usermod-u_checks_mailbox_owner/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/47_usermod-u_default_maildir/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+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:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+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::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/login.defs
===================================================================
--- debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/login.defs	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/login.defs	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/47_usermod-u_default_maildir/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/47_usermod-u_default_maildir/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+user foo exists, UID 1000

Added: debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/data/mailbox.perms
===================================================================
--- debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/data/mailbox.perms	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/data/mailbox.perms	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+-rw-r--r-- foo:mail `/var/mail/foo'

Added: debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/data/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/data/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:4242:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod changes the mailbox ownership"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config; rm -f /var/mail/foo' 0
+
+change_config
+
+echo -n "Create foo mailbox /var/mail/foo ..."
+touch /var/mail/foo
+chown foo:mail /var/mail/foo
+echo "OK"
+
+echo -n "Change the user's UID (usermod -u 4242 foo)..."
+usermod -u 4242 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 config/etc/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+echo -n "Check that the mailbox was moved..."
+test -f /var/mail/foo
+echo "OK"
+echo -n "Check permissions of the mailbox..."
+stat --printf "%A %U:%G %N\n" /var/mail/foo | sort > tmp/mailbox.perms
+diff -rauN data/mailbox.perms tmp/mailbox.perms
+echo "OK"
+rm -f tmp/mailbox.perms
+
+rm -f /var/mail/foo
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/usermod/47_usermod-u_default_maildir/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/48_usermod-u_MAIL_FILE/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+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:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+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::
+foo:*::

Added: debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/login.defs
===================================================================
--- debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/login.defs	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/login.defs	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/48_usermod-u_MAIL_FILE/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/48_usermod-u_MAIL_FILE/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+user foo exists, UID 1000

Added: debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/data/mailbox.perms
===================================================================
--- debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/data/mailbox.perms	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/data/mailbox.perms	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+-rw-r--r-- UNKNOWN:mail `/var/mail/foo'

Added: debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/data/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/data/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:4242:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod changes the mailbox ownership"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config; rm -f /var/mail/foo' 0
+
+change_config
+
+echo -n "Create foo mailbox /var/mail/foo ..."
+touch /var/mail/foo
+chown foo:mail /var/mail/foo
+echo "OK"
+
+echo -n "Change the user's UID (usermod -u 4242 foo)..."
+usermod -u 4242 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 config/etc/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+echo -n "Check that the mailbox was moved..."
+test -f /var/mail/foo
+echo "OK"
+echo -n "Check permissions of the mailbox..."
+stat --printf "%A %U:%G %N\n" /var/mail/foo | sort > tmp/mailbox.perms
+diff -rauN data/mailbox.perms tmp/mailbox.perms
+echo "OK"
+rm -f tmp/mailbox.perms
+
+rm -f /var/mail/foo
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/usermod/48_usermod-u_MAIL_FILE/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:
+bar:x:1001:

Added: debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:*::
+bar:*::

Added: debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/49_usermod_change_gid+move_homedir_other_device/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+user foo exists, UID 1000, home directory: /home/foo

Added: debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/data/home_ls-a
===================================================================
--- debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/data/home_ls-a	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/data/home_ls-a	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,7 @@
+-rw-r--r-- 1000:1001 `/home/foo2/.tata'
+-rw-r--r-- 1000:1001 `/home/foo2/toto'
+crw-r--r-- 1000:1001 `/home/foo2/null'
+drwxr-xr-x 0:0 `/home/foo2/..'
+drwxr-xr-x 1000:1001 `/home/foo2/.'
+drwxr-xr-x 1000:1001 `/home/foo2/titi'
+lrwxrwxrwx 1000:1001 `/home/foo2/tutu' -> `/tmp/home/foo2/toto'

Added: debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/data/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/data/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:1001::/tmp/home/foo2:/bin/false

Added: debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod can move the user's home directory, over a new device and changes the owner of the user's file"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config; rm -rf /home/foo /home/foo2; umount /tmp/home; rmdir /tmp/home' 0
+
+change_config
+
+mkdir /home/foo
+mkdir /home/foo/titi
+echo toto > /home/foo/toto
+ln /home/foo/toto /home/foo/.tata
+ln -s /home/foo/toto /home/foo/tutu
+mknod /home/foo/null c 1 3
+chown -R foo:foo /home/foo
+stat --printf "%A %u:%g %N\n" /home/foo/* /home/foo/.* 2>/dev/null | sort
+
+mkdir /tmp/home
+mount --bind /home /tmp/home
+
+echo -n "Change the user's home directory (usermod -m -d /tmp/home/foo2 -g 1001 foo ..."
+usermod -m -d /tmp/home/foo2 -g 1001 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 config/etc/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+echo -n "Check the user's home directory was removed..."
+test ! -d /home/foo
+echo "OK"
+echo -n "Check the user's home directory was moved..."
+test -d /home/foo2
+echo "OK"
+echo -n "Check content of /tmp/test-newusers..."
+stat --printf "%A %u:%g %N\n" /home/foo2/* /home/foo2/.* 2>/dev/null | sort > tmp/home_ls-a
+diff -rauN data/home_ls-a tmp/home_ls-a
+echo "OK"
+rm -f tmp/home_ls-a
+
+echo -n "Remove the new home directory..."
+rm -rf /home/foo2
+echo "done"
+
+umount /tmp/home
+rmdir /tmp/home
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/usermod/49_usermod_change_gid+move_homedir_other_device/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/50_usermod_change_uid+move_homedir/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,42 @@
+root:x:0:
+daemon:x:1:
+bin:x:2:
+sys:x:3:
+adm:x:4:
+tty:x:5:
+disk:x:6:
+lp:x:7:
+mail:x:8:
+news:x:9:
+uucp:x:10:
+man:x:12:
+proxy:x:13:
+kmem:x:15:
+dialout:x:20:
+fax:x:21:
+voice:x:22:
+cdrom:x:24:
+floppy:x:25:
+tape:x:26:
+sudo:x:27:
+audio:x:29:
+dip:x:30:
+www-data:x:33:
+backup:x:34:
+operator:x:37:
+list:x:38:
+irc:x:39:
+src:x:40:
+gnats:x:41:
+shadow:x:42:
+utmp:x:43:
+video:x:44:
+sasl:x:45:
+plugdev:x:46:
+staff:x:50:
+games:x:60:
+users:x:100:foo
+nogroup:x:65534:
+crontab:x:101:
+Debian-exim:x:102:
+foo:x:1000:

Added: debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/50_usermod_change_uid+move_homedir/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/50_usermod_change_uid+move_homedir/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+user foo exists

Added: debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/data/home_ls-a
===================================================================
--- debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/data/home_ls-a	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/data/home_ls-a	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,3 @@
+-rw-r--r-- foo:foo `/home/foo2/toto'
+drwxr-xr-x foo:foo `/home/foo2/.'
+drwxr-xr-x root:root `/home/foo2/..'

Added: debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/data/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/data/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:1001:1000::/home/foo2:/bin/false

Added: debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod can move the user's home directory"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config; rm -rf /home/foo /home/foo2' 0
+
+change_config
+
+mkdir /home/foo
+echo toto > /home/foo/toto
+chown -R foo:foo /home/foo
+
+echo -n "Change the user's home directory (usermod -m -d /home/foo2 -u 1001 foo)..."
+usermod -m -d /home/foo2 -u 1001 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 config/etc/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+echo -n "Check the user's home directory was removed..."
+test ! -d /home/foo
+echo "OK"
+echo -n "Check the user's home directory was moved..."
+test -d /home/foo2
+echo "OK"
+echo -n "Check content of /tmp/test-newusers..."
+stat --printf "%A %U:%G %N\n" /home/foo2/* /home/foo2/.* 2>/dev/null | sort > tmp/home_ls-a
+diff -rauN data/home_ls-a tmp/home_ls-a
+echo "OK"
+rm -f tmp/home_ls-a
+
+echo -n "Remove the new home directory..."
+rm -rf /home/foo2
+echo "done"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/usermod/50_usermod_change_uid+move_homedir/usermod.test
___________________________________________________________________
Added: svn:executable
   + *

Added: debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/default/useradd
===================================================================
--- debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/default/useradd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/default/useradd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/51_usermod_change_gid+move_homedir/config/etc/group
===================================================================
--- debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/group	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/group	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:
+bar:x:1001:

Added: debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/gshadow
===================================================================
--- debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/gshadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/gshadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:*::
+bar:*::

Added: debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,20 @@
+root:x:0:0:root:/root:/bin/bash
+daemon:x:1:1:daemon:/usr/sbin:/bin/sh
+bin:x:2:2:bin:/bin:/bin/sh
+sys:x:3:3:sys:/dev:/bin/sh
+sync:x:4:65534:sync:/bin:/bin/sync
+games:x:5:60:games:/usr/games:/bin/sh
+man:x:6:12:man:/var/cache/man:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+mail:x:8:8:mail:/var/mail:/bin/sh
+news:x:9:9:news:/var/spool/news:/bin/sh
+uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
+proxy:x:13:13:proxy:/bin:/bin/sh
+www-data:x:33:33:www-data:/var/www:/bin/sh
+backup:x:34:34:backup:/var/backups:/bin/sh
+list:x:38:38:Mailing List Manager:/var/list:/bin/sh
+irc:x:39:39:ircd:/var/run/ircd:/bin/sh
+gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
+Debian-exim:x:102:102::/var/spool/exim4:/bin/false
+foo:x:1000:1000::/home/foo:/bin/false

Added: debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/shadow
===================================================================
--- debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/shadow	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config/etc/shadow	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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/usermod/51_usermod_change_gid+move_homedir/config.txt
===================================================================
--- debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config.txt	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/config.txt	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1 @@
+user foo exists

Added: debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/data/home_ls-a
===================================================================
--- debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/data/home_ls-a	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/data/home_ls-a	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,3 @@
+-rw-r--r-- foo:bar `/home/foo2/toto'
+drwxr-xr-x foo:bar `/home/foo2/.'
+drwxr-xr-x root:root `/home/foo2/..'

Added: debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/data/passwd
===================================================================
--- debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/data/passwd	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/data/passwd	2011-07-14 16:19:27 UTC (rev 3399)
@@ -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:1001::/home/foo2:/bin/false

Added: debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/usermod.test
===================================================================
--- debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/usermod.test	                        (rev 0)
+++ debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/usermod.test	2011-07-14 16:19:27 UTC (rev 3399)
@@ -0,0 +1,58 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)
+
+. ../../../common/config.sh
+. ../../../common/log.sh
+
+log_start "$0" "usermod can move the user's home directory and change the group permissions"
+
+save_config
+
+# restore the files on exit
+trap 'log_status "$0" "FAILURE"; restore_config; rm -rf /home/foo /home/foo2' 0
+
+change_config
+
+mkdir /home/foo
+echo toto > /home/foo/toto
+chown -R foo:foo /home/foo
+
+echo -n "Change the user's home directory (usermod -m -d /home/foo2 -g 1001 foo)..."
+usermod -m -d /home/foo2 -g 1001 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 config/etc/shadow /etc/shadow
+echo "OK"
+echo -n "Check the gshadow file..."
+../../../common/compare_file.pl config/etc/gshadow /etc/gshadow
+echo "OK"
+echo -n "Check the user's home directory was removed..."
+test ! -d /home/foo
+echo "OK"
+echo -n "Check the user's home directory was moved..."
+test -d /home/foo2
+echo "OK"
+echo -n "Check content of /tmp/test-newusers..."
+stat --printf "%A %U:%G %N\n" /home/foo2/* /home/foo2/.* 2>/dev/null | sort > tmp/home_ls-a
+diff -rauN data/home_ls-a tmp/home_ls-a
+echo "OK"
+rm -f tmp/home_ls-a
+
+echo -n "Remove the new home directory..."
+rm -rf /home/foo2
+echo "done"
+
+log_status "$0" "SUCCESS"
+restore_config
+trap '' 0
+


Property changes on: debian/trunk/tests/usertools/usermod/51_usermod_change_gid+move_homedir/usermod.test
___________________________________________________________________
Added: svn:executable
   + *




More information about the Pkg-shadow-commits mailing list