how to get passwd command again if it is deleted by usin rm command


 
Thread Tools Search this Thread
Operating Systems Linux how to get passwd command again if it is deleted by usin rm command
# 1  
Old 06-07-2007
how to get passwd command again if it is deleted by usin rm command

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
# 2  
Old 06-07-2007
I think that the passwd program is in /bin on Linux, so restore the /bin/passwd file from backups just as you would any other file. And be careful when you are acting as root. If you accidentally delete a very critical file you might not be able to run the restore program. In the worst case you will need to re-install the OS. But /bin/passwd should not be needed during the restore, so you should be ok.
# 3  
Old 06-10-2007
thank you but...

i have deleted it when i was working in root now if want to get it again how it is possible i already used cp command to copy it from etc directory but it is not working
# 4  
Old 06-11-2007
/etc/passwd is the password database file - /bin/passwd is a binary executable used for changing passwords (amongst other things) - the two are not the same.

As Perderabo suggests, you need to restore /bin/passwd (or /usr/bin/passwd on some Linuxes) from a backup.

Cheers
ZB
# 5  
Old 06-11-2007
hello venkata.ganesh,

just get your rescue/installation CD,
go to rescue mode,
install the passwd file.

cheers.
# 6  
Old 02-13-2009
passwd command from another server

I made a mistake in a command and zero'd out the useradd and group add commands. Instead of restoring from backups, I copied the same files from another Linux server with the same OS. Everything worked fine, so you should be able to do the same.

It was very frustrating troubleshooting that one since I didn't notice the issue until I went through and tried to add some users on a later day. The command seemed to work because I got no errors, but nothing would appear in the /etc/passwd or group files.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Deleted /etc/passwd file while accessing to our test server via putty

Hi 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 (6 Replies)
Discussion started by: rahul547
6 Replies

2. UNIX for Advanced & Expert Users

Recover Deleted Folder using rm command

Hi All, I accidentally deleted a important folder using rm command. Can i recover that folder. I don't have any backup mechanism. Please suggest.... its very urgant..Plz (1 Reply)
Discussion started by: vijay.gandra
1 Replies

3. Shell Programming and Scripting

How to prevent command from deleted

Hi, I've been searching around for solution, hope that some gurus here can help. I'm using some commands in my shell script and I'd like to protect these command to be moved to another directory. For instance, cp currently in /bin/cp. If I move it to /bin/cpxxx, my script will not be able to... (3 Replies)
Discussion started by: gklntn
3 Replies

4. UNIX for Advanced & Expert Users

CVS command to revert deleted files

Hi, I have deleted a file and commited in CVS. So, is there any CVS command to revert back that deleted file with existing log messages. --Thanks in advance Madhu (1 Reply)
Discussion started by: madhuti
1 Replies

5. Solaris

Passwd,shadow files deleted and abort sequence disabled

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)
Discussion started by: satish51392111
9 Replies

6. UNIX for Dummies Questions & Answers

rm command-outputting files as they are deleted?

Solaris 10/Korn Hi unix experts!, Is it possible to output the actual file names to a file as they are being deleted via the rm command? Context: Im executing the shell script at the command line and directing the output to an output file eg purgescript.ksh > output.lst within the... (3 Replies)
Discussion started by: satnamx
3 Replies

7. Shell Programming and Scripting

How to deleted a string using tr- command

I have a file like below 4 0 /work/ram/jagan/irt_XXrules.dat 4 0 /work/ram/jagan/irt_NNrules.dat 4 0 /work/ram/jagan/irt_MMrules.dat 4 0 /work/ram/jagan/irt_ZZrules.dat My output should be 4 0 XXrules 4 0 NNrules 4 0 MMrules 4 0 ZZrules (3 Replies)
Discussion started by: suresh3566
3 Replies

8. Solaris

/etc/passwd file been deleted

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)
Discussion started by: gera_sachin125
5 Replies

9. Shell Programming and Scripting

Is there a way to recover files deleted using rm command???

Hi All, I just mistakingly deleted some files using rm command.Is there a way to get it back?i work on Solaris 10 Thanks, Kumar (1 Reply)
Discussion started by: kumarsaravana_s
1 Replies

10. UNIX for Dummies Questions & Answers

Deleted /etc/passwd

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)
Discussion started by: cyno
5 Replies
Login or Register to Ask a Question