1

I recently created a new server from backup server in azure. In that server, I'm trying to create a user but user is not being created.

I'm able to see the user in the list of users but I'm unable to ssh the user, I'm getting public key denied. I checked and for that particular user, home directory is not created and hence ssh details are not stored for him to connect.

I tried creating a password based user. Same as before, home directory was not created.

How to resolve this issue?

EDIT 1: mrc02_kr

root@server:/home/sid# adduser user1
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_CTYPE = "UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
Adding user `user1' ...
sent invalidate(passwd) request, exiting
sent invalidate(group) request, exiting
Adding new group `user1' (1005) ...
sent invalidate(passwd) request, exiting
sent invalidate(group) request, exiting
sent invalidate(group) request, exiting
sent invalidate(passwd) request, exiting
sent invalidate(group) request, exiting
Adding new user `user1' (1005) with group `user1' ...
sent invalidate(passwd) request, exiting
sent invalidate(group) request, exiting
sent invalidate(passwd) request, exiting
sent invalidate(group) request, exiting
sent invalidate(passwd) request, exiting
sent invalidate(group) request, exiting
Creating home directory `/home/user1' ...
Copying files from `/etc/skel' ...
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
Changing the user information for user1
Enter the new value, or press ENTER for the default
    Full Name []: 
    Room Number []: 
    Work Phone []: 
    Home Phone []: 
    Other []: 
sent invalidate(passwd) request, exiting
sent invalidate(group) request, exiting
sent invalidate(passwd) request, exiting
Is the information correct? [Y/n] Y

Edit 2: I found this when I ran getent passwd

user1:x:1008:1008::/home/user1:
user2:x:1007:1007:,,,:/home/user2:/bin/bash

I'm able to login to user1 but not user2

  • 1
    Any error messages when trying to create the user? Log file entries? – RudiC Oct 23 '18 at 12:10
  • Could you show the command you are using to create and file /etc/defaults/useradd ? – mrc02_kr Oct 23 '18 at 12:50
  • @RudiC : root@server:/home/sid# adduser user1 Adding user user1' ... sent invalidate(passwd) request, exiting sent invalidate(group) request, exiting Adding new group user1' (1005) ... sent invalidate(passwd) request, exiting sent invalidate(group) request, exiting Creating home directory /home/user1' ... Copying files from /etc/skel' ... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Is the information correct? [Y/n] Y – Sid the Gooner Oct 23 '18 at 13:15
  • @RudiC I'm unable to add entire result as comment has character limit but I'm able to create the user by adding ssh key or password based but when I try to ssh him, I'll always get public key denied error – Sid the Gooner Oct 23 '18 at 13:17
  • @mrc02_kr : how to access /etc/defaults/useradd? – Sid the Gooner Oct 23 '18 at 13:18

Your Answer

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

Browse other questions tagged or ask your own question.