Skip to content
Snippets Groups Projects
Commit 934fcd04 authored by Marta Rybczynska's avatar Marta Rybczynska
Browse files

shadown_%.bbapend: hardening of password settings


Remove the hardening distro requirement from the recipe,
we do not want to rename our distro and this feature is useful
in all cases.

One thing that needs to be added is setting up the password min/max
age, and the minimum password length.

Signed-off-by: default avatarMarta Rybczynska <marta.rybczynska@huawei.com>
parent 2777ef50
No related branches found
No related tags found
No related merge requests found
do_install_append_harden () { do_install_append () {
# to hardend # to hardend
sed -i -e 's:UMASK.*:UMASK 027:' ${D}${sysconfdir}/login.defs sed -i -e 's:UMASK.*:UMASK 027:' ${D}${sysconfdir}/login.defs
sed -i -e 's:PASS_MAX_DAYS.*:PASS_MAX_DAYS 365:' ${D}${sysconfdir}/login.defs # TODO: set the password age limit and min length
sed -i -e 's:PASS_MIN_DAYS.*:PASS_MIN_DAYS 1:' ${D}${sysconfdir}/login.defs
sed -i -e 's:#PASS_MIN_LEN.*:PASS_MIN_LEN 11:' ${D}${sysconfdir}/login.defs
sed -i -e 's:PASS_WARN_AGE.*:PASS_WARN_AGE 14:' ${D}${sysconfdir}/login.defs
sed -i -e 's:LOGIN_RETRIES.*:LOGIN_RETRIES 3:' ${D}${sysconfdir}/login.defs sed -i -e 's:LOGIN_RETRIES.*:LOGIN_RETRIES 3:' ${D}${sysconfdir}/login.defs
sed -i -e 's:LOGIN_TIMEOUT.*:LOGIN_TIMEOUT 30:' ${D}${sysconfdir}/login.defs sed -i -e 's:LOGIN_TIMEOUT.*:LOGIN_TIMEOUT 30:' ${D}${sysconfdir}/login.defs
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment