免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 4745 | 回复: 16
打印 上一主题 下一主题

想su到root提示no shell怎么办? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2002-02-27 15:34 |只看该作者 |正序浏览
我把/etc/passwd文件里的root的/sbin/sh改成/sbin/csh了,就不让su到root了,提示no shell,root的shell不能改吗?我得怎么办啊?各位大虾救救我!

论坛徽章:
0
17 [报告]
发表于 2005-12-30 16:14 |只看该作者
try not modifying root shell on /etc/passwd, or it\'ll cause unexpected issues, e.g., wrong root\'s shell entry might causes a unix system unbootable.

论坛徽章:
0
16 [报告]
发表于 2005-12-30 15:33 |只看该作者
光盘启动,到单用户,挂接根分区,把SH改过来就可以了。

论坛徽章:
0
15 [报告]
发表于 2005-12-29 23:18 |只看该作者
原帖由 shirley 于 2002-2-27 16:24 发表
/sbin下没有csh! root的shell是/sbin/sh,不要改!
改回原来那样不就行了吗?

root的shell也不是不能改,但千万不要直接改/etc/passwd文件。可以在root的.profile文件中执行/bin/csh。

注意一下,/sbin/sh和/ ...



Good!!!!

论坛徽章:
0
14 [报告]
发表于 2005-12-29 00:23 |只看该作者
I encounter this problem on solaris 10, it\'s really annoy me, but soon I solve it, it\'s very simple:
on booting, when some text show up to you to choose between \'B\' and \'I\', just type \"b -s\", and then type root password, and then just edit /etc/passwd, the line about what root shell should be, make sure your shell program is correct this time.

论坛徽章:
0
13 [报告]
发表于 2002-11-23 01:38 |只看该作者

想su到root提示no shell怎么办?

刚找到这一段,和楼上的一样:

Good news is, if you are running Solaris 9,
there is fallback shell if you stop the machine
and boot it into single user with boot -s
Bad news, it doesnt work in previous releases.

There you have to take your Solaris CD, put it in
boot with: boot cdrom -s
when its up do a mount:
mount /dev/dsk/c0t0d0s0 /a
set TERM=vi
export TERM
vi /a/etc/shadow

remove everything between first and second colon
so it looks like this
root:: and leave the rest as it were

Have fun *L*

do an: umount /a
and reboot the system

Sorry, no other way to do it

http://www.google.ca/search?q=cache:j8dOZxT71DUC:www.experts-exchange.com/Operating_Systems/Solaris/Q_20311607.html+unix++su+no+shell&hl=en&ie=UTF-8

论坛徽章:
0
12 [报告]
发表于 2002-11-23 01:34 |只看该作者

想su到root提示no shell怎么办?

我也出现了这个情况,解决办法:
用sun安装盘引导,把硬盘(fsck后)mount到/mnt下,然后vi /mnt/etc/passwd,修改相应的shell。
ok!

论坛徽章:
0
11 [报告]
发表于 2002-11-23 00:26 |只看该作者

想su到root提示no shell怎么办?

完啦,看到这里一篇文章,说在安装Unix后的修改配置,把Root的Shell改成bash,在passwd 文件中改,结果就写成了/sbin/bash
重新用root login,说是no shell, 无法进入,
在本地用root也无法login,其他几个帐号可以登录,可是都不是Superuser,

怎么办?难道我非得重新装Solaris?

多谢!请发一份到:kanata@rogers.com

论坛徽章:
0
10 [报告]
发表于 2002-03-01 13:46 |只看该作者

想su到root提示no shell怎么办?

看看你的SHELL是什么,如果是C shell,则使用.login

论坛徽章:
0
9 [报告]
发表于 2002-02-28 08:57 |只看该作者

想su到root提示no shell怎么办?

谢谢大家~!我还想问一下,我在.profile中的设置,. ./.profile这样可以生效,但在重新连接就不生效了,怎样才能永久生效呢?
  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP