Lubos Rendek

The only solution is determination.

How to Share WindowsXP Directory With Linux System

| Comments

Daniel’s short guide on how to share WindowsXP directory with Linux system:-).

In the first step enable sharing on your Windows XP system. In our example we are going to share entire C: drive under name C. See image below. Reboot may be required in order to enable WindowsXP sharing facility. Once shared directory is ready we make a note of your IP address and your work with Windows is done for now.

In the next step we need are going to mount our windows share C drive within a Linux filesystem. First make sure that you have smbclient and cifs-utils packages installed on your Linux system. The installation method of both previously mentioned packages depends on your Linux distribution you use. Once you are ready check shared directory with command ( replace username and IP address match your environment ):

1
2
3
4
5
6
7
8
9
# smbclient -L //192.168.1.18 -U debian
Enter debian's password: 
Domain=[GOLDSTEIN] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

        Sharename       Type      Comment
        ---------       ----      -------
        IPC$            IPC       Remote IPC
        SharedDocs      Disk      
        C               Disk  

From the above we can see our shared directory C under sharename C. All what remains at this point is to mount this directory using cifs filesystem. First create a new directory into which you wish to mount your C drive:

1
# mkdir c_drive

and as a last step mount your C into c_drive directory ( replace username and password to match your environment ):

1
# mount -t cifs //192.168.1.18/C c_drive/ -o rw -o username=debian,password=mypassword

To validate the above procedure navigate to c_drive directory and list all files:

1
2
3
4
# cd c_drive/
# ls
AUTOEXEC.BAT  CONFIG.SYS              IO.SYS     NTDETECT.COM  pagefile.sys   RECYCLER                   WINDOWS
boot.ini      Documents and Settings  MSDOS.SYS  ntldr         Program Files  System Volume Information

Futhermore, we can test whether we are also able to write to this directory. This will only work under the condition that you ticked the option “Allow network users to change my files” when sharing your C drive.

1
2
3
4
# touch mynewfile
# ls
AUTOEXEC.BAT  CONFIG.SYS              IO.SYS     mynewfile     ntldr         Program Files  System Volume Information
boot.ini      Documents and Settings  MSDOS.SYS  NTDETECT.COM  pagefile.sys  RECYCLER       WINDOWS

Comments