Create a text file with space separated pairs of old and new usernames. The usernames should each be on a new line. E.g. Sample file contents: oldnameone newnameone oldnametwo newnametwo
sudo massuserrename
The above command shall guide with the usage instructions and how to use the file containing the usernames. Thereafter, follow the usage instructions.