9

I want to know what are the implications of create an account using -r option?

# useradd -r ...

The help says:

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

But, beyond assign lower values to uid, gid and groups.

Question 1 What files are affected?

Question 2 What additional performance this type system account presents?

Question 3 What behavior ignores or stops submit?

Question 4 Can I change an account created with the "-r" option to an account as if it were created without that option?

2

Looking at the current source for useradd, one can see exactly what else changes when -r is specified:

  • subordinate uid/gid feature is disabled
  • mail directory is not created

So, no major difference from regular user account. Certainly no automatic performance gain or loss. I am not sure what you mean by Q1 and Q3; as for Q4 -- technically, yes; but since that involves changing user ID, any files owned by former UID must be chowned to new one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.