avatar
SOSSSS! Passwd file broken# Unix - 噫吁兮,危乎高哉
l*n
1
Here is the scenario:
I ftped passwd to windows.
And modify it a little bit.
Then ftp it back.
Noboday can log int the machine now.
I guessed it is because there is an Control-M at the end
of each line.
But how to solve it?
Is there a solution for this?
avatar
l*y
2
Yes, you found the problem.
Try to write a small program to replace those newline characters.

【在 l*****n 的大作中提到】
: Here is the scenario:
: I ftped passwd to windows.
: And modify it a little bit.
: Then ftp it back.
: Noboday can log int the machine now.
: I guessed it is because there is an Control-M at the end
: of each line.
: But how to solve it?
: Is there a solution for this?

avatar
l*n
3
But how? I can not access that file now.
How to access it in the first place?
Thanks very much

【在 l***y 的大作中提到】
: Yes, you found the problem.
: Try to write a small program to replace those newline characters.

avatar
l*y
4
I think you're the system administrator. Don't worry. Ask your superior to reset it. I don't know how to do it.

【在 l*****n 的大作中提到】
: But how? I can not access that file now.
: How to access it in the first place?
: Thanks very much

avatar
l*n
5
I do know the root password. But noweven root can not log in.
The other group memeber s will be mad at me since they can not
access also.
Who ca nsave me ?

【在 l***y 的大作中提到】
: I think you're the system administrator. Don't worry. Ask your superior to reset it. I don't know how to do it.
avatar
T*r
6
try to boot into single user mode (search google for FAQs
for your UNIX system, i.e. Solaris FAQs if you are using
Solaris), and then mount the file system which contains
/etc, move passwd to passwd.bak, and create a new passwd
file as:
echo "root::0:0::/:/bin/sh" > passwd
then reboot the machine, login as root and modify the
passwd.bak to remove ^M, copy it back to passwd.

【在 l*****n 的大作中提到】
: I do know the root password. But noweven root can not log in.
: The other group memeber s will be mad at me since they can not
: access also.
: Who ca nsave me ?

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。