After you have the user name, you can run scripts with su (unix/linux) or runas (windows).