Author Topic: Samba Server problem  (Read 2376 times)

March 24, 2010, 11:01:58 AM
Read 2376 times

ace1774

  • Newbie

  • Offline
  • *

  • 14
Ok lets start by trying to explain the situation

I have a Tv Samsung UE40B7000WW.This tv has a linux kernel and a team of very talented people have started writing apps.

Up until now i was using a SMB network ability of the tv to connect to a network share to my computer and i can the network share as USB hdd mounted to my TV.
The conf file look like this

#!/bin/sh
#
# Copyright 1996-2009, ZsoltTech.Com
#       by Ser Lev Arris <arris@ZsoltTech.Com>
#
#       donated for the SamyGo Project
#       http://samygo.sourceforge.net/
#
#       Version: v0.01-SamyGo
#
# This script is not under the GPL, you have the permission
# to write your own and not use/modify this one!
#
# TODO: more sysv style, more error handling
#
. /dtv/SGO.env

##### CHANGE MEEEEE !!!!! ######
USER=""
PASSWD=""
PERM="rw" # can be ro or rw
##### CHANGE MEEEEE END ######

[ -z $USER ] && exit 1
[ -z $PASSWD ] && exit 1

DEST_DIR=/dtv/usb/smb
SERVER="192.168.1.65"
# SERVER="10.0.0.1" # if you want a fixed server
SHARES=""
FR_NAME="Samba Server"
# M_OPTS="rw,user=${USER},password=${PASSWD}"
M_OPTS="$PERM,user=${USER},password=${PASSWD}"

SERVERS="Don't set me!!"

do_mount()
{
      $(echo -e "[sdh]\nVendor : CifsMount\nProduct : $FR_NAME\n\
Serial : Q80VQLFH\nDevpath : 8\nLun : 0\nMountDir : $DEST_DIR\nFileSystem : vfat\n" >> /dtv/usb/log)

   for i in $S_MOUNTS ; do
      M_POINT="$DEST_DIR/$1/$(echo -n $i | sed -e "s/\\\$/_/g")"
      mkdir -p "$M_POINT"
      if [ `cat /proc/mounts | grep -c "$M_POINT"` -lt "1" ] ; then   
         mount -o "${M_OPTS}" -t cifs "//$1/$i" "$M_POINT"
      else
         echo "$M_POINT is mounted!"
      fi

   done
}

get_shares()
{
   echo -n "Search Shares on: "
   for i in $SERVERS ; do
      S_MOUNTS=$(smbclient -s "$SYSROOT/etc/smb.conf" -U ${USER}%${PASSWD} \
      -g -L $i | grep "Disk|" | grep -v "\\$" | grep -v " Service" | cut -d "|" -f2)   
   [ -n "$S_MOUNTS" ] && do_mount $i
   done
}

get_servers()
{
   if [ -z "$SERVER" ] ; then
      SERVERS=$(cat /proc/net/arp | grep -v "IP address" | cut -d " " -f1)
   else
      SERVERS=$SERVER
   fi
}

case $1 in
   start)
   get_servers
   get_shares
   ;;
   stop)
   # may can fail if device access the mount from content library
   for i in $(cat /proc/mounts | grep cifs | cut -d " " -f2) ; do
      umount $i
   done
   ;;
   status)
   ;;
   *)
   echo "Usage: $0 {start|stop}" 1>&2
   exit 0
   ;;
esac

So to add a smb share i had to enter username ,password and ip of the smb share

The problem is that i cannot find username and password for the samba server anywhere in the forum

Please someone help



March 24, 2010, 01:46:41 PM
Reply #1

choekstr

  • Sr. Member

  • Offline
  • ****

  • 269
Try to comment out these two lines and see if it can connect:
Code: [Select]
[ -z $USER ] && exit 1
[ -z $PASSWD ] && exit 1

Since we have set in the WD smb2.conf:
guest ok        = yes
It will allow access without a password. 

if that doesn't work I would take the next step and comment out this line:
Code: [Select]
M_OPTS="$PERM,user=${USER},password=${PASSWD}"
--
Chris