To create a user with sudo privileges on Debian 12, allowing them to run commands without needing to type a password, follow these steps:

  1. Create the User
    Replace username with the desired username:
  1. Add User to the Sudo Group
    By default, users in the sudo group have sudo privileges:
  1. Edit the Sudoers File
    To allow the user to run sudo commands without typing a password, edit the sudoers file:

Then, add the following line at the end of the file:

Replace username with the actual username you created.

  1. Save and Exit
    Save the changes and exit the editor (for nano, press Ctrl+X, then Y and Enter to confirm).

The user now has sudo privileges and can run commands without entering a password.

Leave A Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.