Bug 711473
Summary: | ps doesn't resolve Active Directory UIDs to User names | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Kai Meyer <kai> | ||||||
Component: | procps | Assignee: | Jaromír Cápík <jcapik> | ||||||
Status: | CLOSED NOTABUG | QA Contact: | BaseOS QE - Apps <qe-baseos-apps> | ||||||
Severity: | low | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 6.1 | CC: | albert, ovasik | ||||||
Target Milestone: | rc | ||||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2012-01-11 12:49:23 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Kai Meyer
2011-06-07 15:14:52 UTC
The top and ps utilities belongs to procps. Moving. Hello Kai. Could You please provide me with Version-Release number of the procps where the issue is reproducible? As Jan Görig noted, top & ps commands belong to the procps package. Thanks in advance. Regards, Jaromir. Ya, sorry for the confusion. I'm running: procps-3.2.8-17.el6.x86_64 And I just verified again to make sure than any recent updates fixed the issue. The issue still exists. Thanks for your attention :) Hello Kai. I have an additional question. Does the ps tool show a correct set of processes? I mean the processes belonging to user kai.meyer ... I'm trying to figure out if it's just about the information displayed in the UID column or if the whole list of processes is incorrect. Thank You. Regards, Jaromir. It is just the information displayed in the UID column. The command: ps -fu kai.meyer Displays the correct list of processes, just the same as if I had done: ps -fu 16777216 But when the output prints, I get a UID instead of a username in the UID column. As far as I can tell, it's simply the output that is incorrect. Username -> UID works. UID -> Username does not. This is not the case for the 'top' command, which will filter by username or UID correctly *AND* display the username in the USER column instead of the UID in the USER column. -Kai Meyer Hello Kai. I'm unable to reproduce the issue. Both commands (top & ps) give me the correct username. --------------------------- -bash-4.1$ id uid=16777217(jcpokus) gid=16777218(domain users) skupiny=16777218(domain users),16777217(BUILTIN\users),16777222(grupa2),16777223(nase rhev),16777224(grupa4-g) kontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 --------------------------- [root@localhost /]# ps -fu jcpokus UID PID PPID C STIME TTY TIME CMD jcpokus 3905 3897 2 15:25 ? 00:00:18 sshd: jcpokus@pts/2 jcpokus 3906 3905 0 15:25 pts/2 00:00:00 -bash jcpokus 4118 3906 99 15:36 pts/2 00:01:23 cat /dev/zero --------------------------- [root@localhost /]# top -u jcpokus top - 15:39:18 up 1:09, 3 users, load average: 0.96, 0.59, 0.29 Tasks: 123 total, 2 running, 121 sleeping, 0 stopped, 0 zombie Cpu(s): 0.5%us, 49.4%sy, 0.0%ni, 50.1%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 1020692k total, 359996k used, 660696k free, 25804k buffers Swap: 1048568k total, 0k used, 1048568k free, 194084k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 4118 jcpokus 20 0 98.6m 608 492 R 99.7 0.1 2:50.97 cat 3905 jcpokus 20 0 104m 4636 1180 S 0.0 0.5 0:18.09 sshd 3906 jcpokus 20 0 104m 1848 1508 S 0.0 0.2 0:00.05 bash --------------------------- Please, update to procps-3.2.8-21.el6 and retest. If it still fails in Your case, then we would have to compare the AD configuration. It's possible, that both tools use a different internal logic and one of them fails due to a failure in one of the dependencies. In such case an update to 6.2 could solve the issue. Please, let me know about Your possibilities / test results. Thanks in advance. Regards, Jaromir. Problem still exists for me. I'm open to ideas here. I've only added 'realm = ###' to my smb.conf file since I reported the issue (to fix some unrelated problem I've since forgotten about.) Thanks for looking into this. Let me know what else I can provide that will help diagnose the problem. [kai.meyer@kai-rhel6 ShadowBack]$ id uid=16777216(kai.meyer) gid=16777221(domain users) groups=16777221(domain users),6(disk),16777223(stcdraper),16777224(stcall),16777225(engineering users),16777228(sbs mobile users),16777229(web workplace users),16777305(BUILTIN\users) [kai.meyer@kai-rhel6 ShadowBack]$ ps -fu kai.meyer | head UID PID PPID C STIME TTY TIME CMD 16777216 2414 1 0 Dec19 ? 00:00:00 /usr/bin/gnome-keyring-daemon --daemonize --login 16777216 2421 1 5 Dec19 ? 01:20:31 /usr/bin/python /usr/share/virt-manager/virt-manager.py 16777216 2426 2405 0 Dec19 ? 00:00:00 gnome-session 16777216 2435 1 0 Dec19 ? 00:00:00 dbus-launch --sh-syntax --exit-with-session 16777216 2436 1 0 Dec19 ? 00:00:09 /bin/dbus-daemon --fork --print-pid 6 --print-address 8 --session 16777216 2522 1 0 Dec19 ? 00:00:09 /usr/libexec/gconfd-2 16777216 2530 1 0 Dec19 ? 00:00:25 /usr/libexec/gnome-settings-daemon 16777216 2534 1 0 Dec19 ? 00:00:00 seahorse-daemon 16777216 2536 1 0 Dec19 ? 00:00:00 /usr/libexec/gvfsd [kai.meyer@kai-rhel6 ShadowBack]$ top -u kai.meyer -b | head top - 10:08:36 up 1 day, 34 min, 14 users, load average: 0.24, 0.18, 0.28 Tasks: 363 total, 2 running, 361 sleeping, 0 stopped, 0 zombie Cpu(s): 2.3%us, 1.1%sy, 0.2%ni, 93.6%id, 2.7%wa, 0.0%hi, 0.1%si, 0.0%st Mem: 16322852k total, 15970016k used, 352836k free, 169476k buffers Swap: 2097144k total, 236k used, 2096908k free, 10323752k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2421 kai.meye 20 0 764m 58m 14m S 9.6 0.4 80:32.04 python 2732 kai.meye 20 0 300m 61m 15m S 1.9 0.4 24:16.97 compiz 7783 kai.meye 20 0 1239m 366m 47m S 1.9 2.3 11:10.53 firefox [kai.meyer@kai-rhel6 ShadowBack]$ rpm -q procps procps-3.2.8-21.el6.x86_64 [kai.meyer@kai-rhel6 ShadowBack]$ rpm -q redhat-release-workstation redhat-release-workstation-6Workstation-6.2.0.3.el6.x86_64 The only differences in smb.conf I noticed are these: ---- security = ads winbind use default domain = true ---- there was a change from YES to TRUE ... but it's hard to guess if that could cause any problems ... NOTE: We used w2k8 in 2k3 mode for the test... Could You please also do the following? 1.) test "htop" 2.) provide me with output of the following command wbinfo --uid-info 16777216 Thanks in advance. Could You please also pick one of the processes matching the "kai.meyer" username and provide me with the /proc/<PID>/environ file? Just replace the <PID> placeholder with a selected PID ... I'm mostly interrested in the USER= and LOGNAME= fields if You have problems with sensitive parts of the data ... They are both set to "jcpokus" in my case ... Created attachment 548933 [details]
/proc/<pid>/environ file for a Bash process
It looks like USER, USERNAME, and LOGNAME all have kai.meyer correctly assigned.
wbinfo --uid-info 16777216
kai.meyer:*:16777216:16777221::/home/STC/kai.meyer:/bin/bash
htop appears to work correctly.
This must be really some small detail ... Please, repeat that once again, but this time attach the following 4 files from /proc/<PID>/ for the selected pid matching the "kai.meyer" username ... cmdline environ stat status Thanks in advance. Regards, Jaromir. Created attachment 551684 [details]
Some proc files for uid kai.meyer
Here's your requested info. I hope this helps :)
Hello Kai. Thanks. I'm solving a similar issue, where the reproduction scenario worked in my case. It's possible, that the root cause is common or similar for both issues. I'll let You know once I have any news. Regards, Jaromir. Hello Kai. I analysed the code deeply and the root cause might be funny. It's a feature in the 'do_pr_name' function. When the username is too long to fit in the column size, then the user's UID is printed instead of the username. That's why it worked in my case. My username was shorter than Yours. Please, let me know if You're happy with this explanation and if it is possible to close this Bug. Thank You. Regards, Jaromir. [kai.meyer@kai-rhel6 ShadowBack]$ ps -o user,cmd USER CMD 16777216 ps -o user,cmd 16777216 -bash [kai.meyer@kai-rhel6 ShadowBack]$ ps -o user:8,cmd USER CMD 16777216 ps -o user:8,cmd 16777216 -bash [kai.meyer@kai-rhel6 ShadowBack]$ ps -o user:9,cmd USER CMD kai.meyer ps -o user:9,cmd kai.meyer -bash How do you like that :). Thanks so much for the explanation! Yes, exactly. That's the most funniest thing. It's just 1 character longer than the Active Directory UID. I understand Your answer as YES -> Closing the bug. Have a nice day. Regards, Jaromir. |