diff --git a/testsuite/expect/test1.26 b/testsuite/expect/test1.26
index 3c81be3985dee0456d9132123dd70afb70f893d8..ac9f2d48e28bbdee590cc717a953fe6ab918c66b 100755
--- a/testsuite/expect/test1.26
+++ b/testsuite/expect/test1.26
@@ -39,6 +39,38 @@ set exit_code   0
 
 print_header $test_id
 
+#
+# Check if we are SlurmUser or root, as required to run this test
+#
+log_user 0
+set user_name "nobody"
+spawn $bin_id -u -n
+expect {
+	-re "($alpha_numeric)" {
+		set user_name $expect_out(1,string)
+		exp_continue
+	}
+	eof {
+		wait
+	}
+}
+set found_user 0
+spawn $scontrol show config
+expect {
+	-re "SlurmUser *= $user_name" {
+		set found_user 1
+		exp_continue
+	}
+	eof {
+		wait
+	}
+}
+log_user 1
+if {$found_user == 0} {
+	send_user "\nWARNING: This test can't be run except as SlurmUser\n"
+	exit 0
+}
+
 #
 # Submit a 1 node job and record the node name
 #