Could chpasswd be used for that? ________________________________ From: openbmc on behalf of vishwa Sent: Friday, August 11, 2017 11:18:48 AM To: OpenBMC Maillist Subject: Design proposal to Non-Interactive password update for REST client This email is about openbmc/openbmc#1714 ( REST API to update root password ) Goal is to do Non-interactive password updates to enable a REST client to update the root password. My proposal is to use `getspent(3)` and `putspent(3)` and here is the flow. REST client will provide a method that takes std::string as parameter. The Provider at the BMC will receive the password and does these: - Executes `getspent(3)` for "root" and gets the entries. - Parses the `sp_pwdp` and extracts `encryption method` , `salt`. - Makes a call to `crypt(3)` with the extracted `salt` and `user input` and generates encrypted pass-code - Populates the structure and calls `putspent(3)` to update the password Please let me know your opinion on this. Thank you, !! Vishwa !!