如何添加禁止登录的用户

通过SSH软件登录服务器,键入如下代码建立用户

  1. useradd username -s /sbin/nologin

设置用户密码

  1. passwd username

这样就建立了没有登录权限的用户。

发布于:2019-10-05 00:44:40