免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3540 | 回复: 0
打印 上一主题 下一主题

/etc/shells是干什么的 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-07-15 23:22 |只看该作者 |倒序浏览
今天配一台新的rx7640,发现除root用户之外,其他的用户都不能ftp登陆。
查找原因,发现其原因是root使用/sbin/sh,而其他用户都是/usr/local/bin/bash,如果换成/sbin/sh就OK了。
在/etc/shells文件中(没有则创建之)增加了/usr/local/bin/bash,则可以使用ftp登陆。
看来/etc/shells是用来说明有效shell的配置文件。奇怪的是目前发现是对ftp有效,对telnet没有什么作用。

终于发现了一个比较权威的解释(来自linuxfromscratch)

The /etc/shells File
The shells file contains a list of login shells on the system. Applications use this file to determine whether a shell is valid. For each shell a single line should be present, consisting of the shell's path, relative to the root of the directory structure (/).
For example, this file is consulted by chsh to determine whether an unprivileged user may change the login shell for her own account. If the command name is not listed, the user will be denied of change.
It is a requirement for applications such as GDM which does not populate the face browser if it can't find /etc/shells, or FTP daemons which traditionally disallow access to users with shells not included in this file.
看来该配置文件只对某些程序有用,如ftp。


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/18578/showart_1082965.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP