Security

A reporting service runs a cron job as the local account svc_report. The account must keep owning its files and running the job, but any interactive login attempt must be refused with a message that the account is not available. Which command meets this requirement?

Show the answer

Correct answerB. usermod -s /sbin/nologin svc_report

Assigning /sbin/nologin as the login shell refuses interactive sessions and prints the not-available message, while the account stays usable for jobs. rbash is tempting, but it still gives the user a working, though restricted, interactive shell.