I could grep through /etc/passwd but that seems onerous. 'finger' isn't installed and I'd like to avoid that dependency. This is for a program so it would be nice if there was some command that let you just access user info.

For hysterical raisins, the full name of the user is recorded in a field called the “GECOS” field; to complicate matters, this field often has its own structure with the full name as just one of several optional sub-fields. So anything that wants to get the full name from the account record needs to parse both these levels.

Perhaps you missed "This is for a program" in the question. I would find it extremely hard to write a program that can walk over and talk to the user, or enact any of the other three suggestions you provided.
–
Keshav KiniSep 7 '13 at 0:12

@kini How can I have missed it, when my answer starts specifically with the word Non-programmatic and has a Seriously further down? Your pedantry is excessive, I'd say.
–
JensSep 7 '13 at 12:55