Chinaunix首页 | 论坛 | 博客
  • 博客访问: 152842
  • 博文数量: 42
  • 博客积分: 852
  • 博客等级: 准尉
  • 技术积分: 430
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-10 09:59
文章分类

全部博文(42)

文章存档

2015年(2)

2013年(9)

2012年(21)

2011年(4)

2009年(6)

我的朋友

分类: LINUX

2012-03-09 15:14:19

only allow a few accounts can logon Linux by telnet/ssh/rsh

 

1, edit /etc/pam.d/system-auth
 
[root@xabuild1 ~]# head -n 4  /etc/pam.d/system-auth  | grep -v ^#
auth        required      /lib/security/$ISA/pam_listfile.so item=user sense=allow file=/etc/allowusers onerr=succeed
[root@xabuild1 ~]#
 
2, add one line to /etc/pam.d/ssh(rsh)
[root@xabuild1 ~]# head -n 5  /etc/pam.d/sshd  | grep -v ^#
auth       include      system-auth
[root@xabuild1 ~]#
 
3, Added accounts in /etc/allowusers:
[root@xabuild1 ~]# cat /etc/allowusers
cnbuild
tfan
liwang
llhu
dfguo
jfwang
sgzhang
tang
swu
engbuild
[root@xabuild1 ~]#
 
that's ok.
Note the step 2.
 
阅读(1180) | 评论(0) | 转发(0) |
0

上一篇:ZFS forbid user and subnet to write

下一篇:sar

给主人留下些什么吧!~~