免费注册 查看新帖 |

Chinaunix

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

Linux所有用户登录的缺省配置文件是什么? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-09-11 16:08 |只看该作者 |倒序浏览
Linux所有用户登录的缺省配置文件是(    )

A./etc/profile              B./etc/login.defs          C./etc/.login        D./etc/.logout

论坛徽章:
0
2 [报告]
发表于 2008-09-11 16:10 |只看该作者
顺便请大家说明理由         好么

论坛徽章:
0
3 [报告]
发表于 2008-09-11 16:58 |只看该作者
感觉是 A./etc/profile
原因是感觉!哈哈 以前看书上是这么写的好像,知道的人挺个。

论坛徽章:
34
亥猪
日期:2015-03-20 13:55:11戌狗
日期:2015-03-20 13:57:01酉鸡
日期:2015-03-20 14:03:56未羊
日期:2015-03-20 14:18:30子鼠
日期:2015-03-20 14:20:14丑牛
日期:2015-03-20 14:20:31辰龙
日期:2015-03-20 14:35:34巳蛇
日期:2015-03-20 14:35:56操作系统版块每日发帖之星
日期:2015-11-06 06:20:00操作系统版块每日发帖之星
日期:2015-11-08 06:20:00操作系统版块每日发帖之星
日期:2015-11-19 06:20:00黄金圣斗士
日期:2015-11-24 10:43:13
4 [报告]
发表于 2008-09-11 17:02 |只看该作者
A吧,这算什么题啊?

[ 本帖最后由 vermouth 于 2008-9-12 08:48 编辑 ]

论坛徽章:
34
亥猪
日期:2015-03-20 13:55:11戌狗
日期:2015-03-20 13:57:01酉鸡
日期:2015-03-20 14:03:56未羊
日期:2015-03-20 14:18:30子鼠
日期:2015-03-20 14:20:14丑牛
日期:2015-03-20 14:20:31辰龙
日期:2015-03-20 14:35:34巳蛇
日期:2015-03-20 14:35:56操作系统版块每日发帖之星
日期:2015-11-06 06:20:00操作系统版块每日发帖之星
日期:2015-11-08 06:20:00操作系统版块每日发帖之星
日期:2015-11-19 06:20:00黄金圣斗士
日期:2015-11-24 10:43:13
5 [报告]
发表于 2008-09-11 17:03 |只看该作者
排除,/etc/里面似乎没有CD.而A和登录没什么关系。

论坛徽章:
0
6 [报告]
发表于 2008-09-11 17:27 |只看该作者
到底                        哪个?

论坛徽章:
0
7 [报告]
发表于 2008-09-11 17:29 |只看该作者
这题问得有点怪,要我选A

A /etc/profile是用户登录时候对所有用户起作用的配置
B /etc/login.defs是创建新用户的时候得默认配置,影响/etc/shadow这个文件,但这个名字起得。。。

论坛徽章:
0
8 [报告]
发表于 2008-09-11 17:34 |只看该作者
学习 关注! 凑字 再凑字!

论坛徽章:
0
9 [报告]
发表于 2008-09-11 22:24 |只看该作者
linux,并且使用bash作为默认shell,选A。
理由:
man bash


  1. …………
  2. INVOCATION
  3. …………
  4.        When bash is invoked as an interactive login shell, or as a non-interactive
  5.        shell with the --login option, it first reads and  executes  commands  from
  6.        the  file  /etc/profile,  if that file exists.  After reading that file, it
  7.        looks for ~/.bash_profile, ~/.bash_login, and ~/.profile,  in  that  order,
  8.        and reads and executes commands from the first one that exists and is read‐\r
  9.        able.  The --noprofile option may be used when  the  shell  is  started  to
  10.        inhibit this behavior.

复制代码

论坛徽章:
0
10 [报告]
发表于 2008-09-11 22:32 |只看该作者
A
至少在Redhat发行版中,对于login shell都会执行/etc/profile
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP