HOWTO: Linux Samba protocol negotiation failed: NT_STATUS_INSUFFICIENT_RESOURCES – SOLVED! Windows XP 2k8 Win7 Win8 Win2012

The issue is the LanmanServer service runs out of memory. We need to boost that up:

On your Windows machine, fire up regedit (Start -> regedit) modify the following registry keys:
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache” from 0 to 1
HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size” from 1 to 3

The problem seems to manifest itself more frequently if you use your Windows box as a file server or a media server. If you can, restart the Windows box. If for some reason you can’t (e.g. your significant other is watching a video on the tv streaming from your Windows box), then you can do effectively the same by restarting the following services:

(Start -> cmd.exe) as administrator
>net stop LanmanServer /y
> net start LanmanServer
> net start Browser
> net start HomeGroupListener

Share Button

Playing videos on the XBox 360 through Media Center (My Movies) stored on an Ubuntu Samba Share (linux)

We watch movies and TV shows upstairs primarily streamed from a Windows 7 Media Center machine through an XBox 360.  When I we ran out of room on the Drobo, I moved the movies to an Ubuntu Server 12.04.1 (Linux) stored on a RAID5 array (samba share).

Since I’m using My Movies for media management, I updated the MYMOVIES database (SQL Server 2005) with the new location.  I used the host name of the Ubuntu server.  After verifying that the guest user on the Ubuntu server was set up correctly in the /etc/samba/smb.conf, I was able to watch the videos in local playback via Media Center. 

[Multimedia]
   path = /mnt/multimedia
   read only = no
   guest ok = yes
   writable = yes
   create mask = 0665
   directory mask = 0775
   write list = jason,tv
   read list = jason,tv,guest

What did not work was the XBox 360.

After a bit of trial and error, I was able to determine that the XBox 360 didn’t quite like the netbios broadcast from the Ubuntu server (samba).  Making it use a static ip made it work when I updated the nvcLocation from “ultra” to “192.168.0.133” in the tblDiscs table (MYMOVIES database).  It should be noted direct manipulation of the tables is unsupported by the My Movies software but it worked just fine.

update dbo.tblDiscs set nvcLocation = replace(nvcLocation, 'Ultra', '192.168.0.133')
Share Button

DROBO: Nice to see after moving 1TB of movies to an Ubuntu Server 12.04.1 RAID 5 Samba share :)

Share Button

Need to upload a file to multiple Windows boxes?

If you don’t want to mess around with windows scripting and you just want to get the job done, well, the easiest method is sometimes the not so obvious…  use smbclient!  It’s part of Samba (no, not the samba style of music).

I’ve created a very simple script to automate smbclient.  It assumes that the login name, password and the directory on each of the windows boxes are the same.

Note that the directory is relative to the windows share.  For example the following two windows machines share the sybase directory as “sybase”.  Whether actual location of sybase is located on the C drive or somewhere else, doesn’t really matter as it is simply “\\<server>\sybase” to the rest of the network.

c:\sybase shared as \\mywin2k\sybase

d:\sybase shared as \\mywin2k3\sybase

Put either the ip address or the name of each of the windows machines you want to upload your file to into the smb_ips file.

192.168.0.70
192.168.0.71
192.168.0.17
192.168.0.101
192.168.0.23
192.168.0.24
192.168.0.25

Change the smb_user and smb_pass to your windows login/password.  Next, change upload_file to point to the file you need to upload to the windows box.  Finally, change the upload_dir to the directory on the windows box you want to upload the file to.

#!/bin/bash

smb_user=”login”
smb_pass=”password”

# EBF 13464.zip is Sybase ASE 12.5.1 esd 13 for windows
upload_file=”EBF13464.zip”
upload_dir=”sybase”

while read ip; do
echo Uploading ${upload_file} to ${ip}
smbclient –user $smb_user \\\\${ip}\\${upload_dir} $smb_pass < Uploading EBF13464.zip to 192.168.0.70
Domain=[DONUT_COOKIE] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager]
putting file EBF13464.zip as \EBF13464.zip (330.5 kb/s) (average 330.5 kb/s)

Uploading EBF13464.zip to 192.168.0.71
Domain=[DONUT_COOKIE] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager]
putting file EBF13464.zip as \EBF13464.zip (331.5 kb/s) (average 331.5 kb/s)

Uploading EBF13464.zip to 192.168.0.17
Domain=[DONUT_COOKIE] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager]
putting file EBF13464.zip as \EBF13464.zip (330.4 kb/s) (average 330.4 kb/s)

Uploading EBF13464.zip to 192.168.0.101
Domain=[DONUT_COOKIE] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager]
putting file EBF13464.zip as \EBF13464.zip (335.4 kb/s) (average 335.4 kb/s)

Uploading EBF13464.zip to 192.168.0.23
Domain=[DONUT_COOKIE] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager]
putting file EBF13464.zip as \EBF13464.zip (327.5 kb/s) (average 327.5 kb/s)

Uploading EBF13464.zip to 192.168.0.24
Domain=[DONUT_COOKIE] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager]
putting file EBF13464.zip as \EBF13464.zip (318.4 kb/s) (average 318.4 kb/s)

Uploading EBF13464.zip to 192.168.0.25
Domain=[DONUT_COOKIE] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager]
putting file EBF13464.zip as \EBF13464.zip (329.5 kb/s) (average 329.5 kb/s)

Share Button