Go Premium for a chance to win a PS4. Enter to Win


Sharing Linux files and printers with Windows PC's

Posted on 2004-08-07
Medium Priority
Last Modified: 2010-03-18
I have the following setup on my wireless network:

1 Linux PC with the printer attached
3 Windows PC's

Problem:  When I go onto one of the Windows PC's, Network Places, WorkGroup computers, I can see the Linux PC .... it shows up as Samba Server (Ezra).    By the way, Ezra is just the name of my Linux box.  When I click on Samba Server (Ezra), it asks me for a user ID and password.  None of the user ID's and passwords that I'm aware of on the Linux box are working :-(  Also, when I browse on the Windows PC to setup the printer that is connected to the Linux box, the Linux box shows up in the list under Windows Network, but there are no printers listed.

So I'm thinking the problem has something to do with security for both the files and the printer.  I've been searching on the Internet on how to set up Samba security so that the Windows PC's  can see the Linux files and share the Linux printer, but to no avail (every site I go to says to set it up a different way, none of which are working).  I'm running Fedora Core 2.  The Windows PC's are on XP Pro.

BTW... I can browse from the Linux Box to all the Windows PC's without a problem.  I can see and transfer files that direction without a problem.  I just need to get the Windows PC's to be able to access the Linux files, and more importantly the printer that's connected to the Linux box.

Anybody have experience with this?
Question by:cxxxcxxx
  • 4
  • 3
LVL 40

Expert Comment

ID: 11745280
> None of the user ID's and passwords that I'm aware of on the Linux box are working :-(

Have you used smbpasswd to create SMB auth info for ach of the users that exist on the Linux system? That's necessary to be able to authenticate to Samba from windows. See 'man smbpasswd' for details.

Author Comment

ID: 11746222
OK.  I actually found some information about samba security with examples that actually worked.  I have successfully set it up so that I can share the printer with the Windows PC's with no problem.   The Windows PC's can now access the files on the Linux box as well.

Only thing left open:  If I go into the workgroup in Linux, I can see the Windows PC that resides on the Linux box (dual boot system).  However, I cannot access any of the files that reside in Windows.  When I click, it just shows an empty box with no files.  How do I get to the Windows files that reside on the Windows partition?

Can you tell that I'm trying to not have to go into Windows on my primary PC?  I'm trying to stay in Linux as much as possible without wrecking the rest of the household!
LVL 40

Expert Comment

ID: 11746545
To be able to access the files on the windows partition from Linux you'd need to mount that file system. That's easy  and works well if the file system is a FAT/FAT32, but problematical if it's an NTFS file system. For a FAT/FAT32 file system you can (in a terminal window as root) execute:

mkdir /mnt/windows
cat >>/etc/fstab <<EOF
/dev/hda?               /mnt/windows            vfat    noauto,user,umask=0 0 0

replacing hda? with the partition number of the windows partition (e.g., hda1, hda5, etc). Then you can mount the windows partiton with 'mount /mnt/windows' and be able to see the data with 'ls /mnt/windows'.

There's only limited support for NTFS in Linux and it may not be enabled at all in the kernel you are running and require a kernel rebuild to enable. Reading of NTFS works pretty well, but the last time I checked it was still recommended not to write to an NTFS file system since that could cause corruption.
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 11746688
I was able to mount the windows partition, but when I look under /mnt/windows there are no files listed there either.  I checked in Windows and made sure the files are shared appropriately. I just don't know what the problem could be.
LVL 40

Accepted Solution

jlevie earned 2000 total points
ID: 11746833
This is the windows data on the same system that you run Linux on, right? In that case sharing of folders doesn't apply and it is just a matter of mounting the correct file system. Does this copy of windows use FAT/FAT32 or NTFS? Could I see what '/sbin/fdisk -l /dev/hda' shows and what is in /etc/fstab, please?

Author Comment

ID: 11747133
OK, things are looking better.  I went and downloaded the ntsf package from http://linux-ntfs.sourceforge.net/  and followed their instructions for installing carefully.  I've successfully mounted my windows ntsf system :-)  
LVL 40

Expert Comment

ID: 11747585
I thought it might be an NTFS file system... Good to know that you succeeded.

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question