salt stack - Saltstack create user : password is not set -


I am trying to automate my users with the salta stack.

I created a column:

  User: Homer: Full Name: Homer Simpson UID: 1007 GID: 1007 Group: - Sudo - Ed Crypt: $ 6H7kNJefhBeY pub_ssh_keys: - ssh -rsa ...  

And in my state I use the following:

% for username, details in pillar.get ('user', {}). Item ()%} {{user name}}: group: - current - name: {{username}} - gid: {{details.get ('gid', '')}} user: - present - full name: { {Details.get ('fullname', '')}} - Name: {{username}} - shell: / bin / bash - home: / home / {{username}} - UID: {{details.get ( '{}}} - Gid: {{details.get (' gid ',' ')}} - Password: {{details.get (' crypt ',' ')}} {% if' details In group '%} - group: {% for details.get for group (' group ', [])%} - {{group}} {% endfor%} {% Endif%} {% if details in' pub_ssh_keys '}% Ssh_auth: - current - user: {{username}} - name: {% pub_ssh_key requires details.get (' pub_ssh_keys', [])%} - {{Pub_ssh_key}} {% endfor%} - : - Uses Customer: {{username}} {% endif%} {% endfor%}

User creation is fine, SSH RSA key is properly added but my main issue is with password I have tried the following:

  crypt: password crypt: some-hash  

But when I connect to my server, I have this user There is a wrong password problem for.

Can you tell me how to prepare a good password in accordance with the format of salt? Is there a special order to use to make it?

Thank you.

To create a hashed user password in Debian / Ubuntu, I use the following in salt, I do the following :

  apt-get install makepasswd echo '& lt; Password & gt; | Makepoked - ScalarForm = - --crypt-md5 | This example gives an example: $ id $ salt $ is encrypted 

"$ id $ salt $ encrypted" should be id1,

this also works for you.


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -