# Samba access problems to server



## Crotalus (Sep 9, 2011)

Needed information:

System:

```
FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011
    root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
```

Samba:

```
Prometheus# smbstatus
lp_load_ex: refreshing parameters
Initialising global parameters
max_open_files: increasing sysctl_max (11095) to minimum Windows limit (16384)
rlimit_max: increasing rlimit_max (11095) to minimum Windows limit (16384)
params.c:pm_process() - Processing configuration file "/usr/local/samba/lib/smb.conf"
Processing section "[global]"
Processing section "[homes]"
Processing section "[printers]"
Processing section "[public]"
Processing section "[Movies]"

Samba version 3.6.0
PID     Username      Group         Machine                        
-------------------------------------------------------------------

Service      pid     machine       Connected at
-------------------------------------------------------

No locked files
```

FreeBSD users
	
	



```
#Changing user information for nobody.
Login: nobody
Password:
Uid [#]: 65534
Gid [# or name]: 65534
Change [month day year]:
Expire [month day year]:
Class:
Home directory: /nonexistent
Shell: /usr/sbin/nologin
Full Name: Unprivileged user
Office Location:
Office Phone:
Home Phone:
Other information:
/etc/pw.iGMv65: unmodified: line 1
Prometheus#
```

Configuration:
	
	



```
[global]
        workgroup = GROUP1
        server string = Samba Server
        encrypt passwords = No
        map to guest = Bad User
        log level = 3
        log file = /var/log/samba/%m.log
        max log size = 50
        dns proxy = No
        idmap config * : backend = tdb
        hosts allow = 192.168., 7.0.0.
        
[public]
        comment = %h Shared Public Directory
        path = /storage2/public
        force user = nobody
        force group = wheel
        read only = No
        force create mode = 0777
        force directory mode = 0777
        guest ok = Yes
```

Samba user:
	
	



```
Prometheus# smbpasswd nobody
New SMB password:
Retype new SMB password:
Forcing Primary Group to 'Domain Users' for nobody
Prometheus#
```


```
Prometheus# pdbedit -Lv nobody
Forcing Primary Group to 'Domain Users' for nobody
Unix username:        nobody
NT username:          
Account Flags:        [U          ]
User SID:             S-1-5-21-1832871735-2465623369-4153686981-501
Primary Group SID:    S-1-5-21-1832871735-2465623369-4153686981-513
Full Name:            Unprivileged user
Home Directory:       \\prometheus\nobody
HomeDir Drive:        
Logon Script:         
Profile Path:         \\prometheus\nobody\profile
Domain:               PROMETHEUS
Account desc:         
Workstations:         
Munged dial:          
Logon time:           0
Logoff time:          Sun, 04 Dec 219250468 08:30:07 MST
Kickoff time:         Sun, 04 Dec 219250468 08:30:07 MST
Password last set:    Fri, 09 Sep 2011 11:50:52 MDT
Password can change:  Fri, 09 Sep 2011 11:50:52 MDT
Password must change: never
Last bad password   : 0
Bad password count  : 0
Logon hours         : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Prometheus#
```

Testing for installation:
	
	



```
Prometheus# smbclient -U% -L Localhost
/libexec/ld-elf.so.1: /usr/local/samba/bin/smbclient: Undefined symbol 
"tdb_transaction_start_nonblock"
```

Trying to map network drive with windows /var/log/samba/smbd.log errors

```
[2011/09/09 12:00:52.680895,  3] passdb/lookup_sid.c:1737(get_primary_group_sid)
  Forcing Primary Group to 'Domain Users' for root
[2011/09/09 12:00:52.681903,  3] auth/token_util.c:438(finalize_local_nt_token)
  Failed to fetch domain sid for GROUP1
[2011/09/09 12:00:52.682157,  3] auth/token_util.c:469(finalize_local_nt_token)
  Failed to fetch domain sid for GROUP1
[2011/09/09 12:00:52.682969,  3] passdb/lookup_sid.c:1737(get_primary_group_sid)
  Forcing Primary Group to 'Domain Users' for nobody
[2011/09/09 12:00:52.683195,  3] auth/token_util.c:438(finalize_local_nt_token)
  Failed to fetch domain sid for GROUP1
[2011/09/09 12:00:52.683386,  3] auth/token_util.c:469(finalize_local_nt_token)
  Failed to fetch domain sid for GROUP1
[2011/09/09 12:00:52.684058,  1] smbd/files.c:204(file_init)
  file_init: Information only: requested 16384 open files, 11075 are available.
[2011/09/09 12:00:52.684235,  3] rpc_server/svcctl/srv_svcctl_reg.c:569(svcctl_init_winreg)
  Initialise the svcctl registry keys if needed.
```

