Skip to content

add user with ansible

a quick and dirty – add a user (svc_lawprod), set his password (abc123) and age it so it must be changed at his first login instance.

- hosts:


   - name: create user
     shell: useradd -d /home/svc_lawprod -m -u 22800 -c 'Lawson service account' -g lawson -p `openssl passwd abc123` svc_lawprod

   - name: force password reset at 1st login
     shell: chage -d 0 svc_lawprod 

Posted in LINUX.

Tagged with , , , , .

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

or, reply to this post via trackback.

WordPress Anti Spam by WP-SpamShield

Copyright © 2016 - 2018 Waldemar Mark Duszyk. All Rights Reserved. Created by Blog Copyright.