If the purser would not give you their names or "file" numbers, then I do think the purser should be fired, for cause.
I think UA employees are required to provide such information to customers.
P.S. what is the exact term for an employee's "file" number? I forgot.