How to Add a New User in Debian
How to Add a New User in Debian
Managing user accounts is a fundamental part of Linux system administration. Whether you’re setting up a new developer account, creating user roles for security, or managing a VPS or dedicated server, knowing how to add and configure users in Debian is essential.
This guide will walk you through the steps to add a new user in Debian, set permissions, and ensure security best practices.
Step 1: Log in as Root or Use sudo
Before adding users, you need administrative privileges. Log in as root or use sudo with your regular account.
su -
# or
sudo -iStep 2: Add the New User
Use the adduser command, which is interactive and user-friendly:
adduser newusernameYou’ll be prompted to:

Step 3: Grant Sudo Access (Optional)
If the new user needs administrative rights:
usermod -aG sudo newusernameThis adds the user to the sudo group, giving them permission to run commands as root using sudo.
Step 4: Verify the New User
Switch to the new user account to verify:
su - newusername
Try a sudo command (if you added to sudo group):


