Unix系统限制终端登录小技巧[转帖 修改]

在Unix系统中,有些应用需要只对某些终端和某些用户开放,而对其他终端和某些用户进行限制。如果要实现如上操作,只要将下面的shell程序加入到/etc/profile的文件中去,就可实现限制对tty1b终端号只能用“xtgl”这一用户登录,而不能用其他的用户登录系统。 # echo "tty tty" # if test tty = '/dev/tty1b'; # then # if test

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus