











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
|
|  |
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
|
|
07-24-01 08:10 PM
|
|
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
|
|
07-24-01 10:32 PM
|
|
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
|
|
07-25-01 11:50 AM
|
|
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
|
|
|
07-29-01 05:17 AM
|
|
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
|
|
08-01-01 10:45 PM
|
|
|
Featured site: MCSE, MCSD, CompTIA, CCNA training videos
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
|