Re: How to disable interactive prompt and autologon inside a shell script

From: Colin M ("Colin)
Date: 04/04/03


From: "Colin M" <colin (at) wew (dot) co (dot) uk>
Date: Fri, 4 Apr 2003 09:11:09 +0100


"xo99ox" <xo99ox@hotmail.com> wrote in message
news:9971d457.0304031707.53e773ee@posting.google.com...
> Hello,
>
> I am trying to run a ftp function inside a shell script. However no
> matter what I do, the -i and -n cannot be recognized by the ftp
> function. They were read as illegal option by the su function.
> Therefore, it still prompt for password.
>

tried enclosing the command in quotes?

> How can I make it work with the disable interactive prompt and
> autologon inside the shell script? I also tried to create a .netrc
> under the user home directory, but it didn't have any effect.
>

...if you've specified '-n' it will be ignored until you you issue a 'USER
?????' command.

<snip>
> content of ftpfile:
>
> cd /u0x/path
> lcd /u0x/anotherpath
> prompt
> mget *
> bye
>

If you insert a line at the top of the script:
        user notroot password

and either replace password with the relevant value, or omit it if it is in
.netrc it should work. e.g.
    user anonymous colin@nowhere.xyz

HTH

Colin



Relevant Pages

  • Re: Newbie help for using multiprocessing and subprocess packages for creating child processes
    ... the first is the conceptual equivalent of executing the ... The first searches for a command in your PATH named ‘ls /path...’. ... where STANAME is a string 4 characters long. ... firing off my shell script: ...
    (comp.lang.python)
  • Re: Newbie help for using multiprocessing and subprocess packages for creating child processes
    ... The first searches for a command in your PATH named ‘ls /path...’. ... where STANAME is a string 4 characters long. ... firing off my shell script: ...
    (comp.lang.python)
  • Re: ssh via gateway to work host script
    ... I am writing a shell script to connect to my work computer. ... I get the following prompt (of course with real values but just as a ... I generate a password and input it at the command line. ... use autossh to open a reverse ssh tunnel from ...
    (comp.unix.shell)
  • Re: despair
    ... I once tried to write a cd program in Unix. ... Just putting a cd command in a script and then ... hell are you supposed to write shell script macros to run a frequently ... make "$ FOO BAR" a meaningful DCL command. ...
    (comp.os.vms)
  • print subsystem errors
    ... I have an application that executes a shell script to print jobs. ... I can take the same command issued in the shell script; ... ATTENTION ATTENTION ATTENTION ATTENTION ATTENTION ...
    (AIX-L)