Visit Our UNIX and Linux User Community

How to display the full username using 'lpstat'?

Thread Tools Search this Thread
Operating Systems AIX How to display the full username using 'lpstat'?
# 1  
Old 05-05-2013
IBM How to display the full username using 'lpstat'?


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!
# 2  
Old 05-06-2013
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 Smilie
# 3  
Old 05-06-2013
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!

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Display full command (including options) information in running

Suppose I am a Unix user, not a root. I can see all commands in running by ps -elf, or some similar commands. Such commands may be submit by other Unix users. Is there a way that I can display those commands with their full parameters/options. For example, I can see a user is running "ls"... (3 Replies)
Discussion started by: happy_lotus
3 Replies

2. UNIX for Advanced & Expert Users

lpstat ?

Hi, can somebody tell me what is the difference between `lpstat -s` and `lpstat -v` command. thanks. (3 Replies)
Discussion started by: anandgodse
3 Replies

3. Solaris

Need help with lpstat command

Hi lpstat reports me "Failed to contact service for xxxxxx: not-found" lpstat -p test -l printer test unknown state. enabled since Oct 27 12:01 2009. available. Remote Name: XXXXXX Remote Server: sunsrv Failed to contact service for xxxxxx: not-found can someone help... (1 Reply)
Discussion started by: xtreams
1 Replies

4. AIX

lpstat issues

Hi, I tried to migrate a server, I installed AIX on a new server and I want to configure the printer queues. I copied all of files from the old server where the printer queues are working fine. I followed these steps: 1. copy the /etc/qconfig (make a copy of the original before) 2. Copy the... (10 Replies)
Discussion started by: imad77
10 Replies

5. Shell Programming and Scripting


Hi, here is lpstat command with queue name. queue name is not valid but lpstat takes my local queue and shows the following there any way that i can stop it after waring message and dont take local print queue. i would like to print a message that queue is not valid but when lpstat... (4 Replies)
Discussion started by: sagii
4 Replies

6. HP-UX


Hi there all.. I got 4 HP ux systems and 4 AIX systems here. when I let LPSTAT make a report in aix with -W I get a really nice report. Example: Queue Dev Status Job Files User PP % Blks Cp Rnk -------------------- -------------- --------- ------ ------------------ ---------- ---- ---... (12 Replies)
Discussion started by: draco
12 Replies

7. UNIX for Dummies Questions & Answers

display full unix path as part of the command line

Hi all, Does anyone know how to ammend the .cshrc file in $HOME for your session to display the path as part of the command line? So that I dont need to keep on typing pwd to see where I am? thanks Ocelot (3 Replies)
Discussion started by: ocelot
3 Replies

8. UNIX for Advanced & Expert Users


Hi, I have been using Hp so far and I am a new user to Solaris.. well, in HP Unix, if I type 'lpstat' if gives me the list of printers connected to the network and their status.. but in solaris it only gives the details if there is any job on the queue. I just want to know what is the... (3 Replies)
Discussion started by: sskb
3 Replies

9. UNIX for Dummies Questions & Answers

display full process name

hi, everytime i use the "ps -elf" command to monitor the processes, i always encounter one problem. some process names are just to long and was truncated. what command should i use to display the full command/process that is running. pls help me. urgent. thanks:rolleyes: (1 Reply)
Discussion started by: champion
1 Replies

10. UNIX for Dummies Questions & Answers

lpstat -t

When you do a lpstat -t it displays all your printers and tty values. Where is the file that stores this information in SCO 5.0.5? Thanks in advance Stufine (2 Replies)
Discussion started by: stufine
2 Replies

Featured Tech Videos