PDA

View Full Version : smbclient shows stuff, but nmblookup doesn't??


mbratch
2007-12-26, 12:09 PM CST
I tried to come up with a catchy title for this weird problem, but didn't think of one that really captured the issue... ;)

I have a network of two PCs. One running Windows XP (called "KIDSPC"), the other Fedora 8 (called "DADPC"). I have samba on F8 and workgroup called "Bratcher".

Up until a couple of days ago, this was working fine. I could my computer in Gnome, double click on the Network icon, and see three icons: "Windows Network", "DADPC" and "KIDSPC". Opening "KIDSPC" would show the shares I set up on Windows XP. And running "smbclient -L KIDSPC" with no password would show the shares as expected.

Now as of a couple days ago, I don't know whether an F8 update has messed me up or what, but now when I open up the Network icon in my Computer browser, it only shows "Windows Network". Opening that, it's empty. I haven't changed any shares on the Windows XP machine (KIDSPC).

So I did some digging and I think Gnome uses nmblookup? Running "nmblookup \*" as a normal user or root on DADPC gives the same results: DADPC (the "self" machine) shows up but nothing else. Running smbclient, though, gives different results depending upon login. If I login as a normal user, "smbclient -L KIDSPC" (no password) gives this:

Anonymous login successful
Domain=[BRATCHER] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Sharename Type Comment
--------- ---- -------
cli_rpc_pipe_open: cli_nt_create failed on pipe \srvsvc to machine kidspc. Error was NT_STATUS_ACCESS_DENIED
Error returning browse list: NT_STATUS_ACCESS_DENIED
Anonymous login successful
Domain=[BRATCHER] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Server Comment
--------- -------
DADPC
KIDSPC
PAMELA-PC

Workgroup Master
--------- -------
BRATCHER

Running "smbclient -L KIDSPC" logged in as root on DADPC gives me this:
Domain=[KIDSPC] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Sharename Type Comment
--------- ---- -------
Attic Disk
hppsc120 Printer hp psc 1200 series
IPC$ IPC Remote IPC
D$ Disk Default share
SharedDocs Disk
print$ Disk Printer Drivers
Corinth (C) Disk
ADMIN$ Disk Remote Admin
C$ Disk Default share
Damascus (D) Disk
Domain=[KIDSPC] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Server Comment
--------- -------

Workgroup Master
--------- -------

So all the shares show up in this case, but under domain "KIDSPC". I tried forcing domain/workgroup using the -W command under root, but I got the same results.

One more twist: I set up the samba shares to mount with automount with anonymous login. As a normal user or as root on DADPC, if I change to the automount directory, the shares show up. However, I don't have the permissions I expect. I can change directory to the share "Attic" for example, but an ls command there says I don't have permission to see anything there.

As I said, this used to all work (although I had never run nmblookup before, so I don't know what it's output used to look like). I didn't change anything (I'm aware of) in the networking to make this problem occur. So I'm confused.

Anyone have any clues what's going on with this?

mbratch
2007-12-26, 12:32 PM CST
OK now this gets even more strange...

My system now DOES see the shares in the Gnome file browser and with the right permissions. I don't know why it decided to.

However, my automounted shares (same shares) don't give me the same permission.

smbclient and nmblookup still behave as I described above, not what I would expect.

This is truly weird...

glennzo
2007-12-26, 12:39 PM CST
Mark, I don't have a solution to your problem but I too am fighting what at times seems a losing battle with samba. Just when I think I have things working the way I want, which is simple file sharing, something goes wrong and computers disappear from the network or I can't copy file xyz to computer a from computer b. One thing I have seen is that NMB seems to die intermittently. I have a problem, start looking around and find that NMB is started but the process is dead. Restarting NMB often times, but not always, resolves the issue.

mbratch
2007-12-26, 03:38 PM CST
Well they just disappeared again. Checked for nmbd and it's still running fine.

I don't think this is specifically a Samba problem as much as an SMB issue in general. I have a dual boot to Windows 98 (it's old, I know) and it can't access the Win XP shares all the time either! SMB has always seemed to behave strangely, even when I administered all-Windows networks.

So I guess I just live with it...

Moe, Larry, cheese!

mbratch
2007-12-26, 07:02 PM CST
Ugh. The Fedora 8 "Network Neighborhood" has been empty most of the day. Seem s to me it used to be populated a lot more often until recently...

reason
2008-04-07, 03:09 PM CDT
Is there an smbclient for Fedora 8? I have samba install but I can not run the smbclient command.

glennzo
2008-04-07, 03:25 PM CDT
Yes there is. Make sure you've updated Samba. Seems I need to install it after a fresh Fedora install.
[glenn@toshiba ~]$ rpm -q samba
samba-3.0.28a-0.fc8

[glenn@toshiba ~]$ smbclient
Usage: smbclient [-?EgVNkP] [-?|--help] [--usage] [-R|--name-resolve NAME-RESOLVE-ORDER]
[-M|--message HOST] [-I|--ip-address IP] [-E|--stderr] [-L|--list HOST] [-t|--terminal CODE]
[-m|--max-protocol LEVEL] [-T|--tar <c|x>IXFqgbNan] [-D|--directory DIR] [-c|--command STRING]
[-b|--send-buffer BYTES] [-p|--port PORT] [-g|--grepable] [-d|--debuglevel DEBUGLEVEL]
[-s|--configfile CONFIGFILE] [-l|--log-basename LOGFILEBASE] [-V|--version]
[-O|--socket-options SOCKETOPTIONS] [-n|--netbiosname NETBIOSNAME] [-W|--workgroup WORKGROUP]
[-i|--scope SCOPE] [-U|--user USERNAME] [-N|--no-pass] [-k|--kerberos]
[-A|--authentication-file FILE] [-S|--signing on|off|required] [-P|--machine-pass]
service <password>

reason
2008-04-07, 05:00 PM CDT
Yes there is. Make sure you've updated Samba. Seems I need to install it after a fresh Fedora install.
[glenn@toshiba ~]$ rpm -q samba
samba-3.0.28a-0.fc8

[glenn@toshiba ~]$ smbclient
Usage: smbclient [-?EgVNkP] [-?|--help] [--usage] [-R|--name-resolve NAME-RESOLVE-ORDER]
[-M|--message HOST] [-I|--ip-address IP] [-E|--stderr] [-L|--list HOST] [-t|--terminal CODE]
[-m|--max-protocol LEVEL] [-T|--tar <c|x>IXFqgbNan] [-D|--directory DIR] [-c|--command STRING]
[-b|--send-buffer BYTES] [-p|--port PORT] [-g|--grepable] [-d|--debuglevel DEBUGLEVEL]
[-s|--configfile CONFIGFILE] [-l|--log-basename LOGFILEBASE] [-V|--version]
[-O|--socket-options SOCKETOPTIONS] [-n|--netbiosname NETBIOSNAME] [-W|--workgroup WORKGROUP]
[-i|--scope SCOPE] [-U|--user USERNAME] [-N|--no-pass] [-k|--kerberos]
[-A|--authentication-file FILE] [-S|--signing on|off|required] [-P|--machine-pass]
service <password>


Samba is installed and services are running but smbclient is not. The system does not recognize the name. To make sure I had all of samba, I downloaded the rpms for samba-common today and still no client.

glennzo
2008-04-07, 05:43 PM CDT
What error do you get when you try using smbclient?

reason
2008-04-07, 06:03 PM CDT
sudo: smbclient: command not found

I get this when I su as root also and samba is installed:

rpm -q samba
samba-3.0.28a-0.fc8

glennzo
2008-04-07, 06:25 PM CDT
Try sudo /usr/bin smbclient

reason
2008-04-07, 09:45 PM CDT
sudo: /usr/bin/smbclient: command not found

I did a locate for it and its just not there.

reason
2008-04-07, 10:11 PM CDT
I got it. I had to install it with yum. apparently it was not in the samba download (for me atleast). Thanks for the help everyone!