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
Daniel Flanagan d33fa3f5dc Fix a few things
* vim as git difftool
* don't use ale completion (we use deoplete)
* normal Iosevka font
* fix a var name collision
* rename home directory to `.home` to hide better
* fix warning with `c` function for going to $NICE_HOME
* improve fsw command
2018-10-19 01:17:08 -05:00

22 lines
490 B
Bash
Executable file

#!/usr/bin/env bash
# user's username
USERNAME=daniel
USER_GROUPS="admin,users,wheel"
# add admin group
groupadd admin 2>/dev/null
# create actual home directory
mkdir -p "/home/$USERNAME/.home"
# add user with groups
useradd -m -d "/home/$USERNAME/.home" -G "${USER_GROUPS}" -s "/bin/bash" "$USERNAME"
# give home directory ownership
chown -R "$USERNAME:$USERNAME" "/home/$USERNAME"
# have user set new user's password
echo "Setting password for user '$USERNAME'"
passwd "$USERNAME"