[H-GEN] Copying a file to a NT box

Ewan Edwards Edwards_Ewan_B at cat.com
Wed Nov 13 22:43:12 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:
>
> Now how can I copy a file to a share on an NT box?

First you need to mount the share on the file system of your Linux box.
smbmount //192.168.0.1/SharedDocs /home/<userid>/SharedDocs 
-orw,username=<winuserid>,password=<winuserpwd>,uid=<userid>

>
> 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.

Then copy the file.
cp test.txt /home/<userid>/SharedDocs/test.txt


P.S.
If your email client wraps lines, the smbmount command above is a single line.

P.P.S.
You may need to make smbmnt suid root.
chmod +s /path/to/smbmnt

P.P.P.S.
Note the difference smbmount and smbmnt - Its not a typo.


--
* 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