{ "@context": "https://schema.org", "@type": "Organization", "name": "Brainscape", "url": "https://www.brainscape.com/", "logo": "https://www.brainscape.com/pks/images/cms/public-views/shared/Brainscape-logo-c4e172b280b4616f7fda.svg", "sameAs": [ "https://www.facebook.com/Brainscape", "https://x.com/brainscape", "https://www.linkedin.com/company/brainscape", "https://www.instagram.com/brainscape/", "https://www.tiktok.com/@brainscapeu", "https://www.pinterest.com/brainscape/", "https://www.youtube.com/@BrainscapeNY" ], "contactPoint": { "@type": "ContactPoint", "telephone": "(929) 334-4005", "contactType": "customer service", "availableLanguage": ["English"] }, "founder": { "@type": "Person", "name": "Andrew Cohen" }, "description": "Brainscape’s spaced repetition system is proven to DOUBLE learning results! Find, make, and study flashcards online or in our mobile app. Serious learners only.", "address": { "@type": "PostalAddress", "streetAddress": "159 W 25th St, Ste 517", "addressLocality": "New York", "addressRegion": "NY", "postalCode": "10001", "addressCountry": "USA" } }

Q8 Linux System Recovery (/etc/passwd) Flashcards

(1 cards)

1
Q

Suppose you have installed a GNU/Linux system on a hard drive.
One day you accidentally deleted the file /etc/passwd but you rebooted the system before you realised the mistake.
No one can log into the system now.
But luckily you have a backup of the file on a different machine.

Explain how you can fix the problem without reinstalling the whole system.

A

Problem: /etc/passwd is essential for user authentication and defining user environments (home direc, login shell).
- Without it system utilities like login cannot determine valid users, preventing normal login access

Solution: to fix without reinstalling, access file system from outside broken installatio to restore backup.

1 - boot from live cd/usb
2 - identify and mount root partition
3 - transfer backup of /etc/passwd to /mnt/etc/passwd
4 - verify permissions and ownership
5 - unmount and reboot.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly