The System admin team of
xFusionCorp Industrieshas installed a backup agent tool on all app servers. As per the tool's requirements, they need to create a user with a non-interactive shell.
Therefore, create a user named
javedwith a non-interactive shell on the
App Server 2
App Server 2using as
ssh email@example.com. Enter password when prompted. Currently only users
ansibleexist in this server
javedwith non-interactive shell:
sudo adduser -s /sbin/nologin javed.
-sis a flag to set the shell for a user. Below I authenticate as
sudoprefixes are unnecessary.
nologin displays a message that an account is not available and closes the connection and returns non-zero. It is intended as a replacement shell field to deny login access to an account.
Creating a user with a non-default $SHELL. Th
nonloginshell is non-interactive and used for disabling a user account in the case of suspicious activity or upon user workplace/contract termination. The shell can also be updated using
A custom message can be set for any attempts to log in as the disabled user account by editing/creating a