[Use a script with Samba]

Nelson Garcia garcian002 at hawaii.rr.com
Wed Feb 14 01:33:41 GMT 2001


Thanks, I use dyndns.org (http://nelsongarcia.dyndns.org).  The expect
script is because I'm paranoid that my server will go down or the IP posting
script will not work, etc., etc.  In other words, is just a backup.
Sorry for getting OT,  I was just trying to illustrate how expect is a handy
tool that could be used to automate some tasks with samba.

This list is great, keep doing the Samba.

Nelson

P.S. (OT):  for a list of dynamic dns providers, try this link
http://www.technopagan.org/dynamic/  (not sure how accurate it is anymore)

----- Original Message -----
From: "Gill, Vern" <vgill at technologist.com>
To: "'Nelson Garcia'" <garcian002 at hawaii.rr.com>
Sent: Tuesday, February 13, 2001 08:38 AM
Subject: RE: [Use a script with Samba]


> Slightly OT, but if you are uploading your IP so you can get to your
> machine, or for others to be able to get to it, you should look into one
> of the free dynamic dns services. I use yi.org, and it works great!!
> Don't know what your needs are, but they are a great boost to my
> "productivity"
>
> dns2go is also pretty good, but I have been with yi.org for over a year
> now, and I really like it. You should check it out...
>
> -----Original Message-----
> From: Nelson Garcia [mailto:garcian002 at hawaii.rr.com]
> Sent: Tuesday, February 13, 2001 10:32 AM
> To: samba-ntdom at us5.samba.org
> Subject: Re: [Use a script with Samba]
>
>
> You could also use smbmount.
>
> If you just want to copy files and directories, use ftp.  You can write
> an
> 'expect' script to do that.
> Here's a sample I stole from
> http://www.rtr.com/newrtr/tech.xprogramer.htm
>
> #! /usr/local/bin/expect --
> #test on ftp
> set timeout 60
> spawn ftp ftp.rtr.com
> expect "Name*:"
> send "anonymous\r"
> expect "Password:"
> send "test at rtr.com\r"
> expect "ftp>"
> send "cd ReadyPaks\r"
> expect "ftp>"
> send "bin\r"
> expect "ftp>"
> send "get SamplePak.SSol2.RTR\r"
> expect "ftp>"
> send "quit\r"
> expect "221 Goodbye.\r"
> close
> wait
> send_user "Your file is here\n"
>
> I have a script that uploads a webpage every 4 hours with my IP address
> (my
> IP is dynamic).  I'm writing from work so I don't have the script with
> me.
> However the above example should get you started.
>
> I hope that helps.
> Nelson
>
> ----- Original Message -----
> From: "Yacketta,Ronald J" <YackettaRJ at worldkitchen.com>
> To: <minh.dang-recalt at akazi.com>; <samba-ntdom at us5.samba.org>
> Sent: Tuesday, February 13, 2001 07:58 AM
> Subject: RE: [Use a script with Samba]
>
>
> > why would you want todo this?
> > you could use rsync, ftp, ncftp or a mired of other utilities
> > that would make life easier on your
> >
> > Ron
> >
> > =>-----Original Message-----
> > =>From: Minh Dang-Recalt [mailto:minh.dang-recalt at akazi.com]
> > =>Sent: Tuesday, February 13, 2001 12:52 PM
> > =>To: samba-ntdom at us5.samba.org
> > =>Subject: [Use a script with Samba]
> > =>
> > =>
> > =>Hello,
> > =>
> > =>I wonder if i can create a script on my linux Box to copy a
> > =>directory to
> > =>another Linux Box via Samba client ?
> > =>I'm thinking a script like that :
> > =>
> > =>-------------
> > =># bash shell
> > =>cd /home/test -> On the local
> > =>Linux Machine
> > =>smbclient \\\\Linux2\\Shared password
> > =>cd /home/TOTO -> On the
> > =>remote Linux box
> > =>put recurse * .
> > =>exit
> > =>-------------
> > =>Of course, it doesn't work.
> > =>Anyone has an idea to make it working ?
> > =>
> > =>Thanks !
> > =>
> > =>Minh
> > =>
> > =>
> >
>





More information about the samba-ntdom mailing list