Managing a user password for linux in puppet

后端 未结 8 970
心在旅途
心在旅途 2020-12-07 16:00

I need to create a test user with a password using puppet.

I\'ve read that puppet cannot manage user passwords in a generic cross-platform way, which is a pity. I am

8条回答
  •  我在风中等你
    2020-12-07 16:20

    I had success (gist) with ruby's String#crypt method from within a Puppet parser function.

    AFAICS it's using the crypt libc functions (see: info crypt), and takes the same arguments $n$[rounds=$]salt, where n is the hashing function ($6 for SHA-512) and m is the number of key strengthening rounds (5000 by default).

提交回复
热议问题