@anisgh Ok so lets follow that sysprep concept. The easiest solution is to not create the user when you build the golden image. I don’t use ubuntu so I don’t know if that’s an option. But lets say its not. So lets create a script called sysprep, and you would run that on your ubuntu golden image. Within that sysprep script you could execute a series of commands and then call a system shutdown (just like sysprep does). Now you need to decide what this sysprep script will do before shutting down ubuntu.
You might have it reset the hostname back to some generic name, and then remove the default added user with something like deluser --remove-home username The last thing you will need to setup is a first run script (akin to windows setupcomplete.cmd batch file) https://askubuntu.com/questions/156771/run-a-script-only-at-the-very-first-boot This will let you do some customization on first boot of the computer (like creating new use and such). You would do this with the unattend.xml file or the setupcomplete.cmd in windows anyway.
Now that you have the ubuntu image cleaned up shutdown the computer.
To extend this a bit more, in your post install script that renames the computer. You could access FOG fields like other1, other2, and (assigned user, don’t remember the actual field name). You use one of those fields to hold the name of the user account to create on the computer. You will write that user name to a text file that your first run script will find and create the user. When you create the user account with a generic password (like Password-1) use this to expire the account so they would be forced to reset the password on first login passwd --expire <username>
The point is to use FOG to leave bread crumbs in the target system based on deployment time values, then use a first run script in the target OS to pickup the crumbs and do something with them. This is the same for windows as well as linux. While FOS is linux, its not the target system linux so it can’t do much more than leave bread crumbs behind for the target OS to find.