VPS1Euro Dashboard Wiki

Complete client guide: infrastructure, services, account and support.

FR EN

Create a sudo user (without root login)

Good practice: never use root on a daily basis, create a dedicated user.

What this tutorial does

The tutorial "Create a sudo user (without root login)" helps you achieve this goal:

Good practice: never use root on a daily basis, create a dedicated user.

← Back to tutorials
1 profiles 11 steps 6 commands ~10 min

Debian/Ubuntu

  1. Create user: adduser deploy
  2. Add to sudo group: usermod -aG sudo deploy
  3. Test by connecting: su - deploy
  4. Check sudo rights: sudo whoami (must return root)
  5. --- Optional: allow sudo without password ---
  6. visudo and add at the end of the file: deploy ALL=(ALL) NOPASSWD:ALL
  7. --- Copy SSH keys from root to new user ---
  8. mkdir -p /home/deploy/.ssh
  9. cp /root/.ssh/authorized_keys /home/deploy/.ssh/
  10. chown -R deploy:deploy /home/deploy/.ssh
  11. chmod 700 /home/deploy/.ssh && chmod 600 /home/deploy/.ssh/authorized_keys