Red Hat Bugzilla – Bug 1518986
Please add AUID to list of selectable fields in ps.
Last modified: 2018-10-30 03:57:02 EDT
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.
Hello, it seems to be present in upstream as LUID (loginID) ($ ps -o LUID). If that is what you meant, I shall backport it in rhel-7.6. Thanks.
Yup. loginID and AUID are synonymous. If we wanna call it LUID, too, welp, I guess we can add another synonym. :-)
Oh, yeah, and I'm guessing that the man page will also be updated as part this request reflecting the change in function, right?
Of course :) Unless you want to make it an easter egg :D
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.
Here is a RHEL 7.3 as well: ashamvarchlab02# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.3 (Maipo) ashamvarchlab02# id -a uid=0(root) gid=0(root) groups=0(root) context=system_u:system_r:unconfined_service_t:s0 ashamvarchlab02# date Mon Feb 5 13:51:17 EST 2018 ashamvarchlab02# ps -eo pid,luid,cmd | head PID LUID CMD 1 - /usr/lib/systemd/systemd --switched-root --system --deserialize 20 2 - [kthreadd] 3 - [ksoftirqd/0] 5 - [kworker/0:0H] 7 - [migration/0] 8 - [rcu_bh] 9 - [rcu_sched] 10 - [watchdog/0] 11 - [watchdog/1] ashamvarchlab02# - 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.
Created attachment 1393936 [details] proposed patch
Fix accepted by upstream. This BZ proposed to rhel-7.6.
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