[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /etc/passwd

> I deleted the first (root) line from the passwd file. I closed out myself.
> HOW can i restore it without root rights?
You have multiple choices,

one is:

1. take a Live distro, (for instance ubunthu)
2. boot the os from the Cd
3. mount the root partition from a root shell
4. edit the /etc/shadow and /etc/passwd adding the line for the root account
5. reboot the system

the second is (the success of this way depends on your local configuration):
pass a command line parameter to lilo, for instance init=/bin/bash and
edit the /etc/passwd file...

We reject kings, presidents and voting
We believe in rough consensus and running code
IETF Credo

Reply to: