Tips for finding Knowledge Articles

  • - Enter just a few key words related to your question or problem
  • - Add Key words to refine your search as necessary
  • - Do not use punctuation
  • - Search is not case sensitive
  • - Avoid non-descriptive filler words like "how", "the", "what", etc.
  • - If you do not find what you are looking for the first time,reduce the number of key words you enter and try searching again.
  • - Minimum supported Internet Explorer version is IE9
Home  >
article

KB-5800: ps command show UID and not Centrify Active Directory username

Centrify DirectControl ,  

12 April,16 at 11:45 AM

Applies to:

Centrify DirectControl 5.2.2 on Rhel 6.6
 

Problem:

When the command 'ps -ef' is executed, the output display the UID number instead of ADusername (highlighted in red).  ‘getent’  and ‘adquery user’ command return as expected. 

Example:
# ps –ef |grep –i java
784368896 1886 1883 0 12:06 ? 00:02:11 java -jar mancenter-3.4.war
784368896 2519 2516 0 12:20 ? 00:01:07 /usr/java/latest/bin/java -server -Xms4G -Xmx4G


# getent passwd <ADusername>
<ADusername>:x:784368896:784368896:<ADusername>:/home/<ADusername>:/bin/bash

# adquery user <ADusername>
<ADusername>:x:784368896:784368896<ADusername>:/home/<ADusername>:/bin/bash
 

Cause:

The length of the ADusername/local username is more than 8 characters.  The ‘ps –ef’ command will show UID instead.  This appears to be procps default behavior and it is by design (RedHat).  
 
 

Resolution:

Please raise the issue to RedHat support. 

Provide the following snippet of procps source code when raising the issue to RedHat support:

// The Open Group Base Specifications Issue 6 (IEEE Std 1003.1, 2004 Edition)
// requires that user and group names print as decimal numbers if there is
// not enough room in the column, so tough luck if you don't like it.
//
// The UNIX and POSIX way to change column width is to rename it:
// ps -o pid,user=CumbersomeUserNames -o comm
// The easy way is to directly specify the desired width:
// ps -o pid,user:19,comm
//
static int do_pr_name(char *restrict const outbuf, const char *restrict const name, unsigned u){…..
 

Still have questions? Click here to log a technical support case, or collaborate with your peers in Centrify's Online Community.

Related Articles

No related Articles