Example 3: Executing command with user bin's Environment and Permissions To execute command with the temporary environment and per- missions of user bin, type: example% su - bin -c "command args" #### su - myuser -c "/home/myuser/t1.pl" #### #!/usr/bin/perl -w use strict; open(OUT,">su-test.log") or die; print OUT "user $ENV{'USER'}\n"; close(OUT) or die; exit;