[Samba] SaMBa 4 - homedir mapping (lp_servicenumber)

Dewayne Geraghty dewayne.geraghty at heuristicsystems.com.au
Tue Feb 5 00:17:31 MST 2013


> -----Original Message-----
> From: samba-bounces at lists.samba.org 
> [mailto:samba-bounces at lists.samba.org] On Behalf Of Celso Viana
> Sent: Sunday, 3 February 2013 12:17 PM
> To: SaMBa
> Subject: [Samba] SaMBa 4 - homedir mapping
> 
> Hi guys,
> 
> I'm testing the SaMBa 4 with FreeBSD 9.1 and am having difficulty.
> 
> I did so:
> mkdir test
> cd test
> wget http://ftp.samba.org/pub/samba/stable/samba-4.0.2.tar.gz
> tar zxvf samba-4.0.2.tar.gz
> cd samba-4.0.2
> ./configure && make && make install
> cd /usr/local/samba
> bin/samba-tool domain provision --realm=box.blurr 
> --domain=BOX --server-role=dc --adminpass='@Tullip500' 
> --use-xattrs=yes
> --use-rfc2307
> sbin/samba
> bin/samba-tool user add fox '@Pipe120' --home-directory='\\samba\fox'
> --home-drive=M --given-name="User Test"
> 
> wbinfo -i fox
> BOX\fox:*:3000017:20::/home/BOX/fox:/bin/false
> 
> smbclient //localhost/fox -Ufox
> Enter fox's password:
> Domain=[BOX] OS=[Unix] Server=[Samba 4.0.2] tree connect 
> failed: NT_STATUS_BAD_NETWORK_NAME
> 
> If I do this procedure with samba 4.0.0 mapping works.
> 
> Could someone help me understand what is happening?
> 
> Thanks!
> 
> --
> Celso Vianna
> BSD User: 51318
> http://www.bsdcounter.org
> 
> Palmas/TO
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba

Celso, I've directed this to the samba technical team because I suspect 
that there is a problem using smbclient to connect to [homes] on FreeBSD.  
The only anomolies that I can see, is from the logs is 
"lp_servicenumber: couldn't find homes" or "tree connect failed: NT_STATUS_BAD_NETWORK_NAME"

Using smbclient with either either ntlm or kerberos, fails.

# /usr/local/samba/bin/smbclient -d9 //t4/fox -Ufox%f7
...
pm_process() returned Yes
lp_servicenumber: couldn't find homes
added interface blue ip=10.0.5.241 bcast=10.0.5.255 netmask=255.255.255.0
Netbios name list:-
my_netbios_names[0]="T4"
...
Got NTLMSSP neg_flags=0x60088215
  NTLMSSP_NEGOTIATE_UNICODE
  NTLMSSP_REQUEST_TARGET
  NTLMSSP_NEGOTIATE_SIGN
  NTLMSSP_NEGOTIATE_NTLM
  NTLMSSP_NEGOTIATE_ALWAYS_SIGN
  NTLMSSP_NEGOTIATE_NTLM2
  NTLMSSP_NEGOTIATE_128
  NTLMSSP_NEGOTIATE_KEY_EXCH
Domain=[AS] OS=[Unix] Server=[Samba 4.0.1]
 session setup ok
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
#

>From the server running "/usr/local/samba/sbin/samba -i -M single -d 9":
..
wb_irpc_get_idmap called
wb_sids2xids_send called
wb_irpc_get_idmap_callback called
wb_sids2xids_recv called
/usr/local/samba/sbin/smbd: Module 'acl_xattr' loaded
/usr/local/samba/sbin/smbd: connect_acl_xattr: setting 'inherit acls = true' 'dos filemode = true' and 'force unknown acl user =
true' for service IPC$
..

------------
Accessing a different [shares] folder is ok.

# /usr/local/samba/bin/smbclient -d 9 -k //t4/shares
...
Doing kerberos session setup
ads_cleanup_expired_creds: Ticket in ccache[FILE:/tmp/krb5cc_0] expiration Tue, 05 Feb 2013 16:55:17 UTC
Domain=[AS] OS=[Unix] Server=[Samba 4.0.1]
 session setup ok
 tconx ok
smb: \>
-----------

Homes are defined and exist per (testparm -vss|egrep -A 3 "homes|shares")
[homes]
        comment = Home Directories
        path = /s4/homes/%S

[shares]
        comment = Test Share
        path = /s4/shares
        read only = No

The folders were created and "chown 3000021 /s4/homes/fox" and "chmod -R 777 /s4/homes/"
# ls -l /s4
drwxrwxrwx  7 root  wheel  512 Feb  4 02:08 homes/
drwxr-xr-x  2 root  wheel  512 Feb  5 04:35 kits/
drwxr-xr-x  4 root  wheel  512 Feb  4 02:08 shares/

Samba4 is running correctly except accessing the [homes] section.

Before we rebuild Samba we delete /usr/local/samba/* then build using

./configure --enable-debug --enable-selftest --with-aio-support \
            --with-acl-support --with-sendfile-support --with-quotas -j2

/usr/local/samba/bin/samba-tool domain provision --realm=AS.LAN --domain=AS \
--adminpass=A1 --server-role=dc --host-ip=10.0.5.241 --debuglevel=2 \
--ldapadminpass=L1 --host-name=t4 --use-rfc2307 \
--function-level=2008_R2 --use-xattrs=yes --dns-backend=BIND9_FLATFILE

Is there anything that stands out requiring further investigation, or can someone suggest how I can dig deeper?

Regards, Dewayne.



More information about the samba-technical mailing list