Blame SOURCES/yp-tools-4.2.3-yppasswd-exclamation_mark.patch

3d68e4
diff -ur yp-tools-4.2.3/src/yppasswd.c yp-tools-4.2.3/src/yppasswd.c
3d68e4
--- yp-tools-4.2.3/src/yppasswd.c       2018-03-27 15:47:48.000000000 +0200
3d68e4
+++ yp-tools-4.2.3/src/yppasswd.c        2022-08-16 19:02:41.727441211 +0200
3d68e4
@@ -689,6 +689,11 @@
3d68e4
         }
3d68e4
     }
3d68e4
3d68e4
+  if (strchr(pwd->pw_passwd, '!') != NULL || strchr(pwd->pw_passwd, '*') != NULL) {
3d68e4
+      printf("%s: The account is locked or has no password. Please unlock the account or set an initial password.\nPlease use 'passwd' or other tools that support this change. For more information, please check man pages 'passwd(5)' or 'shadow(5)'\n", progname);
3d68e4
+      return 1;
3d68e4
+  }
3d68e4
+
3d68e4
   /* Initialize password information */
3d68e4
   memset (&yppwd, '\0', sizeof (yppwd));
3d68e4
   yppwd.newpw.pw_passwd = pwd->pw_passwd;