如何添加禁止登录的用户 通过SSH软件登录服务器,键入如下代码建立用户 useradd username -s /sbin/nologin 设置用户密码 passwd username 这样就建立了没有登录权限的用户。