How to display the full username using 'lpstat'?

Hello,

I would like to get the full username when I run the command 'lpstat'. I've tried using the tags -t and -W, but nothing works.
It seems that the username has a fixed length. However I need the complete name.

Thanks a lot!

I am guessing - but I suspect you will need to write your own script to take the username provided as an index to get the fullname from GECOS field, or whereever the information is stored.

As I am guessing - my guess is that lpstat - per POSIX standards - only reports the UNIX username - which is a limited (8 char) entry.

Hope this helps - even if only to trigger someone else who is not guessing :slight_smile:

First of all, thanks for the reply.

In fact, I am looking for a different kind of username.
The GECOS field gives me the user that exists in the system. However, I would like to get the full string that contains username@domain.

I need this domain that appears after the user to keep track of the location in which he/she is printing.

Thanks a lot!