Commit 4d0ea57b authored by Johannes Kiesel's avatar Johannes Kiesel

Added CVS onboard

parent 70312ba2
......@@ -10,9 +10,11 @@ betamng Low level scripts for managing Betaweb.
bios_cpu_test_all Starts bios cpu test on all nodes of the hostlist
change_lcd_msg_all Change lcd message of every node of betaweb to betaweb???
check_dimms Check for warnings concerning RAM modules in idrac for all betaweb machines
clear_idrac_log
do_all Run a command sequential on all betamng nodes
enable_pxe_bios_boot_all Enable pxe bios boot on all hosts: experimental! hope and prey
get_bios_boot_settings_all Get boot settings from all nodes
get_idrac_log
pssh Run a command parallel on all betamng nodes
read_all_macs Printout system dump of all hosts for extracting mac addresses
set_critical_temp_shutdown Set settings for shutdown on critical temperature
......@@ -39,6 +41,7 @@ core Core functions of the Webis command.
version Get webis version
cvs Helper scripts for working with the Webis CVS server
onboard Create a new user on the webis virtual machine (webis VM)
status Checks what changed in this CVS directory without doing anything
update Update this CVS directory, deleting directories that were deleted on the server
......@@ -61,6 +64,7 @@ git Helper scripts for working with the Webis Git server and Gi
k8s Kubernetes tools
connect-test-cluster Connect kubectl to the testing cluster
login Set up OpenID authentication for kubernetes access
setup-user-namespaces Set up k8s access per gitlab groups
pki Webis TLS PKI Tools
cert
......@@ -71,6 +75,7 @@ util General helper tools and utilities
login Get user name for a university login
patch-jar Add files from one jar to another
read-from-clipboard Print the clipboard to standard output
salt-restart restart a salt minion on a targeted machine
sshproxy Set up an SSH proxy tunnel for accessing digital library content or university-restricted URLs
tasks Execute lists of tasks in parallel
webis-web-permissions Find files with missing group write permission on gonzo
......
#!/bin/bash
# Create a new user on the webis virtual machine (webis VM)
#
# Copyright 2019-today
#
# Project WEBIS
# Author: Johannes Kiesel
#
# Install.
#
# On webis.uni-weimar.de:
# - sudo visudo
#
# # Allow members of group webis to run /usr/bin/webisuseradd
# %webis ALL=/usr/bin/webisuseradd
#
# - sudo vim /usr/bin/webisuseradd
#
# #!/bin/bash
# newlogin=$1
#
# if [ -z "$newlogin" ];then
# echo "Usage: $0 <newlogin>"
# exit 1
# fi
#
# useradd -g webis -G webisstud -s /bin/bash -m -d /home/"$newlogin" "$newlogin"
# passwd "$newlogin"
# chage -d 0 "$newlogin"
#
# - sudo chmod +x /usr/bin/webisuseradd
#
#
# Load libaries and toolkits.
#
scriptPath=${0%/*}
. "$scriptPath"/../../libs/bashhelper.sh
. "$scriptPath"/../../libs/shflags
check_tools "ssh"
#
# Define usage screen.
#
usage() {
echo "
usage:
$(basename "$0") newlogin [yourlogin]
description:
create a new webis staff user on the webis virtual machine
requires your login account on webis.uni-weimar.de to be in the webis group
examples:
$(basename "$0") stein
"
exit 1
}
#
# Define command line arguments and parse them.
#
FLAGS_HELP=$(usage)
export FLAGS_HELP
FLAGS "$@" || exit 1 # Parse command line arguments.
eval set -- "${FLAGS_ARGV}"
#
#
#
main() {
if [ "$#" -eq 0 ]; then
logError "Missing arguments see:"
usage
fi
logInfo "creating $1"
user=$2
if [ -z "$user" ];then
user="$USER"
fi
logInfo "Note you may have to enter your password twice, as the account creation works by sudo"
logInfo "Now connecting to webis.uni-weimar.de as $USER"
name="$1"
ssh webis.uni-weimar.de -t "sudo /usr/bin/webisuseradd \"$name\""
}
#
# Start programm with parameters.
#
main "$@"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment