Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Can somebody point me to a HOW-TO for using Samba to share a Linux directory with a MSW 10 machine on my LAN? If it matters, the Linux box is wire-connected to the LAN and the MSW box is wirelessly connected.
Can somebody point me to a HOW-TO for using Samba to share a Linux directory with a MSW 10 machine on my LAN? If it matters, the Linux box is wire-connected to the LAN and the MSW box is wirelessly connected.
It's very easy to do this.
1. On the server, create a config file (/etc/samba/smb.conf) with contents like this:
Code:
[global]
server string = myservername
server role = standalone server
max log size = 50
log file = /var/log/samba/samba.%m
deadtime = 10
[fileshare]
comment = My file share
path = /path/to/shared/directory
browseable = yes
writeable = yes
write list = @smbusers
valid users = @smbusers
create mask = 0664
directory mask = 0775
2. Create a group called 'smbusers'
3. Add users to the smbusers group
4. Check that the shared directory is owned by the smbusers group, and can be written by them (i.e. "chmod 0775 /path/to/shared/directory" and then "chgrp smbusers /path/to/shared/directory")
5. Add local users to the Samba database with 'smbpasswd' (e.g: smbpasswd -a username)
6. Most importantly, don't forget to start the Samba service. This differs by distro. On Slackware, its (as root): "# sh /etc/rc.d/rc.samba start"
If you use the same login names & passwords on the Windows machines, the users will automatically be able to read & write the share. Depending upon your router, you might be able to browse to the share using it's name. Otherwise you can use the IP address in the File Explorer toolbar preceded by a double backslash (eg: \\192.168.x.x), or use Windows' 'map network drive' function to have it show up as a drive on the user's machines.
For consistency, you might choose to 'fix' the IP address on your Samba server. There are a few ways to do this. Probably the easiest way is to reserve the IP address for that machine in your router settings.
Fantastic! Thank you. Now, if somebody could just supply as nice a set of instructions for doing the MSW 10 side . . .
ron
Already done:
Quote:
Originally Posted by rkelsen
If you use the same login names & passwords on the Windows machines, the users will automatically be able to read & write the share. Depending upon your router, you might be able to browse to the share using it's name. Otherwise you can use the IP address in the File Explorer toolbar preceded by a double backslash (eg: \\192.168.x.x), or use Windows' 'map network drive' function to have it show up as a drive on the user's machines.
A DuckDuckGo search for "microsoft smb "connecting to linux" produced many hits.
If we very simply reduce this problem to: "connecting from <OS#1> via <foreign-file-system> to <OS#2>," the entire problem is reduced to one that has been talked about – and solved – countless times.
As you work to diagnose such problems, remember to fully use the logging and analysis facilities at both ends, simultaneously(!), because the root cause of the problem could be at either end. It always turns out to be ... "a bi**h to discover, but trivial(?) to solve." The challenge is, usually, to find out what the problem actually is, from one-or-the-other-party's point of view. Once you solve it, the link will probably "work reliably, forever."
Last edited by sundialsvcs; 01-30-2022 at 12:40 PM.
The challenge is, usually, to find out what the problem actually is, from one-or-the-other-party's point of view. Once you solve it, the link will probably "work reliably, forever."
It's very easy. People who struggle with this are the ones who've built the problem in their own head to be much bigger than it is.
Two things to check: Firstly, can the client ping the server. If not, then that problem has to be resolved first.
Secondly, is the Samba service actually running on the server? The service doesn't start without a proper configuration, and may even silently fail to start, so it can be difficult to tell if it's running. The config file doesn't need to be very long for a single simple file share. The one I posted above is in use and working here.
If those two conditions are met, then it's "job done" 99.99% of the time.
Connecting to it is done the same way you'd connect to a Windows share from another Windows machine... i.e: You have options. Treat it the same as a Windows file share.
Thank you rkelson and sundialsvcs for all your help. Your information enabled me to learn what I needed to know about Samba.
Learning that samba basically provides access to a directory/folder on another machine, I have decided that I really need full operating capability of my wife's machine (MSW) from mine (Linux). I will be going instead with TeamViewer. Much more suitable to my ultimate purpose.
Thank you again. Much appreciated.
r
I have decided that I really need full operating capability of my wife's machine (MSW) from mine (Linux). I will be going instead with TeamViewer.
That is quite different from your original goal, and is something Samba doesn't do. The best way for us to identify which tools you should use would be to explain the problem you're trying to solve, or what it is you're trying to achieve. Do you need to be able to share files? Do you want a shared clipboard?
If you're within the same LAN, then I think using TeamViewer is a waste of internet traffic. The reason for this is that both computers will connect to each other, but the connection is via TeamViewer's servers.
A better option, IMO, is to enable Remote Desktop on the Windows machine and then connect to it from Linux using KRDC or something like that. VNC is also an option, but as I say, it really depends upon your needs.
I will follow up on your advice. I share your observation of the waste of internet traffic. I don't like being unnecessarily "in the cloud" anyway.
Yes, I want to share files, share clipboard, run applications on the wife's machine including email, Quicken, etc.
Yes, we are on the same LAN. As stated in my original posting, "the Linux box [my machine] is wire-connected to the LAN and the MSW box [the wife's machine] is wirelessly connected."
I will go see what it takes to enable Remote Desktop and install KRDC. I may need to learn about VNC also. (Damn, it never quits, does it?)
I hope my information is more complete now. I know you will holler if more is needed. Again, thanks!
r
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.