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 Smilie](https://www.unix.com/images/smilies/smile.gif)
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
2. UNIX for Dummies Questions & Answers
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
3. 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
4. UNIX for Dummies Questions & Answers
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
5. 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
6. 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 results.is 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
7. AIX
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
8. Solaris
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
9. UNIX for Advanced & Expert Users
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
10. UNIX for Dummies Questions & Answers
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
cuserid(3) Library Functions Manual cuserid(3)
NAME
cuserid - Gets the alphanumeric username associated with the current process
LIBRARY
Standard C Library (libc.so, libc.a)
SYNOPSIS
#include <stdio.h>
char *cuserid( char *s);
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
cuserid(): XPG4, XPG4-UNIX
Refer to the standards(5) reference page for more information about industry standards and associated tags.
PARAMETERS
Points to the character array into which the cuserid() function copies the string representing the username. This array must contain at
least L_cuserid bytes. L_cuserid is a constant defined in the stdio.h header file, and has a value greater than 0 (zero). If you specify a
null pointer for s, the character string is stored into an internal thread-specific buffer, the address of which is returned.
DESCRIPTION
The cuserid() function generates a character string representing the real or effective username of the owner of the current process.
NOTES
If the s parameter is a null pointer, the character string is stored into an internal thread-specific buffer, the address of which is
returned. Subsequent calls to the cuserid() function from the same thread overwrite the contents of the internal buffer.
The cuserid() function is scheduled to be withdrawn from a future version of the X/Open CAE Specification.
RETURN VALUES
If the s parameter is not a null pointer, the cuserid() function returns the character string in the array pointed to by s. If the user-
name cannot be found, an empty string is returned.
If the s parameter is a null pointer, the character string is stored into an internal thread-specific buffer, the address of which is
returned. If the username cannot be found, a null pointer is returned.
RELATED INFORMATION
Functions: getlogin(2), getpwent(3)
Standards: standards(5) delim off
cuserid(3)