Created
October 4, 2019 14:56
-
-
Save Spijkervet/6162b063edf6678a4e1780df875af7ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CWDIR=$1 | |
echo 'Restoring $CWDIR' | |
cd $CWDIR | |
mkdir current_sys.bak | |
cp /etc/passwd /etc/shadow /etc/group /etc/gshadow current_sys.bak | |
cat passwd.mig >> /etc/passwd | |
cat group.mig >> /etc/group | |
cat shadow.mig >> /etc/shadow | |
/bin/cp gshadow.mig /etc/gshadow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment