Skip to content

Instantly share code, notes, and snippets.

@ninehills
Last active December 23, 2015 08:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ninehills/6605129 to your computer and use it in GitHub Desktop.
Save ninehills/6605129 to your computer and use it in GitHub Desktop.
from doorgod dump local user
set -eu
getent passwd | grep "^${1}:" | head -1 >> /etc/passwd
cp -r /etc/skel /home/$1
chown -R $1 /home/$1
usermod -d /home/$1 $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment