For some of the visitors, the ip address and a random ID is shown, can we find out the user name of each of these users on matomo vistors log ?
The visitor ID is a number set by Matomo to identify a visitor for several visits. This is not a user ID.
For visitor ID, you must track it specifically:
But be careful, there is privacy considerations on user id:
If you track user ID, by default Matomo would pseudonomize it (see previous link).