Skip to content

Instantly share code, notes, and snippets.

@ianfinch
Last active December 17, 2019 12:27
Show Gist options
  • Save ianfinch/83733feb571a90b572ddb582a6734124 to your computer and use it in GitHub Desktop.
Save ianfinch/83733feb571a90b572ddb582a6734124 to your computer and use it in GitHub Desktop.
Setup new user to replace pi user
user="whoever"
adduser $user
for group in $(groups pi | cut -d':' -f2 ) ; do
if [[ "$group" != "pi" ]] ; then
adduser $user $group
fi
done
deluser --remove-home --remove-all-files pi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment