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/configure_users.sh | |
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/configure_users.sh')
-rw-r--r-- | util/configure_users.sh | 12 |
1 files changed, 11 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" |