Restore home directory in RHEL

Lets consider you are working as System Admin and you come across that the user’s home directory is deleted completely.

what will u do?

No need to worry , Follow these step :

1)copy all the .bashrc files from the different user’s home.
command : cp -rvpf .bash_* <username>
(Username means the user who’s home profile exist)

cd /etc/skel (Here are the skeleton files present )

cd /etc/skel
ls -g
cp -rvpf .bashrc /home/user
(user means the one who’s home directory is deleted )
this will bring back all his directories and login .

Enjoy….:)

Leave a Reply

Your email address will not be published. Required fields are marked *