How can we create a user account with no login shell for running the Tomcat server.
What is the purpose of User Account with no login shell ?
And How can no login shell user perform the installation of Tomcat Server using non-login user id ?
To create a system user account with no shell:
By setting the shell to /sbin/nologin it is more difficult for the account to be accidentally comprimised (e.g., a password gets set for user tomcat and someone tries to login). It will also stop a shell from being created using
It is, however, still possible to run commands as this user with sudo:
If using a package manager, be sure it doesn't already create a tomcat user for you. If extracting from an archive, ensure that the archive is in a location that is accessible by the tomcat user (e.g., /tmp).