LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-13-2022, 10:56 AM   #1
opty
Member
 
Registered: Mar 2021
Posts: 183

Rep: Reputation: Disabled
Angry Accidentally removed /etc/shadow


I accidentally removed /etc/shadow. >:-(

What recovery do you recommend?
 
Old 05-13-2022, 10:57 AM   #2
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Use your backup to restore the file.
 
Old 05-13-2022, 11:01 AM   #3
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,630

Rep: Reputation: 3516Reputation: 3516Reputation: 3516Reputation: 3516Reputation: 3516Reputation: 3516Reputation: 3516Reputation: 3516Reputation: 3516Reputation: 3516Reputation: 3516
Quote:
Originally Posted by opty View Post
I accidentally removed /etc/shadow. >:-(

What recovery do you recommend?
Boot from the recovery/emergency/backup system from your favorite external hard drive and restore the latest backup.

Last edited by LuckyCyborg; 05-13-2022 at 11:02 AM.
 
Old 05-13-2022, 11:11 AM   #4
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,142

Rep: Reputation: 4211Reputation: 4211Reputation: 4211Reputation: 4211Reputation: 4211Reputation: 4211Reputation: 4211Reputation: 4211Reputation: 4211Reputation: 4211Reputation: 4211
What about the local backup /etc/shadow- ?
You can recover most of the deleted file from there...
 
Old 05-14-2022, 04:07 PM   #5
opty
Member
 
Registered: Mar 2021
Posts: 183

Original Poster
Rep: Reputation: Disabled
Thanks for your support!

Peripheral-less machine hidden under a furniture and immune to standard reboot attempts made it harder but I managed to boot with "rescue" over serial console, restore the file from a BTRFS snapshot and continue normal boot using 14.2's kernel because the file removal happened during upgrade to 15.0 and I didn't get to the initrd creation part. :-D
 
  


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
LFS 11.0: 8.25. Shadow: Invalid /etc/shadow permissions after pwconv ClemaX Linux From Scratch 2 12-25-2021 01:01 PM
[SOLVED] Accidentally removed /etc/pam.d // How to reinstall packages in my arch from a live usb? luther1017 Arch 2 11-24-2018 07:00 PM
Accidentally removed shadow package hussar Slackware 3 12-24-2005 06:31 AM
/etc/passwd, /etc/shadow, /etc/group? Educate me :)! nutnut Linux - General 4 06-11-2005 07:47 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 - Distributions > Slackware

All times are GMT -5. The time now is 03:28 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