`sudo` and `su` for www-data
Created at 2016-04-29T00:29:57.000Z

Assume user "ubuntu" is sudo-able.

$ ssh ubuntu@....
ubuntu:/home/ubuntu $ sudo su
root:/home/ubuntu   $ exit
ubuntu:/home/ubuntu $ sudo su - root
root:/root          $ exit
ubuntu:/home/ubuntu $ sudo su - www-data -c whoami
This account is currently not available.
ubuntu:/home/ubuntu $ sudo su - www-data -s /bin/bash
www-data:/var/www   $ whoami
www-data
www-data:/var/www   $ exit
ubuntu:/home/ubuntu $ exit

This problem is original motivation for this post.

References