- 论坛徽章:
- 0
|
怎么禁止指定的用户远程登陆,在哪里设置?
"思路:在/etc目录下创建一个login-user文件,该文件的每一行是一个允许远程登录的用户的帐号。为了安全,建议将该文件设为0600属性。然后在/etc/profile文件中写下如下脚本:"
Great idea. I have not test it yet. But /etc/login-user is 0600 does not work. Think hard
Another question is, what do you want your user to do if you disable your users\' remote login? Do you only want them login on console?(I think you hardly want them do it).
If you don\'t want your user do both remote login/console login, you can just disable their login shell.
Am I right?
It\'s a good shell script anyway.
|
|