diff --git a/cmd/iam.go b/cmd/iam.go index 0e68a7716..84d78b8b1 100644 --- a/cmd/iam.go +++ b/cmd/iam.go @@ -264,6 +264,8 @@ func loadUser(objectAPI ObjectLayer, user string, isSTS bool, return nil } + // In some cases access key may not be set, so we set it explicitly. + u.Credentials.AccessKey = user m[user] = u.Credentials return nil } @@ -573,6 +575,7 @@ func migrateUsersConfigToV1(objAPI ObjectLayer, isSTS bool) error { // Found a id file in old format. Copy value // into new format and save it. + cred.AccessKey = user u := newUserIdentity(cred) if err := saveIAMConfigItem(objAPI, u, identityPath); err != nil { logger.LogIf(context.Background(), err) @@ -799,6 +802,7 @@ func (sys *IAMSys) Init(objAPI ObjectLayer) error { } break } + return nil }