15.04.2011 - Im pretty sure you cant use login non-interactively (same for su ) unless youre logging in as the already logged in user or unless the login .