solaris10修改root为bash

1,修改root的环境变量指向
默认为:
[root@OCPServer]more /etc/passwd
root:x:0:0:Super-User:/:/sbin/sh
修改为:
[root@OCPServer]more /etc/passwd
root:x:0:0:Super-User:/:/bin/bash
2,建立登陆环境变量
vi /.profile
PS1=[ "$LOGNAME"@`hostname`]:'$PWD'$
PATH=/usr/sfw/sbin:/$PATH:/usr/sfw/bin
3,测试登陆效果
$ su - root
Password:
Welcome to OCPServer's world!

working hard,and the whole world is yours!

Coming on!
[root@OCPServer]~
这样配置后基本ok,命令也能按tab键t出来了。
如果/etc/passwd修改错误,则可能导致root无法识别自己的shell环境,应该在登陆界面修改如下:
1,编辑grup界面
grup界面
在如上图处输入- s ,按B进入单用户模式下。
输入kernel /platform/i86pc/multiboot -s命令,如下
kernel /platform/i86pc/multiboot -s
2,给bash建立一个软连接,本机的bash是在/sbin/bash下,如果不是可查看后做相应的路径调整。
# ln -s   /bin/bash   /sbin/bash  
3,重启系统登陆。

关闭桌面进入文本界面
/usr/dt/bin/dtconfig -d     ----关闭桌面环境
/usr/dt/bin/dtconfig -e     ----打开桌面环境
dtconfig --help
[root@ocmserver]dtconfig --help
Usage:

CDE configuration utility

    /usr/dt/bin/dtconfig -d                (disable auto-start)
    /usr/dt/bin/dtconfig -e                (enable auto-start)
    /usr/dt/bin/dtconfig -kill         (kill dtlogin)
    /usr/dt/bin/dtconfig -reset        (reset dtlogin)
    /usr/dt/bin/dtconfig -p                (printer action update)
/usr/dt/bin/dtconfig -inetd        (inetd.conf /usr/dt daemons)
/usr/dt/bin/dtconfig -inetd.ow (inetd.conf /usr/openwin daemons)

本文出自 “Focus on Oracle” 博客,请务必保留此出处http://alexy.blog.51cto.com/6115453/1062830

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值