Berkeley High School will suspend 50 students and expel two or three for manipulating their attendance data in a school computer database, where students gained access by paying for an administrative password, Principal Pasquale Scuderi said Wednesday.

Administrators discovered the scam just before spring break which started April 2, and it took 50 to 80 hours time to find out how many of the school's 3,200 students were involved, Scuderi said.

By changing their attendance data, students could conceivably cut as many classes as they wanted or not even come to school -- all without their parents knowing. California law requires students with three or more unexcused absences to be referred to a school attendance review board, a process that involves parents and administrators.

Changes to students' attendance records at Berkeley High occurred between October and January, Scuderi said. He wasn't sure how much students were selling passwords for, but it was probably under $20 each.

The 50 students receiving suspensions will be out of school between one and five days depending on their levels of cooperation, remorse and honesty, Scuderi said.

"And then there are a few folks involved who breached our trust and expectations to where an expulsion is something we feel they should experience," Scuderi said.

An expulsion can last up to one year, but some students can receive a "suspended expulsion" where they are out of school until the school district determines they can come back, he said.

At least four students were involved in obtaining the password to get into the computer system, called PowerSchool, officials said.

Berkeley High School only started to make attendance an important part of student life at the school about a year ago when it hired a dean of attendance and assigned three clerical workers to help track data on who comes to school and who doesn't. Before that the school had just one clerical worker trying to track attendance for 3,200 students, he said.

"Two years ago we wouldn't even have noticed this," Scuderi said.

The good news he said, is that average daily attendance at Berkeley High has risen from 92.43 percent for the first seven months of last year to 93.98 percent for the same period this year. He said he would like to get that percentage up to 96 or 98 percent.

"We still have a long way to go, and our current attendance average is nothing to boast about, but it is a nice start," Scuderi said in a three-page letter to parents Wednesday telling them about the scam and what the school has been doing to combat truancy. "Coordinated truancy sweeps with student services and the police department have begun to make the area immediately around the campus less hospitable to truant students. Safety officers have been transforming the hallway culture, hurrying students on to class and requiring passes from students leaving class."

Scuderi said he hopes families of students and staff use the scam as a "teachable moment" to discuss ethics, integrity and honesty.

Doug Oakley covers Berkeley. Contact him at 510-843-1408. Follow him at Twitter.com/douglasoakley.