How to run a shell command as another user without Shell Access enabling

It needs if you don't want to waste time to enable Shell Access for specific user to run some command from his shell

sudo -H -u someuser bash -c 'uptime'

Example of using:

cd ~someuser/www
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
Read the rest