Question: 1- Write a script that can execute 2 functions: backup and restore; a Backup: the script backs up /etc/passwd and/or /etc/shadow to a location given

1- Write a script that can execute 2 functions: backup and restore; a Backup: the script backs up /etc/passwd and/or /etc/shadow to a location given by the user as an argument. b Restore: takes the backup location as an argument. The script must show users backed up, allow the user to select which user to restore. It must read from the backup all user information, then edit local system's passwd and shadow files to ONLY add the user. c : i) Checking local and backup files for duplicates, not allow them to be restored ii) Change user id while restoring to prevent duplicates iii) Automatically adding restored users to their old groups and creating them if missing HINT: you can generate a single backup file containing information from both passwd and shadow (use grep/awk/sed) and read from this file to restore.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!