If you have a Linux computer that boots up through Grub (like Ubuntu does) and you don't know the user names and Grub has the Recovery Mode entry in its menu then you may be able to regain control of the computer using the following steps. (Lots of preconditions but they are pretty common for Debian-based systems.)
Highlight the Recovery Mode option.
Press e for edit.
Highlight the kernel line and press e again.
Remove the ro single kernel parameters and append the line with rw init=/bin/bash.