Skip to content

Instantly share code, notes, and snippets.

@AlexisDucastel
Created October 1, 2021 09:36
Show Gist options
  • Save AlexisDucastel/db679d3b05e3082a047d196f4a3c9f54 to your computer and use it in GitHub Desktop.
Save AlexisDucastel/db679d3b05e3082a047d196f4a3c9f54 to your computer and use it in GitHub Desktop.
bar-ibeaute user add script
useradd -m -s /bin/bash ibeaute
mkdir -p /home/ibeaute/.ssh
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIC9AfLHFPpXiVkOy1Qe2oL41AUrcrSAEHNJm67x0jHe ivan@fabrique-it.fr" > /home/ibeaute/.ssh/authorized_keys
chmod 700 /home/ibeaute/.ssh/authorized_keys
chown -R ibeaute:ibeaute /home/ibeaute/
echo "ibeaute ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment