Skip to content

Commit

Permalink
Imager: Fix for when user password is empty. (microsoft#6632)
Browse files Browse the repository at this point in the history
  • Loading branch information
cwize1 authored Oct 30, 2023
1 parent 865013e commit d3a22c2
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions toolkit/tools/imagegen/installutils/installutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -1188,11 +1188,6 @@ func createUserWithPassword(installChroot *safechroot.Chroot, user configuration
}
logger.Log.Tracef("hashed password: %v", hashedPassword)

if strings.TrimSpace(hashedPassword) == "" {
err = fmt.Errorf("empty password for user (%s) is not allowed", user.Name)
return
}

// Create the user with the given hashed password
if user.Name == userutils.RootUser {
if user.UID != "" {
Expand Down

0 comments on commit d3a22c2

Please sign in to comment.