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
[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
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]~
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界面
在如上图处输入- 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 ----打开桌面环境
/usr/dt/bin/dtconfig -e ----打开桌面环境
[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)
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