I have had two students who have changed there own account name to another student name. How do I go about blocking this for all students through Casper?
I'm assuming you mean they've changed their Full Names in Users & Groups. Correct? Changing the account name requires administrator privileges and means students are probably not running with directory user accounts.
Your two enforceable options are:1. Set your students to Standard users.
1. Use directory accounts from either Open Directory or Active Directory.
With local administrator privileges a student can do anything to bypass whatever restrictions you impose. Yes, you can do things like hide System Preferences panes, disallow use of Terminal or create an elaborate series of extension attributes, smart groups and policies to reset the names. But these are only speed bumps and you'd probably find yourself playing Whack-a-Mole trying to outwit them.