secure-core-image: pass encrypted password rather than plaintext password to usermod

In oe-core commit 759df7395908f18b3b68f28d043ac9ebd42dd0c8, the
plaintext password setting function was dropped because of the security
issue. So the plaintext password setting method "usermod -P 'password'
user" is not available. Now we should pass the encrypted password to
usermod via -p option.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
This commit is contained in:
Yi Zhao
2021-08-09 17:30:50 +08:00
committed by Jia Zhang
parent 9f03a89db8
commit 0e475df858
@@ -5,4 +5,5 @@ IMAGE_INSTALL += "\
"
inherit extrausers
EXTRA_USERS_PARAMS += "usermod -P toor root;"
# Set the root password to toor
EXTRA_USERS_PARAMS += "usermod -p '\$6\$cnS1MQVd07.jLdkj\$NgXwgR.LWtbi4qD3Drn6x0AQtVtX/CdfKPy1eJzuUC0YdD8s54fLAlsLm8vaoacAoqq6BHYGTAbUnAUNJKTOb1' root;"