Change Long User Name THrough The Terminal

Hello,

I was wondering how to change a user's Long Name through the terminal. I am writing a shell script to change some settings back to the default, and could not find how to do this (or even if you can do this).

I do not want to use applescript.

Here is my script so far:

sudo su
ADMIN PASSWORD
##Logs In As Root
passwd student
student
student
##Changes The Password For User "student" to student
rm -rf /Users/student/Desktop/*.*
##Erases Everything Off Desktop
rm -rf /Users/student/Documents/*.*
##Erases Everything Out Of Documents

A coworker of mine found the solution:

sudo dscl . -change /users/shortname "old long name" "new long name"

Problem Solved.