What is the difference between these 2 options in /etc/sudoers:
user1 mymachine = (user2) ALL
user1 mymachine = /bin/su - user2
For option 1, I would do the following as user1:
sudo -u user2 -i
For option 2, I would do the following as user1 (this option also requires "Defaults !authenticate" so that it doesn't ask for a password):
sudo su - user2
Is there any pros/cons to either method? The end result seems the same.