linux禁止用户登录系统的方法
1.在profile文件中加入如下内容
if [ "$LOGNAME" = "user1" ] ; then
exit 1
fi
2.在passwd文件中指定用户shell
/sbin/nologin
linux禁止用户登录系统的方法
1.在profile文件中加入如下内容
if [ "$LOGNAME" = "user1" ] ; then
exit 1
fi
2.在passwd文件中指定用户shell
/sbin/nologin