linux 系統賬戶 和 普通賬戶 的區別


最近使用 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; 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM