Azure-Samples / azure-files-samples

This repository contains supporting code (PowerShell modules/scripts, ARM templates, etc.) for deploying, configuring, and using Azure Files.
https://docs.microsoft.com/azure/storage/files/storage-files-introduction
MIT License
231 stars 194 forks source link

Bad NetBIOSName in Test-AzStorageAccountADObjectPasswordIsKerbKey #48

Open mgajda83 opened 4 years ago

mgajda83 commented 4 years ago

Hi, In function Test-AzStorageAccountADObjectPasswordIsKerbKey was used wrong name for netbios. This generating error with Debug-AzStorageAccountAuth, when you have different netbios name: "---- CheckADObjectPasswordIsCorrect ---- Password for < Bad name > \ < StorageAccountName > does not match kerb1 or kerb2 of storage account: < StorageAccountName >. Please run the following command to resync the AD password with the kerb key of the storage account and retry: Update-AzStorageAccountADObjectPas sword. (https://docs.microsoft.com/en-us/azure/storage/files/storage-files-identity-ad-ds-update-password)"

It is: $userName = $domain.Name + "\" + $adObj.Name But should be: $userName = $domain.NetBIOSName + "\" + $adObj.Name

ancmarti commented 4 years ago

I can confirm we have Microsoft customers that were facing this issue and once the script was modified to reflect $userName = $domain.NetBIOSName + "" + $adObj.Name instead of $userName = $domain.Name + "" + $adObj.Name, the issues got resolved. Can we push this Issue for review so the script can be amended accordingly?

mgajda83 commented 4 years ago

Sure

irina-georgiana commented 4 years ago

Any updates on this?

irina-georgiana commented 3 years ago

@mgajda83 Hi :) any update on this issue? Can you please let me know if the script has been fixed?

Thank you!