You didn't mention any specific distro, but I think OEM installation is what you are looking for. It lets you install system in the way that end user can set username, password and other customization when first time machine is booted after installation.
Heres's Ubuntus documentation of the subject <
Here's also good explation of the subject <