如何限制某用户在特定 pty 的访问?

来源:百度知道 编辑:UC知道 时间:2024/05/18 01:48:16

用户可以编辑/etc/security/user. For example:
test:
admin = false
admgroups = system
ttys = !/dev/pts/0,ALL
结果是用户test可以在除了pts/0以外的所有端口登录,当test在pts/0登录时,系统报错You are not allowed to access the system via this terminal.