encrypt(1) + `usermod -p` compatibility in 5.6
As part of a larger build script, I'm pre-populating passwords with usermod. When upgrading to 5.6, I ran into the error below: 5.5-stable: # encrypt -b 8 onetwothree $2a$08$vCs1eIrJAPAvWUGLR7wKJucQdCmalmQhU/9StF8QJDYz.E126wHeG # usermod -p '$2a$08$vCs1eIrJAPAvWUGLR7wKJucQdCmalmQhU/9StF8QJDYz.E126wHeG' root # 5.6-stable: # encrypt -b 9 onetwothree $2b$09$bacE5YNJiTzsuE8m.WJdUOHJO9U/lJq.tlSfwC/FKIL5EhqYpUsgC # usermod -p '$2b$09$bacE5YNJiTzsuE8m.WJdUOHJO9U/lJq.tlSfwC/FKIL5EhqYpUsgC' root usermod: Invalid password: `$2b$09$bacE5YNJiTzsuE8m.WJdUOHJO9U/lJq.tlSfwC/FKIL5EhqYpUsgC' # Incorrect usage on my part or something else? Thanks. Brian Conway
Re: encrypt(1) + `usermod -p` compatibility in 5.6
On Wed, Nov 05, 2014 at 12:35, Brian Conway wrote: As part of a larger build script, I'm pre-populating passwords with usermod. When upgrading to 5.6, I ran into the error below: 5.5-stable: # encrypt -b 8 onetwothree $2a$08$vCs1eIrJAPAvWUGLR7wKJucQdCmalmQhU/9StF8QJDYz.E126wHeG # usermod -p '$2a$08$vCs1eIrJAPAvWUGLR7wKJucQdCmalmQhU/9StF8QJDYz.E126wHeG' root # 5.6-stable: # encrypt -b 9 onetwothree $2b$09$bacE5YNJiTzsuE8m.WJdUOHJO9U/lJq.tlSfwC/FKIL5EhqYpUsgC # usermod -p '$2b$09$bacE5YNJiTzsuE8m.WJdUOHJO9U/lJq.tlSfwC/FKIL5EhqYpUsgC' root usermod: Invalid password: `$2b$09$bacE5YNJiTzsuE8m.WJdUOHJO9U/lJq.tlSfwC/FKIL5EhqYpUsgC' our (my) mistake. Note that the 5.6 password starts with $2b$. Unfortunately, usermod wasn't taught to recognize such passwords until after 5.6.
Re: encrypt(1) + `usermod -p` compatibility in 5.6
On Wed, Nov 5, 2014 at 2:00 PM, Ted Unangst t...@tedunangst.com wrote: On Wed, Nov 05, 2014 at 12:35, Brian Conway wrote: As part of a larger build script, I'm pre-populating passwords with usermod. When upgrading to 5.6, I ran into the error below: 5.5-stable: # encrypt -b 8 onetwothree $2a$08$vCs1eIrJAPAvWUGLR7wKJucQdCmalmQhU/9StF8QJDYz.E126wHeG # usermod -p '$2a$08$vCs1eIrJAPAvWUGLR7wKJucQdCmalmQhU/9StF8QJDYz.E126wHeG' root # 5.6-stable: # encrypt -b 9 onetwothree $2b$09$bacE5YNJiTzsuE8m.WJdUOHJO9U/lJq.tlSfwC/FKIL5EhqYpUsgC # usermod -p '$2b$09$bacE5YNJiTzsuE8m.WJdUOHJO9U/lJq.tlSfwC/FKIL5EhqYpUsgC' root usermod: Invalid password: `$2b$09$bacE5YNJiTzsuE8m.WJdUOHJO9U/lJq.tlSfwC/FKIL5EhqYpUsgC' our (my) mistake. Note that the 5.6 password starts with $2b$. Unfortunately, usermod wasn't taught to recognize such passwords until after 5.6. Gotcha. Just saw the fix on OPENBSD_5_6, thanks. Brian