[Samba] Cannot browse, 'net view' fails,
but 'net use x: \\server\share' works [ANSWER]
nick4soup at yahoo.com.au
Sat Sep 20 14:14:27 GMT 2008
I had been struggling with the issue, and eventually found the root
cause. But I noted it's not mentioned here, or on the internet.
Solution below, after the details.
The symptoms are that on Windows 2000 you can
C:\> net use X: \\server\share
(maps the drive successfully) and
C:\> net view \\server
(lists the various services).
But doing this:
C:\> net view
gives an error message:
System error 1326 has occurred.
Logon failure: unknown user name or bad password.
and clicking on "Computers Near Me" or Network Neighborhood gives a
Workgroup is not accessible.
The network name cannot be found.
Don't use the 'valid users' option in the [global] section. It should
be replicated across each of the shares, individually.
My particular situation is that I had named the various human
usernames (nick tom dick harry) as valid users (to prevent any other
user, like apache or ftp from noseying around - the chances are slim
but you never know).
It appears the computer is logging in as some guest/anonymous userid,
obviously not included on the list, when it does its browsing.
I can confirm the 'invalid users' option is OK in the [global]
section; I have root listed there.
===Versions of software===
Linux: Ubuntu Breezy (yes it's time for an upgrade)
Running WINS, and as local browse master
Server role: ROLE_STANDALONE
security = USER
Windows 2000 SP4 5.00.2195,
Internet Explorer 5.00.3700.1000,
running in a VMware virtual machine.
=> Another client
A similar Win2000 client with IE6.0sp1 (cursory testing only).
===Suggested additional steps===
I felt "The Official Samba-3 HOWTO and Reference Guide" was a little
incomplete, so here are my additional instructions, for section 35
(The Samba Checklist).
Insert after existing step 7.
7a. Run this command on the unix command line:
$ smbclient -NL BIGSERVER ## name or ip of samba server
You get a list of shares, machines, and workgroups.
If you get an error message saying:
tree connect failed: NT_STATUS_LOGON_FAILURE
then a possible cause is a 'valid users' line in the [globals]
7b. Run this command on the Windows DOS command line
C:\> net view
You should get a list of machines in the workgroup.
If you get a System error 1326 or a Logon failure, then a possible
cause is a 'valid users' line in the [globals] section.
7c. Run this command on the Windows DOS command line
C:\> nbtstat -n
You should see a list of workgroup names, machine names, and possibly
7d. Are you running WINS (wins support = yes in [globals] section)?
If so, in Windows, try Administrative tools -> Wins Administration
tool -> Active Registrations.
Bear in mind not all Windows versions have this tool installed.
As an alternative, on the Windows DOS command line
C:\> ipconfig /all
You should see mention of the WINS server; check the IP address.
===Additional common errors===
In chapter 1, under Common Errors ("The network name cannot be found”)
add this advice:
* You have set 'valid users' in the [Globals] section. It should be
specified under each share, not in the [Globals] section.
In saying this, I hope I've saved others some grief: I've spent a few
late nights on this.
Nick Bishop, email replies ignored.
Advice to the reader that they should put their lawyer away.
Make the switch to the world's best email. Get Yahoo!7 Mail! http://au.yahoo.com/y7mail
More information about the samba