Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Corrupt /etc/passwd file for root 1

Status
Not open for further replies.

kozlow

MIS
Mar 3, 2003
326
US
I have a non-existing shell (bad name) for root in my /etc/passwd file.

I have a good copy of the passwd file (from the original server) on another server.

Is there anyway to get it over to the server and overlay.

I can not rlogin, telnet, FTP, rsh......

Any Ideas?

The only way I can figure on getting around this is to Boot in Single User Mode... I am in Georgia and the Server is in St. Louis....
 
Do you have a NIM server that you can use for maint_boot?

Otherwise I have no idea how you can do it unless you talk someone through it there, or you drive there.
 
You cross-posted the exact question in the Solaris forum, too. Is it AIX or Solaris?

No cross-posting.
 
Are you using SSH?
If so, you can issue the command without the shell
ie.
scp passwd.bak HOST:/etc/passwd

If you have a good copy on the server,
ssh HOST "cp /etc/passwd.orig /etc/passwd"


"If you always do what you've always done, you will always be where you've always been."
 
Also, if you can login to the host as a non-root user and su to root, you can try
su -s "/bin/ksh" - root


"If you always do what you've always done, you will always be where you've always been."
 
I've never seen the -s option to su. What flavour is it available in?
 
I've discovered it by accident in a similar sitatuation to this on Linux. I tried it on AIX and it worked as well. Does not work on Solaris though.



"If you always do what you've always done, you will always be where you've always been."
 
Cool, thanks and have a star for that. Just tried it on an AIX 5.2 box and it works as you describe. I guess the only problem is that Kozlow has posted in this and the Solaris forum, so it depends which OS it actually is as to whether it will work! No doubt he/she will post back to confirm.
 
Thx. Hopefully kozlow has one of these.
Also, specifying the shell on an su only works when switching to root. It's ignored for other users


"If you always do what you've always done, you will always be where you've always been."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top