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
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link or
or How to display code and escape characters
are good places to start.