The solution that @melchai posted works, but is not all that reliable in parts of a mesh where there is a lot of information and it's more often used to transfere weights between two similar but not identical meshes, where the more robust solutions wouldn't work.
And I'm assuming since you asked, that this solution didn't work for you.
In my experience the most reliable way to transfer skinweights from one mesh to an identical other mesh, is to import and export the skin weight maps.
Caution, for this your mesh needs have UV's and they can't overlap. if need be, create a separate UV set with non overlapping UV's to execute this command on.
You select your origin mesh and go to Rigging Toolset-> Skin-> Export Weight Maps...
This will open an option box, the most important setting in there is the resolution. The higher you set it, the more space it will take up on your disk and the longer it will take but it will also be more accurate. I usually go with 1080x1080 for simple meshes and 2160x2160 for more complicated ones. I would leave the Filetype on IFF or change it TIFF, since those filetypes sopport the highest bit count of the options.
Then you hit export and maya tells you to specify where you want to save the weight maps, choose a target location. This will create a black and white texture for each joint specifying the weights it has on the vertices. After the process is done, it might take a minute, you select your target Mesh and click on Rigging Toolset-> Skin-> Import Weight Maps...
Maya will ask you to select the weight maps, you go to the folder you specified earliere, where you will find a .weightmap file, you select it and maya will automatically assign the right weights to the right joints, assuming they have the same names.
Hope this helps