+3 votes
in Operating Systems by (56.8k 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

+1 vote
by (349k points)
selected by
 
Best answer

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


...