No Folder Sharing Between Two Mint Katya Machines

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
Post Reply
waltkerr
Level 1
Level 1
Posts: 16
Joined: Fri Nov 11, 2011 3:10 am

No Folder Sharing Between Two Mint Katya Machines

Post by waltkerr »

I have a desktop PC (DEN) connected to my router and a laptop (TOSHI) with WiFi card, both run Mint Katya and both connect to the internet. I want to use Samba for folder sharing. I right-clicked on the /home/waltkerr/public folder on both machines, opened Sharing Options and checked Share This Folder and "Allow others to create and delete files in this folder". Personal File Sharing is turned off on both machines. I disabled the firewall on both machines (ufw disable). Remote Desktop is turned off on both machines.

I open the Network window and click on the server icon for the other machine. I get a message:
"Unable to mount"
I get this message from either machine when trying to connect to the other.

The following is output from smbtree:

Code: Select all

waltkerr@Toshi ~ $ smbtree
Enter waltkerr's password: 
WORKGROUP
	\\TOSHI          		Toshi server (Samba, LinuxMint)
		\\TOSHI\public         	
		\\TOSHI\Print_to_PDF   	Print to a PDF File
		\\TOSHI\IPC$           	IPC Service (Toshi server (Samba, LinuxMint))
		\\TOSHI\print$         	Printer Drivers
	\\DEN            		Den server (Samba, LinuxMint)
cli_start_connection: failed to connect to DEN<20> (0.0.0.0). Error NT_STATUS_UNSUCCESSFUL
waltkerr@Toshi ~ $ 
A separate, but possibly related, issue is the laptop cannot see the main printer which is directly connected and works from the desktop machine.

Thank you in advance for any suggestions you can give me.
User avatar
Kilz
Level 4
Level 4
Posts: 200
Joined: Mon Apr 04, 2011 8:00 pm

Re: No Folder Sharing Between Two Mint Katya Machines

Post by Kilz »

I have never gotten sambqa working like it should. If all you have to share to is linux machines you might want to try nfs.
I trust Microsoft about as far as I could comfortably spit a dead rat
Ubuntu is my past, it is no longer the place it once was, on its forums you are no longer free to voice your opinion.
64bit Linux Powered
altair4
Level 20
Level 20
Posts: 10269
Joined: Tue Feb 03, 2009 10:27 am

Re: No Folder Sharing Between Two Mint Katya Machines

Post by altair4 »

On both machines edit smb.conf as root:

Code: Select all

gksu gedit /etc/samba/smb.conf
And add a line to the [global] section - right under the workgroup line is where I would put it:

Code: Select all

name resolve order = bcast host lmhosts wins
Then restart samba:

Code: Select all

sudo service smbd restart
Wait a few minutes ( seriously - minutes ) and then try to connect again.

The problem here appears to be that your network is not allowing a machine name to be converted to an ip address. Putting bcast first resolves the issue. You can verify my assumption that it is a name resolution problem by accessing the machine directly by ip address. In a terminal:

Code: Select all

nautilus smb://192.168.0.100
Change 192.168.0.100 to the ip address of the machine you are trying to access.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
waltkerr
Level 1
Level 1
Posts: 16
Joined: Fri Nov 11, 2011 3:10 am

Re: No Folder Sharing Between Two Mint Katya Machines

Post by waltkerr »

Thanks altair4. Yesterday I had edited the smb.conf file to change the "name resolve" order you mentioned but I could not see the shares displayed in the Network window. Today, per your suggestion, I tried accessing the shares from the command line using the IP address and it worked. I was able to access the other machine and open a document as read-only. However, I still cannot see the shared icon in the Network window. Are the any further steps I can try? Thanks for your help.
altair4
Level 20
Level 20
Posts: 10269
Joined: Tue Feb 03, 2009 10:27 am

Re: No Folder Sharing Between Two Mint Katya Machines

Post by altair4 »

EDIT: Before you do the following let's make sure a basic service is running on both machines:

Code: Select all

sudo service nmbd status
If it's not running start it:

Code: Select all

sudo service nmbd start
It's it's not running it's not broadcasting it's name.

<----------------- ORIGINAL REPLY ----------------------->
From the machine you cannot access post the output of each of the following commands:

Code: Select all

hostname
testparm -s
net usershare info --long
smbtree
These 2 machines are on the same network right? They are both connected one way or another to the same router?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
waltkerr
Level 1
Level 1
Posts: 16
Joined: Fri Nov 11, 2011 3:10 am

Re: No Folder Sharing Between Two Mint Katya Machines

Post by waltkerr »

Both machines are on the same network on the same router. They are both accessible under Windows XP and both can access the internet.

HERE'S THE OUTPUT FROM THE DESKTOP (DEN) CONNECTED VIA CABLE TO THE ROUTER:

