diff options
author | xengineering <mail2xengineering@protonmail.com> | 2019-12-15 17:38:10 +0100 |
---|---|---|
committer | xengineering <mail2xengineering@protonmail.com> | 2019-12-15 17:38:10 +0100 |
commit | cc2c8c85984a9e6611bb04544e7010701e4ed4b3 (patch) | |
tree | e4a3cc6ee5ffff0ebfaaa600fa9f450f52e14c2a /util | |
parent | 42cc3111a23ae0d2d61dc587acd1eaf21b3817c1 (diff) | |
download | archinstall-cc2c8c85984a9e6611bb04544e7010701e4ed4b3.tar archinstall-cc2c8c85984a9e6611bb04544e7010701e4ed4b3.tar.zst archinstall-cc2c8c85984a9e6611bb04544e7010701e4ed4b3.zip |
Implemented configuration of default user account (without sudo).
Diffstat (limited to 'util')
-rw-r--r-- | util/configure_users.sh | 12 | ||||
-rw-r--r-- | util/write_config.py | 6 |
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) |