On a Windows box joined to a domain, GetUserName will not return the domain part. On a Unix box joined to a domain via winbindd, wine_get_user_name will. So we need to cut off the domain instead of just replacing the \ character.