a script to login a user an execute commands?

Discussion in 'Perl Misc' started by Marc-Olivier BERNARD, Dec 6, 2003.

  1. Hi there,


    I need to create a small script to execute as root, which logs in as
    standard user, and execute some commands.

    Is there another way to do but use Expect.pm?

    Thanks,
    Marc-Olivier BERNARD, Dec 6, 2003
    #1
    1. Advertising

  2. On 6 Dec 2003 09:09:25 -0800
    (Marc-Olivier BERNARD) wrote:

    > I need to create a small script to execute as root, which logs in as
    > standard user, and execute some commands.


    Define "logs in". What are you using to 'log in' - telnet, ssh, ??

    > Is there another way to do but use Expect.pm?


    Yes. Many modules are available. It all depends on what you're
    trying to do.

    Some code would be helpful :)

    HTH

    --
    Jim

    Copyright notice: all code written by the author in this post is
    released under the GPL. http://www.gnu.org/licenses/gpl.txt
    for more information.

    a fortune quote ...
    "I stopped believing in Santa Claus when I was six. Mother took
    me to see him in a department store and he asked for my
    <autograph." -- Shirley Temple
    James Willmore, Dec 6, 2003
    #2
    1. Advertising

  3. It was a dark and stormy night, and Marc-Olivier BERNARD managed to scribble:

    > Hi there,
    >
    >
    > I need to create a small script to execute as root, which logs in as
    > standard user, and execute some commands.
    >
    > Is there another way to do but use Expect.pm?
    >
    > Thanks,


    Assuming you use linux, why don't you just use the linux 'expect' command.

    gtoomey
    Gregory Toomey, Dec 7, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben Pfaff

    Re: man pages for C commands (GCC commands)

    Ben Pfaff, Jun 24, 2003, in forum: C Programming
    Replies:
    4
    Views:
    3,966
    Thomas Stegen
    Jun 28, 2003
  2. Tony Johansson
    Replies:
    3
    Views:
    16,189
    Patrice
    Jan 2, 2010
  3. Rajat
    Replies:
    3
    Views:
    689
    Jorgen Grahn
    Jan 8, 2010
  4. VYAS ASHISH M-NTB837
    Replies:
    2
    Views:
    551
    Jan Kaliszewski
    Jan 7, 2010
  5. Replies:
    8
    Views:
    265
    Woody Peterson
    Sep 12, 2008
Loading...

Share This Page