%general-entities; ]> 创建 /etc/shells 文件 /etc/shells shells 文件包含系统登录 shell 的列表, 应用程序使用该文件判断 shell 是否合法。该文件中每行指定一个 shell ,包含该 shell 相对于目录树根 (/) 的路径。 例如 chsh 使用该文件判断一个非特权用户是否可以修改自己的登录 shell 。 如果命令没有在 /etc/shell 中找到,就会拒绝修改操作。 这个文件对某些程序是必要的。例如 GDM 在找不到 /etc/shells 时不会填充登录界面, FTP 守护进程通常禁止那些使用未在此文件列出的终端的用户登录。 cat > /etc/shells << "EOF" # Begin /etc/shells /bin/sh /bin/bash # End /etc/shells EOF