diff options
author | Daniel Hansson <github@hanssonit.se> | 2020-07-06 22:35:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-06 22:35:48 +0300 |
commit | 4fb19efd3d62c5091d842079f0177afc44948f8e (patch) | |
tree | 576febdce54c403ba40da07c51fbd0bd45c45540 /static/adduser.sh | |
parent | e541667eca0a5b634d7d70bd9c2bc78462449d1d (diff) |
[very much WIP] Official VM (#1302)
Signed-off-by: enoch85 <github@hanssonit.se>
Diffstat (limited to 'static/adduser.sh')
-rw-r--r-- | static/adduser.sh | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/static/adduser.sh b/static/adduser.sh deleted file mode 100644 index 2e58ca8a..00000000 --- a/static/adduser.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -# shellcheck disable=2034,2059 -true -# shellcheck source=lib.sh -. <(curl -sL https://raw.githubusercontent.com/nextcloud/vm/master/lib.sh) - -# T&M Hansson IT AB © - 2020, https://www.hanssonit.se/ - -# Check for errors + debug code and abort if something isn't right -# 1 = ON -# 0 = OFF -DEBUG=0 -debug_mode - -if [[ $UNIXUSER != "ncadmin" ]] -then -msg_box "Current user with sudo permissions is: $UNIXUSER. -This script will set up everything with that user. -If the field after ':' is blank you are probably running as a pure root user. -It's possible to install with root, but there will be minor errors. - -Please create a user with sudo permissions if you want an optimal installation. -The preferred user is 'ncadmin'." - if [[ "no" == $(ask_yes_or_no "Do you want to create a new user?") ]] - then - print_text_in_color "$ICyan" "Not adding another user..." - sleep 1 - else - read -r -p "Enter name of the new user: " NEWUSER - adduser --disabled-password --gecos "" "$NEWUSER" - sudo usermod -aG sudo "$NEWUSER" - usermod -s /bin/bash "$NEWUSER" - while true - do - sudo passwd "$NEWUSER" && break - done - sudo -u "$NEWUSER" sudo bash "$1" - fi -fi |