0

I know that I can add users using the ansible ejabberd_user module, but there doesn't seem to be a way to add a user with a pre-hashed password.

I want this:

- name: create a user if it does not exists
  ejabberd_user:
    username: test
    host: server
    password: password

to look like this

- name: create a user if it does not exists
  ejabberd_user:
    username: test
    host: server
    password: 2eAJBXOqN7PeM # or whatever possible hash

How can I do that?

Michael
  • 123
  • 4
  • 1
    Add the functionality to the module and submit a pull request. – Michael Hampton Feb 12 '18 at 06:16
  • 1
    Not exactly an answer, but the issue actually seems to be that I can't find anything in the ejabberdctl docs that even say you can add users with hashed passwords. Maybe this can't be done, but I'm hoping it can be and that someone out there knows about it more than I do. – Michael Feb 12 '18 at 08:04
  • What problem are you trying to solve? – techraf Feb 12 '18 at 08:36
  • I want to securely create active users from ansible. – Michael Feb 13 '18 at 08:02
  • How do you define "securely"? What's the attack vector? – techraf Feb 13 '18 at 09:58
  • The server is provisioned by an ansible script shared via a git repo amonst a group of friends. We would want to put the password for our account there without each other being able to see it, hence the need for a hash. – Michael Feb 14 '18 at 16:59
  • Don't put passwords in git repos or use Ansible Vault. ・ Besides... "**our** account" and "securely" don't match. – techraf Feb 14 '18 at 17:49
  • Sorry, *accounts. And there's a reason for Ansible Vaults. It's useful. I'm not really here to argue that though, I'm here for an answer concerning already established tech. Also, keeping a _hashed_ password should be secure enough for my purposes. I just don't know how to do that, hence the question. – Michael Feb 15 '18 at 23:03

1 Answers1

1

No, it is not possible in the current version of ejabberd.