I'm taking over a Linux Ubuntu machine from a previous employee whose recently left. I've created an account for myself on the machine.
I want to preserve their home directory, but change ownership of any system files and directories outside of their home directory to myself.
Basically if User X is the previous user who has left I want to change any system files and directories belonging to User X outside of their home directory to myself now (e.g. stuff within /var/www, /usr/local etc. The only thing left that should have ownership to User X would be their home directory and anything within it. Later I can then backup anything within their home directory and then delete when ready.
Is there a known tool for such a job? Or am I looking for long piped command from the Terminal? E.g. from root, search entire file system for all files &dirs belonging to user X | chown to me? What would a long command like that look like?
Thanks.