On Jul 5, 8:48 pm, [EMAIL PROTECTED] (Lakshmi Sailaja)
wrote:
> Hi,
>
> I will have to login as a super user and run some commands.
>
> I want to automate the following through Perl:
> su - user
> and provide password
> check if the login is successful or not.
>
> Can you please let me know?

I >>>>Expect<<<< you could find a module on CPAN to allow you to abuse
su in that way.

Of course, as Tom points out, you'd be better off with sudo.


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


Reply via email to