Chinaunix首页 | 论坛 | 博客
  • 博客访问: 942209
  • 博文数量: 102
  • 博客积分: 8134
  • 博客等级: 中将
  • 技术积分: 1072
  • 用 户 组: 普通用户
  • 注册时间: 2007-11-21 15:30
文章分类

全部博文(102)

文章存档

2019年(1)

2018年(1)

2014年(1)

2013年(2)

2012年(1)

2011年(2)

2010年(5)

2009年(9)

2008年(10)

2007年(70)

分类: BSD

2007-11-21 16:19:56

使用BASH作ROOT的SHELL,所有系统用户的shell均改为bash

# pkg_add libiconv-1.9.1.tgz
# pkg_add gettext-0.10.40p1.tgz
# pkg_add bash-3.0.tgz
cp /usr/local/bin/bash /bin/
#########################
建议把它从 /usr/local/bin/bash 拷贝到 /bin/bash 下,这样才能一旦不幸机器重启,要进行文件系统检查(或类似情形)时它也能用,因为这种情况下,只有根分区是挂接的,而 /usr/local/bin/bash 就不能用了。
#######################
# echo "/bin/bash" >;>; /etc/shells
# chsh -s /bin/bash
# vi /root/.profile
## 增加下面的部分
PS1='[\u@\H \W]\$'
export PS1
TMOUT=1800

修改/etc/skel/.profile,增加PS1环境变量
PS1='[\u@\h:\w]\$ '
export PS1
修改adduser的配置文件,这样以后增加的用户全都是以bash作为默认shell
#adduser -config_create
Use option ``-silent'' if you don't want to see all warnings and questions.

Reading /etc/shells
Enter your default shell: bash csh ksh nologin sh [sh]: bash
Your default shell is: bash ->; /bin/bash
Reading /etc/login.conf
Default login class: auth-defaults auth-ftp-defaults daemon default staff
[default]:
Enter your default HOME partition: [/home]:
Copy dotfiles from: /etc/skel no [/etc/skel]:
Send message from file: /etc/adduser.message no [no]:
Do not send message
Prompt for passwords by default (y/n) [y]:
Default encryption method for passwords: auto blowfish des md5 old
[auto]:
阅读(1253) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~