diff --git a/lustre/tests/sanity-quota.sh b/lustre/tests/sanity-quota.sh
index a88baea7725102a0bd673509c2604b4eebce0a35..b81a2417f27ca1339845e0e1cd784e3faec9e10e 100644
--- a/lustre/tests/sanity-quota.sh
+++ b/lustre/tests/sanity-quota.sh
@@ -621,7 +621,7 @@ test_8() {
 	echo "  Set enough high limit for user: $TSTUSR"
 	$LFS setquota -u $TSTUSR 0 $BLK_LIMIT 0 $FILE_LIMIT $DIR
 	echo "  Set enough high limit for group: $TSTUSR"
-	$LFS setquota -g $USER 0 $BLK_LIMIT 0 $FILE_LIMIT $DIR
+	$LFS setquota -g $TSTUSR 0 $BLK_LIMIT 0 $FILE_LIMIT $DIR
 
 	chmod 0777 $DIR/$tdir
 	local duration=""