Query the Operating system for the actual $HOME location it use for the provided user is more reliable than assuming it's in /home/. /home/ is just a convention. root don't use it. Sometime, database, webservers, ftp or massively shared instances legitimately have different locations paths.
Query the Operating system for the actual $HOME location it use for the provided user is more reliable than assuming it's in /home/. /home/ is just a convention. root don't use it. Sometime, database, webservers, ftp or massively shared instances legitimately have different locations paths.