Apache - 为什么我的 apache 用户是一个数字?

Pie*_*NAY 2 users apache-2.2

$ ps aux | grep httpd

1003     22806  0.0  0.3  17624  7684 ?        S    May25   0:00 /opt/web/apache/bin/httpd -k start
1003      4834  0.0  0.3  17624  7684 ?        S    May28   0:00 /opt/web/apache/bin/httpd -k start
1003      5299  0.0  0.3  17740  7804 ?        S    May28   0:00 /opt/web/apache/bin/httpd -k start
1003      5503  0.0  0.3  17624  7684 ?        S    May28   0:00 /opt/web/apache/bin/httpd -k start
1003      5875  0.0  0.3  17624  7684 ?        S    May28   0:00 /opt/web/apache/bin/httpd -k start
1003      5970  0.0  0.3  17624  7684 ?        S    May28   0:00 /opt/web/apache/bin/httpd -k start
1003      6062  0.0  0.3  17624  7672 ?        S    May28   0:00 /opt/web/apache/bin/httpd -k start
1003      6245  0.0  0.3  17624  7684 ?        S    May28   0:00 /opt/web/apache/bin/httpd -k start
1003      6338  0.0  0.3  17624  7672 ?        S    May28   0:00 /opt/web/apache/bin/httpd -k start
1003     24091  0.0  0.3  17624  7764 ?        S    May30   0:00 /opt/web/apache/bin/httpd -k start
Run Code Online (Sandbox Code Playgroud)

我的 apache 用户好像是 1003,不是吗?

Eig*_*ony 6

ps 如果用户名超过一定数量的字符(在您的情况下可能长于 7 或 8 个字符),则使用 UID 号。

从手册页,

   euser      EUSER   effective user name. This will be the textual
                      user ID, if it can be obtained and the field width
                      permits, or a decimal representation otherwise. The n option
                      can be used to force the decimal representation.
                      (alias uname, user).
Run Code Online (Sandbox Code Playgroud)

因此,根据用户名列输出的宽度,您的用户名可能太长了。

使用grep ":1003:" /etc/passwd看用户名,看看它有多长。