It doesn't wait for the password. I can see that it switches the user coz the prompt changes. But as you said , yes, since another process gets spawned and su gets executed.

Is there another way os saying "su" using perl?

Thanks.

On Mar 5, 2004, at 10:26 AM, Hanson, Rob wrote:

Any idea why print never gets executed?

The su is probably waiting for you to enter in a password.


...And this probably doesn't do what you think anyway. Even though you su,
it doesn't change who the current script is running under. Your program (as
written) will spawn a new process, execute su, then close that process.


Hope that helps.

Rob

-----Original Message-----
From: Silky Manwani [mailto:[EMAIL PROTECTED]
Sent: Friday, March 05, 2004 1:16 PM
To: [EMAIL PROTECTED]
Subject: Nothing executes after system.


Hello,


@args = ("/usr/bin/su","sam");
system(@args);
print "hello";

Any idea why print never gets executed? So, the switch user takes place
but nothing gets executed after that..

Thanks.


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to