archinstall/modules/10-chroot/20-users.sh
2024-10-02 12:40:34 +07:00

9 lines
247 B
Bash

#!/bin/bash
#shellcheck disable=SC2154
shell="$(sed -n "/$shell/{p;q}" /etc/shells)"
useradd -mG wheel,video "$username" -s "${shell:-/bin/bash}"
[ -n "$rootpasswd" ] && echo "root:$rootpasswd" | chpasswd
echo "$username:$userpasswd" | chpasswd