The values of login username and username in moodle will not be the same.
Can this atrib mapping be done in config.
Moodle 3.3.3
apache
php5.6.33
postgresql9.6
Edir ldap
I have to ask why - the whole point of LDAP, AD etc is you use one username for everything. OK, ignore Office 365 and ADFS, that is an awkward exception in some places (e.g. on site we just use our samaccountname, but in 365 we have to use our upn).
Practically, I believe you can edit the search filter to use your cn attribute, then tell the LDAP plugin that the username field in moodle will be a different one. But it seems a lot of hassle.
In short, no, it can't be done. LDAP auth (and maybe a few of other parts in Moodle too) assumes that the login username and the username are one and the same value.
You would need to modify LDAP authentication plugin to achieve what you propose.
Saludos. Iñaki.