Take the administrative privileges away from the user account. If they are an administrator, they are going to be able to change the name. However limited and power users cannot change the computer name.
By design all members of the administrators group have full control of the computer, including changing it's name. Unless the computer is a member of a domain you cannot restrict a local administrator's rights. Any attempt to do so can be evaded.
The only way to do what you want is to remove the users from the administrators group.
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this
site. Computing.Net and Purch hereby disclaim all responsibility
and liability for the content of Computing.Net and its accuracy.