l*p 发帖数: 74 | 1 情况:用任何用户登录(包括root),在输入正确密码之后,系统回答
No Shell, 然后断线.不能Telnet, FTP, WWW...
Cause: sb把passwd文件中的root行的最末尾的sh改成了csh,然后重启,就发生了
上述情况。
how to solve the problem ?
thanks | l*l 发帖数: 225 | 2 使用控制台登陆,然后用文件编辑器编辑/etc/passwd,该回去就可以了。使用CDE。
【在 l*p 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 情况:用任何用户登录(包括root),在输入正确密码之后,系统回答 : : No Shell, 然后断线.不能Telnet, FTP, WWW... : : Cause: sb把passwd文件中的root行的最末尾的sh改成了csh,然后重启,就发生了 : 上述情况。 : how to solve the problem ? : thanks
| l*p 发帖数: 74 | 3 even can't login from 控制台
【在 l*l 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 使用控制台登陆,然后用文件编辑器编辑/etc/passwd,该回去就可以了。使用CDE。
| m*****e 发帖数: 4193 | 4 boot from emergency CD/disk, mount root disk and change the file back.
As a lesson, never change root. If you want to use csh for root, create
another user with uid=0.
【在 l*p 的大作中提到】![](/moin_static193/solenoid/img/up.png) : even can't login from 控制台
| l*l 发帖数: 225 | 5 纳闷,我以前就是这样改过一台HP的,使用CDE登陆没有问题啊,使用
Install CD ba.
【在 l*p 的大作中提到】![](/moin_static193/solenoid/img/up.png) : even can't login from 控制台
| d******e 发帖数: 2265 | 6 fear,z怎么把root的shell也改了
【在 l*l 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 纳闷,我以前就是这样改过一台HP的,使用CDE登陆没有问题啊,使用 : Install CD ba.
| d******e 发帖数: 2265 | 7 fear,z怎么把root的shell也改了
【在 l*l 的大作中提到】![](/moin_static193/solenoid/img/up.png) : 纳闷,我以前就是这样改过一台HP的,使用CDE登陆没有问题啊,使用 : Install CD ba.
| m****m 发帖数: 165 | 8 You can change root shell to csh and it realldy doesn't hurt
much.
1. You probably doesn't have csh under /bin, change to
root:..:/usr/bin/csh
2. Add an entry to /etc/shells for csh, like
【在 m*****e 的大作中提到】![](/moin_static193/solenoid/img/up.png) : boot from emergency CD/disk, mount root disk and change the file back. : As a lesson, never change root. If you want to use csh for root, create : another user with uid=0.
| l*l 发帖数: 225 | 9 说来话长, 那时候俺还在国内高能所读书, 管理以太HP server, 不小心
被黑了, 黑客将passwd 下载后编辑完又传到我的计算机上, 结果有余
这黑客用的编辑器将每行后面加了一个"^M", 结果他传上文件后就没有
办法登陆了, 我们也是. 编辑后的passwd如下:
root:54343ewtrwef:0:0:root:/:/bin/sh^M
当然不管用. 后来我就是用文本编辑器将后面两位删除. 想想, 好象是98年,
后来黑客又多次进犯, 只到我装了防火墙.
【在 d******e 的大作中提到】![](/moin_static193/solenoid/img/up.png) : fear,z怎么把root的shell也改了
| m*****e 发帖数: 4193 | 10
This is why you should avoid changing root. Why not simply add another
root account? The account "root" should only be used in extreme emergency.
If it breaks, you have trouble. So avoid changing its environment. Don't
add extra dependency to it since it introduces more failing factors.
【在 m****m 的大作中提到】![](/moin_static193/solenoid/img/up.png) : You can change root shell to csh and it realldy doesn't hurt : much. : 1. You probably doesn't have csh under /bin, change to : root:..:/usr/bin/csh : 2. Add an entry to /etc/shells for csh, like
| | | m****m 发帖数: 165 | 11 Normally /bin is a link to /usr/bin and ksh & sh are default
for Solaris. Only
when you need to use CSH, you need to edit /etc/shells.
When we have a root account, why should be add another one
to do the same job.
I guess whether to change root shell depends on personal
preference. At one
point I read a faq called 'root faq' and it is still
probably searchable on net.
I changed the root shell for myself because I have to do
many things as root
and it just doesn't make sense to work with sh mos
【在 m*****e 的大作中提到】![](/moin_static193/solenoid/img/up.png) : : This is why you should avoid changing root. Why not simply add another : root account? The account "root" should only be used in extreme emergency. : If it breaks, you have trouble. So avoid changing its environment. Don't : add extra dependency to it since it introduces more failing factors.
| m*****e 发帖数: 4193 | 12
They are not doing the same job. One for emergency and one for
daily use.
Just an example: you can create a root account that shares the same
home directory as your normal account so that you share the same
environment and you don't have to do it twice. But better not change
"root", because what if your home directory is not available after
a crash? A network outage (i.e., NFS home directory)? A disk failure?
Or even a stupid typo or misconfiguration (as in the example)?
You can take it as
【在 m****m 的大作中提到】![](/moin_static193/solenoid/img/up.png) : Normally /bin is a link to /usr/bin and ksh & sh are default : for Solaris. Only : when you need to use CSH, you need to edit /etc/shells. : When we have a root account, why should be add another one : to do the same job. : I guess whether to change root shell depends on personal : preference. At one : point I read a faq called 'root faq' and it is still : probably searchable on net. : I changed the root shell for myself because I have to do
| m****m 发帖数: 165 | 13
Well, what is the difference if two accounts have the same
permission,
but one is using at daytime and another one is at night.
I will be interesting to see what is another 'root' account
can make
difference here.
I hate people to say that messing around root account is a
dirty solution. No,
it might be a good idea to have an alternative if you like
it. But keep in mind
that the fundamental of unix security is giving as less
permission as possible
but make works done. If I need to be to roo
【在 m*****e 的大作中提到】![](/moin_static193/solenoid/img/up.png) : : They are not doing the same job. One for emergency and one for : daily use. : Just an example: you can create a root account that shares the same : home directory as your normal account so that you share the same : environment and you don't have to do it twice. But better not change : "root", because what if your home directory is not available after : a crash? A network outage (i.e., NFS home directory)? A disk failure? : Or even a stupid typo or misconfiguration (as in the example)? : You can take it as
| m*****e 发帖数: 4193 | 14 You certainly didn't get what we were talking about.
Read on.
You didn't get the example, and thus the point. Read on.
We are NOT talking about permissions or security. We are talking about
good system administration practice. It is safer not because it has less
permission, but because if this secondary/daily account is not usable for
some reason (I already gave the several possibilities that can lead to the
unusability in the example), you can always use the original root account
for emerge
【在 m****m 的大作中提到】![](/moin_static193/solenoid/img/up.png) : : Well, what is the difference if two accounts have the same : permission, : but one is using at daytime and another one is at night. : I will be interesting to see what is another 'root' account : can make : difference here. : I hate people to say that messing around root account is a : dirty solution. No, : it might be a good idea to have an alternative if you like
| m****m 发帖数: 165 | 15 Hehe, THANK YOU! I guess I really didn't get what you are
talking about. Sorry for the confusion!
Now it seems to me that we need to create another root
account to play with and mess it up, but we don't want it to
affect our system and, even it does, we can always roll back
to original root account and remedy the siutation. I am
sorry to say that I might understand you in the track I was
following. I am certainly very interested the
'possibilities' (disk failure, home directories crash,
etc.
【在 m*****e 的大作中提到】![](/moin_static193/solenoid/img/up.png) : You certainly didn't get what we were talking about. : : Read on. : You didn't get the example, and thus the point. Read on. : We are NOT talking about permissions or security. We are talking about : good system administration practice. It is safer not because it has less : permission, but because if this secondary/daily account is not usable for : some reason (I already gave the several possibilities that can lead to the : unusability in the example), you can always use the original root account : for emerge
| m*****e 发帖数: 4193 | 16
Not exactly what I mean, but at least much closer.
Let's talk about concrete examples. In my department, we have a group
of about 10 sysadmins. We all have root, and we have our own root accounts.
The convention is, if I have a normal account 'microbe', I have a root account
'rmicrobe', which shares the same home directory and shell with 'microbe'.
Isn't it very convenient to have the same environment for both accounts? Then
I don't have to maintain two different .bashrc, .bash_aliases, ~/bi
【在 m****m 的大作中提到】![](/moin_static193/solenoid/img/up.png) : Hehe, THANK YOU! I guess I really didn't get what you are : talking about. Sorry for the confusion! : Now it seems to me that we need to create another root : account to play with and mess it up, but we don't want it to : affect our system and, even it does, we can always roll back : to original root account and remedy the siutation. I am : sorry to say that I might understand you in the track I was : following. I am certainly very interested the : 'possibilities' (disk failure, home directories crash, : etc.
| m****m 发帖数: 165 | 17 Thank you for the effort! But I am sorry to say that you
make me laugh. YOU NEED TO READ MY POST CAREFULLY.
I have already lose my interest for discussion and I feel
sorry to other campers here. Meanwhile, I do hope that you
can get along with your 'rmicrobe' account in your
department. I understand that you have valid reason to
insist what you have in your situation, but what makes me
sick if the attitude concerning discussion. Honestly, I
have more than 300 Sun Servers to take care of and
【在 m*****e 的大作中提到】![](/moin_static193/solenoid/img/up.png) : : Not exactly what I mean, but at least much closer. : Let's talk about concrete examples. In my department, we have a group : of about 10 sysadmins. We all have root, and we have our own root accounts. : The convention is, if I have a normal account 'microbe', I have a root account : 'rmicrobe', which shares the same home directory and shell with 'microbe'. : Isn't it very convenient to have the same environment for both accounts? Then : I don't have to maintain two different .bashrc, .bash_aliases, ~/bi
| m*****e 发帖数: 4193 | 18
Oh, sorry, I could not concentrate when I saw too many grammer
mistakes (and I've got the penalty of wasting time). But trust
me, I did not laugh when I read them.
Speaking of "not had a single case", how many times should I
urge you to look back on how this thread began. Oh well, you
have the right to bury your head in sand and believe in that
nothing bad could ever happen.
Honestly, I personally saw people who mucked with root account
and failed to login, based on administration of a netwo
【在 m****m 的大作中提到】![](/moin_static193/solenoid/img/up.png) : Thank you for the effort! But I am sorry to say that you : make me laugh. YOU NEED TO READ MY POST CAREFULLY. : I have already lose my interest for discussion and I feel : sorry to other campers here. Meanwhile, I do hope that you : can get along with your 'rmicrobe' account in your : department. I understand that you have valid reason to : insist what you have in your situation, but what makes me : sick if the attitude concerning discussion. Honestly, I : have more than 300 Sun Servers to take care of and
|
|