Hmm, newbie with samba, I just dont get it.

Hmm, I can't get Samba to work, I know it cant be anywhere far for working, but I don't have any ideas left :/

if I use "smbclient //localhost/tmp" to test samba, without giving password, it seem to work:

Code:
$ smbclient //localhost/tmp
Password:
Anonymous login successful
Domain=[CATS] OS=[Unix] Server=[Samba 3.0.32]
smb: \> quit
$

here I could us it as it should be (seems to work normal andI can browse my tmp dir)


But if I give it my password when it ask it:

Code:
$ smbclient //localhost/tmp
Password:
session setup failed: NT_STATUS_LOGON_FAILURE
$


I used "pdbedit -a -u MyAccountName" to add used and entered pass for it


I do know it reads options from smb.conf file, I try to chance some options like workgrp and it showed it when I logged as anonym.


when I gave pass while I try to log it did some log files:
Code:
-rw-r--r--  1 root  wheel     0 Apr 16 20:04 log.
-rw-r--r--  1 root  wheel     0 Apr 16 20:04 log.127.0.0.1

But all of those are 0 bytes

But if I log without giving password and then quit, it adds to log. next trings:

Code:
[2009/04/16 20:05:43, 1] smbd/service.c:make_connection_snum(1033)
   (127.0.0.1) connect to service tmp initially as user nobody (uid=65534, gid=65534) (pid 68431)
[2009/04/16 20:05:45, 1] smbd/service.c:close_cnum(1230)
   (127.0.0.1) closed connection to service tmp



What I should check next?



And my settings:


Code:
# testparm -s
Load smb config files from /usr/local/etc/smb.conf
Processing section "[homes]"
Processing section "[tmp]"
Loaded services file OK.
Server role: ROLE_STANDALONE
[global]
        workgroup = CATS
        server string = Samba Server
        interfaces = 192.168.1.4/24
        passdb backend = tdbsam
        log file = /var/log/samba/log.%m
        max log size = 50
        load printers = No
        logon script = %U.bat
        preferred master = Yes
        domain master = Yes
        dns proxy = No
        hosts allow = 192.168.1., 192.168.2., 127.

[homes]
        comment = Home Directories
        read only = No
        browseable = No

[tmp]
        comment = Temporary file space
        path = /tmp
        guest ok = Yes
#

most of time I used http://www.csua.berkeley.edu/~ranga/notes/freebsd_samba.html quide and followed it somewhat carefully
 
zakka said:
$ smbclient //localhost/tmp
Password:
session setup failed: NT_STATUS_LOGON_FAILURE
$


I used "pdbedit -a -u MyAccountName" to add used and entered pass for it
Please use code tags...

Try:
Code:
$ smbclient -U MyAccountName //localhost/tmp
 
Same still
Code:
$ smbclient -U leopard //localhost/tmp
Password:
session setup failed: NT_STATUS_LOGON_FAILURE


Sorry missing about tags earlier, somehow I forgot those.
 
also [ just tested] , if you give machine'a name in capitals, it works just with 'smbclient //<machine>/<share>'

by the way , do you know wich ports uses smb? [it is blocked by my firewall]
 
Gkarfield said:
also [ just tested] , if you give machine'a name in capitals, it works just with 'smbclient //<machine>/<share>'

by the way , do you know wich ports uses smb? [it is blocked by my firewall]

Hmm, I never tought Firewall, I did freebsd minimum install and never tought to check that. Note that this lan doesn't need FW, its just for testing (learning)

But there is something weird tho, if I do:
Code:
smbclient -U leopard -I 192.168.1.4 //192.168.1.4/tmp

with pass I'll get: NT_STATUS_LOGON_FAILURE
or without +disabled anonymous account:

Anonymous login successful
Domain=[CATS] OS=[Unix] Server=[Samba 3.0.32]
tree connect failed: NT_STATUS_ACCESS_DENIED


But in both cases logs are empty.

Code:
-rw-r--r--  1 root  wheel     0 Apr 24 16:50 log.192.168.1.4
-rw-r--r--  1 root  wheel     0 Apr 24 16:50 log.smbd

I think incorrect login were logged earlier, but not 100% sure tho :p
 
Gkarfield said:
also [ just tested] , if you give machine'a name in capitals, it works just with 'smbclient //<machine>/<share>'
Hostnames are not case-sensitive.

by the way , do you know wich ports uses smb? [it is blocked by my firewall]

Smb is notoriously tricky to firewall but 137/udp (netbios-ns), 138/udp (netbios-dgm), 139/tcp (netbios-ssn) and 445/tcp (netbios-ds).

Do note that, by default, there's no firewall active on FreeBSD. You have to enable it after the install.
 
Back
Top