diff --git a/master/cygwin-service-installation-helper.sh b/henri/cygwin-service-installation-helper.sh index a0b6216..14a40c1 100644 --- a/master/cygwin-service-installation-helper.sh +++ b/henri/cygwin-service-installation-helper.sh @@ -2566,7 +2566,7 @@ readonly -f csih_old_cygwin # # Otherwise, we need the files. # -# Returns 0 if files shall be used, 1 otherwise. +# Returns 1 if files shall be used, 0 otherwise. # ====================================================================== csih_use_file_etc() { @@ -3003,6 +3003,12 @@ csih_create_privileged_user() csih_inform "the '${csih_PRIVILEGED_USERNAME}' account." echo "" + # If we use /etc account DB only, write new account to /etc/passwd + if csih_use_file_etc passwd + then + /usr/bin/mkpasswd -l -u "${csih_PRIVILEGED_USERNAME}" >> "${SYSCONFDIR}/passwd" + fi + if ! passwd -e "${csih_PRIVILEGED_USERNAME}" >/dev/null then csih_warning "Setting password expiry for user '${csih_PRIVILEGED_USERNAME}' failed!" @@ -3063,12 +3069,6 @@ csih_create_privileged_user() fi fi - # If we use /etc account DB only, write new account to /etc/passwd - if csih_use_file_etc passwd - then - /usr/bin/mkpasswd -l -u "${csih_PRIVILEGED_USERNAME}" >> "${SYSCONFDIR}/passwd" - fi - return "${ret}" fi # ! username_in_sam return 1 # failed to create user (or prevented by auto-answer veto)