Trying to map network drive with windows /var/log/samba/zeus.log errors

```
[2011/09/09 12:00:04.397132,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [Windows for Workgroups 3.1a]
[2011/09/09 12:00:04.397231,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [LM1.2X002]
[2011/09/09 12:00:04.397334,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [LANMAN2.1]
[2011/09/09 12:00:04.397432,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [NT LM 0.12]
[2011/09/09 12:00:04.397655,  3] smbd/negprot.c:401(reply_nt1)
  not using SPNEGO
[2011/09/09 12:00:04.397753,  3] smbd/negprot.c:704(reply_negprot)
  Selected protocol NT LM 0.12
[2011/09/09 12:00:04.399668,  1] smbd/process.c:456(receive_smb_talloc)
  read_smb_length_return_keepalive failed for client 192.168.20.200 read error = 
NT_STATUS_END_OF_FILE.
[2011/09/09 12:00:04.399922,  3] smbd/server_exit.c:180(exit_server_common)
  Server exit (failed to receive smb request)
/libexec/ld-elf.so.1: /usr/local/samba/sbin/smbd: Undefined symbol "tdb_transaction_start_nonblock"
[2011/09/09 12:00:52.692304,  3] smbd/process.c:1661(process_smb)
  Transaction 0 of length 137 (0 toread)
[2011/09/09 12:00:52.692421,  3] smbd/process.c:1466(switch_message)
  switch message SMBnegprot (pid 1562) conn 0x0
[2011/09/09 12:00:52.692598,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [PC NETWORK PROGRAM 1.0]
[2011/09/09 12:00:52.692702,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [LANMAN1.0]
[2011/09/09 12:00:52.692804,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [Windows for Workgroups 3.1a]
[2011/09/09 12:00:52.692903,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [LM1.2X002]
[2011/09/09 12:00:52.693025,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [LANMAN2.1]
[2011/09/09 12:00:52.693124,  3] smbd/negprot.c:598(reply_negprot)
  Requested protocol [NT LM 0.12]
[2011/09/09 12:00:52.693342,  3] smbd/negprot.c:401(reply_nt1)
  not using SPNEGO
[2011/09/09 12:00:52.693439,  3] smbd/negprot.c:704(reply_negprot)
  Selected protocol NT LM 0.12
[2011/09/09 12:00:52.696144,  1] smbd/process.c:456(receive_smb_talloc)
  read_smb_length_return_keepalive failed for client 192.168.20.200 read error = 
NT_STATUS_END_OF_FILE.
[2011/09/09 12:00:52.696394,  3] smbd/server_exit.c:180(exit_server_common)
  Server exit (failed to receive smb request)
/libexec/ld-elf.so.1: /usr/local/samba/sbin/smbd: Undefined symbol "tdb_transaction_start_nonblock"
```


Here is the problem;

I am not able to map a drive from the Windows XP environment; When I try to map a drive I get the window asking for a user and password. Everything that I have tried has not worked. The entry window keeps asking for the same information. If I go to my network places and select GROUP1 I can see the server in the list. However if I click on it it returns the message of *not accessible, the account is not authorized to log in from this station*. I have tried using null passwords and setting a password on both the FreeBSD user and the Samba user.

I have deleted the Samba install and went through the configure, make, and the make install again as described in the Samba documentation. Same results. I have spent quite a few hours searching for answers. 

I just want a simple access without any user or password information passed. When I use the security mode of "share" I get a ton of problem 2 below, but it maps a drive that I can see in "My Computer" but I still can't access it. I am using "user" because "share" has been deprecated. I have read every page of the book, "Using Samba" published by O'Rellly without any luck.

Has anybody installed samba 3.6.0.0 on a FreeBSD machine with version 8.2?

This is what I am trying to get at;

```
Prometheus# pwd
/storage2
Prometheus# 

Prometheus# ls -l
total 4
drwxrwxr-x   2 root  operator   512 May  4 08:47 .snap
drwxrwxrwx  22 root  wheel     1536 May 16 07:50 public
Prometheus#
```

Problem 1. 

```
read_smb_length_return_keepalive failed for client 192.168.20.200 read error = NT_STATUS_END_OF_FILE.
```

