I tried adding a user as root and i succesfully did it (by manually going to the /usr/sbin directory) but now i discovered a problem that I can't solve.I tried running adduser and usermod commands but it kept showing me:

devusr@devsys:~$ usermod-bash: usermod: command not found

So i tried adding them to the path but that didn't fix the problem:

devusr@devsys:~$ echo $PATH/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/sbin/usermod

I am experiencing the same issue on the user and on the root accounts.How to fix this?

1

Best Answer


Try to run the command with full path:

$ /usr/sbin/usermod

if the command does not exist you have to install the package passwd (even though should be already installed)

$ sudo apt install passwd