graphitbv
asked on
Login problems with AD useraccounts when the username contains special characters
Hi,
We encounter login problems with AD user-accounts when the username contains special characters like é or ü ......users cannot login! Hope someone has a solution because the 1500 user-account are imported!
Thanks!
Kind regards,
Dave
We encounter login problems with AD user-accounts when the username contains special characters like é or ü ......users cannot login! Hope someone has a solution because the 1500 user-account are imported!
Thanks!
Kind regards,
Dave
Maybe i have a solution.
Go to powershell with AD module write this command:
Then go to your csv, copy the column A ( ctrl+c ,on excel). Replace every é by e, ü by u (CTRL+F -> replace -> search é and replace with E...) on the column A . Rename A1 by samaccountname1.
Then paste the original A column on B. Save your CSV.
Then execute this powershell script:
This code will change the sam account name and UPN.
I don't know if it works. If an expert understood what i mean, can you correct me?
Go to powershell with AD module write this command:
Get-ADUser -filter * -Searchbase 'OU=your1500users,DC=contoso,DC=com' | ? {$_.sAMAccountname -cmatch'[é ü ]'} | Select sAMaccountname | Export-csv -path C:\username.csv -NTI
Then go to your csv, copy the column A ( ctrl+c ,on excel). Replace every é by e, ü by u (CTRL+F -> replace -> search é and replace with E...) on the column A . Rename A1 by samaccountname1.
Then paste the original A column on B. Save your CSV.
Then execute this powershell script:
Import-Csv C:\username.csv | foreach {
$samoriginal = $($_.samaccountname)
$samnew = $($_.samaccountname1)
$samnew1 = $samnew + "1"
Set-ADUser -identity $samoriginal -samaccountname $samnew1 -UserPrincipalName "$($samnew1)@contoso.com"
Set-ADUser -identity $samoriginal -samaccountname $samnew -UserPrincipalName "$($samnew)@contoso.com"
}
This code will change the sam account name and UPN.
I don't know if it works. If an expert understood what i mean, can you correct me?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://support.microsoft.com/kb/938447
The diacritic mark is not supported for user names (AD should have just change the diacritic to the normal letter), however you may try to have the user sign in without it:
e.g
stéinr could probably login as steinr