Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3646949
  • 博文数量: 880
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 6155
  • 用 户 组: 普通用户
  • 注册时间: 2016-11-11 09:12
个人简介

To be a better coder

文章分类

全部博文(880)

文章存档

2022年(5)

2021年(60)

2020年(175)

2019年(207)

2018年(210)

2017年(142)

2016年(81)

分类:

2018-10-10 14:28:13

原文地址:/etc/shells是干什么的 作者:tanjiesymbol

今天配一台新的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。
阅读(2717) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~