diff --git a/www/group_defs.php b/www/group_defs.php
index 3764283397a7978f27b8478a920b301970a70244..48c6b9be38ecb5f0dcf06f82812e4b7df7ace799 100644
--- a/www/group_defs.php
+++ b/www/group_defs.php
@@ -187,6 +187,10 @@ class Group
 	global $TBBASE, $TBMAIL_APPROVAL, $TBMAIL_AUDIT, $TBMAIL_WWW;
 	global $MIN_UNIX_GID;
 
+	# There appear to be a lot of old groups still around on boss/ops.
+	$starting_gid = $MIN_UNIX_GID + 200;
+	$ending_gid   = 50000;
+
         #
         # Check that we can guarantee uniqueness of the unix group name.
         # 
@@ -218,8 +222,8 @@ class Group
 	    DBQueryWarn("select g.unix_gid + 1 as start from groups as g ".
 			"left outer join groups as r on ".
 			"  g.unix_gid + 1 = r.unix_gid ".
-			"where g.unix_gid>$MIN_UNIX_GID and ".
-			"      g.unix_gid<50000 and ".
+			"where g.unix_gid>$starting_gid and ".
+			"      g.unix_gid<$ending_gid and ".
 			"      r.unix_gid is null limit 1");
 
 	if (!$query_result || !mysql_num_rows($query_result)) {