I was accessing our linux test server via putty and By mistake i deleted /etc/passwd file.....
It is allowing me to login..... So could anyone please help me out in this issue....
Please, it is urgent
It is allowing you to login or NOT allowing you to login? - I assume it is NOT allowing you to login.
Here's what I would do. Login to another computer (preferably same Linux distro/version) and copy
the line of that system's /etc/passwd file where it specifies the password for root. In my system it is:
Then paste it into your test server's /etc/passwd file.
Same thing with /etc/shadow:
Moderator's Comments:
Posting lines from your /etc/shadow exposes your password to cracking, they should be posted obscured.
Unless you can restore that file from a backup, your accident won't go unnoticed. You can start off with the usernames from /etc/shadow and rebuild /etc/passwd, but e.g. non-standard login shells and user homes will be lost. You might be lucky in that passwords are stored in /etc/shadow.
Posting lines from your /etc/shadow exposes your password to cracking, they should be posted obscured.
Thanks! I actually thought about that and changed several characters in the password field. But now that you mentioned it, how do I post something 'obscured'?
In my ignorance I deleted the known_hosts file on private server. I am not sure what the file type is supposed to be. In general, I have been having problems with ssh and passwords. For some reason, despite having generated a private/public key pair and successfully saving the .pub file onto the... (2 Replies)
Hi,
I want to run putty.exe in Solaris server.My main aim is to invoke the putty.exe in Solaris server from a web application(.jsp) deployed in the server so that putty terminal should open.
Thanks in advance (11 Replies)
I have a requirement of following -
1. Transfer excel spreadsheet from desktop to unix server
2. Open the spreadsheet and read the sql row by row at a time
3. Run each sql on database using unix and then send output back to spreadsheet that was uploaded earlier and then transfer file back to... (12 Replies)
Hi all..
I moved the /etc/shadow and /etc/shadow files to /tmp and then rebooted my PARC machine running 5.10. I did it to see if I could recover from single user mode.
But, I forgot to enable the abort key-sequence which I earlier disabled.
Stuck!
One of my gurus told I had to... (9 Replies)
Hi,
I am getting -805 error when i tried accessing TEST DB from PROD environment in AIX UNIX. Could anyone help me in this regard.
Thx,
Satish (1 Reply)
hai friends i have deleted passwd command using rm command i thought it will come again at the time of rebooting but it is completely deleted how to get it worked again (5 Replies)
Hi Folks ,
Would be grateful if someone could help me out in one of the question that came to my mind . If the /etc/passwd file has been deleted and the system has been rebooted . Then i dont think that any user would be able to login and the system will be useless . Whats the best solution for... (5 Replies)
Hi all,
While playing with my LINUX machine i accidently deleted a file name called /etc/passwd . Even though the system is booted am unable to get the login prompt. Is there any remedy for this problem.:( (5 Replies)