
Do you need system user (with UID creates the group with the same name as user and you don't need to create in by yourself.īTW, if you'll decide to change something in user configuration (for example: specify home directory, or change shell), you will always can do it with usermod command. GID counterparts for the creation of groups).Īlso useradd -r. Range, defined in /etc/fs, instead of UID_MIN-UID_MAX (and their Info from man useradd: System users will be created with no aging information in /etc/shadow,Īnd their numeric identifiers are chosen in the SYS_UID_MIN-SYS_UID_MAX It means, you will create system account. I think the best way to create tomcat user to do as follows: # useradd -r -s /sbin/nologin tomcat There are as many opinions as there are people. It would be better to use: useradd UserG5C -M -s /bin/false because this user/account hasn't system privileges? The difference UserG5C creates homeDirectory 33 IntUser IntUser 4096 Jun 25 05:46 IntUserĭrwx. UserG5C UID and GID greater than 500 # ls -al /home/ĭrwxr-xr-x. UserG5C:x:503:504::/home/UserG5C:/bin/falseĭirectory: /home/UserG5C Shell: /bin/false UserL5C with UID and GID lower than 500 # useradd UserG5C -shell /bin/false UserL5C:x:494:491::/home/UserL5C:/bin/falseĭirectory: /home/UserL5C Shell: /bin/false In CentOS is needed to use -s or -r options?ĮDIT 2 # useradd -r UserL5C -shell /bin/false Variable in /etc/default/useradd, or an empty string by default. Which causes the system to select the default login shell specified by the SHELL The default is to leave this field blank, m options if you want a home directory for a system account to be created. Of the default setting in /etc/fs (CREATE_HOME). Note that useradd will not create a home directory for such an user, regardless

etc/fs, instead of UID_MIN-UID_MAX (and their GID counterparts for the Numeric identifiers are chosen in the SYS_UID_MIN-SYS_UID_MAX range, defined in System users will be created with no aging information in /etc/shadow, and their I don't know what is the mistake or consequence, I want to know what is the best optionĬhown - change file owner and group -r, -system # chown -Rf tomcat.tomcat /usr/local/tomcat

Other option:? # useradd -g tomcat -s /bin/bash -d /usr/local/tomcat tomcat In other page (hidden and recursive) # useradd -r tomcat -shell /bin/false # useradd -g tomcat -c "Tomcat User" -d /usr/local/tomcat tomcat # useradd -g tomcat -d /usr/local/tomcat tomcat I want to create an user for my Tomcat installation, but I was viewing multiple options: # groupadd tomcat
