Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-18-2004, 07:48 PM
|
#1
|
Senior Member
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334
Rep:
|
$#!% passwd file removed, how do I log in as root?
In my failed attempt to edit the passwd file on all machines, I clobbered the passwd file on one machine, so it is now blank.
I can log into the machine via NIS as any normal user, but I can't login as root to restore the passwd file. Is there anyway to get logged in?
To make matters more complicated, this machine has no CD ROM drive. (I could have just used knoppix, mounted the drive, & restored the file if that were the case).
|
|
|
08-18-2004, 08:04 PM
|
#2
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
Reboot, single (or init 1) ... if it's an old enough
version of RH/MDK you'll get a root bash-prompt
If it's slack or another sensible distro;
single init=/bin/sh
(Btw, that's why my linux installs all have restricted
in their lilo-options ;})
Cheers,
Tink
|
|
|
08-18-2004, 08:12 PM
|
#3
|
Senior Member
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334
Original Poster
Rep:
|
Quote:
Originally posted by Tinkster
Reboot, single (or init 1) ... if it's an old enough
version of RH/MDK you'll get a root bash-prompt
If it's slack or another sensible distro;
single init=/bin/sh
(Btw, that's why my linux installs all have restricted
in their lilo-options ;})
Cheers,
Tink
|
excellent idea, but I can't edit my /etc/inittab. Is there another way to specify the runtime level?
|
|
|
08-18-2004, 08:14 PM
|
#4
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
At boot, as a kernel parameter
init 1
|
|
|
08-18-2004, 08:19 PM
|
#5
|
Senior Member
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334
Original Poster
Rep:
|
Quote:
Originally posted by Tinkster
At boot, as a kernel parameter
init 1
|
YOU RULE!
Thanks.
|
|
|
08-19-2004, 06:24 AM
|
#6
|
Senior Member
Registered: May 2004
Location: california
Distribution: mdklinux8.1
Posts: 1,209
Rep:
|
tinkster; I second that motion! for as long as responding to posts finally some one else with same problem i,ve had & bingo Tink to the rescue viola!
absolutely thank you. all my research & a simple solution such as U provided. Oh well that is how LQO forums work & Great! back to basics.
|
|
|
08-19-2004, 02:23 PM
|
#7
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
BrianK, penguin4,
thanks for the praise, greatly appreciated :)
Cheers,
Tink
|
|
|
All times are GMT -5. The time now is 04:26 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|