diff options
author | Joseph Reynolds <joseph-reynolds@charter.net> | 2020-11-10 11:56:42 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-11-11 10:08:12 +0000 |
commit | 834ef343b3694ccc4d44999771d49fb316f242e0 (patch) | |
tree | a9b3835e852c909dfc81e6f25d41392d74b50ace /meta/classes/extrausers.bbclass | |
parent | 2b5e7e42769a47fddf9e6cb2fc63b504717c43b2 (diff) | |
download | poky-834ef343b3694ccc4d44999771d49fb316f242e0.tar.gz |
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.
(From OE-Core rev: 1bdcfa4b0d378947a6759fb91872a4edc9a42622)
Signed-off-by: Joseph Reynolds <joseph-reynolds@charter.net>
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/extrausers.bbclass')
-rw-r--r-- | meta/classes/extrausers.bbclass | 3 |
1 files changed, 3 insertions, 0 deletions
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 () { | |||
46 | usermod) | 46 | usermod) |
47 | perform_usermod "${IMAGE_ROOTFS}" "-R ${IMAGE_ROOTFS} $opts" | 47 | perform_usermod "${IMAGE_ROOTFS}" "-R ${IMAGE_ROOTFS} $opts" |
48 | ;; | 48 | ;; |
49 | passwd-expire) | ||
50 | perform_passwd_expire "${IMAGE_ROOTFS}" "$opts" | ||
51 | ;; | ||
49 | groupmod) | 52 | groupmod) |
50 | perform_groupmod "${IMAGE_ROOTFS}" "-R ${IMAGE_ROOTFS} $opts" | 53 | perform_groupmod "${IMAGE_ROOTFS}" "-R ${IMAGE_ROOTFS} $opts" |
51 | ;; | 54 | ;; |