From: Iker Pedrosa Date: Wed, 25 Mar 2026 13:37:01 +0000 (+0100) Subject: */: groupmems(8): Remove program X-Git-Tag: 4.20.0-rc1~87 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=388ce70d8e036e5577f101ee0fe7096029fb0a58;p=thirdparty%2Fshadow.git */: groupmems(8): Remove program The utility is redundant for root and effectively broken for regular users across major distributions, its continued maintenance adds complexity for little to no benefit. Closes: https://github.com/shadow-maint/shadow/issues/1343 Acked-by: Alejandro Colomar Signed-off-by: Iker Pedrosa --- diff --git a/etc/pam.d/Makefile.am b/etc/pam.d/Makefile.am index 053e35d9f..9662cc088 100644 --- a/etc/pam.d/Makefile.am +++ b/etc/pam.d/Makefile.am @@ -5,7 +5,6 @@ pamd_files = \ chpasswd \ chfn \ chsh \ - groupmems \ login \ newusers \ passwd diff --git a/man/Makefile.am b/man/Makefile.am index bce73359b..786573858 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -18,7 +18,6 @@ man_MANS = \ man1/gpasswd.1 \ man8/groupadd.8 \ man8/groupdel.8 \ - man8/groupmems.8 \ man8/groupmod.8 \ man8/grpck.8 \ man8/grpconv.8 \ @@ -84,7 +83,6 @@ man_XMANS = \ gpasswd.1.xml \ groupadd.8.xml \ groupdel.8.xml \ - groupmems.8.xml \ groupmod.8.xml \ grpck.8.xml \ gshadow.5.xml \ diff --git a/man/cs/Makefile.am b/man/cs/Makefile.am index 3a7a2a1ae..4e1271efe 100644 --- a/man/cs/Makefile.am +++ b/man/cs/Makefile.am @@ -15,11 +15,3 @@ man_MANS = \ man5/shadow.5 \ man1/su.1 \ man8/vipw.8 - -if ENABLE_LASTLOG -man_MANS += man8/lastlog.8 -endif - -EXTRA_DIST = $(man_MANS) \ - man8/groupmems.8 - diff --git a/man/de/Makefile.am b/man/de/Makefile.am index 77fa03809..edb3a15bf 100644 --- a/man/de/Makefile.am +++ b/man/de/Makefile.am @@ -13,7 +13,6 @@ man_MANS = \ man1/gpasswd.1 \ man8/groupadd.8 \ man8/groupdel.8 \ - man8/groupmems.8 \ man8/groupmod.8 \ man8/grpck.8 \ man8/grpconv.8 \ diff --git a/man/fr/Makefile.am b/man/fr/Makefile.am index 3987b8b95..b030fc6af 100644 --- a/man/fr/Makefile.am +++ b/man/fr/Makefile.am @@ -13,7 +13,6 @@ man_MANS = \ man1/gpasswd.1 \ man8/groupadd.8 \ man8/groupdel.8 \ - man8/groupmems.8 \ man8/groupmod.8 \ man8/grpck.8 \ man8/grpconv.8 \ diff --git a/man/groupmems.8.xml b/man/groupmems.8.xml deleted file mode 100644 index 7d4c2a420..000000000 --- a/man/groupmems.8.xml +++ /dev/null @@ -1,235 +0,0 @@ - - - - -]> - - - - - George - Kraft - IV - Creation, 2000 - - - Thomas - Kłoczko - kloczek@pld.org.pl - shadow-utils maintainer, 2000 - 2007 - - - Nicolas - François - nicolas.francois@centraliens.net - shadow-utils maintainer, 2007 - now - - - - groupmems - 8 - System Management Commands - shadow-utils - &SHADOW_UTILS_VERSION; - - - groupmems - administer members of a user's primary group - - - - - groupmems - - -a user_name - -d user_name - -g group_name - -l -p - - - - - - DESCRIPTION - - The groupmems command allows a user to administer - their own group membership list without the requirement of - superuser privileges. The groupmems utility is for - systems that configure its users to be in their own name sake primary - group (i.e., guest / guest). - - - Only the superuser, as administrator, can use - groupmems to alter the memberships of other groups. - - - - - OPTIONS - - The options which apply to the groupmems command - are: - - - - ,  user_name - - Add a user to the group membership list. - - If the /etc/gshadow file exists, and the - group has no entry in the /etc/gshadow - file, a new entry will be created. - - - - - ,  user_name - - Delete a user from the group membership list. - - If the /etc/gshadow file exists, the user - will be removed from the list of members and administrators of - the group. - - - If the /etc/gshadow file exists, and the - group has no entry in the /etc/gshadow - file, a new entry will be created. - - - - - ,  group_name - - The superuser can specify which group membership - list to modify. - - - - - , - - Display help message and exit. - - - - , - - List the group membership list. - - - - , - - Purge all users from the group membership list. - - If the /etc/gshadow file exists, and the - group has no entry in the /etc/gshadow - file, a new entry will be created. - - - - - - ,  CHROOT_DIR - - - - Apply changes in the CHROOT_DIR - directory and use the configuration files from the - CHROOT_DIR directory. - Only absolute paths are supported. - No SELINUX support. - - - - - - - - SETUP - - The groupmems executable should be in mode - 2710 as user root and in group - groups. The system administrator can add users to - group groups to allow or disallow them using the - groupmems utility to manage their own group - membership list. - - - - $ groupadd -r groups - $ chmod 2710 groupmems - $ chown root:groups groupmems - $ groupmems -g groups -a gk4 - - - - - CONFIGURATION - - The following configuration variables in - /etc/login.defs change the behavior of this - tool: - - - &MAX_MEMBERS_PER_GROUP; - - - - - FILES - - - /etc/group - - Group account information. - - - - /etc/gshadow - - secure group account information - - - - - - - SEE ALSO - - - chfn1 - , - - chsh1 - , - - passwd1 - , - - groupadd8 - , - - groupdel8 - , - - useradd8 - , - - userdel8 - , - - usermod8 - . - - - diff --git a/man/it/Makefile.am b/man/it/Makefile.am index 709478d9f..4c2adb271 100644 --- a/man/it/Makefile.am +++ b/man/it/Makefile.am @@ -13,7 +13,6 @@ man_MANS = \ man1/gpasswd.1 \ man8/groupadd.8 \ man8/groupdel.8 \ - man8/groupmems.8 \ man8/groupmod.8 \ man8/grpck.8 \ man8/grpconv.8 \ diff --git a/man/login.defs.5.xml b/man/login.defs.5.xml index 5f4063e58..81c39805a 100644 --- a/man/login.defs.5.xml +++ b/man/login.defs.5.xml @@ -311,12 +311,6 @@ MAX_MEMBERS_PER_GROUP - - groupmems - - MAX_MEMBERS_PER_GROUP - - groupmod diff --git a/man/pl/Makefile.am b/man/pl/Makefile.am index f82177088..998bbc2e4 100644 --- a/man/pl/Makefile.am +++ b/man/pl/Makefile.am @@ -10,7 +10,6 @@ man_MANS = \ man3/getspnam.3 \ man8/groupadd.8 \ man8/groupdel.8 \ - man8/groupmems.8 \ man8/groupmod.8 \ man8/grpck.8 \ man1/newgrp.1 \ diff --git a/man/po/XMLFILES b/man/po/XMLFILES index 12f207dd4..f3fbdacb9 100644 --- a/man/po/XMLFILES +++ b/man/po/XMLFILES @@ -10,7 +10,6 @@ XMLFILES = \ $(top_srcdir)/man/gpasswd.1.xml \ $(top_srcdir)/man/groupadd.8.xml \ $(top_srcdir)/man/groupdel.8.xml \ - $(top_srcdir)/man/groupmems.8.xml \ $(top_srcdir)/man/groupmod.8.xml \ $(top_srcdir)/man/grpck.8.xml \ $(top_srcdir)/man/gshadow.5.xml \ diff --git a/man/po/shadow-man-pages.pot b/man/po/shadow-man-pages.pot index 8c9c6fc45..1a0c409b2 100644 --- a/man/po/shadow-man-pages.pot +++ b/man/po/shadow-man-pages.pot @@ -92,7 +92,6 @@ msgstr "" #: gpasswd.1.xml.out:27 #: groupadd.8.xml.out:23 #: groupdel.8.xml.out:21 -#: groupmems.8.xml.out:24 #: groupmod.8.xml.out:21 #: groups.1.xml.out:20 #: grpck.8.xml.out:20 @@ -132,7 +131,6 @@ msgstr "" #: gpasswd.1.xml.out:28 #: groupadd.8.xml.out:24 #: groupdel.8.xml.out:22 -#: groupmems.8.xml.out:25 #: groupmod.8.xml.out:22 #: groups.1.xml.out:21 #: grpck.8.xml.out:21 @@ -172,7 +170,6 @@ msgstr "" #: gpasswd.1.xml.out:29 #: groupadd.8.xml.out:25 #: groupdel.8.xml.out:23 -#: groupmems.8.xml.out:26 #: groupmod.8.xml.out:23 #: groups.1.xml.out:22 #: grpck.8.xml.out:22 @@ -211,7 +208,6 @@ msgstr "" #: gpasswd.1.xml.out:30 #: groupadd.8.xml.out:26 #: groupdel.8.xml.out:24 -#: groupmems.8.xml.out:27 #: groupmod.8.xml.out:24 #: groups.1.xml.out:23 #: grpck.8.xml.out:23 @@ -251,7 +247,6 @@ msgstr "" #: gpasswd.1.xml.out:33 #: groupadd.8.xml.out:29 #: groupdel.8.xml.out:27 -#: groupmems.8.xml.out:30 #: groupmod.8.xml.out:27 #: groups.1.xml.out:26 #: grpck.8.xml.out:26 @@ -293,7 +288,6 @@ msgstr "" #: gpasswd.1.xml.out:34 #: groupadd.8.xml.out:30 #: groupdel.8.xml.out:28 -#: groupmems.8.xml.out:31 #: groupmod.8.xml.out:28 #: groups.1.xml.out:27 #: grpck.8.xml.out:27 @@ -335,7 +329,6 @@ msgstr "" #: gpasswd.1.xml.out:35 #: groupadd.8.xml.out:31 #: groupdel.8.xml.out:29 -#: groupmems.8.xml.out:32 #: groupmod.8.xml.out:29 #: groups.1.xml.out:28 #: grpck.8.xml.out:28 @@ -377,7 +370,6 @@ msgstr "" #: gpasswd.1.xml.out:36 #: groupadd.8.xml.out:32 #: groupdel.8.xml.out:30 -#: groupmems.8.xml.out:33 #: groupmod.8.xml.out:30 #: groups.1.xml.out:29 #: grpck.8.xml.out:29 @@ -452,9 +444,6 @@ msgstr "" #: groupdel.8.xml.out:205 #: groupdel.8.xml.out:208 #: groupdel.8.xml.out:211 -#: groupmems.8.xml.out:209 -#: groupmems.8.xml.out:212 -#: groupmems.8.xml.out:215 #: groupmod.8.xml.out:326 #: groupmod.8.xml.out:329 #: groupmod.8.xml.out:332 @@ -554,7 +543,6 @@ msgstr "" #: gpasswd.1.xml.out:43 #: groupadd.8.xml.out:39 #: groupdel.8.xml.out:37 -#: groupmems.8.xml.out:40 #: groupmod.8.xml.out:37 #: groups.1.xml.out:36 #: grpck.8.xml.out:36 @@ -596,7 +584,6 @@ msgstr "" #: gpasswd.1.xml.out:44 #: groupadd.8.xml.out:40 #: groupdel.8.xml.out:38 -#: groupmems.8.xml.out:41 #: groupmod.8.xml.out:38 #: groups.1.xml.out:37 #: grpck.8.xml.out:37 @@ -692,7 +679,6 @@ msgstr "" #: gpasswd.1.xml.out:72 #: groupadd.8.xml.out:60 #: groupdel.8.xml.out:56 -#: groupmems.8.xml.out:61 #: groupmod.8.xml.out:56 #: groups.1.xml.out:54 #: grpck.8.xml.out:58 @@ -741,7 +727,6 @@ msgstr "" #: groupadd.8.xml.out:51 #: groupadd.8.xml.out:80 #: groupdel.8.xml.out:64 -#: groupmems.8.xml.out:76 #: groupmod.8.xml.out:65 #: grpck.8.xml.out:122 #: lastlog.8.xml.out:68 @@ -768,7 +753,6 @@ msgstr "" #: gpasswd.1.xml.out:120 #: groupadd.8.xml.out:81 #: groupdel.8.xml.out:65 -#: groupmems.8.xml.out:77 #: groupmod.8.xml.out:66 #: grpck.8.xml.out:127 #: lastlog.8.xml.out:69 @@ -786,7 +770,6 @@ msgstr "" #. (itstool) path: para/option #: chage.1.xml.out:74 #: gpasswd.1.xml.out:139 -#: groupmems.8.xml.out:94 #: passwd.1.xml.out:164 #: useradd.8.xml.out:123 #: useradd.8.xml.out:151 @@ -844,10 +827,6 @@ msgstr "" #: groupadd.8.xml.out:213 #: groupdel.8.xml.out:88 #: groupdel.8.xml.out:101 -#: groupmems.8.xml.out:83 -#: groupmems.8.xml.out:94 -#: groupmems.8.xml.out:110 -#: groupmems.8.xml.out:141 #: groupmod.8.xml.out:72 #: groupmod.8.xml.out:81 #: groupmod.8.xml.out:120 @@ -995,7 +974,6 @@ msgstr "" #: gpasswd.1.xml.out:151 #: groupadd.8.xml.out:118 #: groupdel.8.xml.out:82 -#: groupmems.8.xml.out:118 #: groupmod.8.xml.out:114 #: grpck.8.xml.out:132 #: lastlog.8.xml.out:96 @@ -1022,7 +1000,6 @@ msgstr "" #: gpasswd.1.xml.out:151 #: groupadd.8.xml.out:118 #: groupdel.8.xml.out:82 -#: groupmems.8.xml.out:118 #: groupmod.8.xml.out:114 #: grpck.8.xml.out:132 #: lastlog.8.xml.out:96 @@ -1064,9 +1041,6 @@ msgstr "" #: groupadd.8.xml.out:228 #: groupdel.8.xml.out:71 #: groupdel.8.xml.out:82 -#: groupmems.8.xml.out:118 -#: groupmems.8.xml.out:124 -#: groupmems.8.xml.out:130 #: groupmod.8.xml.out:114 #: groupmod.8.xml.out:131 #: groupmod.8.xml.out:193 @@ -1136,7 +1110,6 @@ msgstr "" #: gpasswd.1.xml.out:153 #: groupadd.8.xml.out:120 #: groupdel.8.xml.out:84 -#: groupmems.8.xml.out:120 #: groupmod.8.xml.out:116 #: grpck.8.xml.out:134 #: lastlog.8.xml.out:99 @@ -1215,8 +1188,6 @@ msgstr "" #: faillog.8.xml.out:105 #: faillog.8.xml.out:185 #: faillog.8.xml.out:202 -#: groupmems.8.xml.out:55 -#: groupmems.8.xml.out:124 #: passwd.1.xml.out:218 #: passwd.1.xml.out:327 #: su.1.xml.out:144 @@ -1228,7 +1199,6 @@ msgstr "" #. (itstool) path: term/option #: chage.1.xml.out:147 -#: groupmems.8.xml.out:124 msgid "--list" msgstr "" @@ -1337,7 +1307,6 @@ msgstr "" #: gpasswd.1.xml.out:191 #: groupadd.8.xml.out:201 #: groupdel.8.xml.out:89 -#: groupmems.8.xml.out:142 #: groupmod.8.xml.out:164 #: grpck.8.xml.out:149 #: lastlog.8.xml.out:104 @@ -1362,7 +1331,6 @@ msgstr "" #: gpasswd.1.xml.out:160 #: groupadd.8.xml.out:201 #: groupdel.8.xml.out:89 -#: groupmems.8.xml.out:142 #: groupmod.8.xml.out:164 #: grpck.8.xml.out:149 #: lastlog.8.xml.out:104 @@ -1406,9 +1374,6 @@ msgstr "" #: groupdel.8.xml.out:89 #: groupdel.8.xml.out:93 #: groupdel.8.xml.out:95 -#: groupmems.8.xml.out:142 -#: groupmems.8.xml.out:146 -#: groupmems.8.xml.out:148 #: groupmod.8.xml.out:164 #: groupmod.8.xml.out:168 #: groupmod.8.xml.out:170 @@ -1455,7 +1420,6 @@ msgstr "" #: gpasswd.1.xml.out:163 #: groupadd.8.xml.out:204 #: groupdel.8.xml.out:92 -#: groupmems.8.xml.out:145 #: groupmod.8.xml.out:167 #: grpck.8.xml.out:152 #: lastlog.8.xml.out:107 @@ -1625,7 +1589,6 @@ msgstr "" #: gpasswd.1.xml.out:243 #: groupadd.8.xml.out:247 #: groupdel.8.xml.out:133 -#: groupmems.8.xml.out:176 #: groupmod.8.xml.out:212 #: grpck.8.xml.out:196 #: lastlog.8.xml.out:182 @@ -1671,7 +1634,6 @@ msgstr "" #: groupadd.8.xml.out:250 #: groupadd.8.xml.out:276 #: groupdel.8.xml.out:136 -#: groupmems.8.xml.out:179 #: groupmod.8.xml.out:109 #: groupmod.8.xml.out:204 #: groupmod.8.xml.out:215 @@ -1731,7 +1693,6 @@ msgstr "" #: gpasswd.1.xml.out:244 #: groupadd.8.xml.out:248 #: groupdel.8.xml.out:134 -#: groupmems.8.xml.out:177 #: groupmod.8.xml.out:213 #: grpck.8.xml.out:197 #: lastlog.8.xml.out:183 @@ -1760,7 +1721,6 @@ msgstr "" #: gpasswd.1.xml.out:258 #: groupadd.8.xml.out:261 #: groupdel.8.xml.out:145 -#: groupmems.8.xml.out:188 #: groupmod.8.xml.out:224 #: groups.1.xml.out:77 #: grpck.8.xml.out:208 @@ -2010,7 +1970,6 @@ msgstr "" #: gpasswd.1.xml.out:276 #: groupadd.8.xml.out:343 #: groupdel.8.xml.out:202 -#: groupmems.8.xml.out:206 #: groupmod.8.xml.out:323 #: groups.1.xml.out:89 #: grpck.8.xml.out:277 @@ -2054,7 +2013,6 @@ msgstr "" #: chsh.1.xml.out:218 #: groupadd.8.xml.out:351 #: groupdel.8.xml.out:211 -#: groupmems.8.xml.out:215 #: groupmod.8.xml.out:332 #: grpck.8.xml.out:291 #: lastlog.8.xml.out:176 @@ -2243,7 +2201,6 @@ msgstr "" #: chsh.1.xml.out:212 #: groupadd.8.xml.out:345 #: groupdel.8.xml.out:205 -#: groupmems.8.xml.out:209 #: groupmod.8.xml.out:326 #: login.defs.5.xml.out:243 #: useradd.8.xml.out:898 @@ -2479,7 +2436,6 @@ msgstr "" #: chsh.1.xml.out:109 #: groupadd.8.xml.out:348 #: groupdel.8.xml.out:208 -#: groupmems.8.xml.out:212 #: groupmod.8.xml.out:329 #: login.defs.5.xml.out:280 #: useradd.8.xml.out:901 @@ -2575,12 +2531,6 @@ msgstr "" #: groupdel.8.xml.out:223 #: groupdel.8.xml.out:226 #: groupdel.8.xml.out:229 -#: groupmems.8.xml.out:38 -#: groupmems.8.xml.out:218 -#: groupmems.8.xml.out:221 -#: groupmems.8.xml.out:224 -#: groupmems.8.xml.out:227 -#: groupmems.8.xml.out:230 #: groupmod.8.xml.out:35 #: groupmod.8.xml.out:335 #: groupmod.8.xml.out:338 @@ -2658,7 +2608,6 @@ msgstr "" #: faillog.8.xml.out:35 #: groupadd.8.xml.out:38 #: groupdel.8.xml.out:36 -#: groupmems.8.xml.out:39 #: groupmod.8.xml.out:36 #: grpck.8.xml.out:35 #: lastlog.8.xml.out:37 @@ -2688,8 +2637,6 @@ msgstr "" #. (itstool) path: arg/replaceable #. (itstool) path: term/replaceable #: chgpasswd.8.xml.out:63 -#: groupmems.8.xml.out:54 -#: groupmems.8.xml.out:110 msgid "group_name" msgstr "" @@ -3009,7 +2956,6 @@ msgstr "" #: groupadd.8.xml.out:170 #: groupadd.8.xml.out:264 #: groupdel.8.xml.out:148 -#: groupmems.8.xml.out:191 #: groupmod.8.xml.out:227 #: groups.1.xml.out:58 #: groups.1.xml.out:70 @@ -3045,7 +2991,6 @@ msgstr "" #: gpasswd.1.xml.out:263 #: groupadd.8.xml.out:266 #: groupdel.8.xml.out:150 -#: groupmems.8.xml.out:193 #: groupmod.8.xml.out:229 #: groups.1.xml.out:82 #: grpck.8.xml.out:213 @@ -3071,14 +3016,6 @@ msgstr "" #: groupadd.8.xml.out:170 #: groupadd.8.xml.out:270 #: groupdel.8.xml.out:154 -#: groupmems.8.xml.out:87 -#: groupmems.8.xml.out:88 -#: groupmems.8.xml.out:98 -#: groupmems.8.xml.out:103 -#: groupmems.8.xml.out:104 -#: groupmems.8.xml.out:134 -#: groupmems.8.xml.out:135 -#: groupmems.8.xml.out:197 #: groupmod.8.xml.out:233 #: grpck.8.xml.out:63 #: grpck.8.xml.out:93 @@ -3157,7 +3094,6 @@ msgstr "" #: groupadd.8.xml.out:292 #: groupadd.8.xml.out:300 #: groupdel.8.xml.out:217 -#: groupmems.8.xml.out:218 #: groupmod.8.xml.out:338 #: login.defs.5.xml.out:303 #: useradd.8.xml.out:910 @@ -3217,10 +3153,6 @@ msgstr "" #. (itstool) path: arg/replaceable #. (itstool) path: term/replaceable #: chpasswd.8.xml.out:67 -#: groupmems.8.xml.out:52 -#: groupmems.8.xml.out:53 -#: groupmems.8.xml.out:83 -#: groupmems.8.xml.out:94 msgid "user_name" msgstr "" @@ -3335,7 +3267,6 @@ msgstr "" #: chpasswd.8.xml.out:318 #: groupadd.8.xml.out:366 #: groupdel.8.xml.out:223 -#: groupmems.8.xml.out:224 #: groupmod.8.xml.out:347 #: login.defs.5.xml.out:481 #: newusers.8.xml.out:488 @@ -3625,7 +3556,6 @@ msgstr "" #: faillog.8.xml.out:72 #: faillog.8.xml.out:215 #: gpasswd.1.xml.out:126 -#: groupmems.8.xml.out:83 #: groupmod.8.xml.out:73 #: passwd.1.xml.out:153 #: usermod.8.xml.out:78 @@ -3716,7 +3646,6 @@ msgstr "" #. (itstool) path: para/emphasis #: faillog.8.xml.out:134 -#: groupmems.8.xml.out:160 #: porttime.5.xml.out:85 msgid "root" msgstr "" @@ -4020,7 +3949,6 @@ msgstr "" #. (itstool) path: term/option #: gpasswd.1.xml.out:126 -#: groupmems.8.xml.out:83 msgid "--add" msgstr "" @@ -4045,7 +3973,6 @@ msgstr "" #. (itstool) path: term/option #: gpasswd.1.xml.out:139 -#: groupmems.8.xml.out:94 #: passwd.1.xml.out:164 msgid "--delete" msgstr "" @@ -4135,7 +4062,6 @@ msgstr "" #: groupdel.8.xml.out:57 #: groupdel.8.xml.out:66 #: groupdel.8.xml.out:165 -#: groupmems.8.xml.out:221 #: groupmod.8.xml.out:341 #: login.defs.5.xml.out:312 #: useradd.8.xml.out:913 @@ -4259,7 +4185,6 @@ msgstr "" #: groupadd.8.xml.out:95 #: groupadd.8.xml.out:102 #: groupadd.8.xml.out:236 -#: groupmems.8.xml.out:110 #: groupmod.8.xml.out:82 #: groupmod.8.xml.out:136 #: groupmod.8.xml.out:201 @@ -4432,8 +4357,6 @@ msgstr "" #. (itstool) path: cmdsynopsis/arg #. (itstool) path: para/option #: groupadd.8.xml.out:158 -#: groupmems.8.xml.out:55 -#: groupmems.8.xml.out:130 #: groupmod.8.xml.out:143 #: login.1.xml.out:80 #: login.1.xml.out:88 @@ -4693,7 +4616,6 @@ msgstr "" #. (itstool) path: para/command #: groupadd.8.xml.out:369 #: groupdel.8.xml.out:226 -#: groupmems.8.xml.out:227 #: groupmod.8.xml.out:350 #: login.defs.5.xml.out:499 #: useradd.8.xml.out:933 @@ -4720,7 +4642,6 @@ msgstr "" #. (itstool) path: cmdsynopsis/command #: groupadd.8.xml.out:372 #: groupdel.8.xml.out:229 -#: groupmems.8.xml.out:230 #: groupmod.8.xml.out:353 #: login.defs.5.xml.out:509 #: passwd.1.xml.out:513 @@ -4828,22 +4749,18 @@ msgid "<_:citerefentry-1/>, <_:citerefentry-2/>, <_:citerefentry-3/>, <_:citeref msgstr "" #. (itstool) path: author/firstname -#: groupmems.8.xml.out:18 msgid "George" msgstr "" #. (itstool) path: author/surname -#: groupmems.8.xml.out:19 msgid "Kraft" msgstr "" #. (itstool) path: author/lineage -#: groupmems.8.xml.out:20 msgid "IV" msgstr "" #. (itstool) path: author/contrib -#: groupmems.8.xml.out:21 msgid "Creation, 2000" msgstr "" @@ -4852,104 +4769,75 @@ msgstr "" #. (itstool) path: cmdsynopsis/command #. (itstool) path: para/command #. (itstool) path: varlistentry/term -#: groupmems.8.xml.out:37 -#: groupmems.8.xml.out:44 -#: groupmems.8.xml.out:50 -#: groupmems.8.xml.out:63 -#: groupmems.8.xml.out:65 -#: groupmems.8.xml.out:71 -#: groupmems.8.xml.out:78 -#: groupmems.8.xml.out:159 -#: groupmems.8.xml.out:163 #: login.defs.5.xml.out:318 -msgid "groupmems" msgstr "" #. (itstool) path: refnamediv/refpurpose -#: groupmems.8.xml.out:45 msgid "administer members of a user's primary group" msgstr "" #. (itstool) path: group/arg -#: groupmems.8.xml.out:52 msgid "-a <_:replaceable-1/>" msgstr "" #. (itstool) path: group/arg -#: groupmems.8.xml.out:53 msgid "-d <_:replaceable-1/>" msgstr "" #. (itstool) path: group/arg -#: groupmems.8.xml.out:54 msgid "-g <_:replaceable-1/>" msgstr "" #. (itstool) path: refsect1/para -#: groupmems.8.xml.out:62 msgid "The <_:command-1/> command allows a user to administer their own group membership list without the requirement of superuser privileges. The <_:command-2/> utility is for systems that configure its users to be in their own name sake primary group (i.e., guest / guest)." msgstr "" #. (itstool) path: refsect1/para -#: groupmems.8.xml.out:70 msgid "Only the superuser, as administrator, can use <_:command-1/> to alter the memberships of other groups." msgstr "" #. (itstool) path: listitem/para -#: groupmems.8.xml.out:85 msgid "Add a user to the group membership list." msgstr "" #. (itstool) path: listitem/para -#: groupmems.8.xml.out:86 -#: groupmems.8.xml.out:102 -#: groupmems.8.xml.out:133 msgid "If the <_:filename-1/> file exist, and the group has no entry in the <_:filename-2/> file, a new entry will be created." msgstr "" #. (itstool) path: listitem/para -#: groupmems.8.xml.out:96 msgid "Delete a user from the group membership list." msgstr "" #. (itstool) path: listitem/para -#: groupmems.8.xml.out:97 msgid "If the <_:filename-1/> file exist, the user will be removed from the list of members and administrators of the group." msgstr "" #. (itstool) path: term/option -#: groupmems.8.xml.out:110 #: vipw.8.xml.out:90 msgid "--group" msgstr "" #. (itstool) path: listitem/para -#: groupmems.8.xml.out:112 msgid "The superuser can specify which group membership list to modify." msgstr "" #. (itstool) path: listitem/para -#: groupmems.8.xml.out:126 msgid "List the group membership list." msgstr "" #. (itstool) path: term/option -#: groupmems.8.xml.out:130 msgid "--purge" msgstr "" #. (itstool) path: listitem/para -#: groupmems.8.xml.out:132 msgid "Purge all users from the group membership list." msgstr "" #. (itstool) path: refsect1/title -#: groupmems.8.xml.out:157 msgid "SETUP" msgstr "" #. (itstool) path: para/literal -#: groupmems.8.xml.out:160 msgid "2710" msgstr "" @@ -4958,8 +4846,6 @@ msgstr "" #. (itstool) path: refnamediv/refname #. (itstool) path: cmdsynopsis/command #. (itstool) path: para/command -#: groupmems.8.xml.out:161 -#: groupmems.8.xml.out:162 #: groups.1.xml.out:33 #: groups.1.xml.out:40 #: groups.1.xml.out:46 @@ -4968,22 +4854,17 @@ msgid "groups" msgstr "" #. (itstool) path: refsect1/para -#: groupmems.8.xml.out:158 msgid "The <_:command-1/> executable should be in mode <_:literal-2/> as user <_:emphasis-3/> and in group <_:emphasis-4/>. The system administrator can add users to group <_:emphasis-5/> to allow or disallow them using the <_:command-6/> utility to manage their own group membership list." msgstr "" #. (itstool) path: refsect1/programlisting -#: groupmems.8.xml.out:167 -msgid "$ groupadd -r groups $ chmod 2710 groupmems $ chown root:groups groupmems $ groupmems -g groups -a gk4" msgstr "" #. (itstool) path: listitem/para -#: groupmems.8.xml.out:199 msgid "secure group account information" msgstr "" #. (itstool) path: refsect1/para -#: groupmems.8.xml.out:207 msgid "<_:citerefentry-1/>, <_:citerefentry-2/>, <_:citerefentry-3/>, <_:citerefentry-4/>, <_:citerefentry-5/>, <_:citerefentry-6/>, <_:citerefentry-7/>, <_:citerefentry-8/>." msgstr "" diff --git a/man/ru/Makefile.am b/man/ru/Makefile.am index b3102b1d2..69c43cf75 100644 --- a/man/ru/Makefile.am +++ b/man/ru/Makefile.am @@ -13,7 +13,6 @@ man_MANS = \ man1/gpasswd.1 \ man8/groupadd.8 \ man8/groupdel.8 \ - man8/groupmems.8 \ man8/groupmod.8 \ man8/grpck.8 \ man8/grpconv.8 \ diff --git a/man/sv/Makefile.am b/man/sv/Makefile.am index 64eda7e65..688183768 100644 --- a/man/sv/Makefile.am +++ b/man/sv/Makefile.am @@ -9,7 +9,6 @@ man_MANS = \ man3/getspnam.3 \ man8/groupadd.8 \ man8/groupdel.8 \ - man8/groupmems.8 \ man8/groupmod.8 \ man8/grpck.8 \ man5/gshadow.5 \ diff --git a/man/uk/Makefile.am b/man/uk/Makefile.am index b61a38e82..60b6508c4 100644 --- a/man/uk/Makefile.am +++ b/man/uk/Makefile.am @@ -13,7 +13,6 @@ man_MANS = \ man1/gpasswd.1 \ man8/groupadd.8 \ man8/groupdel.8 \ - man8/groupmems.8 \ man8/groupmod.8 \ man8/grpck.8 \ man8/grpconv.8 \ diff --git a/man/zh_CN/Makefile.am b/man/zh_CN/Makefile.am index 83ed1776e..1d5f7b4ca 100644 --- a/man/zh_CN/Makefile.am +++ b/man/zh_CN/Makefile.am @@ -13,7 +13,6 @@ man_MANS = \ man1/gpasswd.1 \ man8/groupadd.8 \ man8/groupdel.8 \ - man8/groupmems.8 \ man8/groupmod.8 \ man8/grpck.8 \ man8/grpconv.8 \ diff --git a/po/POTFILES.in b/po/POTFILES.in index 2071f3f82..8dd9610d3 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -83,7 +83,6 @@ src/faillog.c src/gpasswd.c src/groupadd.c src/groupdel.c -src/groupmems.c src/groupmod.c src/grpck.c src/grpconv.c diff --git a/share/ansible/roles/ci_run/tasks/fedora.yml b/share/ansible/roles/ci_run/tasks/fedora.yml index 7f02e77b7..2fc6781e2 100644 --- a/share/ansible/roles/ci_run/tasks/fedora.yml +++ b/share/ansible/roles/ci_run/tasks/fedora.yml @@ -31,15 +31,6 @@ group: root mode: '0644' -- name: Temporary workaround to create the groupmems PAM service file - ansible.builtin.copy: - src: /etc/pam.d/chfn - dest: /etc/pam.d/groupmems - remote_src: yes - owner: root - group: root - mode: '0644' - - name: Temporary workaround to create the chpasswd PAM service file ansible.builtin.copy: src: /etc/pam.d/chfn diff --git a/src/.gitignore b/src/.gitignore index 5c78083e1..1a99dff24 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -7,7 +7,6 @@ /gpasswd /groupadd /groupdel -/groupmems /groupmod /grpck /grpconv diff --git a/src/Makefile.am b/src/Makefile.am index 187a32a8d..c935e05b3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -43,7 +43,6 @@ usbin_PROGRAMS = \ chpasswd \ groupadd \ groupdel \ - groupmems \ groupmod \ grpck \ grpconv \ @@ -99,7 +98,6 @@ chpasswd_LDADD = $(LDADD) $(LIBPAM) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT) $(LIBE gpasswd_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT) $(LIBECONF) groupadd_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF) -ldl groupdel_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF) -ldl -groupmems_LDADD = $(LDADD) $(LIBPAM) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF) groupmod_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF) -ldl grpck_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF) grpconv_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBECONF) diff --git a/src/groupmems.c b/src/groupmems.c deleted file mode 100644 index 88054bb70..000000000 --- a/src/groupmems.c +++ /dev/null @@ -1,641 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2000 , International Business Machines - * SPDX-FileCopyrightText: 2000 , George Kraft IV, gk4@us.ibm.com, 03/23/2000 - * SPDX-FileCopyrightText: 2000 - 2006, Tomasz Kłoczko - * SPDX-FileCopyrightText: 2007 - 2011, Nicolas François - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include "config.h" - -#include -#include -#include -#include -#include -#ifdef USE_PAM -#include "pam_defs.h" -#endif /* USE_PAM */ -#include - -#include "alloc/malloc.h" -#include "attr.h" -#include "defines.h" -#include "groupio.h" -#include "prototypes.h" -#ifdef SHADOWGRP -#include "sgroupio.h" -#endif -#include "shadow/gshadow/sgrp.h" -#include "shadowlog.h" -#include "string/strcmp/streq.h" -#include "string/strdup/strdup.h" - - -/* Exit Status Values */ -/*@-exitarg@*/ -#define EXIT_SUCCESS 0 /* success */ -#define EXIT_USAGE 1 /* invalid command syntax */ -#define EXIT_GROUP_FILE 2 /* group file access problems */ -#define EXIT_NOT_ROOT 3 /* not superuser */ -#define EXIT_NOT_EROOT 4 /* not effective superuser */ -#define EXIT_NOT_PRIMARY 5 /* not primary owner of group */ -#define EXIT_NOT_MEMBER 6 /* member of group does not exist */ -#define EXIT_MEMBER_EXISTS 7 /* member of group already exists */ -#define EXIT_INVALID_USER 8 /* specified user does not exist */ -#define EXIT_INVALID_GROUP 9 /* specified group does not exist */ - -/* - * Structures - */ -struct option_flags { - bool chroot; -}; - -/* - * Global variables - */ -static const char Prog[] = "groupmems"; - -static char *adduser = NULL; -static char *deluser = NULL; -static char *thisgroup = NULL; -static bool purge = false; -static bool list = false; -static int exclusive = 0; -static bool gr_locked = false; -#ifdef SHADOWGRP -/* Indicate if shadow groups are enabled on the system - * (/etc/gshadow present) */ -static bool is_shadowgrp; -static bool sgr_locked = false; -#endif - -/* local function prototypes */ -static char *whoami (void); -static void add_user (const char *user, - const struct group *grp, - bool process_selinux); -static void remove_user (const char *user, - const struct group *grp, - bool process_selinux); -static void purge_members (const struct group *grp, bool process_selinux); -static void display_members (const char *const *members); -NORETURN static void usage (int status); -static void process_flags (int argc, char **argv, struct option_flags *flags); -static void check_perms (bool process_selinux); -NORETURN static void fail_exit (int code, bool process_selinux); -#define isroot() (getuid () == 0) - -static char *whoami (void) -{ - /* local, no need for xgetgrgid */ - struct group *grp = getgrgid (getgid ()); - /* local, no need for xgetpwuid */ - struct passwd *usr = getpwuid (getuid ()); - - if ( (NULL != usr) - && (NULL != grp) - && streq(usr->pw_name, grp->gr_name)) { - return xstrdup (usr->pw_name); - } else { - return NULL; - } -} - -/* - * add_user - Add a user to the specified group - */ -static void add_user (const char *user, - const struct group *grp, - bool process_selinux) -{ - struct group *newgrp; - - /* Make sure the user is not already part of the group */ - if (is_on_list (grp->gr_mem, user)) { - fprintf (stderr, - _("%s: user '%s' is already a member of '%s'\n"), - Prog, user, grp->gr_name); - fail_exit (EXIT_MEMBER_EXISTS, process_selinux); - } - - newgrp = __gr_dup(grp); - if (NULL == newgrp) { - fprintf (stderr, - _("%s: Out of memory. Cannot update %s.\n"), - Prog, gr_dbname ()); - fail_exit (13, process_selinux); - } - - /* Add the user to the /etc/group group */ - newgrp->gr_mem = add_list (newgrp->gr_mem, user); - -#ifdef SHADOWGRP - if (is_shadowgrp) { - const struct sgrp *sg = sgr_locate (newgrp->gr_name); - struct sgrp *newsg; - - if (NULL == sg) { - /* Create a shadow group based on this group */ - static struct sgrp sgrent; - sgrent.sg_namp = xstrdup (newgrp->gr_name); - sgrent.sg_mem = dup_list (newgrp->gr_mem); - sgrent.sg_adm = xmalloc_T(1, char *); - sgrent.sg_adm[0] = NULL; - - /* Move any password to gshadow */ - sgrent.sg_passwd = newgrp->gr_passwd; - newgrp->gr_passwd = SHADOW_PASSWD_STRING; - - newsg = &sgrent; - } else { - newsg = __sgr_dup (sg); - if (NULL == newsg) { - fprintf (stderr, - _("%s: Out of memory. Cannot update %s.\n"), - Prog, sgr_dbname ()); - fail_exit (13, process_selinux); - } - /* Add the user to the members */ - newsg->sg_mem = add_list (newsg->sg_mem, user); - /* Do not touch the administrators */ - } - - if (sgr_update (newsg) == 0) { - fprintf (stderr, - _("%s: failed to prepare the new %s entry '%s'\n"), - Prog, sgr_dbname (), newsg->sg_namp); - fail_exit (13, process_selinux); - } - } -#endif - - if (gr_update (newgrp) == 0) { - fprintf (stderr, - _("%s: failed to prepare the new %s entry '%s'\n"), - Prog, gr_dbname (), newgrp->gr_name); - fail_exit (13, process_selinux); - } -} - -/* - * remove_user - Remove a user from a given group - */ -static void remove_user (const char *user, - const struct group *grp, - bool process_selinux) -{ - struct group *newgrp; - - /* Check if the user is a member of the specified group */ - if (!is_on_list (grp->gr_mem, user)) { - fprintf (stderr, - _("%s: user '%s' is not a member of '%s'\n"), - Prog, user, grp->gr_name); - fail_exit (EXIT_NOT_MEMBER, process_selinux); - } - - newgrp = __gr_dup (grp); - if (NULL == newgrp) { - fprintf (stderr, - _("%s: Out of memory. Cannot update %s.\n"), - Prog, gr_dbname ()); - fail_exit (13, process_selinux); - } - - /* Remove the user from the /etc/group group */ - newgrp->gr_mem = del_list (newgrp->gr_mem, user); - -#ifdef SHADOWGRP - if (is_shadowgrp) { - const struct sgrp *sg = sgr_locate (newgrp->gr_name); - struct sgrp *newsg; - - if (NULL == sg) { - /* Create a shadow group based on this group */ - static struct sgrp sgrent; - sgrent.sg_namp = xstrdup (newgrp->gr_name); - sgrent.sg_mem = dup_list (newgrp->gr_mem); - sgrent.sg_adm = xmalloc_T(1, char *); - sgrent.sg_adm[0] = NULL; - - /* Move any password to gshadow */ - sgrent.sg_passwd = newgrp->gr_passwd; - newgrp->gr_passwd = SHADOW_PASSWD_STRING; - - newsg = &sgrent; - } else { - newsg = __sgr_dup (sg); - if (NULL == newsg) { - fprintf (stderr, - _("%s: Out of memory. Cannot update %s.\n"), - Prog, sgr_dbname ()); - fail_exit (13, process_selinux); - } - /* Remove the user from the members */ - newsg->sg_mem = del_list (newsg->sg_mem, user); - /* Remove the user from the administrators */ - newsg->sg_adm = del_list (newsg->sg_adm, user); - } - - if (sgr_update (newsg) == 0) { - fprintf (stderr, - _("%s: failed to prepare the new %s entry '%s'\n"), - Prog, sgr_dbname (), newsg->sg_namp); - fail_exit (13, process_selinux); - } - } -#endif - - if (gr_update (newgrp) == 0) { - fprintf (stderr, - _("%s: failed to prepare the new %s entry '%s'\n"), - Prog, gr_dbname (), newgrp->gr_name); - fail_exit (13, process_selinux); - } -} - -/* - * purge_members - Remove every members of the specified group - */ -static void purge_members (const struct group *grp, bool process_selinux) -{ - struct group *newgrp = __gr_dup (grp); - - if (NULL == newgrp) { - fprintf (stderr, - _("%s: Out of memory. Cannot update %s.\n"), - Prog, gr_dbname ()); - fail_exit (13, process_selinux); - } - - /* Remove all the members of the /etc/group group */ - newgrp->gr_mem[0] = NULL; - -#ifdef SHADOWGRP - if (is_shadowgrp) { - const struct sgrp *sg = sgr_locate (newgrp->gr_name); - struct sgrp *newsg; - - if (NULL == sg) { - /* Create a shadow group based on this group */ - static struct sgrp sgrent; - sgrent.sg_namp = xstrdup (newgrp->gr_name); - sgrent.sg_mem = xmalloc_T(1, char *); - sgrent.sg_mem[0] = NULL; - sgrent.sg_adm = xmalloc_T(1, char *); - sgrent.sg_adm[0] = NULL; - - /* Move any password to gshadow */ - sgrent.sg_passwd = newgrp->gr_passwd; - newgrp->gr_passwd = xstrdup(SHADOW_PASSWD_STRING); - - newsg = &sgrent; - } else { - newsg = __sgr_dup (sg); - if (NULL == newsg) { - fprintf (stderr, - _("%s: Out of memory. Cannot update %s.\n"), - Prog, sgr_dbname ()); - fail_exit (13, process_selinux); - } - /* Remove all the members of the /etc/gshadow - * group */ - newsg->sg_mem[0] = NULL; - /* Remove all the administrators of the - * /etc/gshadow group */ - newsg->sg_adm[0] = NULL; - } - - if (sgr_update (newsg) == 0) { - fprintf (stderr, - _("%s: failed to prepare the new %s entry '%s'\n"), - Prog, sgr_dbname (), newsg->sg_namp); - fail_exit (13, process_selinux); - } - } -#endif - - if (gr_update (newgrp) == 0) { - fprintf (stderr, - _("%s: failed to prepare the new %s entry '%s'\n"), - Prog, gr_dbname (), newgrp->gr_name); - fail_exit (13, process_selinux); - } -} - -static void display_members (const char *const *members) -{ - int i; - - for (i = 0; NULL != members[i]; i++) { - printf ("%s ", members[i]); - - if (NULL == members[i + 1]) { - printf ("\n"); - } else { - printf (" "); - } - } -} - -NORETURN -static void -usage (int status) -{ - FILE *usageout = (EXIT_SUCCESS != status) ? stderr : stdout; - (void) fprintf (usageout, - _("Usage: %s [options] [action]\n" - "\n" - "Options:\n"), - Prog); - (void) fputs (_(" -g, --group groupname change groupname instead of the user's group\n" - " (root only)\n"), usageout); - (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout); - (void) fputs (_("\n"), usageout); - (void) fputs (_("Actions:\n"), usageout); - (void) fputs (_(" -a, --add username add username to the members of the group\n"), usageout); - (void) fputs (_(" -d, --delete username remove username from the members of the group\n"), usageout); - (void) fputs (_(" -h, --help display this help message and exit\n"), usageout); - (void) fputs (_(" -p, --purge purge all members from the group\n"), usageout); - (void) fputs (_(" -l, --list list the members of the group\n"), usageout); - exit (status); -} - -/* - * process_flags - perform command line argument setting - */ -static void process_flags (int argc, char **argv, struct option_flags *flags) -{ - int c; - static struct option long_options[] = { - {"add", required_argument, NULL, 'a'}, - {"delete", required_argument, NULL, 'd'}, - {"group", required_argument, NULL, 'g'}, - {"help", no_argument, NULL, 'h'}, - {"list", no_argument, NULL, 'l'}, - {"purge", no_argument, NULL, 'p'}, - {"root", required_argument, NULL, 'R'}, - {NULL, 0, NULL, '\0'} - }; - - while ((c = getopt_long (argc, argv, "a:d:g:hlpR:", - long_options, NULL)) != EOF) { - switch (c) { - case 'a': - adduser = xstrdup (optarg); - ++exclusive; - break; - case 'd': - deluser = xstrdup (optarg); - ++exclusive; - break; - case 'g': - thisgroup = xstrdup (optarg); - break; - case 'h': - usage (EXIT_SUCCESS); - /*@notreached@*/break; - case 'l': - list = true; - ++exclusive; - break; - case 'p': - purge = true; - ++exclusive; - break; - case 'R': /* no-op, handled in process_root_flag () */ - flags->chroot = true; - break; - default: - usage (EXIT_USAGE); - } - } - - if ((exclusive > 1) || (optind < argc)) { - usage (EXIT_USAGE); - } - - /* local, no need for xgetpwnam */ - if ( (NULL != adduser) - && (getpwnam (adduser) == NULL)) { - fprintf (stderr, _("%s: user '%s' does not exist\n"), - Prog, adduser); - fail_exit (EXIT_INVALID_USER, !flags->chroot); - } - -} - -static void -check_perms(MAYBE_UNUSED bool process_selinux) -{ - if (!list) { -#ifdef USE_PAM - pam_handle_t *pamh = NULL; - int retval; - struct passwd *pampw; - - pampw = getpwuid (getuid ()); /* local, no need for xgetpwuid */ - if (NULL == pampw) { - fprintf (stderr, - _("%s: Cannot determine your user name.\n"), - Prog); - fail_exit (1, process_selinux); - } - - retval = pam_start (Prog, pampw->pw_name, &conv, &pamh); - - if (PAM_SUCCESS == retval) { - retval = pam_authenticate (pamh, 0); - } - - if (PAM_SUCCESS == retval) { - retval = pam_acct_mgmt (pamh, 0); - } - - if (PAM_SUCCESS != retval) { - fprintf (stderr, _("%s: PAM: %s\n"), - Prog, pam_strerror (pamh, retval)); - SYSLOG(LOG_ERR, "%s", pam_strerror(pamh, retval)); - if (NULL != pamh) { - (void) pam_end (pamh, retval); - } - fail_exit (1, process_selinux); - } - (void) pam_end (pamh, retval); -#endif - } -} - -static void fail_exit (int code, bool process_selinux) -{ - if (gr_locked) { - if (gr_unlock (process_selinux) == 0) { - fprintf (stderr, - _("%s: failed to unlock %s\n"), - Prog, gr_dbname ()); - SYSLOG(LOG_ERR, "failed to unlock %s", gr_dbname()); - /* continue */ - } - } - -#ifdef SHADOWGRP - if (sgr_locked) { - if (sgr_unlock (process_selinux) == 0) { - fprintf (stderr, - _("%s: failed to unlock %s\n"), - Prog, sgr_dbname ()); - SYSLOG(LOG_ERR, "failed to unlock %s", sgr_dbname()); - /* continue */ - } - } -#endif - - exit (code); -} - -static void open_files (bool process_selinux) -{ - if (!list) { - if (gr_lock () == 0) { - fprintf (stderr, - _("%s: cannot lock %s; try again later.\n"), - Prog, gr_dbname ()); - fail_exit (EXIT_GROUP_FILE, process_selinux); - } - gr_locked = true; - -#ifdef SHADOWGRP - if (is_shadowgrp) { - if (sgr_lock () == 0) { - fprintf (stderr, - _("%s: cannot lock %s; try again later.\n"), - Prog, sgr_dbname ()); - fail_exit (EXIT_GROUP_FILE, process_selinux); - } - sgr_locked = true; - } -#endif - } - - if (gr_open (list ? O_RDONLY : O_CREAT | O_RDWR) == 0) { - fprintf (stderr, _("%s: cannot open %s\n"), Prog, gr_dbname ()); - fail_exit (EXIT_GROUP_FILE, process_selinux); - } - -#ifdef SHADOWGRP - if (is_shadowgrp) { - if (sgr_open (list ? O_RDONLY : O_CREAT | O_RDWR) == 0) { - fprintf (stderr, _("%s: cannot open %s\n"), Prog, sgr_dbname ()); - fail_exit (EXIT_GROUP_FILE, process_selinux); - } - } -#endif -} - -static void close_files(const struct option_flags *flags) -{ - bool process_selinux; - - process_selinux = !flags->chroot; - - if ((gr_close (process_selinux) == 0) && !list) { - fprintf (stderr, _("%s: failure while writing changes to %s\n"), Prog, gr_dbname ()); - SYSLOG(LOG_ERR, "failure while writing changes to %s", gr_dbname()); - fail_exit (EXIT_GROUP_FILE, process_selinux); - } - if (gr_locked) { - if (gr_unlock (process_selinux) == 0) { - fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, gr_dbname ()); - SYSLOG(LOG_ERR, "failed to unlock %s", gr_dbname()); - /* continue */ - } - gr_locked = false; - } - -#ifdef SHADOWGRP - if (is_shadowgrp) { - if ((sgr_close (process_selinux) == 0) && !list) { - fprintf (stderr, _("%s: failure while writing changes to %s\n"), Prog, sgr_dbname ()); - SYSLOG(LOG_ERR, "failure while writing changes to %s", sgr_dbname()); - fail_exit (EXIT_GROUP_FILE, process_selinux); - } - if (sgr_locked) { - if (sgr_unlock (process_selinux) == 0) { - fprintf (stderr, _("%s: failed to unlock %s\n"), Prog, sgr_dbname ()); - SYSLOG(LOG_ERR, "failed to unlock %s", sgr_dbname()); - /* continue */ - } - sgr_locked = false; - } - } -#endif -} - -int main (int argc, char **argv) -{ - char *name; - const struct group *grp; - struct option_flags flags = {.chroot = false}; - bool process_selinux; - - log_set_progname(Prog); - log_set_logfd(stderr); - - (void) setlocale (LC_ALL, ""); - (void) bindtextdomain (PACKAGE, LOCALEDIR); - (void) textdomain (PACKAGE); - - process_root_flag ("-R", argc, argv); - - OPENLOG (Prog); - -#ifdef SHADOWGRP - is_shadowgrp = sgr_file_present (); -#endif - - process_flags (argc, argv, &flags); - process_selinux = !flags.chroot; - - if (NULL == thisgroup) { - name = whoami (); - if (!list && (NULL == name)) { - fprintf (stderr, _("%s: your groupname does not match your username\n"), Prog); - fail_exit (EXIT_NOT_PRIMARY, process_selinux); - } - } else { - name = thisgroup; - if (!list && !isroot ()) { - fprintf (stderr, _("%s: only root can use the -g/--group option\n"), Prog); - fail_exit (EXIT_NOT_ROOT, process_selinux); - } - } - - check_perms (process_selinux); - - open_files (process_selinux); - - grp = gr_locate (name); - if (NULL == grp) { - fprintf (stderr, _("%s: group '%s' does not exist in %s\n"), - Prog, name, gr_dbname ()); - fail_exit (EXIT_INVALID_GROUP, process_selinux); - } - - if (list) { - display_members ((const char *const *)grp->gr_mem); - } else if (NULL != adduser) { - add_user (adduser, grp, process_selinux); - } else if (NULL != deluser) { - remove_user (deluser, grp, process_selinux); - } else if (purge) { - purge_members (grp, process_selinux); - } - - close_files (&flags); - - exit (EXIT_SUCCESS); -} - diff --git a/tests/debian/01/data/passwd_files b/tests/debian/01/data/passwd_files index 2f3cabdd0..f66d4c722 100644 --- a/tests/debian/01/data/passwd_files +++ b/tests/debian/01/data/passwd_files @@ -8,7 +8,6 @@ /etc/pam.d/chfn /etc/pam.d/chpasswd /etc/pam.d/chsh -/etc/pam.d/groupmems /etc/pam.d/newusers /etc/pam.d/passwd /sbin @@ -25,7 +24,6 @@ /usr/sbin/chpasswd /usr/sbin/groupadd /usr/sbin/groupdel -/usr/sbin/groupmems /usr/sbin/groupmod /usr/sbin/grpck /usr/sbin/grpconv @@ -93,7 +91,6 @@ /usr/share/man/de/man8/chpasswd.8.gz /usr/share/man/de/man8/groupadd.8.gz /usr/share/man/de/man8/groupdel.8.gz -/usr/share/man/de/man8/groupmems.8.gz /usr/share/man/de/man8/groupmod.8.gz /usr/share/man/de/man8/grpck.8.gz /usr/share/man/de/man8/grpconv.8.gz @@ -128,7 +125,6 @@ /usr/share/man/fr/man8/chpasswd.8.gz /usr/share/man/fr/man8/groupadd.8.gz /usr/share/man/fr/man8/groupdel.8.gz -/usr/share/man/fr/man8/groupmems.8.gz /usr/share/man/fr/man8/groupmod.8.gz /usr/share/man/fr/man8/grpck.8.gz /usr/share/man/fr/man8/grpconv.8.gz @@ -170,7 +166,6 @@ /usr/share/man/it/man8/chpasswd.8.gz /usr/share/man/it/man8/groupadd.8.gz /usr/share/man/it/man8/groupdel.8.gz -/usr/share/man/it/man8/groupmems.8.gz /usr/share/man/it/man8/groupmod.8.gz /usr/share/man/it/man8/grpck.8.gz /usr/share/man/it/man8/grpconv.8.gz @@ -238,7 +233,6 @@ /usr/share/man/man8/chpasswd.8.gz /usr/share/man/man8/groupadd.8.gz /usr/share/man/man8/groupdel.8.gz -/usr/share/man/man8/groupmems.8.gz /usr/share/man/man8/groupmod.8.gz /usr/share/man/man8/grpck.8.gz /usr/share/man/man8/grpconv.8.gz @@ -260,7 +254,6 @@ /usr/share/man/pl/man8 /usr/share/man/pl/man8/groupadd.8.gz /usr/share/man/pl/man8/groupdel.8.gz -/usr/share/man/pl/man8/groupmems.8.gz /usr/share/man/pl/man8/groupmod.8.gz /usr/share/man/pl/man8/grpck.8.gz /usr/share/man/pl/man8/shadowconfig.8.gz @@ -293,7 +286,6 @@ /usr/share/man/ru/man8/chpasswd.8.gz /usr/share/man/ru/man8/groupadd.8.gz /usr/share/man/ru/man8/groupdel.8.gz -/usr/share/man/ru/man8/groupmems.8.gz /usr/share/man/ru/man8/groupmod.8.gz /usr/share/man/ru/man8/grpck.8.gz /usr/share/man/ru/man8/grpconv.8.gz @@ -318,7 +310,6 @@ /usr/share/man/sv/man8 /usr/share/man/sv/man8/groupadd.8.gz /usr/share/man/sv/man8/groupdel.8.gz -/usr/share/man/sv/man8/groupmems.8.gz /usr/share/man/sv/man8/groupmod.8.gz /usr/share/man/sv/man8/grpck.8.gz /usr/share/man/sv/man8/pwck.8.gz @@ -355,7 +346,6 @@ /usr/share/man/zh_CN/man8/chpasswd.8.gz /usr/share/man/zh_CN/man8/groupadd.8.gz /usr/share/man/zh_CN/man8/groupdel.8.gz -/usr/share/man/zh_CN/man8/groupmems.8.gz /usr/share/man/zh_CN/man8/groupmod.8.gz /usr/share/man/zh_CN/man8/grpck.8.gz /usr/share/man/zh_CN/man8/grpconv.8.gz diff --git a/tests/failures/groupmems/01_groupmems_group_open_failure/config.txt b/tests/failures/groupmems/01_groupmems_group_open_failure/config.txt deleted file mode 100644 index e9e4bbed8..000000000 --- a/tests/failures/groupmems/01_groupmems_group_open_failure/config.txt +++ /dev/null @@ -1 +0,0 @@ -group foo, GID 1000 diff --git a/tests/failures/groupmems/01_groupmems_group_open_failure/config/etc/group b/tests/failures/groupmems/01_groupmems_group_open_failure/config/etc/group deleted file mode 100644 index fecba0c4e..000000000 --- a/tests/failures/groupmems/01_groupmems_group_open_failure/config/etc/group +++ /dev/null @@ -1,42 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -foo:x:1000: diff --git a/tests/failures/groupmems/01_groupmems_group_open_failure/config/etc/gshadow b/tests/failures/groupmems/01_groupmems_group_open_failure/config/etc/gshadow deleted file mode 100644 index 5042e5818..000000000 --- a/tests/failures/groupmems/01_groupmems_group_open_failure/config/etc/gshadow +++ /dev/null @@ -1,42 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -foo:*:: diff --git a/tests/failures/groupmems/01_groupmems_group_open_failure/config/etc/passwd b/tests/failures/groupmems/01_groupmems_group_open_failure/config/etc/passwd deleted file mode 100644 index 43fc135a4..000000000 --- a/tests/failures/groupmems/01_groupmems_group_open_failure/config/etc/passwd +++ /dev/null @@ -1,19 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/failures/groupmems/01_groupmems_group_open_failure/config/etc/shadow b/tests/failures/groupmems/01_groupmems_group_open_failure/config/etc/shadow deleted file mode 100644 index 5f50d1873..000000000 --- a/tests/failures/groupmems/01_groupmems_group_open_failure/config/etc/shadow +++ /dev/null @@ -1,19 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: diff --git a/tests/failures/groupmems/01_groupmems_group_open_failure/data/groupmems.err b/tests/failures/groupmems/01_groupmems_group_open_failure/data/groupmems.err deleted file mode 100644 index 1d13747d8..000000000 --- a/tests/failures/groupmems/01_groupmems_group_open_failure/data/groupmems.err +++ /dev/null @@ -1,2 +0,0 @@ -open FAILURE /etc/group 2 ... -groupmems: cannot open /etc/group diff --git a/tests/failures/groupmems/01_groupmems_group_open_failure/groupmems.test b/tests/failures/groupmems/01_groupmems_group_open_failure/groupmems.test deleted file mode 100755 index 7b772cfa9..000000000 --- a/tests/failures/groupmems/01_groupmems_group_open_failure/groupmems.test +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems report failures when it cannot open the group file" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Change group 1001 (groupmems -g 1001 -a nobody)..." -LD_PRELOAD=../../../common/open_RDWR_failure.so FAILURE_PATH=/etc/group groupmems -g 1001 -a nobody 2>tmp/groupmems.err && exit 1 || { - status=$? -} -echo "OK" - -echo -n "Check returned status ($status)..." -test "$status" = "2" -echo "OK" - -echo "groupmems reported:" -echo "=======================================================================" -cat tmp/groupmems.err -echo "=======================================================================" -echo -n "Check that there were a failure message..." -diff -au data/groupmems.err tmp/groupmems.err -echo "error message OK." -rm -f tmp/groupmems.err - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/failures/groupmems/02_groupmems_gshadow_open_failure/config.txt b/tests/failures/groupmems/02_groupmems_gshadow_open_failure/config.txt deleted file mode 100644 index e9e4bbed8..000000000 --- a/tests/failures/groupmems/02_groupmems_gshadow_open_failure/config.txt +++ /dev/null @@ -1 +0,0 @@ -group foo, GID 1000 diff --git a/tests/failures/groupmems/02_groupmems_gshadow_open_failure/config/etc/group b/tests/failures/groupmems/02_groupmems_gshadow_open_failure/config/etc/group deleted file mode 100644 index fecba0c4e..000000000 --- a/tests/failures/groupmems/02_groupmems_gshadow_open_failure/config/etc/group +++ /dev/null @@ -1,42 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -foo:x:1000: diff --git a/tests/failures/groupmems/02_groupmems_gshadow_open_failure/config/etc/gshadow b/tests/failures/groupmems/02_groupmems_gshadow_open_failure/config/etc/gshadow deleted file mode 100644 index 5042e5818..000000000 --- a/tests/failures/groupmems/02_groupmems_gshadow_open_failure/config/etc/gshadow +++ /dev/null @@ -1,42 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -foo:*:: diff --git a/tests/failures/groupmems/02_groupmems_gshadow_open_failure/config/etc/passwd b/tests/failures/groupmems/02_groupmems_gshadow_open_failure/config/etc/passwd deleted file mode 100644 index 43fc135a4..000000000 --- a/tests/failures/groupmems/02_groupmems_gshadow_open_failure/config/etc/passwd +++ /dev/null @@ -1,19 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/failures/groupmems/02_groupmems_gshadow_open_failure/config/etc/shadow b/tests/failures/groupmems/02_groupmems_gshadow_open_failure/config/etc/shadow deleted file mode 100644 index 5f50d1873..000000000 --- a/tests/failures/groupmems/02_groupmems_gshadow_open_failure/config/etc/shadow +++ /dev/null @@ -1,19 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: diff --git a/tests/failures/groupmems/02_groupmems_gshadow_open_failure/data/groupmems.err b/tests/failures/groupmems/02_groupmems_gshadow_open_failure/data/groupmems.err deleted file mode 100644 index 3e01ee178..000000000 --- a/tests/failures/groupmems/02_groupmems_gshadow_open_failure/data/groupmems.err +++ /dev/null @@ -1,2 +0,0 @@ -open FAILURE /etc/gshadow 2 ... -groupmems: cannot open /etc/gshadow diff --git a/tests/failures/groupmems/02_groupmems_gshadow_open_failure/groupmems.test b/tests/failures/groupmems/02_groupmems_gshadow_open_failure/groupmems.test deleted file mode 100755 index 8be4d6efa..000000000 --- a/tests/failures/groupmems/02_groupmems_gshadow_open_failure/groupmems.test +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems report failures when it cannot open the gshadow file" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Change group 1001 (groupmems -g 1001 -a nobody)..." -LD_PRELOAD=../../../common/open_RDWR_failure.so FAILURE_PATH=/etc/gshadow groupmems -g 1001 -a nobody 2>tmp/groupmems.err && exit 1 || { - status=$? -} -echo "OK" - -echo -n "Check returned status ($status)..." -test "$status" = "2" -echo "OK" - -echo "groupmems reported:" -echo "=======================================================================" -cat tmp/groupmems.err -echo "=======================================================================" -echo -n "Check that there were a failure message..." -diff -au data/groupmems.err tmp/groupmems.err -echo "error message OK." -rm -f tmp/groupmems.err - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/01_groupmems_root_add_user/config.txt b/tests/grouptools/groupmems/01_groupmems_root_add_user/config.txt deleted file mode 100644 index d222d9104..000000000 --- a/tests/grouptools/groupmems/01_groupmems_root_add_user/config.txt +++ /dev/null @@ -1,2 +0,0 @@ -user utest1 -group gtest1 diff --git a/tests/grouptools/groupmems/01_groupmems_root_add_user/config/etc/group b/tests/grouptools/groupmems/01_groupmems_root_add_user/config/etc/group deleted file mode 100644 index 4f7c1843b..000000000 --- a/tests/grouptools/groupmems/01_groupmems_root_add_user/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99: -utest1:x:1000: -gtest1:x:1001: diff --git a/tests/grouptools/groupmems/01_groupmems_root_add_user/config/etc/gshadow b/tests/grouptools/groupmems/01_groupmems_root_add_user/config/etc/gshadow deleted file mode 100644 index 283ca8ce0..000000000 --- a/tests/grouptools/groupmems/01_groupmems_root_add_user/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*:: -utest1:*:: -gtest1:*:: diff --git a/tests/grouptools/groupmems/01_groupmems_root_add_user/config/etc/passwd b/tests/grouptools/groupmems/01_groupmems_root_add_user/config/etc/passwd deleted file mode 100644 index a07e49894..000000000 --- a/tests/grouptools/groupmems/01_groupmems_root_add_user/config/etc/passwd +++ /dev/null @@ -1,20 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh diff --git a/tests/grouptools/groupmems/01_groupmems_root_add_user/config/etc/shadow b/tests/grouptools/groupmems/01_groupmems_root_add_user/config/etc/shadow deleted file mode 100644 index 976b4f943..000000000 --- a/tests/grouptools/groupmems/01_groupmems_root_add_user/config/etc/shadow +++ /dev/null @@ -1,20 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: diff --git a/tests/grouptools/groupmems/01_groupmems_root_add_user/data/group b/tests/grouptools/groupmems/01_groupmems_root_add_user/data/group deleted file mode 100644 index 62aeba48f..000000000 --- a/tests/grouptools/groupmems/01_groupmems_root_add_user/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99: -utest1:x:1000: -gtest1:x:1001:utest1 diff --git a/tests/grouptools/groupmems/01_groupmems_root_add_user/data/gshadow b/tests/grouptools/groupmems/01_groupmems_root_add_user/data/gshadow deleted file mode 100644 index 563a8baa5..000000000 --- a/tests/grouptools/groupmems/01_groupmems_root_add_user/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*:: -utest1:*:: -gtest1:*::utest1 diff --git a/tests/grouptools/groupmems/01_groupmems_root_add_user/groupmems.test b/tests/grouptools/groupmems/01_groupmems_root_add_user/groupmems.test deleted file mode 100755 index 74c742057..000000000 --- a/tests/grouptools/groupmems/01_groupmems_root_add_user/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by root) can add an user to a group" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Add user utest1 to group gtest1..." -groupmems -a utest1 -g gtest1 -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/02_groupmems_root_del_user/config.txt b/tests/grouptools/groupmems/02_groupmems_root_del_user/config.txt deleted file mode 100644 index d222d9104..000000000 --- a/tests/grouptools/groupmems/02_groupmems_root_del_user/config.txt +++ /dev/null @@ -1,2 +0,0 @@ -user utest1 -group gtest1 diff --git a/tests/grouptools/groupmems/02_groupmems_root_del_user/config/etc/group b/tests/grouptools/groupmems/02_groupmems_root_del_user/config/etc/group deleted file mode 100644 index 62aeba48f..000000000 --- a/tests/grouptools/groupmems/02_groupmems_root_del_user/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99: -utest1:x:1000: -gtest1:x:1001:utest1 diff --git a/tests/grouptools/groupmems/02_groupmems_root_del_user/config/etc/gshadow b/tests/grouptools/groupmems/02_groupmems_root_del_user/config/etc/gshadow deleted file mode 100644 index 563a8baa5..000000000 --- a/tests/grouptools/groupmems/02_groupmems_root_del_user/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*:: -utest1:*:: -gtest1:*::utest1 diff --git a/tests/grouptools/groupmems/02_groupmems_root_del_user/config/etc/passwd b/tests/grouptools/groupmems/02_groupmems_root_del_user/config/etc/passwd deleted file mode 100644 index a07e49894..000000000 --- a/tests/grouptools/groupmems/02_groupmems_root_del_user/config/etc/passwd +++ /dev/null @@ -1,20 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh diff --git a/tests/grouptools/groupmems/02_groupmems_root_del_user/config/etc/shadow b/tests/grouptools/groupmems/02_groupmems_root_del_user/config/etc/shadow deleted file mode 100644 index 976b4f943..000000000 --- a/tests/grouptools/groupmems/02_groupmems_root_del_user/config/etc/shadow +++ /dev/null @@ -1,20 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: diff --git a/tests/grouptools/groupmems/02_groupmems_root_del_user/data/group b/tests/grouptools/groupmems/02_groupmems_root_del_user/data/group deleted file mode 100644 index 4f7c1843b..000000000 --- a/tests/grouptools/groupmems/02_groupmems_root_del_user/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99: -utest1:x:1000: -gtest1:x:1001: diff --git a/tests/grouptools/groupmems/02_groupmems_root_del_user/data/gshadow b/tests/grouptools/groupmems/02_groupmems_root_del_user/data/gshadow deleted file mode 100644 index 283ca8ce0..000000000 --- a/tests/grouptools/groupmems/02_groupmems_root_del_user/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*:: -utest1:*:: -gtest1:*:: diff --git a/tests/grouptools/groupmems/02_groupmems_root_del_user/groupmems.test b/tests/grouptools/groupmems/02_groupmems_root_del_user/groupmems.test deleted file mode 100755 index fca4fdb4c..000000000 --- a/tests/grouptools/groupmems/02_groupmems_root_del_user/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by root) can remove an user from a group" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Remove user utest1 from group gtest1..." -groupmems -d utest1 -g gtest1 -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/03_groupmems_root_del_user_admin/config.txt b/tests/grouptools/groupmems/03_groupmems_root_del_user_admin/config.txt deleted file mode 100644 index d222d9104..000000000 --- a/tests/grouptools/groupmems/03_groupmems_root_del_user_admin/config.txt +++ /dev/null @@ -1,2 +0,0 @@ -user utest1 -group gtest1 diff --git a/tests/grouptools/groupmems/03_groupmems_root_del_user_admin/config/etc/group b/tests/grouptools/groupmems/03_groupmems_root_del_user_admin/config/etc/group deleted file mode 100644 index 62aeba48f..000000000 --- a/tests/grouptools/groupmems/03_groupmems_root_del_user_admin/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99: -utest1:x:1000: -gtest1:x:1001:utest1 diff --git a/tests/grouptools/groupmems/03_groupmems_root_del_user_admin/config/etc/gshadow b/tests/grouptools/groupmems/03_groupmems_root_del_user_admin/config/etc/gshadow deleted file mode 100644 index a559a9acc..000000000 --- a/tests/grouptools/groupmems/03_groupmems_root_del_user_admin/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*:: -utest1:*:: -gtest1:*:utest1: diff --git a/tests/grouptools/groupmems/03_groupmems_root_del_user_admin/config/etc/passwd b/tests/grouptools/groupmems/03_groupmems_root_del_user_admin/config/etc/passwd deleted file mode 100644 index a07e49894..000000000 --- a/tests/grouptools/groupmems/03_groupmems_root_del_user_admin/config/etc/passwd +++ /dev/null @@ -1,20 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh diff --git a/tests/grouptools/groupmems/03_groupmems_root_del_user_admin/config/etc/shadow b/tests/grouptools/groupmems/03_groupmems_root_del_user_admin/config/etc/shadow deleted file mode 100644 index 976b4f943..000000000 --- a/tests/grouptools/groupmems/03_groupmems_root_del_user_admin/config/etc/shadow +++ /dev/null @@ -1,20 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: diff --git a/tests/grouptools/groupmems/03_groupmems_root_del_user_admin/data/group b/tests/grouptools/groupmems/03_groupmems_root_del_user_admin/data/group deleted file mode 100644 index 4f7c1843b..000000000 --- a/tests/grouptools/groupmems/03_groupmems_root_del_user_admin/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99: -utest1:x:1000: -gtest1:x:1001: diff --git a/tests/grouptools/groupmems/03_groupmems_root_del_user_admin/data/gshadow b/tests/grouptools/groupmems/03_groupmems_root_del_user_admin/data/gshadow deleted file mode 100644 index 283ca8ce0..000000000 --- a/tests/grouptools/groupmems/03_groupmems_root_del_user_admin/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*:: -utest1:*:: -gtest1:*:: diff --git a/tests/grouptools/groupmems/03_groupmems_root_del_user_admin/groupmems.test b/tests/grouptools/groupmems/03_groupmems_root_del_user_admin/groupmems.test deleted file mode 100755 index 6e5de89a6..000000000 --- a/tests/grouptools/groupmems/03_groupmems_root_del_user_admin/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by root) can remove an user from a group (only admin in gshadow)" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Remove user utest1 from group gtest1..." -groupmems -d utest1 -g gtest1 -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/config.txt b/tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/config.txt deleted file mode 100644 index d222d9104..000000000 --- a/tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/config.txt +++ /dev/null @@ -1,2 +0,0 @@ -user utest1 -group gtest1 diff --git a/tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/config/etc/group b/tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/config/etc/group deleted file mode 100644 index 62aeba48f..000000000 --- a/tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99: -utest1:x:1000: -gtest1:x:1001:utest1 diff --git a/tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/config/etc/gshadow b/tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/config/etc/gshadow deleted file mode 100644 index 793955f1c..000000000 --- a/tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*:: -utest1:*:: -gtest1:*:utest1:utest1 diff --git a/tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/config/etc/passwd b/tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/config/etc/passwd deleted file mode 100644 index a07e49894..000000000 --- a/tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/config/etc/passwd +++ /dev/null @@ -1,20 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh diff --git a/tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/config/etc/shadow b/tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/config/etc/shadow deleted file mode 100644 index 976b4f943..000000000 --- a/tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/config/etc/shadow +++ /dev/null @@ -1,20 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: diff --git a/tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/data/group b/tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/data/group deleted file mode 100644 index 4f7c1843b..000000000 --- a/tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99: -utest1:x:1000: -gtest1:x:1001: diff --git a/tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/data/gshadow b/tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/data/gshadow deleted file mode 100644 index 283ca8ce0..000000000 --- a/tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*:: -utest1:*:: -gtest1:*:: diff --git a/tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/groupmems.test b/tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/groupmems.test deleted file mode 100755 index e4d9d07e3..000000000 --- a/tests/grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by root) can remove an user from a group (both from the admins and members in gshadow)" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Remove user utest1 from group gtest1..." -groupmems -d utest1 -g gtest1 -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/config.txt b/tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/config.txt deleted file mode 100644 index d222d9104..000000000 --- a/tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/config.txt +++ /dev/null @@ -1,2 +0,0 @@ -user utest1 -group gtest1 diff --git a/tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/config/etc/group b/tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/config/etc/group deleted file mode 100644 index fbc5ea6a9..000000000 --- a/tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99: -utest1:x:1000: -gtest1:x:1001:sasl diff --git a/tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/config/etc/gshadow b/tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/config/etc/gshadow deleted file mode 100644 index 63f3a7680..000000000 --- a/tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*:: -utest1:*:: -gtest1:*::sasl diff --git a/tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/config/etc/passwd b/tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/config/etc/passwd deleted file mode 100644 index a07e49894..000000000 --- a/tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/config/etc/passwd +++ /dev/null @@ -1,20 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh diff --git a/tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/config/etc/shadow b/tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/config/etc/shadow deleted file mode 100644 index 976b4f943..000000000 --- a/tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/config/etc/shadow +++ /dev/null @@ -1,20 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: diff --git a/tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/data/group b/tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/data/group deleted file mode 100644 index f4d05d08c..000000000 --- a/tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99: -utest1:x:1000: -gtest1:x:1001:sasl,utest1 diff --git a/tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/data/gshadow b/tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/data/gshadow deleted file mode 100644 index 567fc6606..000000000 --- a/tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*:: -utest1:*:: -gtest1:*::sasl,utest1 diff --git a/tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/groupmems.test b/tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/groupmems.test deleted file mode 100755 index 3fbfac224..000000000 --- a/tests/grouptools/groupmems/05_groupmems_root_add_user_with_other_users/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by root) can add an user to a group with multipleusers (even admins according to gshadow)" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Add user utest1 to group gtest1..." -groupmems -a utest1 -g gtest1 -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/config.txt b/tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/config.txt deleted file mode 100644 index d222d9104..000000000 --- a/tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/config.txt +++ /dev/null @@ -1,2 +0,0 @@ -user utest1 -group gtest1 diff --git a/tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/config/etc/group b/tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/config/etc/group deleted file mode 100644 index ce188f9d2..000000000 --- a/tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99: -utest1:x:1000: -gtest1:x:1001:sasl,tape diff --git a/tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/config/etc/gshadow b/tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/config/etc/gshadow deleted file mode 100644 index 27eb9190e..000000000 --- a/tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*:: -utest1:*:: -gtest1:*:tape:sasl,tape diff --git a/tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/config/etc/passwd b/tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/config/etc/passwd deleted file mode 100644 index a07e49894..000000000 --- a/tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/config/etc/passwd +++ /dev/null @@ -1,20 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh diff --git a/tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/config/etc/shadow b/tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/config/etc/shadow deleted file mode 100644 index 976b4f943..000000000 --- a/tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/config/etc/shadow +++ /dev/null @@ -1,20 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: diff --git a/tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/data/group b/tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/data/group deleted file mode 100644 index 6080f7ce2..000000000 --- a/tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99: -utest1:x:1000: -gtest1:x:1001:sasl,tape,utest1 diff --git a/tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/data/gshadow b/tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/data/gshadow deleted file mode 100644 index e6f990223..000000000 --- a/tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*:: -utest1:*:: -gtest1:*:tape:sasl,tape,utest1 diff --git a/tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/groupmems.test b/tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/groupmems.test deleted file mode 100755 index 74c742057..000000000 --- a/tests/grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by root) can add an user to a group" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Add user utest1 to group gtest1..." -groupmems -a utest1 -g gtest1 -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/config.txt b/tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/config.txt deleted file mode 100644 index d222d9104..000000000 --- a/tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/config.txt +++ /dev/null @@ -1,2 +0,0 @@ -user utest1 -group gtest1 diff --git a/tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/config/etc/group b/tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/config/etc/group deleted file mode 100644 index f1b283251..000000000 --- a/tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99: -utest1:x:1000: -gtest1:x:1001:utest1,sasl diff --git a/tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/config/etc/gshadow b/tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/config/etc/gshadow deleted file mode 100644 index 567fc6606..000000000 --- a/tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*:: -utest1:*:: -gtest1:*::sasl,utest1 diff --git a/tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/config/etc/passwd b/tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/config/etc/passwd deleted file mode 100644 index a07e49894..000000000 --- a/tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/config/etc/passwd +++ /dev/null @@ -1,20 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh diff --git a/tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/config/etc/shadow b/tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/config/etc/shadow deleted file mode 100644 index 976b4f943..000000000 --- a/tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/config/etc/shadow +++ /dev/null @@ -1,20 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: diff --git a/tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/data/group b/tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/data/group deleted file mode 100644 index fbc5ea6a9..000000000 --- a/tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99: -utest1:x:1000: -gtest1:x:1001:sasl diff --git a/tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/data/gshadow b/tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/data/gshadow deleted file mode 100644 index 63f3a7680..000000000 --- a/tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*:: -utest1:*:: -gtest1:*::sasl diff --git a/tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/groupmems.test b/tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/groupmems.test deleted file mode 100755 index 8c1576b6a..000000000 --- a/tests/grouptools/groupmems/07_groupmems_root_del_user_with_other_users/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by root) can remove an user from a group with multiple users" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Remove user utest1 from group gtest1..." -groupmems -d utest1 -g gtest1 -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/config.txt b/tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/config.txt deleted file mode 100644 index d222d9104..000000000 --- a/tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/config.txt +++ /dev/null @@ -1,2 +0,0 @@ -user utest1 -group gtest1 diff --git a/tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/config/etc/group b/tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/config/etc/group deleted file mode 100644 index 9c4e2c0cd..000000000 --- a/tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99: -utest1:x:1000: -gtest1:x:1001:tape,utest1,sasl,staff diff --git a/tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/config/etc/gshadow b/tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/config/etc/gshadow deleted file mode 100644 index b5e0c7555..000000000 --- a/tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*:: -utest1:*:: -gtest1:*:tape:sasl,utest1,staff diff --git a/tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/config/etc/passwd b/tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/config/etc/passwd deleted file mode 100644 index a07e49894..000000000 --- a/tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/config/etc/passwd +++ /dev/null @@ -1,20 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh diff --git a/tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/config/etc/shadow b/tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/config/etc/shadow deleted file mode 100644 index 976b4f943..000000000 --- a/tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/config/etc/shadow +++ /dev/null @@ -1,20 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: diff --git a/tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/data/group b/tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/data/group deleted file mode 100644 index 2e57cf65e..000000000 --- a/tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99: -utest1:x:1000: -gtest1:x:1001:tape,sasl,staff diff --git a/tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/data/gshadow b/tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/data/gshadow deleted file mode 100644 index 411f209f6..000000000 --- a/tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*:: -utest1:*:: -gtest1:*:tape:sasl,staff diff --git a/tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/groupmems.test b/tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/groupmems.test deleted file mode 100755 index d340e3d90..000000000 --- a/tests/grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by root) can remove an user from a group with multiple users (even admins according to gshadow)" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Remove user utest1 from group gtest1..." -groupmems -d utest1 -g gtest1 -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/09_groupmems_root_purge_user/config.txt b/tests/grouptools/groupmems/09_groupmems_root_purge_user/config.txt deleted file mode 100644 index d222d9104..000000000 --- a/tests/grouptools/groupmems/09_groupmems_root_purge_user/config.txt +++ /dev/null @@ -1,2 +0,0 @@ -user utest1 -group gtest1 diff --git a/tests/grouptools/groupmems/09_groupmems_root_purge_user/config/etc/group b/tests/grouptools/groupmems/09_groupmems_root_purge_user/config/etc/group deleted file mode 100644 index 62aeba48f..000000000 --- a/tests/grouptools/groupmems/09_groupmems_root_purge_user/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99: -utest1:x:1000: -gtest1:x:1001:utest1 diff --git a/tests/grouptools/groupmems/09_groupmems_root_purge_user/config/etc/gshadow b/tests/grouptools/groupmems/09_groupmems_root_purge_user/config/etc/gshadow deleted file mode 100644 index 563a8baa5..000000000 --- a/tests/grouptools/groupmems/09_groupmems_root_purge_user/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*:: -utest1:*:: -gtest1:*::utest1 diff --git a/tests/grouptools/groupmems/09_groupmems_root_purge_user/config/etc/passwd b/tests/grouptools/groupmems/09_groupmems_root_purge_user/config/etc/passwd deleted file mode 100644 index a07e49894..000000000 --- a/tests/grouptools/groupmems/09_groupmems_root_purge_user/config/etc/passwd +++ /dev/null @@ -1,20 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh diff --git a/tests/grouptools/groupmems/09_groupmems_root_purge_user/config/etc/shadow b/tests/grouptools/groupmems/09_groupmems_root_purge_user/config/etc/shadow deleted file mode 100644 index 976b4f943..000000000 --- a/tests/grouptools/groupmems/09_groupmems_root_purge_user/config/etc/shadow +++ /dev/null @@ -1,20 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: diff --git a/tests/grouptools/groupmems/09_groupmems_root_purge_user/data/group b/tests/grouptools/groupmems/09_groupmems_root_purge_user/data/group deleted file mode 100644 index 4f7c1843b..000000000 --- a/tests/grouptools/groupmems/09_groupmems_root_purge_user/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99: -utest1:x:1000: -gtest1:x:1001: diff --git a/tests/grouptools/groupmems/09_groupmems_root_purge_user/data/gshadow b/tests/grouptools/groupmems/09_groupmems_root_purge_user/data/gshadow deleted file mode 100644 index 283ca8ce0..000000000 --- a/tests/grouptools/groupmems/09_groupmems_root_purge_user/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*:: -utest1:*:: -gtest1:*:: diff --git a/tests/grouptools/groupmems/09_groupmems_root_purge_user/groupmems.test b/tests/grouptools/groupmems/09_groupmems_root_purge_user/groupmems.test deleted file mode 100755 index c8cf32d14..000000000 --- a/tests/grouptools/groupmems/09_groupmems_root_purge_user/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by root) can purge all users from a group" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Purge group gtest1..." -groupmems -p -g gtest1 -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/config.txt b/tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/config.txt deleted file mode 100644 index d222d9104..000000000 --- a/tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/config.txt +++ /dev/null @@ -1,2 +0,0 @@ -user utest1 -group gtest1 diff --git a/tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/config/etc/group b/tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/config/etc/group deleted file mode 100644 index 8d6f75ba6..000000000 --- a/tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99: -utest1:x:1000: -gtest1:x:1001:utest1,dip,plugdev diff --git a/tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/config/etc/gshadow b/tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/config/etc/gshadow deleted file mode 100644 index ea0fc859d..000000000 --- a/tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*:: -utest1:*:: -gtest1:*::utest1,plugdev,tape diff --git a/tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/config/etc/passwd b/tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/config/etc/passwd deleted file mode 100644 index a07e49894..000000000 --- a/tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/config/etc/passwd +++ /dev/null @@ -1,20 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh diff --git a/tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/config/etc/shadow b/tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/config/etc/shadow deleted file mode 100644 index 976b4f943..000000000 --- a/tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/config/etc/shadow +++ /dev/null @@ -1,20 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: diff --git a/tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/data/group b/tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/data/group deleted file mode 100644 index 4f7c1843b..000000000 --- a/tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99: -utest1:x:1000: -gtest1:x:1001: diff --git a/tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/data/gshadow b/tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/data/gshadow deleted file mode 100644 index 283ca8ce0..000000000 --- a/tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*:: -utest1:*:: -gtest1:*:: diff --git a/tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/groupmems.test b/tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/groupmems.test deleted file mode 100755 index 9728b1529..000000000 --- a/tests/grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by root) can purge all users from a group (multiple users)" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Purge group gtest1..." -groupmems -p -g gtest1 -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/config.txt b/tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/config.txt deleted file mode 100644 index d222d9104..000000000 --- a/tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/config.txt +++ /dev/null @@ -1,2 +0,0 @@ -user utest1 -group gtest1 diff --git a/tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/config/etc/group b/tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/config/etc/group deleted file mode 100644 index 8d6f75ba6..000000000 --- a/tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99: -utest1:x:1000: -gtest1:x:1001:utest1,dip,plugdev diff --git a/tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/config/etc/gshadow b/tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/config/etc/gshadow deleted file mode 100644 index 3677f64c3..000000000 --- a/tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*:: -utest1:*:: -gtest1:*:plugdev,daemon,backup:utest1,plugdev,tape diff --git a/tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/config/etc/passwd b/tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/config/etc/passwd deleted file mode 100644 index a07e49894..000000000 --- a/tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/config/etc/passwd +++ /dev/null @@ -1,20 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh diff --git a/tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/config/etc/shadow b/tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/config/etc/shadow deleted file mode 100644 index 976b4f943..000000000 --- a/tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/config/etc/shadow +++ /dev/null @@ -1,20 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: diff --git a/tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/data/group b/tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/data/group deleted file mode 100644 index 4f7c1843b..000000000 --- a/tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99: -utest1:x:1000: -gtest1:x:1001: diff --git a/tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/data/gshadow b/tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/data/gshadow deleted file mode 100644 index 283ca8ce0..000000000 --- a/tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*:: -utest1:*:: -gtest1:*:: diff --git a/tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/groupmems.test b/tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/groupmems.test deleted file mode 100755 index 3bc106869..000000000 --- a/tests/grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by root) can purge all users from a group (multiple users and admins)" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Purge group gtest1..." -groupmems -p -g gtest1 -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/12_groupmems_user_add_user/config.txt b/tests/grouptools/groupmems/12_groupmems_user_add_user/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/12_groupmems_user_add_user/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/12_groupmems_user_add_user/config/etc/group b/tests/grouptools/groupmems/12_groupmems_user_add_user/config/etc/group deleted file mode 100644 index 7505b93b9..000000000 --- a/tests/grouptools/groupmems/12_groupmems_user_add_user/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242: diff --git a/tests/grouptools/groupmems/12_groupmems_user_add_user/config/etc/gshadow b/tests/grouptools/groupmems/12_groupmems_user_add_user/config/etc/gshadow deleted file mode 100644 index 9945adca0..000000000 --- a/tests/grouptools/groupmems/12_groupmems_user_add_user/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:: diff --git a/tests/grouptools/groupmems/12_groupmems_user_add_user/config/etc/passwd b/tests/grouptools/groupmems/12_groupmems_user_add_user/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/12_groupmems_user_add_user/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/12_groupmems_user_add_user/config/etc/shadow b/tests/grouptools/groupmems/12_groupmems_user_add_user/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/12_groupmems_user_add_user/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/12_groupmems_user_add_user/data/group b/tests/grouptools/groupmems/12_groupmems_user_add_user/data/group deleted file mode 100644 index 7a0e29556..000000000 --- a/tests/grouptools/groupmems/12_groupmems_user_add_user/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1 diff --git a/tests/grouptools/groupmems/12_groupmems_user_add_user/data/gshadow b/tests/grouptools/groupmems/12_groupmems_user_add_user/data/gshadow deleted file mode 100644 index c908c3943..000000000 --- a/tests/grouptools/groupmems/12_groupmems_user_add_user/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::utest1 diff --git a/tests/grouptools/groupmems/12_groupmems_user_add_user/groupmems.test b/tests/grouptools/groupmems/12_groupmems_user_add_user/groupmems.test deleted file mode 100755 index fc9360bbb..000000000 --- a/tests/grouptools/groupmems/12_groupmems_user_add_user/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by a regular user) can add an user to a group" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/12_groupmems_user_add_user/run_groupmems.exp b/tests/grouptools/groupmems/12_groupmems_user_add_user/run_groupmems.exp deleted file mode 100755 index 18a29d1dc..000000000 --- a/tests/grouptools/groupmems/12_groupmems_user_add_user/run_groupmems.exp +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -a utest1\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" -send_user "# expect prompt '$ '" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/13_groupmems_user_del_user/config.txt b/tests/grouptools/groupmems/13_groupmems_user_del_user/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/13_groupmems_user_del_user/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/13_groupmems_user_del_user/config/etc/group b/tests/grouptools/groupmems/13_groupmems_user_del_user/config/etc/group deleted file mode 100644 index 7a0e29556..000000000 --- a/tests/grouptools/groupmems/13_groupmems_user_del_user/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1 diff --git a/tests/grouptools/groupmems/13_groupmems_user_del_user/config/etc/gshadow b/tests/grouptools/groupmems/13_groupmems_user_del_user/config/etc/gshadow deleted file mode 100644 index c908c3943..000000000 --- a/tests/grouptools/groupmems/13_groupmems_user_del_user/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::utest1 diff --git a/tests/grouptools/groupmems/13_groupmems_user_del_user/config/etc/passwd b/tests/grouptools/groupmems/13_groupmems_user_del_user/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/13_groupmems_user_del_user/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/13_groupmems_user_del_user/config/etc/shadow b/tests/grouptools/groupmems/13_groupmems_user_del_user/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/13_groupmems_user_del_user/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/13_groupmems_user_del_user/data/group b/tests/grouptools/groupmems/13_groupmems_user_del_user/data/group deleted file mode 100644 index 7505b93b9..000000000 --- a/tests/grouptools/groupmems/13_groupmems_user_del_user/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242: diff --git a/tests/grouptools/groupmems/13_groupmems_user_del_user/data/gshadow b/tests/grouptools/groupmems/13_groupmems_user_del_user/data/gshadow deleted file mode 100644 index 9945adca0..000000000 --- a/tests/grouptools/groupmems/13_groupmems_user_del_user/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:: diff --git a/tests/grouptools/groupmems/13_groupmems_user_del_user/groupmems.test b/tests/grouptools/groupmems/13_groupmems_user_del_user/groupmems.test deleted file mode 100755 index 6edd27926..000000000 --- a/tests/grouptools/groupmems/13_groupmems_user_del_user/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by a regular user) can remove an user from a group" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/13_groupmems_user_del_user/run_groupmems.exp b/tests/grouptools/groupmems/13_groupmems_user_del_user/run_groupmems.exp deleted file mode 100755 index 8087c56ad..000000000 --- a/tests/grouptools/groupmems/13_groupmems_user_del_user/run_groupmems.exp +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -d utest1\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" -send_user "# expect prompt '$ '" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/config.txt b/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/config/etc/group b/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/config/etc/group deleted file mode 100644 index 7a0e29556..000000000 --- a/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1 diff --git a/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/config/etc/gshadow b/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/config/etc/gshadow deleted file mode 100644 index 7bc44c538..000000000 --- a/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:utest1: diff --git a/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/config/etc/passwd b/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/config/etc/shadow b/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/data/group b/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/data/group deleted file mode 100644 index 7505b93b9..000000000 --- a/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242: diff --git a/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/data/gshadow b/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/data/gshadow deleted file mode 100644 index 9945adca0..000000000 --- a/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:: diff --git a/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/groupmems.test b/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/groupmems.test deleted file mode 100755 index 38d0dcd4e..000000000 --- a/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by a regular user) can remove an user from a group (only member according to gshadow)" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/run_groupmems.exp b/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/run_groupmems.exp deleted file mode 100755 index 8087c56ad..000000000 --- a/tests/grouptools/groupmems/14_groupmems_user_del_user_admin/run_groupmems.exp +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -d utest1\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" -send_user "# expect prompt '$ '" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/config.txt b/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/config/etc/group b/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/config/etc/group deleted file mode 100644 index 7a0e29556..000000000 --- a/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1 diff --git a/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/config/etc/gshadow b/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/config/etc/gshadow deleted file mode 100644 index c824f7b4c..000000000 --- a/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:utest1:utest1 diff --git a/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/config/etc/passwd b/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/config/etc/shadow b/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/data/group b/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/data/group deleted file mode 100644 index 7505b93b9..000000000 --- a/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242: diff --git a/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/data/gshadow b/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/data/gshadow deleted file mode 100644 index 9945adca0..000000000 --- a/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:: diff --git a/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/groupmems.test b/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/groupmems.test deleted file mode 100755 index 9377a0216..000000000 --- a/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by a regular user) can remove an user from a group (both gshadow members and admins)" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/run_groupmems.exp b/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/run_groupmems.exp deleted file mode 100755 index 8087c56ad..000000000 --- a/tests/grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/run_groupmems.exp +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -d utest1\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" -send_user "# expect prompt '$ '" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/config.txt b/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/config/etc/group b/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/config/etc/group deleted file mode 100644 index f1718b3d2..000000000 --- a/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:sasl diff --git a/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/config/etc/gshadow b/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/config/etc/gshadow deleted file mode 100644 index e4953ce70..000000000 --- a/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::sasl diff --git a/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/config/etc/passwd b/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/config/etc/shadow b/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/data/group b/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/data/group deleted file mode 100644 index b79c5b0f3..000000000 --- a/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:sasl,utest1 diff --git a/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/data/gshadow b/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/data/gshadow deleted file mode 100644 index b5681f778..000000000 --- a/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::sasl,utest1 diff --git a/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/groupmems.test b/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/groupmems.test deleted file mode 100755 index 39acbdbd2..000000000 --- a/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by a regular user) can add an user to a group with multiple users" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/run_groupmems.exp b/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/run_groupmems.exp deleted file mode 100755 index 18a29d1dc..000000000 --- a/tests/grouptools/groupmems/16_groupmems_user_add_user_with_other_users/run_groupmems.exp +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -a utest1\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" -send_user "# expect prompt '$ '" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/config.txt b/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/config/etc/group b/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/config/etc/group deleted file mode 100644 index d28c3ef6f..000000000 --- a/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:sasl,tape diff --git a/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/config/etc/gshadow b/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/config/etc/gshadow deleted file mode 100644 index a8221cb14..000000000 --- a/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:tape:sasl,tape diff --git a/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/config/etc/passwd b/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/config/etc/shadow b/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/data/group b/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/data/group deleted file mode 100644 index 9ab6baf40..000000000 --- a/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:sasl,tape,utest1 diff --git a/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/data/gshadow b/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/data/gshadow deleted file mode 100644 index 599f28bf6..000000000 --- a/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:tape:sasl,tape,utest1 diff --git a/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/groupmems.test b/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/groupmems.test deleted file mode 100755 index 7b63ddcd2..000000000 --- a/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by a regular user) can add an user to a group with multiple users (even gshadow admins)" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/run_groupmems.exp b/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/run_groupmems.exp deleted file mode 100755 index 18a29d1dc..000000000 --- a/tests/grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/run_groupmems.exp +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -a utest1\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" -send_user "# expect prompt '$ '" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/config.txt b/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/config/etc/group b/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/config/etc/group deleted file mode 100644 index dfa09d4e1..000000000 --- a/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1,sasl diff --git a/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/config/etc/gshadow b/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/config/etc/gshadow deleted file mode 100644 index b5681f778..000000000 --- a/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::sasl,utest1 diff --git a/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/config/etc/passwd b/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/config/etc/shadow b/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/data/group b/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/data/group deleted file mode 100644 index f1718b3d2..000000000 --- a/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:sasl diff --git a/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/data/gshadow b/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/data/gshadow deleted file mode 100644 index e4953ce70..000000000 --- a/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::sasl diff --git a/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/groupmems.test b/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/groupmems.test deleted file mode 100755 index 9bd46b615..000000000 --- a/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called from a regular user) can remove an user from a group with multiple users" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/run_groupmems.exp b/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/run_groupmems.exp deleted file mode 100755 index 8087c56ad..000000000 --- a/tests/grouptools/groupmems/18_groupmems_user_del_user_with_other_users/run_groupmems.exp +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -d utest1\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" -send_user "# expect prompt '$ '" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/config.txt b/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/config/etc/group b/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/config/etc/group deleted file mode 100644 index 5ebdecad2..000000000 --- a/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:tape,utest1,sasl,staff diff --git a/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/config/etc/gshadow b/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/config/etc/gshadow deleted file mode 100644 index 934d2aff6..000000000 --- a/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:tape:sasl,utest1,staff diff --git a/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/config/etc/passwd b/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/config/etc/shadow b/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/data/group b/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/data/group deleted file mode 100644 index 406d0783d..000000000 --- a/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:tape,sasl,staff diff --git a/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/data/gshadow b/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/data/gshadow deleted file mode 100644 index 8fe2213a8..000000000 --- a/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:tape:sasl,staff diff --git a/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/groupmems.test b/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/groupmems.test deleted file mode 100755 index 68ebb2f79..000000000 --- a/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called from a regular user) can remove an user from a group with multiple users (even gshadow admins)" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/run_groupmems.exp b/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/run_groupmems.exp deleted file mode 100755 index 8087c56ad..000000000 --- a/tests/grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/run_groupmems.exp +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -d utest1\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" -send_user "# expect prompt '$ '" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/20_groupmems_user_purge_user/config.txt b/tests/grouptools/groupmems/20_groupmems_user_purge_user/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/20_groupmems_user_purge_user/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/20_groupmems_user_purge_user/config/etc/group b/tests/grouptools/groupmems/20_groupmems_user_purge_user/config/etc/group deleted file mode 100644 index 7a0e29556..000000000 --- a/tests/grouptools/groupmems/20_groupmems_user_purge_user/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1 diff --git a/tests/grouptools/groupmems/20_groupmems_user_purge_user/config/etc/gshadow b/tests/grouptools/groupmems/20_groupmems_user_purge_user/config/etc/gshadow deleted file mode 100644 index c908c3943..000000000 --- a/tests/grouptools/groupmems/20_groupmems_user_purge_user/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::utest1 diff --git a/tests/grouptools/groupmems/20_groupmems_user_purge_user/config/etc/passwd b/tests/grouptools/groupmems/20_groupmems_user_purge_user/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/20_groupmems_user_purge_user/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/20_groupmems_user_purge_user/config/etc/shadow b/tests/grouptools/groupmems/20_groupmems_user_purge_user/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/20_groupmems_user_purge_user/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/20_groupmems_user_purge_user/data/group b/tests/grouptools/groupmems/20_groupmems_user_purge_user/data/group deleted file mode 100644 index 7505b93b9..000000000 --- a/tests/grouptools/groupmems/20_groupmems_user_purge_user/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242: diff --git a/tests/grouptools/groupmems/20_groupmems_user_purge_user/data/gshadow b/tests/grouptools/groupmems/20_groupmems_user_purge_user/data/gshadow deleted file mode 100644 index 9945adca0..000000000 --- a/tests/grouptools/groupmems/20_groupmems_user_purge_user/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:: diff --git a/tests/grouptools/groupmems/20_groupmems_user_purge_user/groupmems.test b/tests/grouptools/groupmems/20_groupmems_user_purge_user/groupmems.test deleted file mode 100755 index 23988412d..000000000 --- a/tests/grouptools/groupmems/20_groupmems_user_purge_user/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called from a regular user) can purge users" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/20_groupmems_user_purge_user/run_groupmems.exp b/tests/grouptools/groupmems/20_groupmems_user_purge_user/run_groupmems.exp deleted file mode 100755 index 33324492a..000000000 --- a/tests/grouptools/groupmems/20_groupmems_user_purge_user/run_groupmems.exp +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -p\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" -send_user "# expect prompt '$ '" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/config.txt b/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/config/etc/group b/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/config/etc/group deleted file mode 100644 index d0009e544..000000000 --- a/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1,dip,plugdev diff --git a/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/config/etc/gshadow b/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/config/etc/gshadow deleted file mode 100644 index dfce137be..000000000 --- a/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::utest1,plugdev,tape diff --git a/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/config/etc/passwd b/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/config/etc/shadow b/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/data/group b/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/data/group deleted file mode 100644 index 7505b93b9..000000000 --- a/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242: diff --git a/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/data/gshadow b/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/data/gshadow deleted file mode 100644 index 9945adca0..000000000 --- a/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:: diff --git a/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/groupmems.test b/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/groupmems.test deleted file mode 100755 index e63fc92aa..000000000 --- a/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called from a regular user) can purge users when multiple users were already in the group" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/run_groupmems.exp b/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/run_groupmems.exp deleted file mode 100755 index 33324492a..000000000 --- a/tests/grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/run_groupmems.exp +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -p\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" -send_user "# expect prompt '$ '" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/config.txt b/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/config/etc/group b/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/config/etc/group deleted file mode 100644 index d0009e544..000000000 --- a/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1,dip,plugdev diff --git a/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/config/etc/gshadow b/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/config/etc/gshadow deleted file mode 100644 index 2f63428fa..000000000 --- a/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:plugdev,daemon,backup:utest1,plugdev,tape diff --git a/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/config/etc/passwd b/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/config/etc/shadow b/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/data/group b/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/data/group deleted file mode 100644 index 7505b93b9..000000000 --- a/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242: diff --git a/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/data/gshadow b/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/data/gshadow deleted file mode 100644 index 9945adca0..000000000 --- a/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:: diff --git a/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/groupmems.test b/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/groupmems.test deleted file mode 100755 index bbcd7d671..000000000 --- a/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called from a regular user) can purge users when multiple users were already in the group (even gshadow admins)" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/run_groupmems.exp b/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/run_groupmems.exp deleted file mode 100755 index 33324492a..000000000 --- a/tests/grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/run_groupmems.exp +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -p\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" -send_user "# expect prompt '$ '" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/config.txt b/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/config/etc/group b/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/config/etc/group deleted file mode 100644 index 0b80d30e7..000000000 --- a/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99: -utest1:x:1000: -myuser:x:424242: diff --git a/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/config/etc/gshadow b/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/config/etc/gshadow deleted file mode 100644 index 750eceab1..000000000 --- a/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*:: -utest1:*:: -myuser:x:: diff --git a/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/config/etc/passwd b/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/config/etc/shadow b/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/groupmems.test b/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/groupmems.test deleted file mode 100755 index f287ade8a..000000000 --- a/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called from a regular user) fails for users not in the groups group" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/run_groupmems.exp b/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/run_groupmems.exp deleted file mode 100755 index 084bb12e3..000000000 --- a/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/run_groupmems.exp +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -a utest1\r" ;# -expect "groupmems: Permission denied" -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "126\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/config.txt b/tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/config/etc/group b/tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/config/etc/group deleted file mode 100644 index 230ff8eeb..000000000 --- a/tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/config/etc/group +++ /dev/null @@ -1,45 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242: -gmyuser:x:424243: diff --git a/tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/config/etc/gshadow b/tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/config/etc/gshadow deleted file mode 100644 index cd86429e2..000000000 --- a/tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/config/etc/gshadow +++ /dev/null @@ -1,45 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:: -gmyuser:x:: diff --git a/tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/config/etc/passwd b/tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/config/etc/shadow b/tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/groupmems.test b/tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/groupmems.test deleted file mode 100755 index 3a78effaa..000000000 --- a/tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems fails if a regular user tries to change (-a) another group with -g" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/run_groupmems.exp b/tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/run_groupmems.exp deleted file mode 100755 index ac12a1625..000000000 --- a/tests/grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/run_groupmems.exp +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -a utest1 -g gmyuser\r" ;# -expect "groupmems: only root can use the -g/--group option" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "3\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/config.txt b/tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/config/etc/group b/tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/config/etc/group deleted file mode 100644 index 230ff8eeb..000000000 --- a/tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/config/etc/group +++ /dev/null @@ -1,45 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242: -gmyuser:x:424243: diff --git a/tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/config/etc/gshadow b/tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/config/etc/gshadow deleted file mode 100644 index cd86429e2..000000000 --- a/tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/config/etc/gshadow +++ /dev/null @@ -1,45 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:: -gmyuser:x:: diff --git a/tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/config/etc/passwd b/tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/config/etc/passwd deleted file mode 100644 index 9e07aa1f2..000000000 --- a/tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424243::/home:/bin/bash diff --git a/tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/config/etc/shadow b/tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/groupmems.test b/tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/groupmems.test deleted file mode 100755 index 2a65f7bef..000000000 --- a/tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems fails if the name of the user's primary group differ from the user's name" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/run_groupmems.exp b/tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/run_groupmems.exp deleted file mode 100755 index 3de3fabdf..000000000 --- a/tests/grouptools/groupmems/25_groupmems_user_add_user-not_user_group/run_groupmems.exp +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424243(gmyuser) groups=424243(gmyuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424243(gmyuser) groups=424243(gmyuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -a utest1\r" ;# -expect "groupmems: your groupname does not match your username" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "5\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/config.txt b/tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/config/etc/group b/tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/config/etc/group deleted file mode 100644 index 7a0e29556..000000000 --- a/tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1 diff --git a/tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/config/etc/gshadow b/tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/config/etc/gshadow deleted file mode 100644 index c908c3943..000000000 --- a/tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::utest1 diff --git a/tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/config/etc/passwd b/tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/config/etc/shadow b/tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/groupmems.test b/tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/groupmems.test deleted file mode 100755 index d2b3383c6..000000000 --- a/tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems fails if the user is already a member of the group" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/run_groupmems.exp b/tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/run_groupmems.exp deleted file mode 100755 index a7442aa1f..000000000 --- a/tests/grouptools/groupmems/26_groupmems_user_add_user-already_member/run_groupmems.exp +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -a utest1\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" - -expect "groupmems: user 'utest1' is already a member of 'myuser'" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "7\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/config.txt b/tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/config/etc/group b/tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/config/etc/group deleted file mode 100644 index 7a0e29556..000000000 --- a/tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1 diff --git a/tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/config/etc/gshadow b/tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/config/etc/gshadow deleted file mode 100644 index 9945adca0..000000000 --- a/tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:: diff --git a/tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/config/etc/passwd b/tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/config/etc/shadow b/tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/groupmems.test b/tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/groupmems.test deleted file mode 100755 index 1a5666a3d..000000000 --- a/tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems fails if the user is already a member of the group (even if it is not according to gshadow)" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/run_groupmems.exp b/tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/run_groupmems.exp deleted file mode 100755 index a7442aa1f..000000000 --- a/tests/grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/run_groupmems.exp +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -a utest1\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" - -expect "groupmems: user 'utest1' is already a member of 'myuser'" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "7\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/config.txt b/tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/config/etc/group b/tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/config/etc/group deleted file mode 100644 index 7505b93b9..000000000 --- a/tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242: diff --git a/tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/config/etc/gshadow b/tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/config/etc/gshadow deleted file mode 100644 index c908c3943..000000000 --- a/tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::utest1 diff --git a/tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/config/etc/passwd b/tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/config/etc/shadow b/tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/data/group b/tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/data/group deleted file mode 100644 index 7a0e29556..000000000 --- a/tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1 diff --git a/tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/groupmems.test b/tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/groupmems.test deleted file mode 100755 index 23b224a66..000000000 --- a/tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems adds the user if it does not exist in group (but exists in gshadow)" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/run_groupmems.exp b/tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/run_groupmems.exp deleted file mode 100755 index 4c40ef109..000000000 --- a/tests/grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/run_groupmems.exp +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -a utest1\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/config.txt b/tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/config/etc/group b/tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/config/etc/group deleted file mode 100644 index 7a0e29556..000000000 --- a/tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1 diff --git a/tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/config/etc/gshadow b/tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/config/etc/gshadow deleted file mode 100644 index c908c3943..000000000 --- a/tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::utest1 diff --git a/tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/config/etc/passwd b/tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/config/etc/shadow b/tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/groupmems.test b/tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/groupmems.test deleted file mode 100755 index 201bb9af5..000000000 --- a/tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems fails when the user to be added does not exist" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/run_groupmems.exp b/tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/run_groupmems.exp deleted file mode 100755 index 6864f5c3c..000000000 --- a/tests/grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/run_groupmems.exp +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -a utest2\r" ;# -expect "groupmems: user 'utest2' does not exist" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "8\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/config.txt b/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/config/etc/group b/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/config/etc/group deleted file mode 100644 index 9ceded095..000000000 --- a/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:sasl,root,bin diff --git a/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/config/etc/gshadow b/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/config/etc/gshadow deleted file mode 100644 index 46c277871..000000000 --- a/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/config/etc/gshadow +++ /dev/null @@ -1,43 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: diff --git a/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/config/etc/passwd b/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/config/etc/shadow b/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/data/group b/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/data/group deleted file mode 100644 index 6249a8aa4..000000000 --- a/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:sasl,root,bin,utest1 diff --git a/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/data/gshadow b/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/data/gshadow deleted file mode 100644 index 3748fc53c..000000000 --- a/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::sasl,root,bin,utest1 diff --git a/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/groupmems.test b/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/groupmems.test deleted file mode 100755 index 783876ac8..000000000 --- a/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by a regular user) can add an user to a group, and creates the gshadow entry if it did not exist" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/run_groupmems.exp b/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/run_groupmems.exp deleted file mode 100755 index 18a29d1dc..000000000 --- a/tests/grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/run_groupmems.exp +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -a utest1\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" -send_user "# expect prompt '$ '" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/config.txt b/tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/config/etc/group b/tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/config/etc/group deleted file mode 100644 index 9ceded095..000000000 --- a/tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:sasl,root,bin diff --git a/tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/config/etc/gshadow b/tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/config/etc/gshadow deleted file mode 100644 index 46c277871..000000000 --- a/tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/config/etc/gshadow +++ /dev/null @@ -1,43 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: diff --git a/tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/config/etc/passwd b/tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/config/etc/shadow b/tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/data/group b/tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/data/group deleted file mode 100644 index 6249a8aa4..000000000 --- a/tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:sasl,root,bin,utest1 diff --git a/tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/groupmems.test b/tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/groupmems.test deleted file mode 100755 index 31983b654..000000000 --- a/tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/groupmems.test +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by a regular user) can add an user to a group, even if the gshadow file does not exist" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo "Remove the gshadow file" -rm -f /etc/gshadow - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -test ! -f /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/run_groupmems.exp b/tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/run_groupmems.exp deleted file mode 100755 index 18a29d1dc..000000000 --- a/tests/grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/run_groupmems.exp +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -a utest1\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" -send_user "# expect prompt '$ '" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/config.txt b/tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/config/etc/group b/tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/config/etc/group deleted file mode 100644 index 248e7b7a1..000000000 --- a/tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:bin,daemon diff --git a/tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/config/etc/gshadow b/tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/config/etc/gshadow deleted file mode 100644 index d2f4c7b35..000000000 --- a/tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:bin,daemon: diff --git a/tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/config/etc/passwd b/tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/config/etc/shadow b/tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/groupmems.test b/tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/groupmems.test deleted file mode 100755 index 243d830a7..000000000 --- a/tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems -d fails if the user is not a member of the group" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/run_groupmems.exp b/tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/run_groupmems.exp deleted file mode 100755 index bc6652920..000000000 --- a/tests/grouptools/groupmems/32_groupmems_user_del_user-not_member/run_groupmems.exp +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -d utest1\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" - -expect "groupmems: user 'utest1' is not a member of 'myuser'" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "6\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/config.txt b/tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/config/etc/group b/tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/config/etc/group deleted file mode 100644 index 2ef69bb5e..000000000 --- a/tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:daemon,utest1,bin diff --git a/tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/config/etc/gshadow b/tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/config/etc/gshadow deleted file mode 100644 index eefaca894..000000000 --- a/tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:daemon:bin diff --git a/tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/config/etc/passwd b/tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/config/etc/shadow b/tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/data/group b/tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/data/group deleted file mode 100644 index d1fae982c..000000000 --- a/tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:daemon,bin diff --git a/tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/groupmems.test b/tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/groupmems.test deleted file mode 100755 index b42c8f7ee..000000000 --- a/tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems removes the user if it exists in group (but does not exist in gshadow)" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/run_groupmems.exp b/tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/run_groupmems.exp deleted file mode 100755 index 7c6de70aa..000000000 --- a/tests/grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/run_groupmems.exp +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -d utest1\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/config.txt b/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/config/etc/group b/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/config/etc/group deleted file mode 100644 index 0a4716b7b..000000000 --- a/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1,utest2 diff --git a/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/config/etc/gshadow b/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/config/etc/gshadow deleted file mode 100644 index 0a1cb18b6..000000000 --- a/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:utest2:utest1 diff --git a/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/config/etc/passwd b/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/config/etc/shadow b/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/data/group b/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/data/group deleted file mode 100644 index 7a0e29556..000000000 --- a/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1 diff --git a/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/data/gshadow b/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/data/gshadow deleted file mode 100644 index c908c3943..000000000 --- a/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::utest1 diff --git a/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/groupmems.test b/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/groupmems.test deleted file mode 100755 index da1ebc595..000000000 --- a/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems accepts to remove the user if this user does not (no more) exist)" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/run_groupmems.exp b/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/run_groupmems.exp deleted file mode 100755 index 8c18c9425..000000000 --- a/tests/grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/run_groupmems.exp +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -d utest2\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/config.txt b/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/config/etc/group b/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/config/etc/group deleted file mode 100644 index 0f4bff9ba..000000000 --- a/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:daemon,utest1,utest2,bin diff --git a/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/config/etc/gshadow b/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/config/etc/gshadow deleted file mode 100644 index 46c277871..000000000 --- a/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/config/etc/gshadow +++ /dev/null @@ -1,43 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: diff --git a/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/config/etc/passwd b/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/config/etc/shadow b/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/data/group b/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/data/group deleted file mode 100644 index 497eed7df..000000000 --- a/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:daemon,utest2,bin diff --git a/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/data/gshadow b/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/data/gshadow deleted file mode 100644 index 487ecb368..000000000 --- a/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::daemon,utest2,bin diff --git a/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/groupmems.test b/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/groupmems.test deleted file mode 100755 index 43f2e5db1..000000000 --- a/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems -d will copy the group entry to gshadow if there were no entries" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/run_groupmems.exp b/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/run_groupmems.exp deleted file mode 100755 index 8087c56ad..000000000 --- a/tests/grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/run_groupmems.exp +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -d utest1\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" -send_user "# expect prompt '$ '" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/config.txt b/tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/config/etc/group b/tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/config/etc/group deleted file mode 100644 index 7a0e29556..000000000 --- a/tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1 diff --git a/tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/config/etc/gshadow b/tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/config/etc/gshadow deleted file mode 100644 index c908c3943..000000000 --- a/tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::utest1 diff --git a/tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/config/etc/passwd b/tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/config/etc/shadow b/tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/data/group b/tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/data/group deleted file mode 100644 index 7505b93b9..000000000 --- a/tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242: diff --git a/tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/groupmems.test b/tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/groupmems.test deleted file mode 100755 index 22a83e576..000000000 --- a/tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/groupmems.test +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by a regular user) can remove an user from a group if there are no gshadow file" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo "Remove the gshadow file" -rm -f /etc/gshadow - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -test ! -f /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/run_groupmems.exp b/tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/run_groupmems.exp deleted file mode 100755 index 8087c56ad..000000000 --- a/tests/grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/run_groupmems.exp +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -d utest1\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" -send_user "# expect prompt '$ '" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/config.txt b/tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/config/etc/group b/tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/config/etc/group deleted file mode 100644 index 7505b93b9..000000000 --- a/tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242: diff --git a/tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/config/etc/gshadow b/tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/config/etc/gshadow deleted file mode 100644 index 288d6c371..000000000 --- a/tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::< diff --git a/tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/config/etc/passwd b/tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/config/etc/shadow b/tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/data/gshadow b/tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/data/gshadow deleted file mode 100644 index 9945adca0..000000000 --- a/tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:: diff --git a/tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/groupmems.test b/tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/groupmems.test deleted file mode 100755 index d97b9047b..000000000 --- a/tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called from a regular user) can purge users even if the group is empty" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/run_groupmems.exp b/tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/run_groupmems.exp deleted file mode 100755 index 33324492a..000000000 --- a/tests/grouptools/groupmems/37_groupmems_user_purge_user-empty_group/run_groupmems.exp +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -p\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" -send_user "# expect prompt '$ '" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/config.txt b/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/config/etc/group b/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/config/etc/group deleted file mode 100644 index 7a0e29556..000000000 --- a/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1 diff --git a/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/config/etc/gshadow b/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/config/etc/gshadow deleted file mode 100644 index 46c277871..000000000 --- a/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/config/etc/gshadow +++ /dev/null @@ -1,43 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: diff --git a/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/config/etc/passwd b/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/config/etc/shadow b/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/data/group b/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/data/group deleted file mode 100644 index 7505b93b9..000000000 --- a/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242: diff --git a/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/data/gshadow b/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/data/gshadow deleted file mode 100644 index 9945adca0..000000000 --- a/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/data/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:: diff --git a/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/groupmems.test b/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/groupmems.test deleted file mode 100755 index f9d58f6b0..000000000 --- a/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called from a regular user) can purge users even if there are no gshadow group (and a gshadow group is created)" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/run_groupmems.exp b/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/run_groupmems.exp deleted file mode 100755 index 33324492a..000000000 --- a/tests/grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/run_groupmems.exp +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -p\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" -send_user "# expect prompt '$ '" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/config.txt b/tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/config/etc/group b/tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/config/etc/group deleted file mode 100644 index 7a0e29556..000000000 --- a/tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1 diff --git a/tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/config/etc/gshadow b/tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/config/etc/gshadow deleted file mode 100644 index c908c3943..000000000 --- a/tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::utest1 diff --git a/tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/config/etc/passwd b/tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/config/etc/shadow b/tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/data/group b/tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/data/group deleted file mode 100644 index 7505b93b9..000000000 --- a/tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/data/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242: diff --git a/tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/groupmems.test b/tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/groupmems.test deleted file mode 100755 index e6e8e9c7f..000000000 --- a/tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/groupmems.test +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called from a regular user) can purge users, even if there are no gshadow file" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo "Remove the gshadow file" -rm -f /etc/gshadow - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -test ! -f /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/run_groupmems.exp b/tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/run_groupmems.exp deleted file mode 100755 index 33324492a..000000000 --- a/tests/grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/run_groupmems.exp +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -p\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" -send_user "# expect prompt '$ '" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/config.txt b/tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/config/etc/group b/tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/config/etc/group deleted file mode 100644 index 230ff8eeb..000000000 --- a/tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/config/etc/group +++ /dev/null @@ -1,45 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242: -gmyuser:x:424243: diff --git a/tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/config/etc/gshadow b/tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/config/etc/gshadow deleted file mode 100644 index cd86429e2..000000000 --- a/tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/config/etc/gshadow +++ /dev/null @@ -1,45 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:: -gmyuser:x:: diff --git a/tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/config/etc/passwd b/tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/config/etc/shadow b/tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/groupmems.test b/tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/groupmems.test deleted file mode 100755 index a2976d196..000000000 --- a/tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems fails if a regular user tries to change (-d) another group with -g" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/run_groupmems.exp b/tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/run_groupmems.exp deleted file mode 100755 index 0c5763386..000000000 --- a/tests/grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/run_groupmems.exp +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -d utest1 -g gmyuser\r" ;# -expect "groupmems: only root can use the -g/--group option" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "3\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/config.txt b/tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/config/etc/group b/tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/config/etc/group deleted file mode 100644 index 230ff8eeb..000000000 --- a/tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/config/etc/group +++ /dev/null @@ -1,45 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242: -gmyuser:x:424243: diff --git a/tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/config/etc/gshadow b/tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/config/etc/gshadow deleted file mode 100644 index cd86429e2..000000000 --- a/tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/config/etc/gshadow +++ /dev/null @@ -1,45 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:: -gmyuser:x:: diff --git a/tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/config/etc/passwd b/tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/config/etc/shadow b/tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/groupmems.test b/tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/groupmems.test deleted file mode 100755 index f70f12a6d..000000000 --- a/tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems fails if a regular user tries to change (-p) another group with -g" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/run_groupmems.exp b/tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/run_groupmems.exp deleted file mode 100755 index 39cd9f825..000000000 --- a/tests/grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/run_groupmems.exp +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -p -g gmyuser\r" ;# -expect "groupmems: only root can use the -g/--group option" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "3\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/42_groupmems_user_list_users/config.txt b/tests/grouptools/groupmems/42_groupmems_user_list_users/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/42_groupmems_user_list_users/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/42_groupmems_user_list_users/config/etc/group b/tests/grouptools/groupmems/42_groupmems_user_list_users/config/etc/group deleted file mode 100644 index bd6da4e7a..000000000 --- a/tests/grouptools/groupmems/42_groupmems_user_list_users/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1,bin,daemon diff --git a/tests/grouptools/groupmems/42_groupmems_user_list_users/config/etc/gshadow b/tests/grouptools/groupmems/42_groupmems_user_list_users/config/etc/gshadow deleted file mode 100644 index 02b9401d6..000000000 --- a/tests/grouptools/groupmems/42_groupmems_user_list_users/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::utest1,bin,daemon diff --git a/tests/grouptools/groupmems/42_groupmems_user_list_users/config/etc/passwd b/tests/grouptools/groupmems/42_groupmems_user_list_users/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/42_groupmems_user_list_users/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/42_groupmems_user_list_users/config/etc/shadow b/tests/grouptools/groupmems/42_groupmems_user_list_users/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/42_groupmems_user_list_users/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/42_groupmems_user_list_users/groupmems.test b/tests/grouptools/groupmems/42_groupmems_user_list_users/groupmems.test deleted file mode 100755 index cb6bff40e..000000000 --- a/tests/grouptools/groupmems/42_groupmems_user_list_users/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by a regular user) can list the users of a group" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/42_groupmems_user_list_users/run_groupmems.exp b/tests/grouptools/groupmems/42_groupmems_user_list_users/run_groupmems.exp deleted file mode 100755 index a628348be..000000000 --- a/tests/grouptools/groupmems/42_groupmems_user_list_users/run_groupmems.exp +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -l\r" ;# -expect -re "\nutest1 bin daemon \r" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/config.txt b/tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/config/etc/group b/tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/config/etc/group deleted file mode 100644 index bd6da4e7a..000000000 --- a/tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1,bin,daemon diff --git a/tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/config/etc/gshadow b/tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/config/etc/gshadow deleted file mode 100644 index 74f0e82f3..000000000 --- a/tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:nouser,root: diff --git a/tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/config/etc/passwd b/tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/config/etc/shadow b/tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/groupmems.test b/tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/groupmems.test deleted file mode 100755 index 9d2388b35..000000000 --- a/tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by a regular user) can list the users of a group, and gshadow is not taken into account" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/run_groupmems.exp b/tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/run_groupmems.exp deleted file mode 100755 index a628348be..000000000 --- a/tests/grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/run_groupmems.exp +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -l\r" ;# -expect -re "\nutest1 bin daemon \r" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/config.txt b/tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/config/etc/group b/tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/config/etc/group deleted file mode 100644 index 287981ed1..000000000 --- a/tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/config/etc/group +++ /dev/null @@ -1,45 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1,bin,daemon -gtest1:x:424242:utest1,bin,utmp diff --git a/tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/config/etc/gshadow b/tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/config/etc/gshadow deleted file mode 100644 index f9ba86afa..000000000 --- a/tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/config/etc/gshadow +++ /dev/null @@ -1,45 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::utest1,bin,daemon -gtest1:*:: diff --git a/tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/config/etc/passwd b/tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/config/etc/shadow b/tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/groupmems.test b/tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/groupmems.test deleted file mode 100755 index 33e4fc434..000000000 --- a/tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by a regular user) can list the users of another group" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/run_groupmems.exp b/tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/run_groupmems.exp deleted file mode 100755 index 43c335c11..000000000 --- a/tests/grouptools/groupmems/44_groupmems_user_list_users-another_group/run_groupmems.exp +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -l -g gtest1\r" ;# -expect -re "\nutest1 bin utmp \r" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/config.txt b/tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/config/etc/group b/tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/config/etc/group deleted file mode 100644 index bd6da4e7a..000000000 --- a/tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1,bin,daemon diff --git a/tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/config/etc/gshadow b/tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/config/etc/gshadow deleted file mode 100644 index 02b9401d6..000000000 --- a/tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::utest1,bin,daemon diff --git a/tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/config/etc/passwd b/tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/config/etc/shadow b/tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/groupmems.test b/tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/groupmems.test deleted file mode 100755 index 58f09cd7b..000000000 --- a/tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/groupmems.test +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by a regular user) can list the users of a group, even if group is locked" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Create lock file for /etc/group..." -touch /etc/group.lock -echo "done" - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -rm -f /etc/group.lock - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/run_groupmems.exp b/tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/run_groupmems.exp deleted file mode 100755 index a628348be..000000000 --- a/tests/grouptools/groupmems/45_groupmems_user_list_users-group_locked/run_groupmems.exp +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -l\r" ;# -expect -re "\nutest1 bin daemon \r" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/config.txt b/tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/config/etc/group b/tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/config/etc/group deleted file mode 100644 index bd6da4e7a..000000000 --- a/tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1,bin,daemon diff --git a/tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/config/etc/gshadow b/tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/config/etc/gshadow deleted file mode 100644 index 02b9401d6..000000000 --- a/tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::utest1,bin,daemon diff --git a/tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/config/etc/passwd b/tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/config/etc/shadow b/tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/groupmems.test b/tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/groupmems.test deleted file mode 100755 index a01a10e8f..000000000 --- a/tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/groupmems.test +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by a regular user) can list the users of a group, even if gshadow is locked" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Create lock file for /etc/gshadow..." -touch /etc/gshadow.lock -echo "done" - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -rm -f /etc/gshadow.lock - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/run_groupmems.exp b/tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/run_groupmems.exp deleted file mode 100755 index a628348be..000000000 --- a/tests/grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/run_groupmems.exp +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -l\r" ;# -expect -re "\nutest1 bin daemon \r" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/config.txt b/tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/config/etc/group b/tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/config/etc/group deleted file mode 100644 index 7505b93b9..000000000 --- a/tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242: diff --git a/tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/config/etc/gshadow b/tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/config/etc/gshadow deleted file mode 100644 index 9945adca0..000000000 --- a/tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:: diff --git a/tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/config/etc/passwd b/tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/config/etc/shadow b/tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/groupmems.test b/tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/groupmems.test deleted file mode 100755 index 302b68979..000000000 --- a/tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/groupmems.test +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (-a) fails if the group file is locked" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Create lock file for /etc/group..." -touch /etc/group.lock -echo "done" - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -rm -f /etc/group.lock - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/run_groupmems.exp b/tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/run_groupmems.exp deleted file mode 100755 index 8d5e55e2f..000000000 --- a/tests/grouptools/groupmems/47_groupmems_user_add_user-group_locked/run_groupmems.exp +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -a utest1\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" - -expect "groupmems: cannot lock /etc/group; try again later." - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "2\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/config.txt b/tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/config/etc/group b/tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/config/etc/group deleted file mode 100644 index 7505b93b9..000000000 --- a/tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242: diff --git a/tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/config/etc/gshadow b/tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/config/etc/gshadow deleted file mode 100644 index 9945adca0..000000000 --- a/tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x:: diff --git a/tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/config/etc/passwd b/tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/config/etc/shadow b/tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/groupmems.test b/tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/groupmems.test deleted file mode 100755 index 38ac7a2f5..000000000 --- a/tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/groupmems.test +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (-a) fails if the gshadow file is locked" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Create lock file for /etc/gshadow..." -touch /etc/gshadow.lock -echo "done" - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -rm -f /etc/gshadow.lock - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/run_groupmems.exp b/tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/run_groupmems.exp deleted file mode 100755 index ba0ae56c9..000000000 --- a/tests/grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/run_groupmems.exp +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -a utest1\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" - -expect "groupmems: cannot lock /etc/gshadow; try again later." - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "2\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/config.txt b/tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/config/etc/group b/tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/config/etc/group deleted file mode 100644 index 7a0e29556..000000000 --- a/tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1 diff --git a/tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/config/etc/gshadow b/tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/config/etc/gshadow deleted file mode 100644 index c908c3943..000000000 --- a/tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::utest1 diff --git a/tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/config/etc/passwd b/tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/config/etc/shadow b/tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/groupmems.test b/tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/groupmems.test deleted file mode 100755 index cfb869967..000000000 --- a/tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/groupmems.test +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (-d) fails if the group file is locked" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Create lock file for /etc/group..." -touch /etc/group.lock -echo "done" - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -rm -f /etc/group.lock - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/run_groupmems.exp b/tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/run_groupmems.exp deleted file mode 100755 index d28b18c15..000000000 --- a/tests/grouptools/groupmems/49_groupmems_user_del_user-group_locked/run_groupmems.exp +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -d utest1\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" - -expect "groupmems: cannot lock /etc/group; try again later." - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "2\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/config.txt b/tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/config/etc/group b/tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/config/etc/group deleted file mode 100644 index 7a0e29556..000000000 --- a/tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1 diff --git a/tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/config/etc/gshadow b/tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/config/etc/gshadow deleted file mode 100644 index c908c3943..000000000 --- a/tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::utest1 diff --git a/tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/config/etc/passwd b/tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/config/etc/shadow b/tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/groupmems.test b/tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/groupmems.test deleted file mode 100755 index c2b5626e0..000000000 --- a/tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/groupmems.test +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (-d) fails if the gshadow file is locked" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Create lock file for /etc/gshadow..." -touch /etc/gshadow.lock -echo "done" - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -rm -f /etc/gshadow.lock - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/run_groupmems.exp b/tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/run_groupmems.exp deleted file mode 100755 index bf66b104f..000000000 --- a/tests/grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/run_groupmems.exp +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -d utest1\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" - -expect "groupmems: cannot lock /etc/gshadow; try again later." - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "2\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/config.txt b/tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/config/etc/group b/tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/config/etc/group deleted file mode 100644 index 7a0e29556..000000000 --- a/tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1 diff --git a/tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/config/etc/gshadow b/tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/config/etc/gshadow deleted file mode 100644 index c908c3943..000000000 --- a/tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::utest1 diff --git a/tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/config/etc/passwd b/tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/config/etc/shadow b/tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/groupmems.test b/tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/groupmems.test deleted file mode 100755 index 75272b3a5..000000000 --- a/tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/groupmems.test +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (-p) fails if the group file is locked" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Create lock file for /etc/group..." -touch /etc/group.lock -echo "done" - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -rm -f /etc/group.lock - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/run_groupmems.exp b/tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/run_groupmems.exp deleted file mode 100755 index 8f4746499..000000000 --- a/tests/grouptools/groupmems/51_groupmems_user_purge_user-group_locked/run_groupmems.exp +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -p\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" - -expect "groupmems: cannot lock /etc/group; try again later." - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "2\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/config.txt b/tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/config/etc/group b/tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/config/etc/group deleted file mode 100644 index 7a0e29556..000000000 --- a/tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/config/etc/group +++ /dev/null @@ -1,44 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1 diff --git a/tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/config/etc/gshadow b/tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/config/etc/gshadow deleted file mode 100644 index c908c3943..000000000 --- a/tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/config/etc/gshadow +++ /dev/null @@ -1,44 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::utest1 diff --git a/tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/config/etc/passwd b/tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/config/etc/shadow b/tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/groupmems.test b/tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/groupmems.test deleted file mode 100755 index ecff63f34..000000000 --- a/tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/groupmems.test +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (-p) fails if the gshadow file is locked" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Create lock file for /etc/gshadow..." -touch /etc/gshadow.lock -echo "done" - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -rm -f /etc/gshadow.lock - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/run_groupmems.exp b/tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/run_groupmems.exp deleted file mode 100755 index 3913f7a4b..000000000 --- a/tests/grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/run_groupmems.exp +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -p\r" ;# -expect "Password: " ;# Wait for the Password: prompt -# Wait a little bit more (it is not ready to receive the password) -sleep 0.1 - -send "myuserF00barbaz\r" ;# Send the password - -send_user "\n# password 'myuserF00barbaz' sent\n\n" - -expect "groupmems: cannot lock /etc/gshadow; try again later." - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "2\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/53_groupmems_usage/config.txt b/tests/grouptools/groupmems/53_groupmems_usage/config.txt deleted file mode 100644 index 31f56359e..000000000 --- a/tests/grouptools/groupmems/53_groupmems_usage/config.txt +++ /dev/null @@ -1,10 +0,0 @@ -# no testsuite password -# root password: rootF00barbaz -# myuser password: myuserF00barbaz - -user foo, in group users (only in /etc/group) -user foo, in group tty (only in /etc/gshadow) -user foo, in group floppy -user foo, admin of group disk -user foo, admin and member of group fax -user foo, admin and member of group cdrom (only in /etc/gshadow) diff --git a/tests/grouptools/groupmems/53_groupmems_usage/config/etc/group b/tests/grouptools/groupmems/53_groupmems_usage/config/etc/group deleted file mode 100644 index 101239088..000000000 --- a/tests/grouptools/groupmems/53_groupmems_usage/config/etc/group +++ /dev/null @@ -1,41 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: diff --git a/tests/grouptools/groupmems/53_groupmems_usage/config/etc/gshadow b/tests/grouptools/groupmems/53_groupmems_usage/config/etc/gshadow deleted file mode 100644 index ae4248659..000000000 --- a/tests/grouptools/groupmems/53_groupmems_usage/config/etc/gshadow +++ /dev/null @@ -1,41 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: diff --git a/tests/grouptools/groupmems/53_groupmems_usage/config/etc/passwd b/tests/grouptools/groupmems/53_groupmems_usage/config/etc/passwd deleted file mode 100644 index 43fc135a4..000000000 --- a/tests/grouptools/groupmems/53_groupmems_usage/config/etc/passwd +++ /dev/null @@ -1,19 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/grouptools/groupmems/53_groupmems_usage/config/etc/shadow b/tests/grouptools/groupmems/53_groupmems_usage/config/etc/shadow deleted file mode 100644 index 5f50d1873..000000000 --- a/tests/grouptools/groupmems/53_groupmems_usage/config/etc/shadow +++ /dev/null @@ -1,19 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: diff --git a/tests/grouptools/groupmems/53_groupmems_usage/data/usage.out b/tests/grouptools/groupmems/53_groupmems_usage/data/usage.out deleted file mode 100644 index 584313c5d..000000000 --- a/tests/grouptools/groupmems/53_groupmems_usage/data/usage.out +++ /dev/null @@ -1,13 +0,0 @@ -Usage: groupmems [options] [action] - -Options: - -g, --group groupname change groupname instead of the user's group - (root only) - -R, --root CHROOT_DIR directory to chroot into - -Actions: - -a, --add username add username to the members of the group - -d, --delete username remove username from the members of the group - -h, --help display this help message and exit - -p, --purge purge all members from the group - -l, --list list the members of the group diff --git a/tests/grouptools/groupmems/53_groupmems_usage/groupmems.test b/tests/grouptools/groupmems/53_groupmems_usage/groupmems.test deleted file mode 100755 index 7b3784a58..000000000 --- a/tests/grouptools/groupmems/53_groupmems_usage/groupmems.test +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems 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 groupmems usage (groupmems -h)..." -groupmems -h >tmp/usage.out - -echo "OK" - -echo "groupmems reported:" -echo "=======================================================================" -cat tmp/usage.out -echo "=======================================================================" -echo -n "Check the usage message..." -diff -au data/usage.out tmp/usage.out -echo "usage message OK." -rm -f tmp/usage.out - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/54_groupmems_usage_invalid_option/config.txt b/tests/grouptools/groupmems/54_groupmems_usage_invalid_option/config.txt deleted file mode 100644 index e9e4bbed8..000000000 --- a/tests/grouptools/groupmems/54_groupmems_usage_invalid_option/config.txt +++ /dev/null @@ -1 +0,0 @@ -group foo, GID 1000 diff --git a/tests/grouptools/groupmems/54_groupmems_usage_invalid_option/config/etc/group b/tests/grouptools/groupmems/54_groupmems_usage_invalid_option/config/etc/group deleted file mode 100644 index fecba0c4e..000000000 --- a/tests/grouptools/groupmems/54_groupmems_usage_invalid_option/config/etc/group +++ /dev/null @@ -1,42 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -foo:x:1000: diff --git a/tests/grouptools/groupmems/54_groupmems_usage_invalid_option/config/etc/gshadow b/tests/grouptools/groupmems/54_groupmems_usage_invalid_option/config/etc/gshadow deleted file mode 100644 index 5042e5818..000000000 --- a/tests/grouptools/groupmems/54_groupmems_usage_invalid_option/config/etc/gshadow +++ /dev/null @@ -1,42 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -foo:*:: diff --git a/tests/grouptools/groupmems/54_groupmems_usage_invalid_option/config/etc/login.defs b/tests/grouptools/groupmems/54_groupmems_usage_invalid_option/config/etc/login.defs deleted file mode 100644 index 62f9d227c..000000000 --- a/tests/grouptools/groupmems/54_groupmems_usage_invalid_option/config/etc/login.defs +++ /dev/null @@ -1,302 +0,0 @@ -# -# /etc/login.defs - Configuration control definitions for the login package. -# -# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. -# If unspecified, some arbitrary (and possibly incorrect) value will -# be assumed. All other items are optional - if not specified then -# the described action or option will be inhibited. -# -# Comment lines (lines beginning with "#") and blank lines are ignored. -# -# Modified for Linux. --marekm - -# REQUIRED for useradd/userdel/usermod -# Directory where mailboxes reside, _or_ name of file, relative to the -# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, -# MAIL_DIR takes precedence. -# -# Essentially: -# - MAIL_DIR defines the location of users mail spool files -# (for mbox use) by appending the username to MAIL_DIR as defined -# below. -# - MAIL_FILE defines the location of the users mail spool files as the -# fully-qualified filename obtained by prepending the user home -# directory before $MAIL_FILE -# -# NOTE: This is no more used for setting up users MAIL environment variable -# which is, starting from shadow 4.0.12-1 in Debian, entirely the -# job of the pam_mail PAM modules -# See default PAM configuration files provided for -# login, su, etc. -# -# This is a temporary situation: setting these variables will soon -# move to /etc/default/useradd and the variables will then be -# no more supported -MAIL_DIR /var/mail -#MAIL_FILE .mail - -# -# Enable logging and display of /var/log/faillog login failure info. -# This option conflicts with the pam_tally PAM module. -# -FAILLOG_ENAB yes - -# -# Enable display of unknown usernames when login failures are recorded. -# -# WARNING: Unknown usernames may become world readable. -# See #290803 and #298773 for details about how this could become a security -# concern -LOG_UNKFAIL_ENAB no - -# -# Enable logging of successful logins -# -LOG_OK_LOGINS no - -# -# Enable "syslog" logging of su activity - in addition to sulog file logging. -# SYSLOG_SG_ENAB does the same for newgrp and sg. -# -SYSLOG_SU_ENAB yes -SYSLOG_SG_ENAB yes - -# -# If defined, all su activity is logged to this file. -# -#SULOG_FILE /var/log/sulog - -# -# If defined, file which maps tty line to TERM environment parameter. -# Each line of the file is in a format something like "vt100 tty01". -# -#TTYTYPE_FILE /etc/ttytype - -# -# If defined, login failures will be logged here in a utmp format -# last, when invoked as lastb, will read /var/log/btmp, so... -# -FTMP_FILE /var/log/btmp - -# -# If defined, the command name to display when running "su -". For -# example, if this is defined as "su" then a "ps" will display the -# command is "-su". If not defined, then "ps" would display the -# name of the shell actually being run, e.g. something like "-sh". -# -SU_NAME su - -# -# If defined, file which inhibits all the usual chatter during the login -# sequence. If a full pathname, then hushed mode will be enabled if the -# user's name or shell are found in the file. If not a full pathname, then -# hushed mode will be enabled if the file exists in the user's home directory. -# -HUSHLOGIN_FILE .hushlogin -#HUSHLOGIN_FILE /etc/hushlogins - -# -# *REQUIRED* The default PATH settings, for superuser and normal users. -# -# (they are minimal, add the rest in the shell startup files) -ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games - -# -# Terminal permissions -# -# TTYGROUP Login tty will be assigned this group ownership. -# TTYPERM Login tty will be set to this permission. -# -# If you have a "write" program which is "setgid" to a special group -# which owns the terminals, define TTYGROUP to the group number and -# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign -# TTYPERM to either 622 or 600. -# -# In Debian /usr/bin/bsd-write or similar programs are setgid tty -# However, the default and recommended value for TTYPERM is still 0600 -# to not allow anyone to write to anyone else console or terminal - -# Users can still allow other people to write them by issuing -# the "mesg y" command. - -TTYGROUP tty -TTYPERM 0600 - -# -# Login configuration initializations: -# -# ERASECHAR Terminal ERASE character ('\010' = backspace). -# KILLCHAR Terminal KILL character ('\025' = CTRL/U). -# UMASK Default "umask" value. -# -# The ERASECHAR and KILLCHAR are used only on System V machines. -# -# UMASK usage is discouraged because it catches only some classes of user -# entries to system, in fact only those made through login(1), while setting -# umask in shell rc file will catch also logins through su, cron, ssh etc. -# -# At the same time, using shell rc to set umask won't catch entries which use -# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" -# user and alike. -# -# Therefore the use of pam_umask is recommended (Debian package libpam-umask) -# as the solution which catches all these cases on PAM-enabled systems. -# -# This avoids the confusion created by having the umask set -# in two different places -- in login.defs and shell rc files (i.e. -# /etc/profile). -# -# For discussion, see #314539 and #248150 as well as the thread starting at -# http://lists.debian.org/debian-devel/2005/06/msg01598.html -# -# Prefix these values with "0" to get octal, "0x" to get hexadecimal. -# -ERASECHAR 0177 -KILLCHAR 025 -# 022 is the "historical" value in Debian for UMASK when it was used -# 027, or even 077, could be considered better for privacy -# There is no One True Answer here : each sysadmin must make up their -# mind. -#UMASK 022 - -# -# Password aging controls: -# -# PASS_MAX_DAYS Maximum number of days a password may be used. -# PASS_MIN_DAYS Minimum number of days allowed between password changes. -# PASS_WARN_AGE Number of days warning given before a password expires. -# -PASS_MAX_DAYS 99999 -PASS_MIN_DAYS 0 -PASS_WARN_AGE 7 - -# -# Min/max values for automatic uid selection in useradd -# -UID_MIN 1000 -UID_MAX 60000 - -# -# Min/max values for automatic gid selection in groupadd -# -GID_MIN 100 -GID_MAX 60000 - -# -# Max number of login retries if password is bad. This will most likely be -# overridden 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 is no. -# -DEFAULT_HOME yes - -# -# If defined, this command is run when removing a user. -# It should remove any at/cron/print jobs etc. owned by -# the user to be removed (passed as the first argument). -# -#USERDEL_CMD /usr/sbin/userdel_local - -# -# This enables userdel to remove user groups if no members exist. -# -# Other former uses of this variable such as setting the umask when -# user==primary group are not used in PAM environments, thus in Debian -# -USERGROUPS_ENAB yes - -# -# Instead of the real user shell, the program specified by this parameter -# will be launched, although its visible name (argv[0]) will be the shell's. -# The program may do whatever it wants (logging, additional authentification, -# banner, ...) before running the actual shell. -# -# FAKE_SHELL /bin/fakeshell - -# -# If defined, either full pathname of a file containing device names or -# a ":" delimited list of device names. Root logins will be allowed only -# upon these devices. -# -# This variable is used by login and su. -# -#CONSOLE /etc/consoles -#CONSOLE console:tty01:tty02:tty03:tty04 - -# -# List of groups to add to the user's supplementary group set -# when logging in on the console (as determined by the CONSOLE -# setting). Default is none. -# -# Use with caution - it is possible for users to gain permanent -# access to these groups, even when not logged in on the console. -# How to do it is left as an exercise for the reader... -# -# This variable is used by login and su. -# -#CONSOLE_GROUPS floppy:audio:cdrom - -################# OBSOLETED BY PAM ############## -# # -# These options are now handled by PAM. Please # -# edit the appropriate file in /etc/pam.d/ to # -# enable the equivalents of them. -# -############### - -#MOTD_FILE -#DIALUPS_CHECK_ENAB -#LASTLOG_ENAB -#MAIL_CHECK_ENAB -#OBSCURE_CHECKS_ENAB -#PORTTIME_CHECKS_ENAB -#SU_WHEEL_ONLY -#PASS_CHANGE_TRIES -#PASS_ALWAYS_WARN -#ENVIRON_FILE -#NOLOGINS_FILE -#ISSUE_FILE -#PASS_MIN_LEN -#PASS_MAX_LEN -#ULIMIT -#ENV_HZ -#CHFN_AUTH -#CHSH_AUTH -#FAIL_DELAY - -################# OBSOLETED ####################### -# # -# These options are no more handled by shadow. # -# # -# Shadow utilities will display a warning if they # -# still appear. # -# # -################################################### - -# CLOSE_SESSIONS -# LOGIN_STRING -# NO_PASSWORD_CONSOLE -# QMAIL_DIR - - - diff --git a/tests/grouptools/groupmems/54_groupmems_usage_invalid_option/config/etc/passwd b/tests/grouptools/groupmems/54_groupmems_usage_invalid_option/config/etc/passwd deleted file mode 100644 index 43fc135a4..000000000 --- a/tests/grouptools/groupmems/54_groupmems_usage_invalid_option/config/etc/passwd +++ /dev/null @@ -1,19 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/grouptools/groupmems/54_groupmems_usage_invalid_option/config/etc/shadow b/tests/grouptools/groupmems/54_groupmems_usage_invalid_option/config/etc/shadow deleted file mode 100644 index 5f50d1873..000000000 --- a/tests/grouptools/groupmems/54_groupmems_usage_invalid_option/config/etc/shadow +++ /dev/null @@ -1,19 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: diff --git a/tests/grouptools/groupmems/54_groupmems_usage_invalid_option/data/groupmems.err b/tests/grouptools/groupmems/54_groupmems_usage_invalid_option/data/groupmems.err deleted file mode 100644 index a6ac1f6b2..000000000 --- a/tests/grouptools/groupmems/54_groupmems_usage_invalid_option/data/groupmems.err +++ /dev/null @@ -1,14 +0,0 @@ -groupmems: invalid option -- 'Z' -Usage: groupmems [options] [action] - -Options: - -g, --group groupname change groupname instead of the user's group - (root only) - -R, --root CHROOT_DIR directory to chroot into - -Actions: - -a, --add username add username to the members of the group - -d, --delete username remove username from the members of the group - -h, --help display this help message and exit - -p, --purge purge all members from the group - -l, --list list the members of the group diff --git a/tests/grouptools/groupmems/54_groupmems_usage_invalid_option/groupmems.test b/tests/grouptools/groupmems/54_groupmems_usage_invalid_option/groupmems.test deleted file mode 100755 index d0e1fa795..000000000 --- a/tests/grouptools/groupmems/54_groupmems_usage_invalid_option/groupmems.test +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems reports usage when called with an invalid option" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Call groupmems with an invalid option (groupmems -Z bar -g 1000 foo)..." -groupmems -Z bar -g 1000 -a foo 2>tmp/groupmems.err && exit 1 || { - status=$? -} -echo "OK" - -echo -n "Check returned status ($status)..." -test "$status" = "1" -echo "OK" - -echo "groupmems reported:" -echo "=======================================================================" -cat tmp/groupmems.err -echo "=======================================================================" -echo -n "Check that there were a failure message..." -diff -au data/groupmems.err tmp/groupmems.err -echo "error message OK." -rm -f tmp/groupmems.err - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/55_groupmems_usage-a-d/config.txt b/tests/grouptools/groupmems/55_groupmems_usage-a-d/config.txt deleted file mode 100644 index e9e4bbed8..000000000 --- a/tests/grouptools/groupmems/55_groupmems_usage-a-d/config.txt +++ /dev/null @@ -1 +0,0 @@ -group foo, GID 1000 diff --git a/tests/grouptools/groupmems/55_groupmems_usage-a-d/config/etc/group b/tests/grouptools/groupmems/55_groupmems_usage-a-d/config/etc/group deleted file mode 100644 index fecba0c4e..000000000 --- a/tests/grouptools/groupmems/55_groupmems_usage-a-d/config/etc/group +++ /dev/null @@ -1,42 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -foo:x:1000: diff --git a/tests/grouptools/groupmems/55_groupmems_usage-a-d/config/etc/gshadow b/tests/grouptools/groupmems/55_groupmems_usage-a-d/config/etc/gshadow deleted file mode 100644 index 5042e5818..000000000 --- a/tests/grouptools/groupmems/55_groupmems_usage-a-d/config/etc/gshadow +++ /dev/null @@ -1,42 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -foo:*:: diff --git a/tests/grouptools/groupmems/55_groupmems_usage-a-d/config/etc/login.defs b/tests/grouptools/groupmems/55_groupmems_usage-a-d/config/etc/login.defs deleted file mode 100644 index 62f9d227c..000000000 --- a/tests/grouptools/groupmems/55_groupmems_usage-a-d/config/etc/login.defs +++ /dev/null @@ -1,302 +0,0 @@ -# -# /etc/login.defs - Configuration control definitions for the login package. -# -# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. -# If unspecified, some arbitrary (and possibly incorrect) value will -# be assumed. All other items are optional - if not specified then -# the described action or option will be inhibited. -# -# Comment lines (lines beginning with "#") and blank lines are ignored. -# -# Modified for Linux. --marekm - -# REQUIRED for useradd/userdel/usermod -# Directory where mailboxes reside, _or_ name of file, relative to the -# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, -# MAIL_DIR takes precedence. -# -# Essentially: -# - MAIL_DIR defines the location of users mail spool files -# (for mbox use) by appending the username to MAIL_DIR as defined -# below. -# - MAIL_FILE defines the location of the users mail spool files as the -# fully-qualified filename obtained by prepending the user home -# directory before $MAIL_FILE -# -# NOTE: This is no more used for setting up users MAIL environment variable -# which is, starting from shadow 4.0.12-1 in Debian, entirely the -# job of the pam_mail PAM modules -# See default PAM configuration files provided for -# login, su, etc. -# -# This is a temporary situation: setting these variables will soon -# move to /etc/default/useradd and the variables will then be -# no more supported -MAIL_DIR /var/mail -#MAIL_FILE .mail - -# -# Enable logging and display of /var/log/faillog login failure info. -# This option conflicts with the pam_tally PAM module. -# -FAILLOG_ENAB yes - -# -# Enable display of unknown usernames when login failures are recorded. -# -# WARNING: Unknown usernames may become world readable. -# See #290803 and #298773 for details about how this could become a security -# concern -LOG_UNKFAIL_ENAB no - -# -# Enable logging of successful logins -# -LOG_OK_LOGINS no - -# -# Enable "syslog" logging of su activity - in addition to sulog file logging. -# SYSLOG_SG_ENAB does the same for newgrp and sg. -# -SYSLOG_SU_ENAB yes -SYSLOG_SG_ENAB yes - -# -# If defined, all su activity is logged to this file. -# -#SULOG_FILE /var/log/sulog - -# -# If defined, file which maps tty line to TERM environment parameter. -# Each line of the file is in a format something like "vt100 tty01". -# -#TTYTYPE_FILE /etc/ttytype - -# -# If defined, login failures will be logged here in a utmp format -# last, when invoked as lastb, will read /var/log/btmp, so... -# -FTMP_FILE /var/log/btmp - -# -# If defined, the command name to display when running "su -". For -# example, if this is defined as "su" then a "ps" will display the -# command is "-su". If not defined, then "ps" would display the -# name of the shell actually being run, e.g. something like "-sh". -# -SU_NAME su - -# -# If defined, file which inhibits all the usual chatter during the login -# sequence. If a full pathname, then hushed mode will be enabled if the -# user's name or shell are found in the file. If not a full pathname, then -# hushed mode will be enabled if the file exists in the user's home directory. -# -HUSHLOGIN_FILE .hushlogin -#HUSHLOGIN_FILE /etc/hushlogins - -# -# *REQUIRED* The default PATH settings, for superuser and normal users. -# -# (they are minimal, add the rest in the shell startup files) -ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games - -# -# Terminal permissions -# -# TTYGROUP Login tty will be assigned this group ownership. -# TTYPERM Login tty will be set to this permission. -# -# If you have a "write" program which is "setgid" to a special group -# which owns the terminals, define TTYGROUP to the group number and -# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign -# TTYPERM to either 622 or 600. -# -# In Debian /usr/bin/bsd-write or similar programs are setgid tty -# However, the default and recommended value for TTYPERM is still 0600 -# to not allow anyone to write to anyone else console or terminal - -# Users can still allow other people to write them by issuing -# the "mesg y" command. - -TTYGROUP tty -TTYPERM 0600 - -# -# Login configuration initializations: -# -# ERASECHAR Terminal ERASE character ('\010' = backspace). -# KILLCHAR Terminal KILL character ('\025' = CTRL/U). -# UMASK Default "umask" value. -# -# The ERASECHAR and KILLCHAR are used only on System V machines. -# -# UMASK usage is discouraged because it catches only some classes of user -# entries to system, in fact only those made through login(1), while setting -# umask in shell rc file will catch also logins through su, cron, ssh etc. -# -# At the same time, using shell rc to set umask won't catch entries which use -# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" -# user and alike. -# -# Therefore the use of pam_umask is recommended (Debian package libpam-umask) -# as the solution which catches all these cases on PAM-enabled systems. -# -# This avoids the confusion created by having the umask set -# in two different places -- in login.defs and shell rc files (i.e. -# /etc/profile). -# -# For discussion, see #314539 and #248150 as well as the thread starting at -# http://lists.debian.org/debian-devel/2005/06/msg01598.html -# -# Prefix these values with "0" to get octal, "0x" to get hexadecimal. -# -ERASECHAR 0177 -KILLCHAR 025 -# 022 is the "historical" value in Debian for UMASK when it was used -# 027, or even 077, could be considered better for privacy -# There is no One True Answer here : each sysadmin must make up their -# mind. -#UMASK 022 - -# -# Password aging controls: -# -# PASS_MAX_DAYS Maximum number of days a password may be used. -# PASS_MIN_DAYS Minimum number of days allowed between password changes. -# PASS_WARN_AGE Number of days warning given before a password expires. -# -PASS_MAX_DAYS 99999 -PASS_MIN_DAYS 0 -PASS_WARN_AGE 7 - -# -# Min/max values for automatic uid selection in useradd -# -UID_MIN 1000 -UID_MAX 60000 - -# -# Min/max values for automatic gid selection in groupadd -# -GID_MIN 100 -GID_MAX 60000 - -# -# Max number of login retries if password is bad. This will most likely be -# overridden 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 is no. -# -DEFAULT_HOME yes - -# -# If defined, this command is run when removing a user. -# It should remove any at/cron/print jobs etc. owned by -# the user to be removed (passed as the first argument). -# -#USERDEL_CMD /usr/sbin/userdel_local - -# -# This enables userdel to remove user groups if no members exist. -# -# Other former uses of this variable such as setting the umask when -# user==primary group are not used in PAM environments, thus in Debian -# -USERGROUPS_ENAB yes - -# -# Instead of the real user shell, the program specified by this parameter -# will be launched, although its visible name (argv[0]) will be the shell's. -# The program may do whatever it wants (logging, additional authentification, -# banner, ...) before running the actual shell. -# -# FAKE_SHELL /bin/fakeshell - -# -# If defined, either full pathname of a file containing device names or -# a ":" delimited list of device names. Root logins will be allowed only -# upon these devices. -# -# This variable is used by login and su. -# -#CONSOLE /etc/consoles -#CONSOLE console:tty01:tty02:tty03:tty04 - -# -# List of groups to add to the user's supplementary group set -# when logging in on the console (as determined by the CONSOLE -# setting). Default is none. -# -# Use with caution - it is possible for users to gain permanent -# access to these groups, even when not logged in on the console. -# How to do it is left as an exercise for the reader... -# -# This variable is used by login and su. -# -#CONSOLE_GROUPS floppy:audio:cdrom - -################# OBSOLETED BY PAM ############## -# # -# These options are now handled by PAM. Please # -# edit the appropriate file in /etc/pam.d/ to # -# enable the equivalents of them. -# -############### - -#MOTD_FILE -#DIALUPS_CHECK_ENAB -#LASTLOG_ENAB -#MAIL_CHECK_ENAB -#OBSCURE_CHECKS_ENAB -#PORTTIME_CHECKS_ENAB -#SU_WHEEL_ONLY -#PASS_CHANGE_TRIES -#PASS_ALWAYS_WARN -#ENVIRON_FILE -#NOLOGINS_FILE -#ISSUE_FILE -#PASS_MIN_LEN -#PASS_MAX_LEN -#ULIMIT -#ENV_HZ -#CHFN_AUTH -#CHSH_AUTH -#FAIL_DELAY - -################# OBSOLETED ####################### -# # -# These options are no more handled by shadow. # -# # -# Shadow utilities will display a warning if they # -# still appear. # -# # -################################################### - -# CLOSE_SESSIONS -# LOGIN_STRING -# NO_PASSWORD_CONSOLE -# QMAIL_DIR - - - diff --git a/tests/grouptools/groupmems/55_groupmems_usage-a-d/config/etc/passwd b/tests/grouptools/groupmems/55_groupmems_usage-a-d/config/etc/passwd deleted file mode 100644 index 43fc135a4..000000000 --- a/tests/grouptools/groupmems/55_groupmems_usage-a-d/config/etc/passwd +++ /dev/null @@ -1,19 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/grouptools/groupmems/55_groupmems_usage-a-d/config/etc/shadow b/tests/grouptools/groupmems/55_groupmems_usage-a-d/config/etc/shadow deleted file mode 100644 index 5f50d1873..000000000 --- a/tests/grouptools/groupmems/55_groupmems_usage-a-d/config/etc/shadow +++ /dev/null @@ -1,19 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: diff --git a/tests/grouptools/groupmems/55_groupmems_usage-a-d/data/groupmems.err b/tests/grouptools/groupmems/55_groupmems_usage-a-d/data/groupmems.err deleted file mode 100644 index 584313c5d..000000000 --- a/tests/grouptools/groupmems/55_groupmems_usage-a-d/data/groupmems.err +++ /dev/null @@ -1,13 +0,0 @@ -Usage: groupmems [options] [action] - -Options: - -g, --group groupname change groupname instead of the user's group - (root only) - -R, --root CHROOT_DIR directory to chroot into - -Actions: - -a, --add username add username to the members of the group - -d, --delete username remove username from the members of the group - -h, --help display this help message and exit - -p, --purge purge all members from the group - -l, --list list the members of the group diff --git a/tests/grouptools/groupmems/55_groupmems_usage-a-d/groupmems.test b/tests/grouptools/groupmems/55_groupmems_usage-a-d/groupmems.test deleted file mode 100755 index 4b82e0da0..000000000 --- a/tests/grouptools/groupmems/55_groupmems_usage-a-d/groupmems.test +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems reports usage if the -a and -d options are used at the same time" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Call groupmems with the -a and -d options (groupmems -a root -d nobody -g foo)..." -groupmems -a root -d nobody -g foo 2>tmp/groupmems.err && exit 1 || { - status=$? -} -echo "OK" - -echo -n "Check returned status ($status)..." -test "$status" = "1" -echo "OK" - -echo "groupmems reported:" -echo "=======================================================================" -cat tmp/groupmems.err -echo "=======================================================================" -echo -n "Check that there were a failure message..." -diff -au data/groupmems.err tmp/groupmems.err -echo "error message OK." -rm -f tmp/groupmems.err - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/56_groupmems_usage_extra_arg/config.txt b/tests/grouptools/groupmems/56_groupmems_usage_extra_arg/config.txt deleted file mode 100644 index e9e4bbed8..000000000 --- a/tests/grouptools/groupmems/56_groupmems_usage_extra_arg/config.txt +++ /dev/null @@ -1 +0,0 @@ -group foo, GID 1000 diff --git a/tests/grouptools/groupmems/56_groupmems_usage_extra_arg/config/etc/group b/tests/grouptools/groupmems/56_groupmems_usage_extra_arg/config/etc/group deleted file mode 100644 index fecba0c4e..000000000 --- a/tests/grouptools/groupmems/56_groupmems_usage_extra_arg/config/etc/group +++ /dev/null @@ -1,42 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -foo:x:1000: diff --git a/tests/grouptools/groupmems/56_groupmems_usage_extra_arg/config/etc/gshadow b/tests/grouptools/groupmems/56_groupmems_usage_extra_arg/config/etc/gshadow deleted file mode 100644 index 5042e5818..000000000 --- a/tests/grouptools/groupmems/56_groupmems_usage_extra_arg/config/etc/gshadow +++ /dev/null @@ -1,42 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -foo:*:: diff --git a/tests/grouptools/groupmems/56_groupmems_usage_extra_arg/config/etc/login.defs b/tests/grouptools/groupmems/56_groupmems_usage_extra_arg/config/etc/login.defs deleted file mode 100644 index 62f9d227c..000000000 --- a/tests/grouptools/groupmems/56_groupmems_usage_extra_arg/config/etc/login.defs +++ /dev/null @@ -1,302 +0,0 @@ -# -# /etc/login.defs - Configuration control definitions for the login package. -# -# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. -# If unspecified, some arbitrary (and possibly incorrect) value will -# be assumed. All other items are optional - if not specified then -# the described action or option will be inhibited. -# -# Comment lines (lines beginning with "#") and blank lines are ignored. -# -# Modified for Linux. --marekm - -# REQUIRED for useradd/userdel/usermod -# Directory where mailboxes reside, _or_ name of file, relative to the -# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, -# MAIL_DIR takes precedence. -# -# Essentially: -# - MAIL_DIR defines the location of users mail spool files -# (for mbox use) by appending the username to MAIL_DIR as defined -# below. -# - MAIL_FILE defines the location of the users mail spool files as the -# fully-qualified filename obtained by prepending the user home -# directory before $MAIL_FILE -# -# NOTE: This is no more used for setting up users MAIL environment variable -# which is, starting from shadow 4.0.12-1 in Debian, entirely the -# job of the pam_mail PAM modules -# See default PAM configuration files provided for -# login, su, etc. -# -# This is a temporary situation: setting these variables will soon -# move to /etc/default/useradd and the variables will then be -# no more supported -MAIL_DIR /var/mail -#MAIL_FILE .mail - -# -# Enable logging and display of /var/log/faillog login failure info. -# This option conflicts with the pam_tally PAM module. -# -FAILLOG_ENAB yes - -# -# Enable display of unknown usernames when login failures are recorded. -# -# WARNING: Unknown usernames may become world readable. -# See #290803 and #298773 for details about how this could become a security -# concern -LOG_UNKFAIL_ENAB no - -# -# Enable logging of successful logins -# -LOG_OK_LOGINS no - -# -# Enable "syslog" logging of su activity - in addition to sulog file logging. -# SYSLOG_SG_ENAB does the same for newgrp and sg. -# -SYSLOG_SU_ENAB yes -SYSLOG_SG_ENAB yes - -# -# If defined, all su activity is logged to this file. -# -#SULOG_FILE /var/log/sulog - -# -# If defined, file which maps tty line to TERM environment parameter. -# Each line of the file is in a format something like "vt100 tty01". -# -#TTYTYPE_FILE /etc/ttytype - -# -# If defined, login failures will be logged here in a utmp format -# last, when invoked as lastb, will read /var/log/btmp, so... -# -FTMP_FILE /var/log/btmp - -# -# If defined, the command name to display when running "su -". For -# example, if this is defined as "su" then a "ps" will display the -# command is "-su". If not defined, then "ps" would display the -# name of the shell actually being run, e.g. something like "-sh". -# -SU_NAME su - -# -# If defined, file which inhibits all the usual chatter during the login -# sequence. If a full pathname, then hushed mode will be enabled if the -# user's name or shell are found in the file. If not a full pathname, then -# hushed mode will be enabled if the file exists in the user's home directory. -# -HUSHLOGIN_FILE .hushlogin -#HUSHLOGIN_FILE /etc/hushlogins - -# -# *REQUIRED* The default PATH settings, for superuser and normal users. -# -# (they are minimal, add the rest in the shell startup files) -ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/games - -# -# Terminal permissions -# -# TTYGROUP Login tty will be assigned this group ownership. -# TTYPERM Login tty will be set to this permission. -# -# If you have a "write" program which is "setgid" to a special group -# which owns the terminals, define TTYGROUP to the group number and -# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign -# TTYPERM to either 622 or 600. -# -# In Debian /usr/bin/bsd-write or similar programs are setgid tty -# However, the default and recommended value for TTYPERM is still 0600 -# to not allow anyone to write to anyone else console or terminal - -# Users can still allow other people to write them by issuing -# the "mesg y" command. - -TTYGROUP tty -TTYPERM 0600 - -# -# Login configuration initializations: -# -# ERASECHAR Terminal ERASE character ('\010' = backspace). -# KILLCHAR Terminal KILL character ('\025' = CTRL/U). -# UMASK Default "umask" value. -# -# The ERASECHAR and KILLCHAR are used only on System V machines. -# -# UMASK usage is discouraged because it catches only some classes of user -# entries to system, in fact only those made through login(1), while setting -# umask in shell rc file will catch also logins through su, cron, ssh etc. -# -# At the same time, using shell rc to set umask won't catch entries which use -# non-shell executables in place of login shell, like /usr/sbin/pppd for "ppp" -# user and alike. -# -# Therefore the use of pam_umask is recommended (Debian package libpam-umask) -# as the solution which catches all these cases on PAM-enabled systems. -# -# This avoids the confusion created by having the umask set -# in two different places -- in login.defs and shell rc files (i.e. -# /etc/profile). -# -# For discussion, see #314539 and #248150 as well as the thread starting at -# http://lists.debian.org/debian-devel/2005/06/msg01598.html -# -# Prefix these values with "0" to get octal, "0x" to get hexadecimal. -# -ERASECHAR 0177 -KILLCHAR 025 -# 022 is the "historical" value in Debian for UMASK when it was used -# 027, or even 077, could be considered better for privacy -# There is no One True Answer here : each sysadmin must make up their -# mind. -#UMASK 022 - -# -# Password aging controls: -# -# PASS_MAX_DAYS Maximum number of days a password may be used. -# PASS_MIN_DAYS Minimum number of days allowed between password changes. -# PASS_WARN_AGE Number of days warning given before a password expires. -# -PASS_MAX_DAYS 99999 -PASS_MIN_DAYS 0 -PASS_WARN_AGE 7 - -# -# Min/max values for automatic uid selection in useradd -# -UID_MIN 1000 -UID_MAX 60000 - -# -# Min/max values for automatic gid selection in groupadd -# -GID_MIN 100 -GID_MAX 60000 - -# -# Max number of login retries if password is bad. This will most likely be -# overridden 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 is no. -# -DEFAULT_HOME yes - -# -# If defined, this command is run when removing a user. -# It should remove any at/cron/print jobs etc. owned by -# the user to be removed (passed as the first argument). -# -#USERDEL_CMD /usr/sbin/userdel_local - -# -# This enables userdel to remove user groups if no members exist. -# -# Other former uses of this variable such as setting the umask when -# user==primary group are not used in PAM environments, thus in Debian -# -USERGROUPS_ENAB yes - -# -# Instead of the real user shell, the program specified by this parameter -# will be launched, although its visible name (argv[0]) will be the shell's. -# The program may do whatever it wants (logging, additional authentification, -# banner, ...) before running the actual shell. -# -# FAKE_SHELL /bin/fakeshell - -# -# If defined, either full pathname of a file containing device names or -# a ":" delimited list of device names. Root logins will be allowed only -# upon these devices. -# -# This variable is used by login and su. -# -#CONSOLE /etc/consoles -#CONSOLE console:tty01:tty02:tty03:tty04 - -# -# List of groups to add to the user's supplementary group set -# when logging in on the console (as determined by the CONSOLE -# setting). Default is none. -# -# Use with caution - it is possible for users to gain permanent -# access to these groups, even when not logged in on the console. -# How to do it is left as an exercise for the reader... -# -# This variable is used by login and su. -# -#CONSOLE_GROUPS floppy:audio:cdrom - -################# OBSOLETED BY PAM ############## -# # -# These options are now handled by PAM. Please # -# edit the appropriate file in /etc/pam.d/ to # -# enable the equivalents of them. -# -############### - -#MOTD_FILE -#DIALUPS_CHECK_ENAB -#LASTLOG_ENAB -#MAIL_CHECK_ENAB -#OBSCURE_CHECKS_ENAB -#PORTTIME_CHECKS_ENAB -#SU_WHEEL_ONLY -#PASS_CHANGE_TRIES -#PASS_ALWAYS_WARN -#ENVIRON_FILE -#NOLOGINS_FILE -#ISSUE_FILE -#PASS_MIN_LEN -#PASS_MAX_LEN -#ULIMIT -#ENV_HZ -#CHFN_AUTH -#CHSH_AUTH -#FAIL_DELAY - -################# OBSOLETED ####################### -# # -# These options are no more handled by shadow. # -# # -# Shadow utilities will display a warning if they # -# still appear. # -# # -################################################### - -# CLOSE_SESSIONS -# LOGIN_STRING -# NO_PASSWORD_CONSOLE -# QMAIL_DIR - - - diff --git a/tests/grouptools/groupmems/56_groupmems_usage_extra_arg/config/etc/passwd b/tests/grouptools/groupmems/56_groupmems_usage_extra_arg/config/etc/passwd deleted file mode 100644 index 43fc135a4..000000000 --- a/tests/grouptools/groupmems/56_groupmems_usage_extra_arg/config/etc/passwd +++ /dev/null @@ -1,19 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false diff --git a/tests/grouptools/groupmems/56_groupmems_usage_extra_arg/config/etc/shadow b/tests/grouptools/groupmems/56_groupmems_usage_extra_arg/config/etc/shadow deleted file mode 100644 index 5f50d1873..000000000 --- a/tests/grouptools/groupmems/56_groupmems_usage_extra_arg/config/etc/shadow +++ /dev/null @@ -1,19 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: diff --git a/tests/grouptools/groupmems/56_groupmems_usage_extra_arg/data/groupmems.err b/tests/grouptools/groupmems/56_groupmems_usage_extra_arg/data/groupmems.err deleted file mode 100644 index 584313c5d..000000000 --- a/tests/grouptools/groupmems/56_groupmems_usage_extra_arg/data/groupmems.err +++ /dev/null @@ -1,13 +0,0 @@ -Usage: groupmems [options] [action] - -Options: - -g, --group groupname change groupname instead of the user's group - (root only) - -R, --root CHROOT_DIR directory to chroot into - -Actions: - -a, --add username add username to the members of the group - -d, --delete username remove username from the members of the group - -h, --help display this help message and exit - -p, --purge purge all members from the group - -l, --list list the members of the group diff --git a/tests/grouptools/groupmems/56_groupmems_usage_extra_arg/groupmems.test b/tests/grouptools/groupmems/56_groupmems_usage_extra_arg/groupmems.test deleted file mode 100755 index bdd0632ba..000000000 --- a/tests/grouptools/groupmems/56_groupmems_usage_extra_arg/groupmems.test +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems reports usage if extra arguments are provided" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Call groupmems with an extra argument (groupmems -a root -g foo foo)..." -groupmems -a root -g foo foo 2>tmp/groupmems.err && exit 1 || { - status=$? -} -echo "OK" - -echo -n "Check returned status ($status)..." -test "$status" = "1" -echo "OK" - -echo "groupmems reported:" -echo "=======================================================================" -cat tmp/groupmems.err -echo "=======================================================================" -echo -n "Check that there were a failure message..." -diff -au data/groupmems.err tmp/groupmems.err -echo "error message OK." -rm -f tmp/groupmems.err - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/57_groupmems_authentication/config.txt b/tests/grouptools/groupmems/57_groupmems_authentication/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/57_groupmems_authentication/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/57_groupmems_authentication/config/etc/group b/tests/grouptools/groupmems/57_groupmems_authentication/config/etc/group deleted file mode 100644 index 287981ed1..000000000 --- a/tests/grouptools/groupmems/57_groupmems_authentication/config/etc/group +++ /dev/null @@ -1,45 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1,bin,daemon -gtest1:x:424242:utest1,bin,utmp diff --git a/tests/grouptools/groupmems/57_groupmems_authentication/config/etc/gshadow b/tests/grouptools/groupmems/57_groupmems_authentication/config/etc/gshadow deleted file mode 100644 index f9ba86afa..000000000 --- a/tests/grouptools/groupmems/57_groupmems_authentication/config/etc/gshadow +++ /dev/null @@ -1,45 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::utest1,bin,daemon -gtest1:*:: diff --git a/tests/grouptools/groupmems/57_groupmems_authentication/config/etc/pam.d/common-account b/tests/grouptools/groupmems/57_groupmems_authentication/config/etc/pam.d/common-account deleted file mode 100644 index 316b17337..000000000 --- a/tests/grouptools/groupmems/57_groupmems_authentication/config/etc/pam.d/common-account +++ /dev/null @@ -1,25 +0,0 @@ -# -# /etc/pam.d/common-account - authorization settings common to all services -# -# This file is included from other service-specific PAM config files, -# and should contain a list of the authorization modules that define -# the central access policy for use on the system. The default is to -# only deny service to users whose accounts are expired in /etc/shadow. -# -# As of pam 1.0.1-6, this file is managed by pam-auth-update by default. -# To take advantage of this, it is recommended that you configure any -# local modules either before or after the default block, and use -# pam-auth-update to manage selection of other modules. See -# pam-auth-update(8) for details. -# - -# here are the per-package modules (the "Primary" block) -account [success=1 new_authtok_reqd=done default=ignore] pam_unix.so -# here's the fallback if no module succeeds -account requisite pam_deny.so -# prime the stack with a positive return value if there isn't one already; -# this avoids us returning an error just because nothing sets a success code -# since the modules above will each just jump around -account required pam_permit.so -# and here are more per-package modules (the "Additional" block) -# end of pam-auth-update config diff --git a/tests/grouptools/groupmems/57_groupmems_authentication/config/etc/pam.d/common-auth b/tests/grouptools/groupmems/57_groupmems_authentication/config/etc/pam.d/common-auth deleted file mode 100644 index 5facfa290..000000000 --- a/tests/grouptools/groupmems/57_groupmems_authentication/config/etc/pam.d/common-auth +++ /dev/null @@ -1,25 +0,0 @@ -# -# /etc/pam.d/common-auth - authentication settings common to all services -# -# This file is included from other service-specific PAM config files, -# and should contain a list of the authentication modules that define -# the central authentication scheme for use on the system -# (e.g., /etc/shadow, LDAP, Kerberos, etc.). The default is to use the -# traditional Unix authentication mechanisms. -# -# As of pam 1.0.1-6, this file is managed by pam-auth-update by default. -# To take advantage of this, it is recommended that you configure any -# local modules either before or after the default block, and use -# pam-auth-update to manage selection of other modules. See -# pam-auth-update(8) for details. - -# here are the per-package modules (the "Primary" block) -auth [success=1 default=ignore] pam_unix.so nullok_secure -# here's the fallback if no module succeeds -auth requisite pam_deny.so -# prime the stack with a positive return value if there isn't one already; -# this avoids us returning an error just because nothing sets a success code -# since the modules above will each just jump around -auth required pam_permit.so -# and here are more per-package modules (the "Additional" block) -# end of pam-auth-update config diff --git a/tests/grouptools/groupmems/57_groupmems_authentication/config/etc/pam.d/groupmems b/tests/grouptools/groupmems/57_groupmems_authentication/config/etc/pam.d/groupmems deleted file mode 100644 index 2b65f340a..000000000 --- a/tests/grouptools/groupmems/57_groupmems_authentication/config/etc/pam.d/groupmems +++ /dev/null @@ -1,8 +0,0 @@ -# The PAM configuration file for the Shadow 'groupmod' service -# - -# This allows root to modify groups without being prompted for a password -auth sufficient pam_rootok.so - -@include common-auth -@include common-account diff --git a/tests/grouptools/groupmems/57_groupmems_authentication/config/etc/passwd b/tests/grouptools/groupmems/57_groupmems_authentication/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/57_groupmems_authentication/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/57_groupmems_authentication/config/etc/shadow b/tests/grouptools/groupmems/57_groupmems_authentication/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/57_groupmems_authentication/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/57_groupmems_authentication/data/group b/tests/grouptools/groupmems/57_groupmems_authentication/data/group deleted file mode 100644 index 7214940d7..000000000 --- a/tests/grouptools/groupmems/57_groupmems_authentication/data/group +++ /dev/null @@ -1,45 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1,bin,daemon,nobody -gtest1:x:424242:utest1,bin,utmp diff --git a/tests/grouptools/groupmems/57_groupmems_authentication/data/gshadow b/tests/grouptools/groupmems/57_groupmems_authentication/data/gshadow deleted file mode 100644 index b79987c5a..000000000 --- a/tests/grouptools/groupmems/57_groupmems_authentication/data/gshadow +++ /dev/null @@ -1,45 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::utest1,bin,daemon,nobody -gtest1:*:: diff --git a/tests/grouptools/groupmems/57_groupmems_authentication/groupmems.test b/tests/grouptools/groupmems/57_groupmems_authentication/groupmems.test deleted file mode 100755 index 4abad1baa..000000000 --- a/tests/grouptools/groupmems/57_groupmems_authentication/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by a regular user) authenticate the caller" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl data/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl data/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/57_groupmems_authentication/run_groupmems.exp b/tests/grouptools/groupmems/57_groupmems_authentication/run_groupmems.exp deleted file mode 100755 index 5689cd5a3..000000000 --- a/tests/grouptools/groupmems/57_groupmems_authentication/run_groupmems.exp +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/expect - -set timeout 2 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -a nobody\r" -expect "Password: " -send "myuserF00barbaz\r" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "0\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/58_groupmems_authentication_failure1/config.txt b/tests/grouptools/groupmems/58_groupmems_authentication_failure1/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/58_groupmems_authentication_failure1/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/group b/tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/group deleted file mode 100644 index 287981ed1..000000000 --- a/tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/group +++ /dev/null @@ -1,45 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1,bin,daemon -gtest1:x:424242:utest1,bin,utmp diff --git a/tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/gshadow b/tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/gshadow deleted file mode 100644 index f9ba86afa..000000000 --- a/tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/gshadow +++ /dev/null @@ -1,45 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::utest1,bin,daemon -gtest1:*:: diff --git a/tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/pam.d/common-account b/tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/pam.d/common-account deleted file mode 100644 index 316b17337..000000000 --- a/tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/pam.d/common-account +++ /dev/null @@ -1,25 +0,0 @@ -# -# /etc/pam.d/common-account - authorization settings common to all services -# -# This file is included from other service-specific PAM config files, -# and should contain a list of the authorization modules that define -# the central access policy for use on the system. The default is to -# only deny service to users whose accounts are expired in /etc/shadow. -# -# As of pam 1.0.1-6, this file is managed by pam-auth-update by default. -# To take advantage of this, it is recommended that you configure any -# local modules either before or after the default block, and use -# pam-auth-update to manage selection of other modules. See -# pam-auth-update(8) for details. -# - -# here are the per-package modules (the "Primary" block) -account [success=1 new_authtok_reqd=done default=ignore] pam_unix.so -# here's the fallback if no module succeeds -account requisite pam_deny.so -# prime the stack with a positive return value if there isn't one already; -# this avoids us returning an error just because nothing sets a success code -# since the modules above will each just jump around -account required pam_permit.so -# and here are more per-package modules (the "Additional" block) -# end of pam-auth-update config diff --git a/tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/pam.d/common-auth b/tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/pam.d/common-auth deleted file mode 100644 index 5facfa290..000000000 --- a/tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/pam.d/common-auth +++ /dev/null @@ -1,25 +0,0 @@ -# -# /etc/pam.d/common-auth - authentication settings common to all services -# -# This file is included from other service-specific PAM config files, -# and should contain a list of the authentication modules that define -# the central authentication scheme for use on the system -# (e.g., /etc/shadow, LDAP, Kerberos, etc.). The default is to use the -# traditional Unix authentication mechanisms. -# -# As of pam 1.0.1-6, this file is managed by pam-auth-update by default. -# To take advantage of this, it is recommended that you configure any -# local modules either before or after the default block, and use -# pam-auth-update to manage selection of other modules. See -# pam-auth-update(8) for details. - -# here are the per-package modules (the "Primary" block) -auth [success=1 default=ignore] pam_unix.so nullok_secure -# here's the fallback if no module succeeds -auth requisite pam_deny.so -# prime the stack with a positive return value if there isn't one already; -# this avoids us returning an error just because nothing sets a success code -# since the modules above will each just jump around -auth required pam_permit.so -# and here are more per-package modules (the "Additional" block) -# end of pam-auth-update config diff --git a/tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/pam.d/groupmems b/tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/pam.d/groupmems deleted file mode 100644 index 2b65f340a..000000000 --- a/tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/pam.d/groupmems +++ /dev/null @@ -1,8 +0,0 @@ -# The PAM configuration file for the Shadow 'groupmod' service -# - -# This allows root to modify groups without being prompted for a password -auth sufficient pam_rootok.so - -@include common-auth -@include common-account diff --git a/tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/passwd b/tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/shadow b/tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/58_groupmems_authentication_failure1/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/58_groupmems_authentication_failure1/groupmems.test b/tests/grouptools/groupmems/58_groupmems_authentication_failure1/groupmems.test deleted file mode 100755 index bf741c957..000000000 --- a/tests/grouptools/groupmems/58_groupmems_authentication_failure1/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by a regular user) authenticates the caller" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/58_groupmems_authentication_failure1/run_groupmems.exp b/tests/grouptools/groupmems/58_groupmems_authentication_failure1/run_groupmems.exp deleted file mode 100755 index b42b92edc..000000000 --- a/tests/grouptools/groupmems/58_groupmems_authentication_failure1/run_groupmems.exp +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/expect - -set timeout 3 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -a nobody\r" -expect "Password: " -send "!myuserF00barbaz\r" -expect -re "groupmems: PAM: Authentication failure\r" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "1\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/59_groupmems_authentication_failure2/config.txt b/tests/grouptools/groupmems/59_groupmems_authentication_failure2/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/59_groupmems_authentication_failure2/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/group b/tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/group deleted file mode 100644 index 287981ed1..000000000 --- a/tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/group +++ /dev/null @@ -1,45 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1,bin,daemon -gtest1:x:424242:utest1,bin,utmp diff --git a/tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/gshadow b/tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/gshadow deleted file mode 100644 index f9ba86afa..000000000 --- a/tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/gshadow +++ /dev/null @@ -1,45 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::utest1,bin,daemon -gtest1:*:: diff --git a/tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/pam.d/common-account b/tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/pam.d/common-account deleted file mode 100644 index c175a1413..000000000 --- a/tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/pam.d/common-account +++ /dev/null @@ -1 +0,0 @@ -account requisite pam_deny.so diff --git a/tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/pam.d/common-auth b/tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/pam.d/common-auth deleted file mode 100644 index 5facfa290..000000000 --- a/tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/pam.d/common-auth +++ /dev/null @@ -1,25 +0,0 @@ -# -# /etc/pam.d/common-auth - authentication settings common to all services -# -# This file is included from other service-specific PAM config files, -# and should contain a list of the authentication modules that define -# the central authentication scheme for use on the system -# (e.g., /etc/shadow, LDAP, Kerberos, etc.). The default is to use the -# traditional Unix authentication mechanisms. -# -# As of pam 1.0.1-6, this file is managed by pam-auth-update by default. -# To take advantage of this, it is recommended that you configure any -# local modules either before or after the default block, and use -# pam-auth-update to manage selection of other modules. See -# pam-auth-update(8) for details. - -# here are the per-package modules (the "Primary" block) -auth [success=1 default=ignore] pam_unix.so nullok_secure -# here's the fallback if no module succeeds -auth requisite pam_deny.so -# prime the stack with a positive return value if there isn't one already; -# this avoids us returning an error just because nothing sets a success code -# since the modules above will each just jump around -auth required pam_permit.so -# and here are more per-package modules (the "Additional" block) -# end of pam-auth-update config diff --git a/tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/pam.d/groupmems b/tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/pam.d/groupmems deleted file mode 100644 index 2b65f340a..000000000 --- a/tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/pam.d/groupmems +++ /dev/null @@ -1,8 +0,0 @@ -# The PAM configuration file for the Shadow 'groupmod' service -# - -# This allows root to modify groups without being prompted for a password -auth sufficient pam_rootok.so - -@include common-auth -@include common-account diff --git a/tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/passwd b/tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/shadow b/tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/59_groupmems_authentication_failure2/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/59_groupmems_authentication_failure2/groupmems.test b/tests/grouptools/groupmems/59_groupmems_authentication_failure2/groupmems.test deleted file mode 100755 index bf741c957..000000000 --- a/tests/grouptools/groupmems/59_groupmems_authentication_failure2/groupmems.test +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by a regular user) authenticates the caller" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/59_groupmems_authentication_failure2/run_groupmems.exp b/tests/grouptools/groupmems/59_groupmems_authentication_failure2/run_groupmems.exp deleted file mode 100755 index 0da4b225d..000000000 --- a/tests/grouptools/groupmems/59_groupmems_authentication_failure2/run_groupmems.exp +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/expect - -set timeout 3 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -a nobody\r" -expect "Password: " -send "myuserF00barbaz\r" -expect -re "groupmems: PAM: Authentication failure\r" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "1\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/grouptools/groupmems/60_groupmems_authentication_failure3/config.txt b/tests/grouptools/groupmems/60_groupmems_authentication_failure3/config.txt deleted file mode 100644 index fa7bf4384..000000000 --- a/tests/grouptools/groupmems/60_groupmems_authentication_failure3/config.txt +++ /dev/null @@ -1 +0,0 @@ -user myuser, in group groups diff --git a/tests/grouptools/groupmems/60_groupmems_authentication_failure3/config/etc/group b/tests/grouptools/groupmems/60_groupmems_authentication_failure3/config/etc/group deleted file mode 100644 index 287981ed1..000000000 --- a/tests/grouptools/groupmems/60_groupmems_authentication_failure3/config/etc/group +++ /dev/null @@ -1,45 +0,0 @@ -root:x:0: -daemon:x:1: -bin:x:2: -sys:x:3: -adm:x:4: -tty:x:5: -disk:x:6: -lp:x:7: -mail:x:8: -news:x:9: -uucp:x:10: -man:x:12: -proxy:x:13: -kmem:x:15: -dialout:x:20: -fax:x:21: -voice:x:22: -cdrom:x:24: -floppy:x:25: -tape:x:26: -sudo:x:27: -audio:x:29: -dip:x:30: -www-data:x:33: -backup:x:34: -operator:x:37: -list:x:38: -irc:x:39: -src:x:40: -gnats:x:41: -shadow:x:42: -utmp:x:43: -video:x:44: -sasl:x:45: -plugdev:x:46: -staff:x:50: -games:x:60: -users:x:100: -nogroup:x:65534: -crontab:x:101: -Debian-exim:x:102: -groupmems:x:99:myuser -utest1:x:1000: -myuser:x:424242:utest1,bin,daemon -gtest1:x:424242:utest1,bin,utmp diff --git a/tests/grouptools/groupmems/60_groupmems_authentication_failure3/config/etc/gshadow b/tests/grouptools/groupmems/60_groupmems_authentication_failure3/config/etc/gshadow deleted file mode 100644 index f9ba86afa..000000000 --- a/tests/grouptools/groupmems/60_groupmems_authentication_failure3/config/etc/gshadow +++ /dev/null @@ -1,45 +0,0 @@ -root:*:: -daemon:*:: -bin:*:: -sys:*:: -adm:*:: -tty:*:: -disk:*:: -lp:*:: -mail:*:: -news:*:: -uucp:*:: -man:*:: -proxy:*:: -kmem:*:: -dialout:*:: -fax:*:: -voice:*:: -cdrom:*:: -floppy:*:: -tape:*:: -sudo:*:: -audio:*:: -dip:*:: -www-data:*:: -backup:*:: -operator:*:: -list:*:: -irc:*:: -src:*:: -gnats:*:: -shadow:*:: -utmp:*:: -video:*:: -sasl:*:: -plugdev:*:: -staff:*:: -games:*:: -users:*:: -nogroup:*:: -crontab:x:: -Debian-exim:x:: -groupmems:*::myuser -utest1:*:: -myuser:x::utest1,bin,daemon -gtest1:*:: diff --git a/tests/grouptools/groupmems/60_groupmems_authentication_failure3/config/etc/pam.d/groupmems b/tests/grouptools/groupmems/60_groupmems_authentication_failure3/config/etc/pam.d/groupmems deleted file mode 100644 index 915296994..000000000 --- a/tests/grouptools/groupmems/60_groupmems_authentication_failure3/config/etc/pam.d/groupmems +++ /dev/null @@ -1 +0,0 @@ -This file will be removed diff --git a/tests/grouptools/groupmems/60_groupmems_authentication_failure3/config/etc/pam.d/other b/tests/grouptools/groupmems/60_groupmems_authentication_failure3/config/etc/pam.d/other deleted file mode 100644 index 915296994..000000000 --- a/tests/grouptools/groupmems/60_groupmems_authentication_failure3/config/etc/pam.d/other +++ /dev/null @@ -1 +0,0 @@ -This file will be removed diff --git a/tests/grouptools/groupmems/60_groupmems_authentication_failure3/config/etc/passwd b/tests/grouptools/groupmems/60_groupmems_authentication_failure3/config/etc/passwd deleted file mode 100644 index df9b7a07e..000000000 --- a/tests/grouptools/groupmems/60_groupmems_authentication_failure3/config/etc/passwd +++ /dev/null @@ -1,21 +0,0 @@ -root:x:0:0:root:/root:/bin/bash -daemon:x:1:1:daemon:/usr/sbin:/bin/sh -bin:x:2:2:bin:/bin:/bin/sh -sys:x:3:3:sys:/dev:/bin/sh -sync:x:4:65534:sync:/bin:/bin/sync -games:x:5:60:games:/usr/games:/bin/sh -man:x:6:12:man:/var/cache/man:/bin/sh -lp:x:7:7:lp:/var/spool/lpd:/bin/sh -mail:x:8:8:mail:/var/mail:/bin/sh -news:x:9:9:news:/var/spool/news:/bin/sh -uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh -proxy:x:13:13:proxy:/bin:/bin/sh -www-data:x:33:33:www-data:/var/www:/bin/sh -backup:x:34:34:backup:/var/backups:/bin/sh -list:x:38:38:Mailing List Manager:/var/list:/bin/sh -irc:x:39:39:ircd:/var/run/ircd:/bin/sh -gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh -nobody:x:65534:65534:nobody:/nonexistent:/bin/sh -Debian-exim:x:102:102::/var/spool/exim4:/bin/false -utest1:x:1000:1000::/tmp:/bin/sh -myuser:x:424242:424242::/home:/bin/bash diff --git a/tests/grouptools/groupmems/60_groupmems_authentication_failure3/config/etc/shadow b/tests/grouptools/groupmems/60_groupmems_authentication_failure3/config/etc/shadow deleted file mode 100644 index 65079bb1a..000000000 --- a/tests/grouptools/groupmems/60_groupmems_authentication_failure3/config/etc/shadow +++ /dev/null @@ -1,21 +0,0 @@ -root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7::: -daemon:*:12977:0:99999:7::: -bin:*:12977:0:99999:7::: -sys:*:12977:0:99999:7::: -sync:*:12977:0:99999:7::: -games:*:12977:0:99999:7::: -man:*:12977:0:99999:7::: -lp:*:12977:0:99999:7::: -mail:*:12977:0:99999:7::: -news:*:12977:0:99999:7::: -uucp:*:12977:0:99999:7::: -proxy:*:12977:0:99999:7::: -www-data:*:12977:0:99999:7::: -backup:*:12977:0:99999:7::: -list:*:12977:0:99999:7::: -irc:*:12977:0:99999:7::: -gnats:*:12977:0:99999:7::: -nobody:*:12977:0:99999:7::: -Debian-exim:!:12977:0:99999:7::: -utest1:!:12977:0:99999:7::: -myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7::: diff --git a/tests/grouptools/groupmems/60_groupmems_authentication_failure3/groupmems.test b/tests/grouptools/groupmems/60_groupmems_authentication_failure3/groupmems.test deleted file mode 100755 index fb5129dee..000000000 --- a/tests/grouptools/groupmems/60_groupmems_authentication_failure3/groupmems.test +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/sh - -set -e - -cd $(dirname $0) - -. ../../../common/config.sh -. ../../../common/log.sh - -log_start "$0" "groupmems (called by a regular user) authenticates the caller" - -save_config - -# restore the files on exit -trap 'log_status "$0" "FAILURE"; restore_config' 0 - -change_config - -echo -n "Remove PAM configuration (/etc/pam.d/other /etc/pam.d/groupmems)..." -rm -f /etc/pam.d/other /etc/pam.d/groupmems -echo "OK" - -echo -n "myuser will call groupmems..." -./run_groupmems.exp -echo "OK" - -echo -n "Check the passwd file..." -../../../common/compare_file.pl config/etc/passwd /etc/passwd -echo "OK" -echo -n "Check the group file..." -../../../common/compare_file.pl config/etc/group /etc/group -echo "OK" -echo -n "Check the shadow file..." -../../../common/compare_file.pl config/etc/shadow /etc/shadow -echo "OK" -echo -n "Check the gshadow file..." -../../../common/compare_file.pl config/etc/gshadow /etc/gshadow -echo "OK" - -log_status "$0" "SUCCESS" -restore_config -trap '' 0 - diff --git a/tests/grouptools/groupmems/60_groupmems_authentication_failure3/run_groupmems.exp b/tests/grouptools/groupmems/60_groupmems_authentication_failure3/run_groupmems.exp deleted file mode 100755 index 76c1b767d..000000000 --- a/tests/grouptools/groupmems/60_groupmems_authentication_failure3/run_groupmems.exp +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/expect - -set timeout 3 -expect_after default {puts stderr "\nFAIL"; exit 1} - -if {$argc != 0} { - puts "usage: run_groupmems.exp" - exit 1 -} - -# First, switch to the testsuite user -# (otherwise, no password will be asked) -send_user "# switch to the 'myuser' user\n" -send_user "# and expect a '$ ' prompt\n" -spawn /bin/su myuser - -expect "$ " ;# Wait for the prompt - -send_user "\n# make sure we are now 'myuser'" -send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)'" -send "\r" ;# restore the prompt for the logs -send "id\r" ;# Verify we are really testsuite - -expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser),99(groupmems)" - -expect "$ " ;# Wait for the prompt - -send_user "\n\n" -send_user "# now add user utest1 to the myuser group\n" -send_user "# and expect a password prompt" -send "\r" ;# restore the prompt for the logs -send "/usr/sbin/groupmems -a nobody\r" -expect -re "groupmems: PAM: Critical error . immediate abort" - -expect "$ " ;# Wait for the prompt -send "echo $?\r" -expect "1\r" -expect "$ " ;# Wait for the prompt -close - -puts "\nPASS" -exit 0 diff --git a/tests/run_all b/tests/run_all index 7ab29d9fc..7dbd5f42a 100755 --- a/tests/run_all +++ b/tests/run_all @@ -371,66 +371,6 @@ run_test ./grouptools/groupdel/08_groupdel_delete_group_error_no_group_parameter run_test ./grouptools/groupdel/09_groupdel_delete_group_error_two_group_parameter/groupdel.test run_test ./grouptools/groupdel/10_groupdel_usage/groupdel.test run_test ./grouptools/groupdel/11_groupdel_invalid_option/groupdel.test -run_test ./grouptools/groupmems/01_groupmems_root_add_user/groupmems.test -run_test ./grouptools/groupmems/02_groupmems_root_del_user/groupmems.test -run_test ./grouptools/groupmems/03_groupmems_root_del_user_admin/groupmems.test -run_test ./grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/groupmems.test -run_test ./grouptools/groupmems/05_groupmems_root_add_user_with_other_users/groupmems.test -run_test ./grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/groupmems.test -run_test ./grouptools/groupmems/07_groupmems_root_del_user_with_other_users/groupmems.test -run_test ./grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/groupmems.test -run_test ./grouptools/groupmems/09_groupmems_root_purge_user/groupmems.test -run_test ./grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/groupmems.test -run_test ./grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/groupmems.test -run_test ./grouptools/groupmems/12_groupmems_user_add_user/groupmems.test -run_test ./grouptools/groupmems/13_groupmems_user_del_user/groupmems.test -run_test ./grouptools/groupmems/14_groupmems_user_del_user_admin/groupmems.test -run_test ./grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/groupmems.test -run_test ./grouptools/groupmems/16_groupmems_user_add_user_with_other_users/groupmems.test -run_test ./grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/groupmems.test -run_test ./grouptools/groupmems/18_groupmems_user_del_user_with_other_users/groupmems.test -run_test ./grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/groupmems.test -run_test ./grouptools/groupmems/20_groupmems_user_purge_user/groupmems.test -run_test ./grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/groupmems.test -run_test ./grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/groupmems.test -run_test ./grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/groupmems.test -run_test ./grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/groupmems.test -run_test ./grouptools/groupmems/25_groupmems_user_add_user-not_user_group/groupmems.test -run_test ./grouptools/groupmems/26_groupmems_user_add_user-already_member/groupmems.test -run_test ./grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/groupmems.test -run_test ./grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/groupmems.test -run_test ./grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/groupmems.test -run_test ./grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/groupmems.test -run_test ./grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/groupmems.test -run_test ./grouptools/groupmems/32_groupmems_user_del_user-not_member/groupmems.test -run_test ./grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/groupmems.test -run_test ./grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/groupmems.test -run_test ./grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/groupmems.test -run_test ./grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/groupmems.test -run_test ./grouptools/groupmems/37_groupmems_user_purge_user-empty_group/groupmems.test -run_test ./grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/groupmems.test -run_test ./grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/groupmems.test -run_test ./grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/groupmems.test -run_test ./grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/groupmems.test -run_test ./grouptools/groupmems/42_groupmems_user_list_users/groupmems.test -run_test ./grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/groupmems.test -run_test ./grouptools/groupmems/44_groupmems_user_list_users-another_group/groupmems.test -run_test ./grouptools/groupmems/45_groupmems_user_list_users-group_locked/groupmems.test -run_test ./grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/groupmems.test -run_test ./grouptools/groupmems/47_groupmems_user_add_user-group_locked/groupmems.test -run_test ./grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/groupmems.test -run_test ./grouptools/groupmems/49_groupmems_user_del_user-group_locked/groupmems.test -run_test ./grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/groupmems.test -run_test ./grouptools/groupmems/51_groupmems_user_purge_user-group_locked/groupmems.test -run_test ./grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/groupmems.test -run_test ./grouptools/groupmems/53_groupmems_usage/groupmems.test -run_test ./grouptools/groupmems/54_groupmems_usage_invalid_option/groupmems.test -run_test ./grouptools/groupmems/55_groupmems_usage-a-d/groupmems.test -run_test ./grouptools/groupmems/56_groupmems_usage_extra_arg/groupmems.test -run_test ./grouptools/groupmems/57_groupmems_authentication/groupmems.test -run_test ./grouptools/groupmems/58_groupmems_authentication_failure1/groupmems.test -run_test ./grouptools/groupmems/59_groupmems_authentication_failure2/groupmems.test -run_test ./grouptools/groupmems/60_groupmems_authentication_failure3/groupmems.test run_test ./grouptools/groupmod/01_groupmod_change_gid/groupmod.test run_test ./grouptools/groupmod/02_groupmod_change_gid_change_primary_group/groupmod.test run_test ./grouptools/groupmod/03_groupmod_change_gid_no_gshadow_group/groupmod.test @@ -1054,8 +994,6 @@ run_test ./failures/groupdel/01_groupdel_gshadow_rename_failure/groupdel.test run_test ./failures/groupdel/02_groupdel_group_rename_failure/groupdel.test run_test ./failures/groupdel/03_groupdel_gshadow_open_failure/groupdel.test run_test ./failures/groupdel/04_groupdel_group_open_failure/groupdel.test -run_test ./failures/groupmems/01_groupmems_group_open_failure/groupmems.test -run_test ./failures/groupmems/02_groupmems_gshadow_open_failure/groupmems.test run_test ./failures/groupmod/01_groupmod_change_group_name_gshadow_rename_failure/groupmod.test run_test ./failures/groupmod/02_groupmod_change_gid_change_primary_group_passwd_rename_failure/groupmod.test run_test ./failures/groupmod/03_groupmod_change_group_name_group_rename_failure/groupmod.test diff --git a/tests/run_all.coverage b/tests/run_all.coverage index e5e9a6bcd..7b778b844 100755 --- a/tests/run_all.coverage +++ b/tests/run_all.coverage @@ -387,66 +387,6 @@ run_test ./grouptools/groupdel/08_groupdel_delete_group_error_no_group_parameter run_test ./grouptools/groupdel/09_groupdel_delete_group_error_two_group_parameter/groupdel.test run_test ./grouptools/groupdel/10_groupdel_usage/groupdel.test run_test ./grouptools/groupdel/11_groupdel_invalid_option/groupdel.test -run_test ./grouptools/groupmems/01_groupmems_root_add_user/groupmems.test -run_test ./grouptools/groupmems/02_groupmems_root_del_user/groupmems.test -run_test ./grouptools/groupmems/03_groupmems_root_del_user_admin/groupmems.test -run_test ./grouptools/groupmems/04_groupmems_root_del_user_admin_and_user/groupmems.test -run_test ./grouptools/groupmems/05_groupmems_root_add_user_with_other_users/groupmems.test -run_test ./grouptools/groupmems/06_groupmems_root_add_user_with_other_users_admin/groupmems.test -run_test ./grouptools/groupmems/07_groupmems_root_del_user_with_other_users/groupmems.test -run_test ./grouptools/groupmems/08_groupmems_root_del_user_with_other_users_admin/groupmems.test -run_test ./grouptools/groupmems/09_groupmems_root_purge_user/groupmems.test -run_test ./grouptools/groupmems/10_groupmems_root_purge_user_with_other_users/groupmems.test -run_test ./grouptools/groupmems/11_groupmems_root_purge_user_with_other_users_admin/groupmems.test -run_test ./grouptools/groupmems/12_groupmems_user_add_user/groupmems.test -run_test ./grouptools/groupmems/13_groupmems_user_del_user/groupmems.test -run_test ./grouptools/groupmems/14_groupmems_user_del_user_admin/groupmems.test -run_test ./grouptools/groupmems/15_groupmems_user_del_user_admin_and_user/groupmems.test -run_test ./grouptools/groupmems/16_groupmems_user_add_user_with_other_users/groupmems.test -run_test ./grouptools/groupmems/17_groupmems_user_add_user_with_other_users_admin/groupmems.test -run_test ./grouptools/groupmems/18_groupmems_user_del_user_with_other_users/groupmems.test -run_test ./grouptools/groupmems/19_groupmems_user_del_user_with_other_users_admin/groupmems.test -run_test ./grouptools/groupmems/20_groupmems_user_purge_user/groupmems.test -run_test ./grouptools/groupmems/21_groupmems_user_purge_user_with_other_users/groupmems.test -run_test ./grouptools/groupmems/22_groupmems_user_purge_user_with_other_users_admin/groupmems.test -run_test ./grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/groupmems.test -run_test ./grouptools/groupmems/24_groupmems_user_add_user-not_primary_group/groupmems.test -run_test ./grouptools/groupmems/25_groupmems_user_add_user-not_user_group/groupmems.test -run_test ./grouptools/groupmems/26_groupmems_user_add_user-already_member/groupmems.test -run_test ./grouptools/groupmems/27_groupmems_user_add_user-already_member_in_group/groupmems.test -run_test ./grouptools/groupmems/28_groupmems_user_add_user-already_member_in_gshadow/groupmems.test -run_test ./grouptools/groupmems/29_groupmems_user_add_user-user_does_not_exist/groupmems.test -run_test ./grouptools/groupmems/30_groupmems_user_add_user-no_gshadow_group/groupmems.test -run_test ./grouptools/groupmems/31_groupmems_user_add_user-no_gshadow_file/groupmems.test -run_test ./grouptools/groupmems/32_groupmems_user_del_user-not_member/groupmems.test -run_test ./grouptools/groupmems/33_groupmems_user_del_user-not_member_in_gshadow/groupmems.test -run_test ./grouptools/groupmems/34_groupmems_user_del_user-user_does_not_exist/groupmems.test -run_test ./grouptools/groupmems/35_groupmems_user_del_user-no_gshadow_group/groupmems.test -run_test ./grouptools/groupmems/36_groupmems_user_del_user-no_gshadow_file/groupmems.test -run_test ./grouptools/groupmems/37_groupmems_user_purge_user-empty_group/groupmems.test -run_test ./grouptools/groupmems/38_groupmems_user_purge_user-no_gshadow_group/groupmems.test -run_test ./grouptools/groupmems/39_groupmems_user_purge_user-no_gshadow_file/groupmems.test -run_test ./grouptools/groupmems/40_groupmems_user_del_user-not_primary_group/groupmems.test -run_test ./grouptools/groupmems/41_groupmems_user_purge_user-not_primary_group/groupmems.test -run_test ./grouptools/groupmems/42_groupmems_user_list_users/groupmems.test -run_test ./grouptools/groupmems/43_groupmems_user_list_users-gshadow_ignored/groupmems.test -run_test ./grouptools/groupmems/44_groupmems_user_list_users-another_group/groupmems.test -run_test ./grouptools/groupmems/45_groupmems_user_list_users-group_locked/groupmems.test -run_test ./grouptools/groupmems/46_groupmems_user_list_users-gshadow_locked/groupmems.test -run_test ./grouptools/groupmems/47_groupmems_user_add_user-group_locked/groupmems.test -run_test ./grouptools/groupmems/48_groupmems_user_add_user-gshadow_locked/groupmems.test -run_test ./grouptools/groupmems/49_groupmems_user_del_user-group_locked/groupmems.test -run_test ./grouptools/groupmems/50_groupmems_user_del_user-gshadow_locked/groupmems.test -run_test ./grouptools/groupmems/51_groupmems_user_purge_user-group_locked/groupmems.test -run_test ./grouptools/groupmems/52_groupmems_user_purge_user-gshadow_locked/groupmems.test -run_test ./grouptools/groupmems/53_groupmems_usage/groupmems.test -run_test ./grouptools/groupmems/54_groupmems_usage_invalid_option/groupmems.test -run_test ./grouptools/groupmems/55_groupmems_usage-a-d/groupmems.test -run_test ./grouptools/groupmems/56_groupmems_usage_extra_arg/groupmems.test -run_test ./grouptools/groupmems/57_groupmems_authentication/groupmems.test -run_test ./grouptools/groupmems/58_groupmems_authentication_failure1/groupmems.test -run_test ./grouptools/groupmems/59_groupmems_authentication_failure2/groupmems.test -run_test ./grouptools/groupmems/60_groupmems_authentication_failure3/groupmems.test run_test ./grouptools/groupmod/01_groupmod_change_gid/groupmod.test run_test ./grouptools/groupmod/02_groupmod_change_gid_change_primary_group/groupmod.test run_test ./grouptools/groupmod/03_groupmod_change_gid_no_gshadow_group/groupmod.test @@ -1069,8 +1009,6 @@ run_test ./failures/groupdel/01_groupdel_gshadow_rename_failure/groupdel.test run_test ./failures/groupdel/02_groupdel_group_rename_failure/groupdel.test run_test ./failures/groupdel/03_groupdel_gshadow_open_failure/groupdel.test run_test ./failures/groupdel/04_groupdel_group_open_failure/groupdel.test -run_test ./failures/groupmems/01_groupmems_group_open_failure/groupmems.test -run_test ./failures/groupmems/02_groupmems_gshadow_open_failure/groupmems.test run_test ./failures/groupmod/01_groupmod_change_group_name_gshadow_rename_failure/groupmod.test run_test ./failures/groupmod/02_groupmod_change_gid_change_primary_group_passwd_rename_failure/groupmod.test run_test ./failures/groupmod/03_groupmod_change_group_name_group_rename_failure/groupmod.test diff --git a/tests/system/framework/roles/shadow.py b/tests/system/framework/roles/shadow.py index fd4157d69..f1a57eaf3 100644 --- a/tests/system/framework/roles/shadow.py +++ b/tests/system/framework/roles/shadow.py @@ -298,30 +298,6 @@ class Shadow(BaseLinuxRole[ShadowHost]): return cmd - def groupmems(self, *args, run_as: str = "root", password: str | None = None) -> ProcessResult: - """ - Administer members of a user's primary group. - - The groupmems command allows management of group membership lists. - If `run_as` is provided, then the `password` must be provided and the command groupmems run under this user. - If `run_as` isn't provided, then the command is run under `root`. - """ - args_dict = self._parse_args(args) - - if run_as == "root": - self.logger.info(f'Administer {args_dict["name"]} group membership as root on {self.host.hostname}') - cmd = self.host.conn.run("groupmems " + args[0], log_level=ProcessLogLevel.Error) - else: - self.logger.info(f'Administer {args_dict["name"]} group membership on {self.host.hostname}') - cmd = self.host.conn.run( - f"echo '{password}' | su - {run_as} -c 'groupmems {args[0]}'", log_level=ProcessLogLevel.Error - ) - - self.host.discard_file("/etc/group") - self.host.discard_file("/etc/gshadow") - - return cmd - def newgrp(self, *args, run_as: str = "root") -> Tuple[ProcessResult, int]: """ Log in to a new group. diff --git a/tests/system/tests/test_groupmems.py b/tests/system/tests/test_groupmems.py deleted file mode 100644 index f59d49c86..000000000 --- a/tests/system/tests/test_groupmems.py +++ /dev/null @@ -1,41 +0,0 @@ -""" -Test groupmems -""" - -from __future__ import annotations - -import pytest - -from framework.roles.shadow import Shadow -from framework.topology import KnownTopology - - -@pytest.mark.topology(KnownTopology.Shadow) -def test_groupmems__add_user_as_root(shadow: Shadow): - """ - :title: Add user to group as root user - :setup: - 1. Create test user and group - :steps: - 1. Add user to group using groupmems as root - 2. Check group and gshadow entry - :expectedresults: - 1. User is added to group - 2. group and gshadow entry values are correct - :customerscenario: False - """ - shadow.useradd("tuser") - shadow.groupadd("tgroup") - - shadow.groupmems("-g tgroup -a tuser") - - group_entry = shadow.tools.getent.group("tgroup") - assert group_entry is not None, "Group should be found" - assert group_entry.name == "tgroup", "Incorrect groupname" - assert "tuser" in group_entry.members, "User should be member of group" - - if shadow.host.features["gshadow"]: - gshadow_entry = shadow.tools.getent.gshadow("tgroup") - assert gshadow_entry is not None, "Group should be found" - assert gshadow_entry.name == "tgroup", "Incorrect groupname" - assert gshadow_entry.password == "!", "Incorrect password"