Cannot see network share but can access using IP directly

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
cpthk

Cannot see network share but can access using IP directly

Post by cpthk »

When I try to see my network computer, I couldn't see any. I am pretty sure, those computers are config correctly, since they could see each others. I tried to access directly by IP "smb://192.168.1.3", this works fine, but the browse nework just doesn't work. This has worked sometimes, but not all the time, it is kind of random. What could be the issue?
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.
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot see network share but can access using IP directl

Post by altair4 »

Without knowing anything about how you are set up I would guess it's about how your Mint machine is configured to resolve netbios names to ip addresses ( name resolve order ). Go through the checklist and see if it resolves anything:

Samba Browsing Problems Checklist: http://forums.linuxmint.com/viewtopic.p ... 46&start=0
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
cpthk

Re: Cannot see network share but can access using IP directl

Post by cpthk »

altair4 wrote:Without knowing anything about how you are set up I would guess it's about how your Mint machine is configured to resolve netbios names to ip addresses ( name resolve order ). Go through the checklist and see if it resolves anything:

Samba Browsing Problems Checklist: http://forums.linuxmint.com/viewtopic.p ... 46&start=0
Sorry, I am trying to search my windows and linux computers in my Mint linux. They are all in the same area network.
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot see network share but can access using IP directl

Post by altair4 »

Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
cpthk

Re: Cannot see network share but can access using IP directl

Post by cpthk »

I went through the list, they didn't solve my problem
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot see network share but can access using IP directl

Post by altair4 »

Post the output of the following commands:

Code: Select all

testparm -s

Code: Select all

smbtree
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
cpthk

Re: Cannot see network share but can access using IP directl

Post by cpthk »

config dump:

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, Ubuntu)
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
idmap config * : backend = tdb

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

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers



smbtree returns nothing

Thanks.
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot see network share but can access using IP directl

Post by altair4 »

altair4 wrote:Samba Browsing Problems Checklist: http://forums.linuxmint.com/viewtopic.p ... 46&start=0
cpthk wrote:I went through the list, they didn't solve my problem
Well, if you had the output of testparm -s would be different than what it is and I'm fairly certain you would have some kind of output from smbtree even if it was nothing but error messages so ...
[1] Samba Browsing depends on all hosts being members of the same subnet.
Are all the machines connecting to the same router and all have ip address in the same range like 192.168.0.100, 192.168.0.101, 192.168.0.102, etc..?
[2] Services not starting at boot.
Restart or start your services:

Code: Select all

sudo service smbd restart
sudo service nmbd restart
[3] Hostname
The hostnames of all your machines have to be 15 characters or less in length because Mint uses your host name as the netbios name to broadcast to the rest of the network.
[4] Name Resolution
Edit smb.conf as root:

Code: Select all

gksu gedit /etc/samba/smb.conf
Add the following line to the [global] section right under the workgroup line:

Code: Select all

name resolve order = bcast host lmhosts wins
At this point restart smbd and nmbd again then run the following command to see if you have the "name resolve order" line showing up:

Code: Select all

testparm -s
Now run the following and see if your lan machines show up.

Code: Select all

smbtree
If not disable everyones firewall and try it again.

This procedure will have to be done on all the Linux machines on your network. Windows machines pretty much do this sort of thing automatically.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
cpthk

Re: Cannot see network share but can access using IP directl

Post by cpthk »

After I swap the name resolve order, I restarted smbd and nmbd, and smbtree still returns nothing.
All my computers are under 192.168.1.xxx.
I have another ubuntu box in the same network. That computer wihout the need to swap the order, is able to see all the share in the network.
I honestly think there is some bugs in Mint.
Supposely, we do not need to swap the orders, even our windows machines are running with bcast at last by default.
My hostname is Gamma, 5 characters.


This is my new config:
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, Ubuntu)
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
name resolve order = bcast host lmhosts wins
dns proxy = No
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d
idmap config * : backend = tdb

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

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
cpthk

Re: Cannot see network share but can access using IP directl

Post by cpthk »

I just directly access by host name in the location bar like this: "smb://PC-ONE", this worked fine. This means my mint resolving hostname works fine. But browser all network computers still doesn't work, it just show nothing.

Image
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot see network share but can access using IP directl

Post by altair4 »

Did you expand "Windows Network". Samba is a Windows protocol.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
cpthk

Re: Cannot see network share but can access using IP directl

Post by cpthk »

altair4 wrote:Did you expand "Windows Network". Samba is a Windows protocol.
I tried that also, it's empty.
On my ubuntu box, I do not need to expand "windows network", and all network computers show up "next" to "windows network"

What's even more weird is that I run nmblookup, it is able to find network computers:
@Beta ~ $ nmblookup 'WORKGROUP'
querying WORKGROUP on 192.168.1.255
192.168.1.181 WORKGROUP<00>
192.168.1.135 WORKGROUP<00>
192.168.1.182 WORKGROUP<00>
192.168.1.3 WORKGROUP<00>
192.168.1.2 WORKGROUP<00>
192.168.1.5 WORKGROUP<00>
cpthk

Re: Cannot see network share but can access using IP directl

Post by cpthk »

I finally got it fixed, the problem is my "new" "expensive" linksys router. Here is what I found:
$ nmblookup workgroup#1d
querying workgroup on 192.168.1.255
192.168.1.1 workgroup<1d>

That's my router's IP. The new series of linksys router uses samba to detect network devices. It has a higher os level, so the router will always become the domain master. But it has a problem sharing network browser information with my mint box.

How I fix it.
Add these to smb.conf in my first mint box:
domain master = yes
local master = yes
preferred master = yes
os level = 200

$ nmblookup workgroup#1d
querying workgroup on 192.168.1.255
192.168.1.3 workgroup<1d>

Domain master is now my first mint box.

smbtree works now, UI works too.

I think linksys only tested to work with windows, all windows works fine, but not linux.
altair4
Level 20
Level 20
Posts: 11419
Joined: Tue Feb 03, 2009 10:27 am

Re: Cannot see network share but can access using IP directl

Post by altair4 »

If you have the time it would be extremely helpful if you were to post the model number of your linksys router so others could benefit from your discovery.

Sorry I wasn't able to help you with this issue. It never occurred to me that the router itself could actually impede network browsing.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
cpthk

Re: Cannot see network share but can access using IP directl

Post by cpthk »

altair4 wrote:If you have the time it would be extremely helpful if you were to post the model number of your linksys router so others could benefit from your discovery.

Sorry I wasn't able to help you with this issue. It never occurred to me that the router itself could actually impede network browsing.
Thanks for your help. I have the linksys EA4500, it is the second best model they have.
I have also noticed other people complained about other models also from linksys: http://homecommunity.cisco.com/t5/Wirel ... d-p/368951
Locked

Return to “Software & Applications”