From cc447fb2c8e935b2e54b9bcd02b18e9758d84524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Mon, 22 Apr 2024 14:11:19 +0200 Subject: [PATCH] zsh: Set password on first login --- zsh/zprofile.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/zsh/zprofile.j2 b/zsh/zprofile.j2 index 576e01f..0ae1b2a 100644 --- a/zsh/zprofile.j2 +++ b/zsh/zprofile.j2 @@ -1,5 +1,9 @@ source /etc/profile +if [[ "$(passwd --status $USER | awk '{print $2}')" =~ ^(NP|L)$ ]] ; then + sudo passwd $USER +fi + _path=( "$HOME/bin" "$HOME/.cargo/bin"