Is there a way—via Apple, shell script, or third party software—where multiple user accounts on a Macintosh computer can be automatically logged in, then out, like in a script. For example, account #1 is logged in, then out, then log into account #2, log out, then log into account #3, etc?
(Yes, I am taking into consideration the security issue of such a method needing both username and password in order for authentication to occur. For purposes of discussion, assume that this is for a test environment where it is not an issue.)