deleting /etc/passwd

This is a discussion on deleting /etc/passwd within the Linux Programming forums, part of the Platform Specific Boards category; Lets say I accidently deleted /etc/passwd, how would I get back into the system to do anything because there would ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    140

    deleting /etc/passwd

    Lets say I accidently deleted /etc/passwd, how would I get back into the system to do anything because there would no longer be any users or passwords or something like that.
    Acos is good

  2. #2
    Registered User
    Join Date
    Aug 2001
    Posts
    79
    You could write a new one manually, I suppose. If you can't get in, you could always boot lilo using "linux single", which boots to single user mode(and thus, no security at the console)
    All generalizations are false

  3. #3
    Blank
    Join Date
    Aug 2001
    Posts
    1,034
    I just tried and it didn't do anything? I even rebooted, maybe you
    have to enter some command to update the database. I'm pretty sure even if there was a problem the startup would notice it and not do a kernel panic.

  4. #4
    Registered User
    Join Date
    Sep 2001
    Posts
    12
    not sure on this one, but if you know another linux box....you could take a passwd file from that one changing the info necessary. ?
    THE Dark_Knight_506

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Creating and deleting directories and deleting files
    By fguy817817 in forum C Programming
    Replies: 1
    Last Post: 04-08-2009, 08:26 AM
  2. deleting nodes in a linear list
    By sudhanshu_nsit in forum C++ Programming
    Replies: 7
    Last Post: 06-25-2006, 03:00 AM
  3. Deleting dynamically allocated objects
    By Daniel Jurnove in forum C++ Programming
    Replies: 3
    Last Post: 11-07-2002, 03:30 AM
  4. Deleting Records from a structure
    By Simon in forum C Programming
    Replies: 5
    Last Post: 09-12-2002, 12:28 AM
  5. need help deleting a deleting a struct from file
    By Unregistered in forum C Programming
    Replies: 5
    Last Post: 05-20-2002, 06:38 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21