您当前的位置: 首页 > 学无止境 > 心得笔记 网站首页心得笔记
马哥linux运维学习笔记-nss&pam
发布时间:2019-03-10 12:28:48编辑:雪饮阅读()
仅允许指定用户组的用户登录
在文件'/etc/pam.d/system-auth-ac'中'auth required pam_env.so'下插入'auth required pam_listfile.so item=group sense=allow file=/etc/pam_allowgroups'
然后建立文件如下:
[root@mail ~]# cat /etc/pam_allowgroups
root
allowgrp
该文件仅允许了root用户组的用户和allowgrp用户组的用户登录系统
motd欢迎信息
[root@mail ~]# cat /etc/motd
this is motd
如此以来在系统登录后会有类似如下信息:这里以MobaXterm Personal Edition工具登录为例
login as: root
┌────────────────────────────────────────────────────────────────────┐
│ • MobaXterm 9.2 • │
│ (SSH client, X-server and networking tools) │
│ │
│ ➤ SSH session to root@192.168.1.11 │
│ • SSH compression : ✔ │
│ • SSH-browser : ✔ │
│ • X11-forwarding : ✔ (remote display is forwarded through SSH) │
│ • DISPLAY : ✔ (automatically set on remote server) │
│ │
│ ➤ For more info, ctrl+click on help or visit our website │
└────────────────────────────────────────────────────────────────────┘
Last login: Sun Mar 10 20:17:18 2019
this is motd
关键字词:linux,nss,pam