[H-GEN] Copying a file to a NT box
Sarah Hollings
sysadmin at humanfactors.uq.edu.au
Wed Nov 13 22:16:40 EST 2002
[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
On Thu, 14 Nov 2002 12:40, Paul Clarke wrote:
> [ Humbug *General* list - semi-serious discussions about Humbug and ]
> [ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
>
> Hi all,
>
> I am getting further down the track with my printer log problem, thanks
> Mark and others for your suggestions the wget works great. I now have a
> collection of file on the debian server but I want to automatically copy
> them to a windows share.
>
> Now how can I copy a file to a share on an NT box?
>
> Something like cp test.txt \\192.68.01\SharedDocs\test.txt (which
> doesn't work it only creates a file on the linux box) that will copy
> test.txt to the NT share.
If you have samba something like
mount -t smbfs -o username=<nt user>,password=foobar //192.68.0.1/SharedDocs
/mnt
(note that this should all be on one line)
will mount the windows share on /mnt on the Linux box. Then you can use:
cp test.txt /mnt/test.txt
If you want to set this up to happen automatically somehow, its probably
better do use something like:
smbclient //192.68.0.1/SharedDocs <foobar> -U <nt user> -c "put test.txt"
might be better - you can put the auth info in a 0600 file somewhere out of
harms way and specify it with -A if you're going to run this from a cron job.
man smbclient for more
>
> Thanks
> Paul.
>
> Site Dynamics - Paul Clarke
> paul at qfm.org.au
> 0414 367 747
--
--- Sarah Hollings <sarah at humanfactors.uq.edu.au>
--- IT Manager Ph +61 7 3365 6080 Fax +61 7 3365 6171
Key Centre for Human Factors and Applied Cognitive Psychology
The University of Queensland, Saint Lucia, QLD 4072 Australia
--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'. See http://www.humbug.org.au/
More information about the General
mailing list