Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change password #1

Open
felipeaom opened this issue Aug 19, 2019 · 4 comments
Open

Change password #1

felipeaom opened this issue Aug 19, 2019 · 4 comments

Comments

@felipeaom
Copy link

Good afternoon,
Congratulations on the code, it was very well explained. But I am having a problem that I could not find the solution. After running PLAYBOOK it changes the password, but I can't login to the server with the new root password. Have an idea what it could be?

@Wayde2014
Copy link

I have the same question, is it solved?

@rmbleeker
Copy link

This method unfortunately doesn't work. The salt in /etc/shadow should be only 8 characters long, while the salt generated by the password_hash filter is 16 characters.

Please note that working with a fixed salt which can be passed onto the password_hash filter is a potential security risk, so instead we need a method to generate a random 8 character salt to use.

@sydneysider
Copy link

Yea same issue for me. When I tail the secure log I receive: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met by user "root".

@sydneysider
Copy link

Take out encryption and changed a few bits, runs fine:

  • hosts: bind
    become: yes
    vars_prompt:
    • name: root_pwd
      prompt: "Enter Password: "
      private: yes
      confirm: yes
      tasks:
    • name: Change Password
      expect:
      command: passwd root
      responses:
      (?i)password: "{{ root_pwd }}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants