Hi there! I’ve been wanting to find this film for many years now, sadly I don’t remember much of it… It’s si fi, and it features a group of people travelling on a space ship, possibly to other planets but I’m not too sure. At some point, the main character gets imprisoned or locked in a cell (on the ship), but then the others from the group get into trouble and are forced to temporarily release him if he agrees to help them solve the problem they’ve ran into. I remember that when they open the door of his cellar he’s very dirty and has grown a long, shabby beard, he looks haggard and angry. I also remember the ending of the film: the main character (the one who was imprisoned and grew that beard) speeds away on a ship into space with two women. He’s smiling, clean shaven and smug (possibly managed to trick and get away from the people who imprisoned him and then demanded his assistance).
Really sorry for the scant detail! It must have been around 2000-2004 when I watched it.