+3 votes
in Operating Systems by (6.2k points)

I am getting "No passwd entry for user" error when I try to change user using su command.

$ su - Moderator1

No passwd entry for user 'Moderator1'

1 Answer

0 votes
by (25.6k points)

Check your /etc/passwd file. It should have an entry for user Moderator1 something like this:

Moderator1:x:1007:1007:Moderator1,,,:/home/Moderator1:/bin/bash

If it is not there, you need to add Moderator1 using adduser command:

$ sudo adduser Moderator1

...