I am trying to write a script for changing user password in dovecot user database and I can't understand how to replace a set of characters between delimeters for exact lines with sed.
Please check this line for example (this is the part from dovecot userdb):
123@example.com:{SHA512-CRYPT}$6$0vthg.LubtSCxRRK$MdTKNQ2Vk8ZW3XQXNXStt9rfr6fNaXqPvZ0o9WJ8mW8y9ozE1pi8dYM8oQzwWa8ESGzEmJO6yT/tgi3ZEqAiE0::: abc@example.com:{SHA512-CRYPT}$6$0vthg.LubtSCxRRK$MdTKNQ2Vk8ZW3XQXNXStt9rfr6fNaXqPvZ0o9WJ8mW8y9ozE1pi8dYM8oQzwWa8ESGzEmJO6yT/tgi3ZEqAiE0:::
How to replace the string between ":" delimeters starting with "{SHA512-CRYPT}" only for user "123@example.com" and not for user "abc@example.com" with sed?
Aucun commentaire:
Enregistrer un commentaire