The 'useradd' command is used to create a new user account on a Linux system. In this case, the command is creating a new user account named 'zabbix' with the following options:

  • '-r' creates a system account, which is used for running services or daemons on the system.
  • '-M' tells the command not to create a home directory for the user.
  • '-s /sbin/nologin' sets the login shell for the user to '/sbin/nologin', which means the user cannot log in interactively.

So, the command 'useradd -r -M -s /sbin/nologin zabbix' creates a system account named 'zabbix' that cannot log in interactively and does not have a home directory.

How to Create a Non-Interactive System User with useradd in Linux

原文地址: https://www.cveoy.top/t/topic/hsQ6 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录