- 论坛徽章:
- 0
|
昨天,我以root账号编辑了.bashrc文件,机器重启以后就不能以root账号登录了。
输入根用户名和密码后,会出现如下信息:
your session only lasted less than 10 seconds. If you have not looged out yourself, this could mean that there is some installation problem or that you may be out of diskspace. Try logging in with one of the failsafe sessions to see if you can fix this problem.并给出了详细的错误信息,如下:
-/bin/bash:line 16:bash:command not found
-/bin/bash:line 1:id:command not found
-/bin/bash:line 1:id:command not found
-/bin/bash:line 1:id:command not found
-/bin/bash:line 12:[:too many arguments
-/bin/bash:line 16:[:too many arguments
/bin/bash:line 1:id:command not found
/bin/bash:line 1:id:command not found
/bin/bash:line 1:id:command not found
/bin/bash:line 12:[:too many arguments
/bin/bash:line 16:[:too many argumentsents
/root/.Xclients:line 8:/root/.Xclients-default:No such file or directory
/root/.Xclients:line 8:exe:/root/.Xclients-default:cannot execute:No such file or directory
幸运的是一般用户账号能登录,但mv, tar, rpm等重要命令失效。
以一般账号进入系统,运行su命令,输入root账号密码后,会出现如下错误:bash:bash:command not found。但[ ]里的账号会改为根用户账号,提示符也会由$变为#,可是当前用户所在的目录仍为以一般用户登录时的目录,即[root@localhost yjy]#。键入除cd外的任何命令都无效,会出现如下错误信息:command not found.
另外。我还试着在文字模式下以root账号登录,结果同样是失败。输入root账号和密码后,显示如下内容:
Last login:Wed Sep 13 08:59:39 on :0
You have new mail
-bash:bash:command not found
[root@localhost root]#
请教各位,除了重装系统还有其他解决方法吗?谢谢!!
对了,我的linux为red hat 9.0, 内核为2.4.20-8。 |
|