If the user has a shell:
su [user] -c "[command]"
If they don’t have a shell:
su -s /bin/sh [user] -c "[command]"
If the user has a shell:
su [user] -c "[command]"
If they don’t have a shell:
su -s /bin/sh [user] -c "[command]"
Last modified: 01/06/2011 Tags: su
Other pages possibly of interest:
This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan