summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/configure_users.sh12
-rw-r--r--util/write_config.py6
2 files changed, 17 insertions, 1 deletions
diff --git a/util/configure_users.sh b/util/configure_users.sh
index b6eba0b..3c2fcc4 100644
--- a/util/configure_users.sh
+++ b/util/configure_users.sh
@@ -18,6 +18,16 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
-echo "root:root" | chpasswd
+admin_username=$1
+default_password=$2
+
+
+echo "root:$default_password" | chpasswd
+
+useradd -m $admin_username
+usermod -aG wheel $admin_username
+echo "$admin_username:$default_password" | chpasswd
+
+# passwd -l root # lock the root account if changing /etc/sudoers is implemented
echo "Configured users - OK"
diff --git a/util/write_config.py b/util/write_config.py
index 72c1c34..8f9dae9 100644
--- a/util/write_config.py
+++ b/util/write_config.py
@@ -52,6 +52,12 @@ else:
config["desktop"] = "no"
+# Admin account
+
+print("Please select your username (like 'paul' or 'alice'):")
+config["admin_username"] = input()
+
+
# Write config to json file
config_json = json.dumps(config, indent=4)