SOLVED : Movie name is Idiocracy

I only remember one scene which I saw on youtube years ago.

It’s a science fiction movie. The character is in a futuristic prison, where he just arrived. The guards are asking him his name. He is asked to put his hand into a machine where his name/number will be tattoed on. He answers something else and that gets tattoed on his arm.

I first thought it was Total Recall, but it doesn’t seem so.