There are two paths here.
One is to
reboot and get back into single user mode, which doesn't require a password on 99% of UNIX flavors, when you get to the prompt type:
passwd root
That should let you change the root passwd.
The second path is not as easy. You will either need to make an alternate boot disk or reload your OS.
Also, you can search this site for others who have had problems with losing the root password. Search for "root login problems" or "no root password".
Here is one link.
https://www.unix.com/showthread.php?s...+root+password
Maybe you will get lucky and can
reboot to single user mode and change the password!
Let me know how this works out!
Good Luck.