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/env/debian/provisioning/create-my-user.bash

16 lines
386 B
Bash
Raw Normal View History

2020-02-14 12:16:56 -06:00
#!/usr/bin/env bash
# user's username
USERNAME=daniel
USER_GROUPS="users,docker,sudo"
# add user with groups
useradd -m -d "/home/$USERNAME/.home" -G "${USER_GROUPS}" -s "/bin/bash" "$USERNAME"
# give "nice home" directory ownership
chown -R "$USERNAME:$USERNAME" "/home/$USERNAME"
# have user set new user's password
echo "Setting password for user '$USERNAME'"
passwd "$USERNAME"