LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-21-2006, 02:12 PM   #1
shifty51
LQ Newbie
 
Registered: Mar 2006
Location: Ontario, Canada
Distribution: debian 'etch'
Posts: 4

Rep: Reputation: 0
Question I corrupted /etc/shadow


Hello all
I did a stupid thing, i played with the /etc/shadow file as root
and now nobody can log in. I have found an article that tells me how to fix it, but i need to be in run level 1. I don't know how to do that, so if anyone knows how to boot to run level 1 through grub in FC4, or a way to fix the shadow file, that would be greatly appreciated.

Cheers
 
Old 03-21-2006, 02:35 PM   #2
mcmillan
Member
 
Registered: Jul 2005
Distribution: Arch
Posts: 489

Rep: Reputation: 30
I know Ubuntu adds an entry to grub for a rescue mode, which is the pretty much run-level 1. If you don't have an option like that you could try booting with a LiveCD and mount your root partition. Edit your /etc/inittab file, where it says id:5:initdefault: to be id:1:initdefault:

Just remember to change it back when your done. Depending on the directions you might be able to fix things from the liveCD without needing to boot into a single user mode.

There's probably an easier way to do this, but that's the first thing I can think of.
 
Old 03-21-2006, 05:40 PM   #3
Hobbletoe
Member
 
Registered: Sep 2004
Location: Dayton, Oh
Distribution: Linux Mint 17
Posts: 150

Rep: Reputation: 18
As root ...

Code:
# init 1
To get back after correcting your /etc/shadow file...

Code:
# init 5
 
Old 03-21-2006, 05:59 PM   #4
nixcraft
Member
 
Registered: Nov 2004
Location: BIOS
Distribution: RHEL3.0, FreeBSD 5.x, Debian 3.x, Soaris x86 v10
Posts: 379

Rep: Reputation: 30
Try
Recovering deleted /etc/shadow password file :
http://www.cyberciti.biz/nixcraft/vi...w-password.php

Pass init=/bin/bash and then recover it
 
Old 03-21-2006, 08:44 PM   #5
shifty51
LQ Newbie
 
Registered: Mar 2006
Location: Ontario, Canada
Distribution: debian 'etch'
Posts: 4

Original Poster
Rep: Reputation: 0
thankyou

thanks guys, the problem is fixed now and i owe you debt of gratitude.

Cheers
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/etc/shadow throwapart Linux - Security 2 01-18-2006 08:43 PM
permission /etc/shadow ... stomach Linux - Software 6 12-24-2005 12:24 PM
htaccess to shadow spud Programming 1 03-10-2005 02:23 PM
/etc/shadow crack gfrair Linux - Security 3 03-06-2005 08:01 PM
/etc/shadow- (notice the dash after the word shadow) shellcode Linux - Security 1 09-03-2004 04:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration