1826325 Members
3500 Online
109692 Solutions
New Discussion

Script Question

 
SOLVED
Go to solution
Chrisl_2
Frequent Advisor

Script Question

HPUX 11.23 PA-RISC RP3410
Hi all. I moved a production system today from an old L2000 to a new RP3410. The new RP3410 took the old ip address and user accounts/passwords. Everything is fine...except 1 little script. It uses a here document to ftp a file from this system to another...here's the snippet

ftp host <put 'blah blah'
ENDFTP

and here is the error that show up in cron

Error - incorrect permissions on /dev/tty.
Name (host:root): password missing from PASS command
Login failed.
Not logged in.

No passwords have changed. Any ideas?

TIA






5 REPLIES 5
Kofi ARTHIABAH
Honored Contributor
Solution

Re: Script Question

Is it possible that on the old machine, you had set up a .netrc file. This would allow the above to work without the requirement for password.

Create a file on the machine that is going to run the script called .netrc in the home directory of the user, and then include the hostname and the password. (do man netrc for more info)

echo "machine machine_name login login_name password the_password" >> $HOME/.netrc

should do the trick.

Good luck
nothing wrong with me that a few lines of code cannot fix!
James R. Ferguson
Acclaimed Contributor

Re: Script Question

Hi Chris:

So where is the user/password? Are you using a 'netrc' file? Did you port that file to your new machine?

Regards!

...JRF...
Victor Fridyev
Honored Contributor

Re: Script Question

Hi,

Please compare the following: ~/.netrc and /etc/shells on the old and new servers.
HTH
Entities are not to be multiplied beyond necessity - RTFM
Chrisl_2
Frequent Advisor

Re: Script Question

.netrc. You guys nailed it.

Thx!
Chrisl_2
Frequent Advisor

Re: Script Question

see thread.