Debian – bash: adduser: command not found [Debian Buster]

debianuseraddusers

Question: What is the most-ideal way to add new users in Debian? adduser appears to be missing on my system, any tips?

Log:

bash: adduser: command not found


Edit:

adduser does appear to be installed

adduser is already the newest version (3.118).

Is is possible to manually execute it as a binary? Where is the applications stored?

Best Answer

Use su -l or su - to start the root shell with an environment similar to a normal 'login' shell. This includes initializing the environment variable $PATH for user root instead of simply inheriting it from the normal (non-sudo) user who does not have /sbin on her $PATH. See man su or https://linuxconfig.org/command-not-found-missing-path-to-sbin-on-debian-gnu-linux.

This is how to enable sudo after a fresh install of Debian 10:

$ su -l
# adduser <your_username_here> sudo
# logout

Then, log out of the Desktop Environment and log in again.

Related Question