This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/scripts/arch-linux/provisioning/0-adduser.bash

11 lines
293 B
Bash
Raw Normal View History

#!/usr/bin/env bash
USERNAME=daniel
groupadd admin 2>/dev/null
mkdir -p "/home/$USERNAME/usr"
2017-08-03 16:14:26 -05:00
useradd -m -d "/home/$USERNAME/usr" -G admin,users,wheel -s "/bin/bash" "$USERNAME"
chown -R "$USERNAME:$USERNAME" "/home/$USERNAME"
echo "Setting password for user '$USERNAME'"
passwd "$USERNAME"