修改了PASSWD把登陆的SHELL给改错了结果ROOT无法登陆,可有办法补救啊??

XJL1981 2003-11-04 05:19:28
给位大哥,由于小弟想把ROOT的默认SHELL改为CSH,于是去修改PASSWD文件,结果没看清把默认的SHELL改成了CHS,导致登陆的时候显示无法找到SHELL登陆,进不了SHELL我无法再改回原来的SHELL。我还有个USER的帐号可以登陆到BASH但却没有权限修改PASSWD文件,想在LIUNX下MOUNT FREEBSD的分区修改却不知道怎么MOUNT。各位大哥给小弟想个办法啊,很急啊,我不想重装系统啊,我机器里有三个系统一重装就要都重搞。帮帮我啊!!!!
...全文
174 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
fierygnu 2003-11-05
  • 打赏
  • 举报
回复
freebsd此时会忽略/etc/passwd文件。
Nvram 2003-11-05
  • 打赏
  • 举报
回复
You must use root shell even in single user mode!
but the problem is the root shell can not be found.
Nvram 2003-11-05
  • 打赏
  • 举报
回复
使用FreeBSD Disk 2引导
mount 分区修改passwd

BUT......
You should NEVER change root shell!http://www.xs4all.nl/~hanb/documents/change_root_shell.html
http://www.roble.com/docs/sol_root_shell.html
shongyu 2003-11-05
  • 打赏
  • 举报
回复
At this prompt type 'boot -s' which will get you into single
user mode. From there 'mount -a' to mount all the drives r/w.
You can remount just the root partition if you like, but this
will be easiest. Then use passwd to change root's password
to whatever you want.
cathy97 2003-11-05
  • 打赏
  • 举报
回复
看来你只有用应急启动了,用linux安装光盘,选择linux rescue,在不使用root登陆shell的情况下可对Linux系统文件进行修改
fierygnu 2003-11-05
  • 打赏
  • 举报
回复
引导时能进单用户吗?在
Hit [Enter] to boot immediately, or any other key for command prompt.

Booting [kernel] in 10 seconds...
提示时按空格,然后执行boot -s试试。
linaxing 2003-11-05
  • 打赏
  • 举报
回复
估计只能用应急盘引导后再修改了。
NC 2003-11-04
  • 打赏
  • 举报
回复
试试将csh文件复制一份,名为chs,再进ROOT试试.如果没有权限那只有用同样的UNIX做一张应急盘了。

23,121

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