I created a new user on my server, with:
useradd newuser
Then tried to set the login shell and group for the user afterwards, but seems I did something wrong. Now when I try to switch to root user I get:
Cannot execute newuser: No such file or directory
for command:
cat /etc/passwd | grep root
I get:
root:x:0:0:root:/root:newuser
Is there a way to set things straight from here? Are the commands I ran needed to understand what the solution may be? I still have the command history in my console
default shell
(such as /bin/bas) tonewuser
, sincenewuser
doesn't exists it is giving you error.