In his films, Kubrick went from a from having a Rousseauistic view of the innately good human being corrupted by society (the Libertarian morality) to openly attacking Rousseau and taking on a more pessimistic which some have likened to "fascist" (the Authoritarian morality)
Paths of Glory (1957) - Libertarian
In fact, it even went on to mock the central tenets of Authoritarian morality, the idea that people are evil and need to be disciplined to become good:
Dr. Strangelove (1967) -"Realist""You see colonel, troops are like children, and just as a child wants his father to be firm, troops crave discipline, and one way to ensure discipline is to shoot a man now and again." "Do you sincerey believe the things you've just said?"
The film is a clear vindication of Mutually Assured Destruction (MAD) and many of the institutions that make it possible for this catastrophe to happen, but it also tarnishes the idea of institutions having fail-safe mechanisms to prevent a crazed general or sinister President etc. from unleashing Armageddon. Thus, it puts people and institutions on a mostly level playing field, with people being slightly more important.
A Clockwork Orange (1971) - Authoritarian
The film's saving grace is that it views the conditioning that was put onto Alex as a worse and more dehumanizing crime than the many committed by Alex. Although as the film contends, there wouldn't be a need such authoritarian measures if people behaved.
With this film his views would be known, Kubrick would go on to say:
"Man isn't a noble savage, he's an ignoble savage. He is irrational, brutal, weak, silly, unable to be objective about anything where his own interests are involved—that about sums it up...any attempt to create social institutions on a false view of the nature of man is probably doomed to failure."He would later add that "The idea that social restraints are all bad is based on a utopian and unrealistic vision of man." When accused of being a fascist, Kubrick rejected it but went on to say:
Rousseau's romantic fallacy that it is society which corrupts man, not man who corrupts society, places a flattering gauze between ourselves and reality. This view...is solid box office but, in the end, such a self-inflating illusion leads to despair.Kubrick's friend would later characterize his beleif of democracy as a "a noble failed experiment along our evolutionary way, brought low by base instincts, money and self-interest and stupidity... He thought the best system might be under a benign despot, though he had little belief that such a man could be found."
How did Kubrick end up from promoting Rousseau's ideals to openly attacking them? I don't know but I know his other movies are more mixed.
Full Metal Jacket (1987) - Libertarian?
"[t]he political left will call Kubrick a fascist," it's now considered a classic anti-war film although Kubrick said that wasn't the intention. In the film various young soldiers are enlisted into the marines and go through a brutal process of training and hazing, one of soldiers eventually going crazy and committing a murder-suicide. It then picks up in urban Vietnam through the Tet-offensive and afterwards.
In many ways, the film mirrors Paths of Glory including the Rousseauian themes of people being corrupted by society (unlike Kubrick's earlier quotes). In fact, the idea of people having to be indoctrinated in order to fight in the war, and the obvious negative portrayal of this process, is in many ways akin to what Kubrick derides.
Ultimately, Kubrick went on a huge journey from Libertarian to Authoritarian and possibly back.