当前位置: 移动技术网 > 科技>操作系统>Linux > linux 系统账户 和 普通账户 的区别

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

2019年12月07日  | 移动技术网科技  | 我要评论

慧眼问道txt下载,高地红石榴,解剖女尸图

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

       -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.

什么是系统账户?系统账户和普通账户有什么区别?()

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; 

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网