HOWTO: Access/Mount a Linux ext2/ext3 filesystem from a Windows XP machine over a LAN/Domain network
Purpose: This post will explain how you can mount a Linux filesystem (ext2/etx3) on your Windows XP machine over a network.
Note: If you are looking for how to the reverse – Mount a windows share drive on a linux machine over a network then please refer to my previous blog entry.
Also this blog entry does NOT explain how you can access an ext2/ext3 filesystem on your Windows XP partition on the same hard drive – The typical Dual Boot scenario. Update (12/22/2008): To see how to do this, see this.
Important Note: Before you read any further I strongly encourage you to do the things that I mentioned in my previous blog as noted above. Your chances of success to follow the instructions on this entry will greatly increase. Therefore I strong encourage you to do all the things mentioned in my previous blog.
My Setup:
1. Debian Linux (4.0) running 2.6.24 kernel with IP address 192.168.0.2 and user accounts: “root” and “kushalk”
2. Windows XP SP2 machine on a network domain called “home.net” with IP address 192.168.0.3 and user account: “kkoolwal”
Step 1: Install Samba Package on your Linux machine
#apt-get install samba
Step 2: Stop the Samba Daemon
It is a good idea to stop the Samba daemon since we will be making changes to the Samba configuration file.
#/etc/init.d/samba stop
Step 3: Edit the Samba file /etc/samba/smb.conf (may be required)
This will require two steps:
a) Make sure that your domain/workgroup name is setup correctly in the variable “workgroup”. Also you need to un-comment the line by removing the “;” or “#” symbol.
workgroup = home.net
Make sure you set the name of your workgroup properly. To find out the name of your workgroup/domain do the following on your Windows machine.
To find out the Workgroup name in Windows follow these steps:
- Go to “START”
- Click “Control Panel”
- Click “System”
- Click on the 2nd tab button named: “Computername” and find out the name of your workgroup/domain.
b) Select which directory you want to share
As per the default setting you will be able to access your home directory on your Windows XP machine i.e. the directory of the user from which you connect. If you want to access any other directory other than your home directory then you need to add the following section anywhere in the smb.conf file:
[src]
comment = My Kernel/Module development sources
path = /usr/src/
read only = Yes
Basically by doing the above you are telling your Samba server that you want to share the ‘/usr/src’ directory.
That’s it. Your smb.conf file should now be configured.
Note: It is a good idea to check your smb.conf file for any syntactic error by giving the following command:
# testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
[global]
workgroup = home.net
server string = %h server
obey pam restrictions = Yes
passdb backend = tdbsam
passwd program = /usr/bin/passwd %u
passwd chat = *EntersnewsUNIXspassword:* %nn *RetypesnewsUNIXspassword:* %nn *passwordsupdatedssuccessfully* .
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
wins server = eth0:192.168.0.20
panic action = /usr/share/samba/panic-action %d
invalid users = root
include = /etc/samba/dhcp.conf
[homes]
comment = Home Directories
valid users = %S
create mask = 0700
directory mask = 0700
browseable = No
[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
#
Step 4: Add a user to the Samba user list
You need to tell the Samba server which user you will be using to connect the to Linux filesystem from the Windows machine. I added myself (user: kushalk) to the Samba server by giving the following commands:
smbpasswd -L -a kushalk
smbpasswd -L -e kushalk
Note: By default, Samba does not allow the user “root” to access the filesystem. You will have to change the setting “invalid users = root” in your smb.conf file. I have not tried this.
Step 5: Restart the Samba server
#/etc/init.d/samba start
Step 6: Access your Linux filesystem/folder from Windows XP machine
Finally go to your Windows machine (assuming you have File Sharing and all configured which I think it should be if you were able to follow the steps in my previous blog successfully) and type the following in your “Explorer Windows” and NOT “Internet Explorer” like this:
Now enter your username and password – the one that you used in the smbpasswd command in Step 4 above. After that you should be able to see your home directory like this:

That’s it. As usual, please leave a comment/feedback, if you have any.

Free Email Subscription









November 1st, 2008 at 7:46 am
Why not?
Reply to this comment
November 2nd, 2008 at 10:06 am
Hi Tyler Williams,
Can you tell me why you don’t agree with this post? If you think that something is wto corong in the post please let me know and I will be happy to correct it.
Thanks
Reply to this comment
December 26th, 2008 at 11:46 am
Thanks! this is very informative
regards,
Joe
1 step system
Reply to this comment
Kushal Reply:
January 5th, 2009 at 7:29 pm
Hi Joe,
Thanks for letting me know.
Reply to this comment
January 4th, 2009 at 12:36 am
Thanks alot for the information. I’ve been wondering how to sync up our Linux computer to the Windows on the network.
Reply to this comment
Kushal Reply:
January 5th, 2009 at 7:26 pm
Glad to know that it worked for you….
Reply to this comment
March 12th, 2009 at 8:28 pm
[...] Now if you would to access your Linux partition on your Windows machine over your LAN then click here.This is exactly the opposite case of Section 1: Topic A that we just saw [...]
March 14th, 2009 at 4:49 am
It’s the first time I commented here and I must say that you provide genuine, and quality information for other bloggers! Great job.
p.s. You have a very good template for your blog. Where have you got it from?
Reply to this comment
March 16th, 2009 at 5:23 pm
Your comment has not been approved by the moderator because of possible spam. If you think your comment got mis-categorize as spam please reply to this e-mail
or
contact the moderator at: http://blogs.koolwal.net/contact-me/
Reply to this comment
March 19th, 2009 at 9:04 pm
Keep writing ,good job!
Reply to this comment
March 19th, 2009 at 10:48 pm
Keep working ,good job!
Reply to this comment
March 19th, 2009 at 10:55 pm
Keep working ,outstanding work!
Reply to this comment
April 2nd, 2009 at 7:46 am
Your comment has not been approved by the moderator because of possible spam detection by our spam filtering software. If you think your comment got mis-categorized as spam, please reply to this e-mail
or
contact the moderator at: http://blogs.koolwal.net/contact-me/
Reply to this comment
April 2nd, 2009 at 10:57 am
amazing stuff thanx
Reply to this comment
April 8th, 2009 at 9:35 am
Thanks for posting this. you showed how to manually mount the Linux volume from XP machine. I am curious how to do that through the command from the PC. I can use mount -t smbfs …. from Mac, but on PC, mount command seems not recognizable.
Reply to this comment
Admin Reply:
April 8th, 2009 at 3:24 pm
Hi Tester,
Unfortunately Windows does not have “mount” command. Trying install Cygwin. That will give you a Unix/Linux type environment in Windows,
Reply to this comment
April 23rd, 2009 at 8:23 pm
Thank you for your help!
Reply to this comment
April 27th, 2009 at 3:48 pm
Super-Duper site! I am loving it!! Will come back again – taking you feeds also, Thanks.
Reply to this comment
Admin Reply:
April 27th, 2009 at 6:43 pm
Thank you for your comment!
Glad to be of help!
Reply to this comment
July 3rd, 2009 at 10:27 am
Thoughtful post and well written. Please write more on this if you have time.
Reply to this comment
September 19th, 2009 at 11:59 am
Suche nach Meinung zu diesem Thema am letzten Donnerstag.
Reply to this comment
September 26th, 2009 at 12:00 am
as a simple user on a netra 1, I took a lot of time to get “samba on SPARC/Solaris 10″ working. Your blog was very useful
Thanx a lot
Reply to this comment
September 28th, 2009 at 12:52 am
Hi, Just like to tell you that this piece of info is one quick to the point, no nonsense, workable and effective way to have directories shared in Linux as fast as possible. It worked for me and thank you for the effort. Keep up the good work.
Reply to this comment