She was also placed on 36 months probation, is required to complete an 18-month alcohol education program, pay hundreds of dollars in fines and must complete a three-day county coroner program in which she'll visit a morgue and talk to victims of drunken drivers.
"She's getting what everyone else would get," Deputy District Attorney Danette Meyers said after an hourlong hearing before Los Angeles County Superior Court Judge H. Chester Horn Jr.
If Lohan were to be convicted of another DUI, she would receive a mandatory 120-day jail sentence, Meyers said.
Lohan's publicist did not immediately return an e-mail seeking comment about the charges.
Lohan was charged earlier in the day with seven misdemeanors stemming from two drunken-driving arrests in the last four months. More serious felony drug charges were not filed, prosecutors said, because tests showed there wasn't enough cocaine on her to warrant them.
Attorney Blair Berk entered pleas on Lohan's behalf: she pleaded guilty to two counts of being under the influence of cocaine; no contest to two counts of driving with a blood-alcohol level above .08 percent and one count of reckless driving. Two counts of driving under the influence were dropped.
Lohan was arrested on May 26 in Beverly Hills and on July 24 in Santa Monica. In each incident, the amount of cocaine tested was below the .05 grams required for felony charges, according to the district attorney's office.
Each of Lohan's arrests were followed by trips to rehab.
Lohan's legal problems come on the heels of two other high-profile celebrity DUI cases that resulted in jail time. Paris Hilton served 23 days behind bars after she was found guilty of driving on a suspended license while on probation for an alcohol-related reckless driving case. Nicole Richie was ordered to serve four days in jail stemming from a December DUI arrest.
Lohan crashed her Mercedes Benz into a tree on Sunset Boulevard in May and fled the scene to seek medical treatment. Police tests revealed that a white powder found in Lohan's purse was .04 grams of cocaine.
Lohan checked into the posh Promises rehabilitation facility in Malibu after the incident. She left the facility July 13 after six weeks of treatment. She was photographed wearing an alcohol-monitoring ankle bracelet after her release.
Lohan was arrested again on July 24 following a 911 call by Michelle Peck, the mother of Lohan's former personal assistant. Peck told police she was being chased by an SUV. Police later said Lohan was the driver.
Lohan's blood-alcohol level was between 0.12 and 0.13 percent when police found her, officials said. Police also found a white powder in her pocket that was determined to be .02 grams of cocaine.
She was enrolled in a drug rehab center in Sundance, Utah, attorneys said in court Thursday.
A woman who was a passenger in Michelle Peck's vehicle sued the actress this month for assault and negligence.
Tracie Rice's suit seeks unspecified damages and payment of medical and other expenses related to emotional distress.
Lohan started 2007 in rehab at the Wonderland Center in Los Angeles.
"I was growing up and going out a lot, and I needed to have a balance," she told Elle magazine during an interview in May, just days before her first DUI arrest. "I was glad I went, because I needed to get away from everyone and I didn't know how to do that. And I learned a lot there."
Lohan's latest film, "I Know Who Killed Me," opened in July to lackluster response.