前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >linux 系统账户 和 普通账户 的区别

linux 系统账户 和 普通账户 的区别

作者头像
xuyaowen
发布2020-12-30 14:26:16
4.2K0
发布2020-12-30 14:26:16
举报
文章被收录于专栏:XUYAOWEN的专栏XUYAOWEN的专栏

最近使用 useradd -r 选项进行创建账户,用于测试,对-r 选项不是很明白,下面记录一些调研的过程:

代码语言:javascript
复制
       -r, --system
           Create a system account.

           System users will be created with no aging information in /etc/shadow, and their numeric identifiers are chosen in the
           SYS_UID_MIN-SYS_UID_MAX range, defined in /etc/login.defs, instead of UID_MIN-UID_MAX (and their GID counterparts for the
           creation of groups).

           Note that useradd will not create a home directory for such a user, regardless of the default setting in /etc/login.defs
           (CREATE_HOME). You have to specify the -m options if you want a home directory for a system account to be created.

什么是系统账户?系统账户和普通账户有什么区别?(参考连接

代码语言:javascript
复制
When you are creating an account to run a daemon, service, or other system software, rather than an account for interactive use.

Technically, it makes no difference, but in the real world it turns out there are long term benefits in keeping user and software accounts in separate parts of the numeric space.

Mostly, it makes it easy to tell what the account is, and if a human should be able to log in.

系统账户的用户id一般是小于一千的;其实就是给UID一个确定的代号,它不能用于登录,一般是给程序来使用;

保持更新,转载请注明出处;更多内容请关注 cnblogs.com/xuyaowen; 

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2019-12-06 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档