SAMBA

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
altair4
Level 20
Level 20
Posts: 11461
Joined: Tue Feb 03, 2009 10:27 am

Re: SAMBA

Post by altair4 »

I'm a little lost. You have set up a Mint share and you require authorization from Windows and that's what doesn't work? What is the error message?

It's probably best to provide the output of the following commands just to see what you currently have set up on the Mint machine.

Open Terminal
Type net usershare info
Type testparm -s

Just so you know there are two distinct ways to share folders in Mint: Classic and Simple ( or Nautilus ).
Simple sharing might be all that you need and it's much easier to set up because you basically never have to edit smb.conf.
Simple File Sharing in Mint: http://forums.linuxmint.com/viewtopic.php?f=42&t=23169

Simplified version of above Howto: Open Nautilus > right click on a folder you want to share > Select "Sharing Options" > Click on any or all of 3 boxes > Select OK .
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 20
Level 20
Posts: 11461
Joined: Tue Feb 03, 2009 10:27 am

Re: SAMBA

Post by altair4 »

Sorry, clicking where just makes the screen sit there - on Windows?

Edit, please post the contents of smb.conf by typing testparm -s in a terminal
And net usershare info
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 20
Level 20
Posts: 11461
Joined: Tue Feb 03, 2009 10:27 am

Re: SAMBA

Post by altair4 »

How on earth did you share /var?

Only root can share /var and if you issued that "net usershare info" while you were currently logged in , it looks like you're running as root.

Do I have that right?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 20
Level 20
Posts: 11461
Joined: Tue Feb 03, 2009 10:27 am

Re: SAMBA

Post by altair4 »

This is what I've done:

As root I shared , using Nautilus, /var so that my net usershare info matches yours.

I created a user, tester1, on that Mint box and then I created a samba user of the same name using the same command you did: smbpasswd -a tester1.

Then I went to WinXP and mapped a network drive to \\ServerName\var
Connect using a different user name: tester1 ( I left the password blank )

And I have Z: as the mapped network drive and have read access to it's contents once I supplied the password.

Other than being logged in as root ( there's a limit to how far I'll go for a fellow Mint user ) I think I reproduced the steps you took and it works for me.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 20
Level 20
Posts: 11461
Joined: Tue Feb 03, 2009 10:27 am

Re: SAMBA

Post by altair4 »

Still can't reproduce your problem but I do have a workaround that may suffice until "anyone else have any ideas as to the problem" comes along: :wink: Change the authorization to allow guests ( public share ) but limit access to specific hosts.

If you change it to allow guest access everyone will have access to that share, but you can limit who actually has access by adding the following line to smb.conf:

Code: Select all

hosts allow = 127.0. 192.168.0.100 192.168.0.101
Change 192.168.0.100 to the ip address of the Windows client and 192.168.0.101 to the ip address of the mint client
And don't forget the ending "." at 127.0.


If you don't have static ip addresses on all your clients then you have two other options:
Substitute netbios names:

Code: Select all

hosts allow = 127.0. winxp_name mint_name
Or make it subnet specific:

Code: Select all

hosts allow = 127.0. 192.168.0.
The last one will allow access to everyone behind your router.

If you're using classic samba you need to add that line in the share definition portion of each specific share. If your using Nautilus-share you need to add that line somewhere in the [global] section.

If you go this route it's probably best to remove the samba users and passwords from the server because of the way Windows broadcasts it's login username and password when trying to connect to a server.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 20
Level 20
Posts: 11461
Joined: Tue Feb 03, 2009 10:27 am

Re: SAMBA

Post by altair4 »

You're asking the wrong person. I'm a samba bigot and am not fond of adding networking utilities to Windows ( with the exception of apples's bonjour ). Besides what happens when someone brings a laptop from work or their own home to the lan mix? Are you going to force them to install something on their laptop?

For better or worse ( and some would argue for worse ) samba has become the default cross platform protocol - windows, linux, and mac.

EDIT: You probably already know this but I forgot a step in my previous post. After you make the changes to smb.conf you need to to issue a sudo service samba restart from a Terminal for the changes to process.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Locked

Return to “Beginner Questions”