Hi,
I am trying to create a new user and password for the server login. The user is created in /etc/passwd and also I can see the password entry in /etc/shadow however when I try to ssh through the new user I cannot login into the server. What steps are missing in the following code?
---
- hosts: local host
vars:
username: random
vars_prompt:
- name: "user_passwd"
prompt: "Enter a password for the user"
private: yes
tasks:
- name: Add a new user
become: yes
user:
name: '{{ username }}'
shell: /bin/bash
group: sudo
state: present
createhome: yes