ExamNotes.net  -  IT certification portal

ForumsCertResearchTop sitesNewslettersFree email
HomeRegister
Exams Notes
Practice exams
Exam games
Questions by email
Online training
Training videos
College degrees
Boot camps
Book store
Links directory
Tell a friend
For webmasters

CompTIA Exam Vouchers
Save money on CompTIA exams
Question of the day
Sign up to receive
interactive practice questions
for MCSE, CompTIA
Cisco and other exams
TestKing
Get MCSE, MCSD, CCNA, CCNP,A+, N+ and many more

* ExamSheets *
Guide for Success!
Actual Questions & Answers
MCSE, MCSD, A+ ,CCNA, CCNP
Oracle 8i, Oracle 9i

Online practice tests

Certification sites

Online university

Online college

Online education

Distance learning

Software forum

Server administration forum

Programming resources






This is interesting: Free IT Magazines | Databases help forum



Other IT certifications > Linux/Unix > FTP Script

Show a Printable Version
Email This Page to Someone!
Receive updates to this thread






Author FTP Script
Randy
Guest




Registered: Not Yet
Location:
Country:
State:
Certifications:
Working on:

Total Posts: N/A
FTP Script

Recently I had to write an FTP script that would FTP a report to a server automatically. I couldn't find any of these on the net, so I came up with the following solution. I made two files, one called "patronload" with the following contents:

#!/usr/bin/sh
/usr/bin/ftp -ivn < ftppatron >patronlog 2>&1 &

and a second file called "ftppatron" which had the FTP commands in it:

open badmvs.library.usl.edu
user myusername mytopsecretpasswd
ascii
put patron.txt 'lbr.ftp.patron'
ls
bye

I haven't figured out how to do this with only one file, but this seems to work. I scheduled the job to be run and now the process is wholly automatic. But I still wish that I could do this with one file . . .

Report this post to a moderator

Old Post 07-24-01 08:10 PM
Reply w/Quote Edit/Delete Message IP: Logged
ccieToBe
Wireless Fanatic




Registered: Jul 2000
Location: Blue Ridge, North Georgia
Country: US
State:
Certifications: CCDA, CNA, MCP, Network+, A+, BSIT
Working on: Security+

Total Posts: 2210

Thanks for posting that. I might modify those scripts for something I need to do soon. I need to get a FreeBSD box running Samba to do what an NT trust is doing now. Basically, the NT trust involves an NT server that I'm replacing copying a database file from another NT server residing in a portion of the company that I don't adminster. I think I'll setup cron to copy it each night through Samba or FTP. I know Samba can't do trust relationships (yet), but can it exist in 2 different domains?

Report this post to a moderator

Old Post 07-24-01 10:32 PM
ccieToBe is offline Click Here to See the Profile for ccieToBe Click here to Send ccieToBe a Private Message Visit ccieToBe's homepage! Add ccieToBe to your buddy list Find more posts by ccieToBe Reply w/Quote Edit/Delete Message IP: Logged
Randy
Guest




Registered: Not Yet
Location:
Country:
State:
Certifications:
Working on:

Total Posts: N/A

Let me check up on this, I don't think you can have samba in two domains at once, but there may be a way to get around it. I'll let you know if I find anything.

Report this post to a moderator

Old Post 07-25-01 11:50 AM
Reply w/Quote Edit/Delete Message IP: Logged
ccieToBe
Wireless Fanatic




Registered: Jul 2000
Location: Blue Ridge, North Georgia
Country: US
State:
Certifications: CCDA, CNA, MCP, Network+, A+, BSIT
Working on: Security+

Total Posts: 2210

Thanks Randy. It seems like if Samba can't be in two domains at once I could run two sepperate Samba daemons.

Report this post to a moderator

Old Post 07-29-01 05:17 AM
ccieToBe is offline Click Here to See the Profile for ccieToBe Click here to Send ccieToBe a Private Message Visit ccieToBe's homepage! Add ccieToBe to your buddy list Find more posts by ccieToBe Reply w/Quote Edit/Delete Message IP: Logged
ccieToBe
Wireless Fanatic




Registered: Jul 2000
Location: Blue Ridge, North Georgia
Country: US
State:
Certifications: CCDA, CNA, MCP, Network+, A+, BSIT
Working on: Security+

Total Posts: 2210

In case anyone's interested, I was able to setup cron to accomplish this. What I did was leave smbd and nmbd alone and use smbclient (with a sepperate smb.conf file) to copy the 2 database files over every night. I pasted one of the cron statements below (the other one has the same format). The only thing I did out of ordinary in the new smb.conf file was tell Samba to act as a Windows 95 workstation so that I wouldn't have to add a new machine account to the source domain.

0 2 * * * /usr/local/bin/smbclient //source/sharename password -U username -s /usr/local/etc/domainnamesmb.conf -c 'get sourceDirectory/filename.mdb "/destination directory.mdb"'

This copies the database files from another department's server to my FreeBSD box at 2 AM everyday.

Report this post to a moderator

Old Post 08-01-01 10:45 PM
ccieToBe is offline Click Here to See the Profile for ccieToBe Click here to Send ccieToBe a Private Message Visit ccieToBe's homepage! Add ccieToBe to your buddy list Find more posts by ccieToBe Reply w/Quote Edit/Delete Message IP: Logged
All times are GMT.
Post new thread   Post reply

Featured site: MCSE, MCSD, CompTIA, CCNA training videos



Forum Jump:
Rate This Thread:
Forum Rules:
Who Can Read The Forum? Any registered user or guest.
Who Can Post New Topics? Any registered user.
Who Can Post Replies? Any registered user.
Changes: Messages can be edited by their author.
Posts: HTML code is OFF. Smilies are ON. vB code is ON. [IMG] code is ON.
 

ExamNotes forum archive


Powered by: vBulletin 2.2.8
Copyright ©2000, Jelsoft Enterprises Limited.

  Free Braindumps | mcse braindumps