2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-21 13:35:32 +00:00

Add testcase for nodeshell REST API method for non-root user(3)

This commit is contained in:
Mark Gurevich
2022-01-10 10:04:35 -05:00
parent 66421bd993
commit 1fb3391052

View File

@ -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