You probably have solved this by now, but the following all get the user name I believe on solaris
getlogin // this is a posix function too
cuserid
anyway, copy this into a string as you suggest then compare it to the entered value. You probably don't need the following code but anyway this...