|
发表于 2005-11-11 20:47:34
|
显示全部楼层
非root用户登陆时系统没有执行~/.bash_profile和~/.bashrc,而是去执行了/etc/profile。
而root用户登陆则执行了/root/.bash_profile 和.bashrc
一个successful的login使用/bin/login并读取/etc/passwd后---------->执行/etc/profile----->寻找/home/user/.bash_profile
以上是login shell的读取过程.
对于non-login shell (也就是不需要输入username and passwd 马上能得到$, 例如直接在命令行输入bash, 启动xterm等), 先读取父环境的参数然后读取/home/user/.bashrc
同意木木的意见, 楼主应该是用root建立的那个文件的, 权限对users应该是不可读的. |
|