From bf46a7ed5733b1dcac5704ca238d3ad07d2ae236 Mon Sep 17 00:00:00 2001 From: Saul Wold Date: Thu, 9 May 2019 12:58:20 -0700 Subject: [PATCH] integ: Convert wrsroot -> sysadmin This also changes the group wrs_protected to sys_protected to de-brand the user and group names. Depends-On: I887464a20fc17d66529caea03be2b445156f9426 Change-Id: Ic2ea06d3ac15c31854a604af5f4cecf9094fcaea Story: 2004716 Task: 28748 Signed-off-by: Saul Wold --- tools/collector/scripts/collect | 18 +++++++++--------- tools/collector/scripts/collect_host | 4 ++-- .../scripts/linux_benchmark.sh | 2 +- .../scripts/remote/rsync-engtools-data.sh | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tools/collector/scripts/collect b/tools/collector/scripts/collect index 758e377e..5d50dbc9 100755 --- a/tools/collector/scripts/collect +++ b/tools/collector/scripts/collect @@ -28,7 +28,7 @@ # Generally, individual commands that display output have that output # redirected to the appropriate info file in /scratch/var/extra # -# wrsroot@controller-0:/scratch# sudo collect +# sysadmin@controller-0:/scratch# sudo collect # nodetype : controller # Collector: /scratch # Extra Dir: /scratch/var/extra @@ -76,7 +76,7 @@ TOOL_NAME=collect TOOL_VER=2 TOOL_REV=0 -# collect must be run as wrsroot +# collect must be run as sysadmin if [ ${UID} -eq 0 ]; then echo "Error: Cannot run collect as 'root' user" exit 1 @@ -149,8 +149,8 @@ function print_help() echo "" echo "Optionally specify a --name prefix of the collected tar file." echo "" - echo "With the command set specified, simply run collect as wrsroot and when" - echo "prompted provide the wrsroot sudo password and let collect handle the rest." + echo "With the command set specified, simply run collect as sysadmin and when" + echo "prompted provide the sysadmin sudo password and let collect handle the rest." echo "" echo "Scope Options:" echo "" @@ -563,7 +563,7 @@ function clean_scratch_dir_remote() spawn bash -i expect -re $ set timeout 60 - send "${SSH_CMD} wrsroot@${this_hostname}\n" + send "${SSH_CMD} sysadmin@${this_hostname}\n" expect { "assword:" { send "${pw}\r" @@ -621,7 +621,7 @@ function delete_remote_dir_or_file() spawn bash -i expect -re $ set timeout 60 - send "${SSH_CMD} wrsroot@${this_hostname}\n" + send "${SSH_CMD} sysadmin@${this_hostname}\n" expect { "assword:" { send "${pw}\r" @@ -683,7 +683,7 @@ function get_file_from_host() spawn bash -i set timeout ${SCP_TIMEOUT} expect -re $ - send "${SCP_CMD} wrsroot@${this_hostname}:${remote_src} ${local_dest} 2>>${HOST_COLLECT_ERROR_LOG}\n" + send "${SCP_CMD} sysadmin@${this_hostname}:${remote_src} ${local_dest} 2>>${HOST_COLLECT_ERROR_LOG}\n" expect { "assword:" { send "${pw}\r" @@ -1083,7 +1083,7 @@ EOF spawn bash -i set timeout 30 expect -re $ - send "${SSH_CMD} wrsroot@${host}\n" + send "${SSH_CMD} sysadmin@${host}\n" expect { "assword:" { send "${pw}\r" @@ -1131,7 +1131,7 @@ EOF exit ${FAIL_UNREACHABLE} } "Host key verification failed" { - send "rm -f /home/wrsroot/.ssh/known_hosts\n" + send "rm -f /home/sysadmin/.ssh/known_hosts\n" exit ${FAIL} } timeout { exit ${FAIL_TIMEOUT} } diff --git a/tools/collector/scripts/collect_host b/tools/collector/scripts/collect_host index 3016b1b3..3faf250e 100755 --- a/tools/collector/scripts/collect_host +++ b/tools/collector/scripts/collect_host @@ -332,8 +332,8 @@ function collect_extra() echo "${hostname}: Bash History ......: ${LOGFILE}" # history - delimiter ${LOGFILE} "cat /home/wrsroot/.bash_history" - cat /home/wrsroot/.bash_history >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG} + delimiter ${LOGFILE} "cat /home/sysadmin/.bash_history" + cat /home/sysadmin/.bash_history >> ${LOGFILE} 2>>${COLLECT_ERROR_LOG} LOGFILE="${EXTRA_DIR}/interrupt.info" echo "${hostname}: Interrupt Info ....: ${LOGFILE}" diff --git a/tools/engtools/hostdata-collectors/scripts/linux_benchmark.sh b/tools/engtools/hostdata-collectors/scripts/linux_benchmark.sh index 64fd5ce8..32d7dd20 100644 --- a/tools/engtools/hostdata-collectors/scripts/linux_benchmark.sh +++ b/tools/engtools/hostdata-collectors/scripts/linux_benchmark.sh @@ -1,6 +1,6 @@ #!/bin/bash -username="wrsroot" +username="sysadmin" password="Li69nux*" test_duration="30" wait_duration="5" diff --git a/tools/engtools/hostdata-collectors/scripts/remote/rsync-engtools-data.sh b/tools/engtools/hostdata-collectors/scripts/remote/rsync-engtools-data.sh index 4fdfc487..08a1623d 100644 --- a/tools/engtools/hostdata-collectors/scripts/remote/rsync-engtools-data.sh +++ b/tools/engtools/hostdata-collectors/scripts/remote/rsync-engtools-data.sh @@ -32,7 +32,7 @@ fi sudo mkdir -p ${DEST} # rsync options -USER=wrsroot +USER=sysadmin RSYNC_OPT="-r -l --safe-links -h -P --stats --exclude=*.pyc" # Rsync data from multiple locations