waltkerr@Den ~ $ sudo service nmbd status
[sudo] password for waltkerr:
nmbd start/running, process 807
waltkerr@Den ~ $ hostname
Den
waltkerr@Den ~ $ testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE
[global]
server string = %h server (Samba, LinuxMint)
map to guest = Bad User
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
browseable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
waltkerr@Den ~ $ net usershare info --long
[public]
path=/home/waltkerr/Public
comment=
usershare_acl=Everyone:F,
guest_ok=y

waltkerr@Den ~ $ smbtree
Enter waltkerr's password:
WORKGROUP
\\DEN Den server (Samba, LinuxMint)
\\DEN\public
\\DEN\IPC$ IPC Service (Den server (Samba, LinuxMint))
\\DEN\print$ Printer Drivers
waltkerr@Den ~ $


HERE'S THE OUTPUT FROM THE LAPTOP (TOSHI) CONNECTED VIA WIFI TO THE SAME ROUTER AS THE DESKTOP:

waltkerr@Toshi ~ $ sudo service nmbd status
[sudo] password for waltkerr:
nmbd start/running, process 1544
waltkerr@Toshi ~ $ hostname
Toshi
waltkerr@Toshi ~ $ testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE
[global]
server string = %h server (Samba, LinuxMint)
map to guest = Bad User
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
username map = /etc/samba/smbusers
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
browseable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
waltkerr@Toshi ~ $ net usershare info --long
[public]
path=/home/waltkerr/Public
comment=
usershare_acl=Everyone:F,
guest_ok=n

waltkerr@Toshi ~ $ smbtree
Enter waltkerr's password:
WORKGROUP
\\TOSHI Toshi server (Samba, LinuxMint)
\\TOSHI\public
\\TOSHI\IPC$ IPC Service (Toshi server (Samba, LinuxMint))
\\TOSHI\print$ Printer Drivers
\\DEN Den server (Samba, LinuxMint)
cli_start_connection: failed to connect to DEN<20> (0.0.0.0). Error NT_STATUS_UNSUCCESSFUL
waltkerr@Toshi ~ $
altair4
Level 20
Level 20
Posts: 10269
Joined: Tue Feb 03, 2009 10:27 am

Re: No Folder Sharing Between Two Mint Katya Machines

Post by altair4 »

Please go back to my original response and perform the following operation, wait a few minutes, run smbtree again, and see if it still gives you an error message:
altair4 wrote:On both machines edit smb.conf as root:

Code: Select all

gksu gedit /etc/samba/smb.conf
And add a line to the [global] section - right under the workgroup line is where I would put it:

Code: Select all

name resolve order = bcast host lmhosts wins
Then restart samba:

Code: Select all

sudo service smbd restart
Wait a few minutes ( seriously - minutes ) and then try to connect again.
If you think you've already added it, it may be that you have a preceding ";" or "#" on that line which tells samba to ignore it.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
waltkerr
Level 1
Level 1
Posts: 16
Joined: Fri Nov 11, 2011 3:10 am

Re: No Folder Sharing Between Two Mint Katya Machines

Post by waltkerr »

You hit the nail on the head. The relevant Name Resolve lines were commented out in both smb.conf files! Being a newbie at this, I thought commenting was done with the character '#' and I ignored the ';' that was at the start of the line. Anyway, both machines can now see each other and their shared folders. I'm being prompted for a password to open the folder on the other machine. Where is the password set for these shared folders? I remember reading somewhere that this password is different than the system password.
altair4
Level 20
Level 20
Posts: 10269
Joined: Tue Feb 03, 2009 10:27 am

Re: No Folder Sharing Between Two Mint Katya Machines

Post by altair4 »

One Den you have this share:
[public]
path=/home/waltkerr/Public
comment=
usershare_acl=Everyone:F,
guest_ok=y
You should not be prompted for authentication on that share.

On Toshi you have this share:
[public]
path=/home/waltkerr/Public
comment=
usershare_acl=Everyone:F,
guest_ok=n
Not sure that was your intent but you have set this up to disable guest access. Go back into nautilus and redo the share so that it allows guest access and the client will not be asked for authentication and you won't have to set up a password.

Anyway to answer your question: In a terminal on Toshi:

Code: Select all

sudo smbpasswd -a waltkerr
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
waltkerr
Level 1
Level 1
Posts: 16
Joined: Fri Nov 11, 2011 3:10 am

Re: No Folder Sharing Between Two Mint Katya Machines [SOLVE

Post by waltkerr »

Can't thank you enough altair4. Everything is now working with Samba, even my network printing.

I've learned a lot about setting up and using Samba through this.

Thanks again.
Post Reply

Return to “Other networking topics”