Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: write/read to remote machine

by monk2b (Pilgrim)
on Jul 27, 2010 at 21:56 UTC ( #851620=note: print w/replies, xml ) Need Help??


in reply to write/read to remote machine

AFAIK, you will only be able to mount windows from Linux using cifs or smbfs. In my world Linux uses Samba for both. Samba does not run on your Windows computer it only needs to run on your Linux computer.

If you run this command on a Redhat and most likely any other Linux computer you can see if Samba is running. You should see processes for smbd -d and nmbd -D running

ps -aux | grep mbd

If samba is running I use this command on my Linux servers to run perl scripts on Windows file system all the time.

$mp = "/mnt/mylinuxmountpoint"; $winshare = "//windowsservername/windowsshare"; RHEL3 $mount = "/bin/mount -t smbfs -o username=hari9,password=hari9passwor +d,workgroup=hari9doomainname"; Older versions of the 2.4 kernel use smbfs and newer versions use cifs +. RHEL5 $mount = "/bin/mount -t cifs -o username=hari9,password=hari9password +,workgroup=hari9doomainname"; sub Mnt { my ($mntcmd,$mount,$share,$mp); ($mount,$share,$mp) = @_; $mntcmd = "$mount $share $mp"; system("$mntcmd"); } Mnt($mount,$winshare,$mp);
Perl Good - Manual process bad

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://851620]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2022-05-29 04:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (101 votes). Check out past polls.

    Notices?