Dumbledore seems a pretty shrewd guy. Simple question: did Dumbledore know that Lockhart was a fraud and wanted to prove it to the (wizarding) world, or did he genuinely believe Lockhart would make a good DADA teacher?
According to the Harry Potter wiki page on Lockhart, it is most likely Dumbledore had some idea that Lockhart was a fraud. According to the page, which cites Pottermore, Dumbledore actually knew two of the wizards whose memories Lockhart erased. The article then goes on to say that Dumbledore expected that putting Lockhart into a school environment would show Lockhart was a fraud. Furthermore, in that same paragraph, it explains Lockhart was probably somewhat hesitant to return to Hogwarts because:
many of his teachers were still there and might have remembered his foolishness and ineptitude
Hence, even if Dumbledore hadn't known the two aforementioned wizards, he would have been able to ask those staff members.
So Dumbledore probably had a very good idea of what Lockhart was up to.
Dumbledore knew very well that Lockhart was a fraud. The wizarding world at large might have been fooled by Lockhart's theatrics, but Dumbledore was not fooled in the least. In fact, as Pottermore explains, Dumbledore was one of a very few wizards who suspected what Lockhart was actually doing:
He happened to have known two of the wizards for whose life's work Gilderoy Lockhart had taken credit, and was one of the only people in the world who thought he knew was Lockhart was up to. Dumbledore was convinced that Lockhart needed only to be put back into an ordinary school setting to be revealed as a charlatan and a fraud.
Other members of the wizarding community disliked Lockhart's exhibitionism--in fact, most of the Hogwarts staff, notably McGonagall, did not want Lockhart to teach at Hogwarts for that very reason. But to prove that Lockhart was, in fact, committing illegal actions in order to further his own reputation would be more difficult. The two wizards Dumbledore knew no longer had their memories, and it would simply be Dumbledore's word against Lockhart's. Yet Lockhart had to be stopped. His Memory Charms were criminal, not merely unethical.
Dumbledore needed a DADA teacher. Lockhart would be no worse than Quirrell, and Dumbledore believed that having him teach would expose him as a fraud. Furthermore, Lockhart could not steal other wizards' memories and accomplishments if he was teaching at Hogwarts. Short of having him tried and thrown into Azkaban (which, sadly, was not possible), proving him a fraud was the best way of protecting the wizarding community. Dumbledore's guess turned out to be correct: except for Memory Charms, Lockhart's magical skills were rusty. The Cornish pixie disaster and the failed duel with Snape both showed the Hogwarts students and staff that Lockhart's supposed accomplishments must be false. Eventually his behavior toward Ron and Harry not only proved his cowardice, but wiped his own memory. Dumbledore wanted Lockhart discredited, not injured, but at the very least the problem was solved. Lockhart's days stealing other people's accomplishments were over.
I think its fairly safe to say Dumbledore was 100% aware of Lockhart's incompetence, based on what we can find in the book itself.
Dumbledore added. "Why so modest, Gilderoy?"
Professor Dumbledore," Ron said quickly, "there was an accident down in the Chamber of Secrets. Professor Lockhart—"
"Am I a professor?" Said Lockhart in a mild surprise. "Goodness. I expect I was hopeless, was I?"
"He tried to do a memory charm and the wand backfired," Ron explained quietly to Dumbledore.
"Dear me," said Dumbledore, shaking his head, his long silver mustache quivering. "Impaled on your own sword, Gilderoy?"
These quotes imply that Dumbledore not only knew he was a fraud, but knew that Lockhart had been stealing stories from people this whole time.
To fall on ones sword fall on one's sword. Used other than as an idiom: To commit suicide by allowing one's body to drop onto the point of one's sword.
Common phrase meaning, to die, or get in trouble from, your own weapon. In this case Gilderoy by his use of memory charms as weapons.
After the fact JKR added this on Pottermore Confirming that Dumbledore Knew Lockhart was a fraud.
He happened to have known two of the wizards for whose life's work Gilderoy Lockhart had taken credit, and was one of the only people in the world who thought he knew what Lockhart was up to. Dumbledore was convinced that Lockhart needed only to be put back into an ordinary school setting to be revealed as a charlatan and a fraud.
One thing to keep in mind about Dumbledore and his decision to bring in Lockhart to teach is to remember that Dumbledore was becoming desperate to find a DADA teacher. We find out in Harry Potter and the Half-Blood Prince that
Tom Riddle, before becoming Lord Voldemort
applied for the job and put a curse on the job after being turned down. Assuming this was prior to Harry being born, that's nearly 20 years - give or take - of people not lasting more than a year when they take the DADA job.
I believe that Dumbledore knew full well that Lockhart was a joke and a fraud but really had no other choice in hiring him because by that time word would have spread of the DADA curse.
Everything that everyone has said here is GREAT, but...
I want to add that the interpretation that Dumbledore personally wanted Lockheart as the DADA teacher is not necessarily correct. We see in the same book (via the removal of Dumbledore as Headmaster, a recurring theme throughout the series) that Dumbledore is beholden to the Board of Governors, and that they have some authority over Hogwarts and the goings-on at the school. Even if he was aware of the situation with Lockheart it's possible that a majority of them were not.
Given that we know Luicius Malfoy was part of the board, it's also possible that they were aware of Lockhearts skills (or lack thereof) and were deliberately attempting to sabotage students (specifically Potter's) training in the DADA role. It is equally likely that he (and he alone) was aware, and he alone manipulated the others into promoting Lockheart for the role, using Lockhears popularity in the Wizarding world (and presumably among the other Governors unaware of Lockhearts true nature).
All I am saying is, it cannot be conclusively proven with the provided information that whatever knowledge Dumbledore may or may not have had came into play regarding the hiring of Lockheart.