Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
The *ps* utility now displays the Login ID associated with processes
The new format option "luid" of the *ps* utility now enables you to display the Login ID associated with processes.
To display the login ID attributes of running processes, use the following command:
$ ps -o luid
Description of problem:
Every other type of UID that I can think of for a process to have (EUID, RUID, FUID, SUID) can be selected as a field to be displayed in ps output, but not AUID (AKA loginID). We have a customer that needs to see this in ps output for some scripts he's writing because by the time his script gets the ps output, finds the process it's after, the short-lived process exits. He can't just have his script go look it up for itself in /proc/###/loginid because that directory disappears when the process exits, before his script has a chance to go get it.
It seems reasonable to ask that it be a valid field in the ps output as every other kind of UID (as far as I can recall) is available.
I doubt we'll have this in time to help this exact situation, but it makes sense to include it anyway for the next guy with the same problem.
I've just peeked at the history of the LUID feature in upstream and it seems to be present there since 2003. And yes, it's in RHEL7 and Fedora also! It just appears to be missing from manpage.
Try the following:
$ ps -eo pid,luid,cmd
Is it the result expected by the customer?
Thanks.
PS: manpage fix is on the way.
Displaying the the auid is not just a man page fix for the ps command.
iaasn00052525# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.8 (Santiago)
iaasn00052525# id -a
uid=0(root) gid=0(root) groups=0(root)
iaasn00052525# date
Mon Feb 5 13:31:55 EST 2018
iaasn00052525# ps -eo pid,luid,cmd | head
PID LUID CMD
1 - /sbin/init
2 - [kthreadd]
3 - [migration/0]
4 - [ksoftirqd/0]
5 - [stopper/0]
6 - [watchdog/0]
7 - [migration/1]
8 - [stopper/1]
9 - [ksoftirqd/1]
iaasn00052525#
The LUID is blank in the ps output. This needs to be fixed. Having it work with -o auid would make sense too, as a suggestion.
Please move forward with a real fix/update.
- Brett Lowry J.P. Morgan Chase.
Yes, the code in upstream seems like a preparation for the functionality, but without an actual implementation.
The patch implementing the functionality has been sent to upstream.
It will be merged into the nearest RHEL minor release as quickly as it gets merged into upstream.
Comments welcomed.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2018:3045