From 1fb3391052539e8e7276d2b8df9d500d48ae10c3 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Mon, 10 Jan 2022 10:04:35 -0500 Subject: [PATCH] Add testcase for nodeshell REST API method for non-root user(3) --- xCAT-test/autotest/testcase/restapi/cases0 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xCAT-test/autotest/testcase/restapi/cases0 b/xCAT-test/autotest/testcase/restapi/cases0 index bddb59c91..31af793da 100644 --- a/xCAT-test/autotest/testcase/restapi/cases0 +++ b/xCAT-test/autotest/testcase/restapi/cases0 @@ -250,15 +250,16 @@ start:restapi_nodeshell_cmd_non_root description: Call nodeshell method to execute a command by non-root user label:restapi # Create nonroot user on MN -cmd:useradd -u 99 nonroot +cmd:useradd -u 518 nonroot cmd:echo "nonroot:nonrootpw" | chpasswd +cmd:chmod a+x /home/nonroot/ cmd:tabch key=xcat,username=nonroot passwd.password=nonrootpw cmd:mkdef -t policy 9 name=nonroot rule=allow # Create nonroot user on SN -cmd:xdsh $$SN "useradd -u 99 nonroot" +cmd:xdsh $$SN "useradd -u 518 nonroot" cmd:xdsh $$SN "echo \"nonroot:nonrootpw\" | chpasswd" # Create nonroot user on CN -cmd:xdsh $$CN "useradd -u 99 nonroot" +cmd:xdsh $$CN "useradd -u 518 nonroot" cmd:xdsh $$CN "echo \"nonroot:nonrootpw\" | chpasswd" cmd:/opt/xcat/share/xcat/scripts/setup-local-client.sh nonroot -f # Setup ssh keys on SN and CN