macsat.com OpenWrt and ASUS WL Forum
January 08, 2009, 09:56:44 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?
Login with username, password and session length
News: Back to macsat.com
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Samba runs sec or two and then dying  (Read 1375 times)
0 Members and 1 Guest are viewing this topic.
Pawel
Newbie
*
Offline Offline

Posts: 2



View Profile WWW
« on: November 27, 2006, 23:13:58 PM »

Hello
 
I've managed to install samba d @ OpenWRT RC6 on my Asus WL-500gP, unfortunately w/o success. daemon works a few seconds and then die.
I found following in logs
Quote
cat /opt/log/messages|grep smb
Nov 27 22:43:48 (none) user.info : /opt/etc/samba/smb.conf: 1: workgroup: not found
Nov 27 22:43:48 (none) user.info : /opt/etc/samba/smb.conf: 2: server: not found
Nov 27 22:43:48 (none) user.info : /opt/etc/samba/smb.conf: 5: name: not found
Nov 27 22:43:48 (none) user.info : /opt/etc/samba/smb.conf: 6: log: not found
Nov 27 22:43:48 (none) user.info : /opt/etc/samba/smb.conf: 7: max: not found
Nov 27 22:43:48 (none) user.info : /opt/etc/samba/smb.conf: 12: guest: not found
Nov 27 22:43:48 (none) user.info : /opt/etc/samba/smb.conf: 16: [SambaShare]: not found
Nov 27 22:43:48 (none) user.info : /opt/etc/samba/smb.conf: 17: comment: not found
Nov 27 22:43:48 (none) user.info : /opt/etc/samba/smb.conf: 18: path: not found
Nov 27 22:43:48 (none) user.info : /opt/etc/samba/smb.conf: 19: browseable: not found
Nov 27 22:43:48 (none) user.info : /opt/etc/samba/smb.conf: 20: public: not found
Nov 27 22:43:48 (none) user.info : /opt/etc/samba/smb.conf: 21: guest: not found
Nov 27 22:43:48 (none) user.info : /opt/etc/samba/smb.conf: 22: writeable: not found
Samba is installed in /opt according to the Yours tutorial (THX:D)
samba init script is located in
/opt/etc/init.d/S50samba
Code:
#!/bin/sh

DEFAULT=/opt/etc/samba/smb.conf
RUN_D=/var/run/samba
NMBD_PID_F=$RUN_D/nmbd.pid
SMBD_PID_F=$RUN_D/smbd.pid
[ -f $DEFAULT ] && . $DEFAULT

case $1 in
 start)
  mkdir -p $RUN_D
  nmbd -D $NMBD_OPTIONS
  smbd -D $SMBD_OPTIONS
  ;;
 stop)
  [ -f $SMBD_PID_F ] && kill $(cat $SMBD_PID_F)
  [ -f $NMBD_PID_F ] && kill $(cat $NMBD_PID_F)
  ;;
 *)
  echo "usage: $0 (start|stop)"
  exit 1
esac

exit $?
and conf file is like that
Code:
cat /opt/etc/samba/smb.conf
workgroup = WORKGROUP
server string = OpenWRT Samba Server
wins support = no
dns proxy = no
name resolve order = lmhosts hosts bcast
log file = /opt/log/samba/log.%m
max log size = 1000
syslog = 0
security = share
encrypt passwords = true
obey pam restrictions = yes
guest account = nobody
passwd program = /usr/bin/passwd %u
load printers = no

[SambaShare]
comment = /opt/samba
path = /opt/samba
browseable = yes
public = yes
guest ok = yes
writeable = yes




/etc/init.d/S98optfiles
Code:
#!/bin/sh
#
# macsat.com /opt/etc/init.d/ script
#

i=0
while [ $i -le 30 ]
do
if [ -d /opt/etc/init.d ]
then
for i in /opt/etc/init.d/S*; do
$i start 2>&1
done | logger -s -p 6 -t '' &
break
fi

sleep 1
i=`expr $i + 1`
done

I simply cannot figure out where am i wrong  Huh, any suggestions are welcome  Grin
Thanks, Pabl0z
Logged

macsat
Administrator
Sr. Member
*****
Offline Offline

Posts: 1,104



View Profile
« Reply #1 on: November 28, 2006, 10:13:01 AM »


Code:
cd /etc

ln -s /opt/etc/samba/

Logged
Pawel
Newbie
*
Offline Offline

Posts: 2



View Profile WWW
« Reply #2 on: November 28, 2006, 19:53:53 PM »

I've tried and it didn't worked - besides all init scripts starting with "S" in /opt/etc/init.d/ are automagically executed thanks to script in /etc/init.d/S98optfiles
so this is obsolete i think?

In my desperation i've removed samba from opt and installed in root, still not running -  I'm giving up for now Angry. There has to be some flaw with it - I've been successfully installing samba in embedded linux (leaf bering) several times w/o complications  Regarding my n tries with samba sftpd becomes tempting solution.

Logged

macsat
Administrator
Sr. Member
*****
Offline Offline

Posts: 1,104



View Profile
« Reply #3 on: November 28, 2006, 21:33:13 PM »


The problem could also be that your router dosnt have a real hostname.

In RC6 it seems like that could be an issue.

Try to change your /etc/hosts to something like :
Code:
127.0.0.1 localhost OpenWrt
192.168.1.1 router router

If you LAN IP is 192.168.1.1 - if you use some other LAN ip, change accordingly.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

English Steel 1.6 © Saxon North Technologies
Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!
Page created in 0.119 seconds with 24 queries.