【问题标题】:linux, command to get the first non-system user idlinux,获取第一个非系统用户id的命令
【发布时间】:2014-09-07 16:19:37
【问题描述】:

是否有获取第一个非系统用户 ID(系统上的第一个“真实”用户)的 linux 命令? (因为https://superuser.com/questions/626843/does-the-root-account-always-have-uid-gid-0 不包括root)

【问题讨论】:

标签: linux userid


【解决方案1】:

假设您的意思是“useradd 命令添加的第一个用户的 uid 是什么” - 通常是 1000(虽然不知道我是怎么知道的)

另外,我通过谷歌快速搜索发现:https://serverfault.com/questions/362943/who-is-user-500

以前好像是500是第一个用户,现在变成了1000

cat /etc/login.defs | grep UID_MIN

将为您提供系统的最小用户 ID

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-02-22
    • 2011-09-24
    • 1970-01-01
    • 2016-01-14
    • 2012-08-24
    • 2015-05-21
    • 2021-01-22
    • 1970-01-01
    相关资源
    最近更新 更多