1

I created a new user in linux by running useradd command:

david@machineA:~> sudo useradd golden
david@machineA:~> sudo su - golden
Creating directory '/home/golden'.
$ ^C
$ exit
su: User not known to the underlying authentication module

But when I try to switch to that user, I am seeing an error: su: User not known to the underlying authentication module

What wrong I am doing?

3

The useradd program doesn't add a password entry automatically, whereas adduser prompts for directory information (name, phone, office etc) as well as prompts to set a password for your newly created user.

  • ok so what I should do now? How can I fix it.. same command worked fine on some other box few months back but now it doesnt work on this new box. – user5447339 May 10 '17 at 19:54
  • Delete the user (deluser golden) and then re-create using adduser golden – ivanivan May 10 '17 at 20:00
  • yeah now it works. I have another question related to this I guess. – user5447339 May 10 '17 at 23:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.