From 1bdcfa4b0d378947a6759fb91872a4edc9a42622 Mon Sep 17 00:00:00 2001 From: Joseph Reynolds Date: Tue, 10 Nov 2020 11:56:42 +0800 Subject: add new extrausers command passwd-expire This enhances extrausers with a new passwd-expire command that causes a local user's password to be expired as if the `passwd --expire` command was run, so the password needs to be changed on initial login. Example: EXTRA_USERS_PARAMS += " useradd ... USER; passwd-expire USER;" Tested: on useradd accounts When configured with Linux-PAM, console login prompts for and can successfully change the password. OpenSSH server works. Dropbear SSH server notes the password must be changed but does not offer a password change dialog and rejects the login request. Signed-off-by: Joseph Reynolds Signed-off-by: Kai Kang Signed-off-by: Richard Purdie --- meta/classes/extrausers.bbclass | 3 +++ 1 file changed, 3 insertions(+) (limited to 'meta/classes/extrausers.bbclass') diff --git a/meta/classes/extrausers.bbclass b/meta/classes/extrausers.bbclass index 32569e97db..90811bfe2a 100644 --- a/meta/classes/extrausers.bbclass +++ b/meta/classes/extrausers.bbclass @@ -46,6 +46,9 @@ set_user_group () { usermod) perform_usermod "${IMAGE_ROOTFS}" "-R ${IMAGE_ROOTFS} $opts" ;; + passwd-expire) + perform_passwd_expire "${IMAGE_ROOTFS}" "$opts" + ;; groupmod) perform_groupmod "${IMAGE_ROOTFS}" "-R ${IMAGE_ROOTFS} $opts" ;; -- cgit 1.2.3-korg