Re: a script to login a user an execute commands?

From: James Willmore (jwillmore_at_remove.adelphia.net)
Date: 12/06/03


Date: Sat, 06 Dec 2003 22:15:11 GMT

On 6 Dec 2003 09:09:25 -0800
s_p_a_m_mob@hotmail.com (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 


Relevant Pages

  • Re: ssh "Permission denied" on everything
    ... yum update and have hit an interesting ... It logs in and gives: ... When we log in as root on the box the commands we ... > are trying to execute show that they are rwxr-xr-x, ...
    (Fedora)
  • ssh "Permission denied" on everything
    ... We `useradd test` on the new machine, then go to another machine and ssh ... It logs in and gives: ... When we log in as root on the box the commands we ... are trying to execute show that they are rwxr-xr-x, ...
    (Fedora)
  • Automated MySQL checks using shell script or maybe Expect
    ... for a customer i need to create a script that logs into mysqladmin and ... within the program i want to execute the following commands ...
    (comp.unix.shell)
  • Re: a script to login a user an execute commands?
    ... > I need to create a small script to execute as root, which logs in as ... > standard user, and execute some commands. ... Assuming you use linux, why don't you just use the linux 'expect' command. ...
    (comp.lang.perl.misc)
  • a script to login a user an execute commands?
    ... I need to create a small script to execute as root, which logs in as ... standard user, and execute some commands. ...
    (comp.lang.perl.misc)