I have not found anything usefull that could help me.

Problem 2.

```
/libexec/ld-elf.so.1: /usr/local/samba/sbin/smbd: Undefined symbol "tdb_transaction_start_nonblock"
```

Found the following, build world, rebuild package/port causing the problem. Nothing relating to Samba. One solution was to load all of the compat?x packages which I did without any luck.

Is /libexec/ld-elf.so.1 part of Samba or FreeBSD. If FreeBSD what port/package does it belong to? Is it part of the base? How can you find what port/package a module belongs to?

Problem 3.

```
Forcing Primary Group to 'Domain Users' for nobody
```

If you look at the share I have force the group to wheel. I don't believe it is looking at the shares as I can't access the server. I have no idea where this is coming from or why.

Anybody have any ideas?

Keith


----------



## shitson (Sep 10, 2011)

Did you write this conf from scratch?

The best way is to use the sample/default located in /usr/local/share/examples/samba35, set your security to share and then follow the example shares shown at the bottom. (this is an example from my system, read/write dump file)


```
[dump]
comment = Dump files here
path = /mnt/15tb/tmp
public = yes
writable = yes
```

Also ensure that the dir that you set here is owned by *nobody:nogroup* (user:group) if you wish to allow write access.

Edit: The first thing i would do is to load the said default conf file and just make sure everything works first then go and edit the file.


----------



## Crotalus (Sep 10, 2011)

I had a hard drive failure that gave me the opportunity to get current. I was running FreeBSD 6.2 Release 1 with Samba version 3.0.12 without any problems. 

I tried the file /usr/ports/net/samba-3.6.0/examples/smb.conf.default that was part of the install. I then used the previous config file that was used with my previous install that worked. Same results!

The only difference that I found looking at the config file is that the share has 
	
	



```
public = no  or
public = yes
```
 But it is not getting that far. However this parameter is a synonym for 
	
	



```
guest ok
```

I believe that the problem may be related to the "Problem 2" in my original post.
Has anybody installed samba version 3.6.0.0 on a version 8.2 of FreeBSD?

Keith


----------



## Sylhouette (Sep 11, 2011)

> I tried the file /usr/ports/net/samba-3.6.0/examples/smb.conf.default that was part of the install.



Are you sure about that.
As far as i know, samba 3.6 is not in the ports tree yet.

only samba 3.4.x and 3.5.x 
I can not find this version on freshports.org either!


Well i found it on the bugtracker.
3.6.0 is still in testing phase, so i would run net/samba35

I would however contact timur (port maintainer) with the above error, maybe he can help you.

regards
Johan Hendriks


----------



## Crotalus (Sep 12, 2011)

Sylhouette,

Here is where I got if from; http://www.samba.org/. I followed the instructions in the manual to install it. Here is the manual, http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/. I followed the path to the detail information from I. 1. It is in chapter 42, Part VI. With a brand new install why use an older version? From visiting other forums on the internet it appears to work with all kinds of Linux variations and with Macs. With the Linux compatibility, should it work with FreeBSD?

Keith


----------



## Sylhouette (Sep 12, 2011)

Ah.

Ok.
Delete samba from your server.

If you want to use 3.6.0, i think it is better to use the ports version that Timor has put together.
This way you get some patches against samba to fit FreeBSD.

You can find the port here 

samba36-devel port

Download the patch.txt file and then do sh filename.
It wil create the port directoryy (samba36-devel) and copy that to /usr/ports/net
Then go to the port dir and do the usual make install clean routine.

Why use an older version, well that depend onyour definition of old.
3.6.0 is a new branch, and if you read the samba maillings list, there are some rough edges to it, as where 3.5.11 has had much more real live exposure and has lots of bugs fixed.

Also 3.5.11 runs good on FreeBSD, i do not think you will lose that much functionality by using the 3.5.11 port.
major change is the smb2 support in 3.6
But if you have only XP clients, you will not benefit from that either.

regards,
Johan


----------



## Crotalus (Sep 12, 2011)

Johan,

I was going to try the FreeBSD ports for Samba. That was my next step. I was trying to see if I could get the version 3.6 to work, but that at this time it does not seem possible without a lot of effort. I see the 3.5.11 and 4.0.0 versions. I think that it may be better to stay away from the version 4. I will be gone for almost 2 weeks so I will have to wait until I return.

Thanks!

Keith


----------

