VectorLinux
September 01, 2014, 08:21:57 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: samba fails to start at boot, probably due to internet not started  (Read 2703 times)
ted_chou12
Member
*
Posts: 31



« on: September 14, 2013, 11:59:30 pm »

I am not getting samba to successfully start at boot, it always fails (in red). Although I am able to get samba restart successfully though. The restart samba code was added in /etc/rc.d/rc.local:
Code:
#samba restart
/etc/init.d/samba restart
The boot orders are:
Code:
ted:$ ls /etc/rc.d/rc3.d
K40cron@            K6transmission-daemon@  S51sshd@
K45samba@           K76firewall@            S70cron@
K48sshd@            K8gpm@                  S85samba@
K49inetd@           S23firewall@            S91gpm@
K4logmein-hamachi@  S30portmap@             S93transmission-daemon@
K60cups@            S39cups@                S94logmein-hamachi@
K69portmap@         S50inetd@
server:/~
ted:$ ls /etc/rc.d/rc4.d
K40cron@            K6transmission-daemon@  S51sshd@
K45samba@           K76firewall@            S70cron@
K48sshd@            K8gpm@                  S85samba@
K49inetd@           S23firewall@            S91gpm@
K4logmein-hamachi@  S30portmap@             S93transmission-daemon@
K60cups@            S39cups@                S94logmein-hamachi@
K69portmap@         S50inetd@
Here is a clip Ive filmed, a bit shaky.
http://www.youtube.com/watch?v=F67H_jJSYXQ
Thanks,
Ted
« Last Edit: September 15, 2013, 12:01:03 am by ted_chou12 » Logged
kolaloka
Member
*
Posts: 15


« Reply #1 on: September 15, 2013, 12:24:14 pm »

That is weird, I do not think working internet should influence the start of samba, can you look into the log files?

cat /var/log/log.smbd
cat /var/log/samba/log.nmbd

and may be also

cat /var/log/syslog |grep smb

and you can see some error that would possibly lead you to the solution (and may confirm your "missing network theory")

My personal non-geeky guess would be that a stalled pid file after a restart prevents the daemon from starting, now the question is why? Btw, do you use specific locale?
Logged
ted_chou12
Member
*
Posts: 31



« Reply #2 on: September 15, 2013, 12:34:47 pm »

Sorry, I forgot to post it, its here:
Code:

server:/~
ted:$ cat /var/log/syslog |grep smb
Sep 15 19:41:12 server smbd[2868]: [2013/09/15 19:41:12.519493,  0] param/loadparm.c:3154(lp_do_parameter)
Sep 15 19:41:12 server smbd[2868]:   Global parameter guest account found in service section!
Sep 15 19:41:13 server smbd[2869]: [2013/09/15 19:41:13.395535,  0] param/loadparm.c:3154(lp_do_parameter)
Sep 15 19:41:13 server smbd[2869]:   Global parameter guest account found in service section!
Sep 15 20:10:30 server smbd[24564]: [2013/09/15 20:10:30.332948,  0] param/loadparm.c:3154(lp_do_parameter)
Sep 15 20:10:30 server smbd[24564]:   Global parameter guest account found in service section!
Sep 15 20:15:36 server smbd[3875]: [2013/09/15 20:15:36.188112,  0] param/loadparm.c:3154(lp_do_parameter)
Sep 15 20:15:36 server smbd[3875]:   Global parameter guest account found in service section!
Sep 15 20:15:37 server smbd[3876]: [2013/09/15 20:15:37.267282,  0] param/loadparm.c:3154(lp_do_parameter)
Sep 15 20:15:37 server smbd[3876]:   Global parameter guest account found in service section!
Sep 15 20:17:06 server smbd[3913]: [2013/09/15 20:17:06.441313,  0] param/loadparm.c:3154(lp_do_parameter)
Sep 15 20:17:06 server smbd[3913]:   Global parameter guest account found in service section!
Sep 15 22:45:11 server smbd[10754]: [2013/09/15 22:45:11.246430,  0] param/loadparm.c:3154(lp_do_parameter)
Sep 15 22:45:11 server smbd[10754]:   Global parameter guest account found in service section!
Sep 15 22:45:12 server smbd[10755]: [2013/09/15 22:45:12.292898,  0] param/loadparm.c:3154(lp_do_parameter)
Sep 15 22:45:12 server smbd[10755]:   Global parameter guest account found in service section!
Sep 15 22:45:14 server smbd[10758]: [2013/09/15 22:45:14.904738,  0] param/loadparm.c:3154(lp_do_parameter)
Sep 15 22:45:14 server smbd[10758]:   Global parameter guest account found in service section!
Sep 15 23:15:33 server smbd[11637]: [2013/09/15 23:15:33.615389,  0] param/loadparm.c:3154(lp_do_parameter)
Sep 15 23:15:33 server smbd[11637]:   Global parameter guest account found in service section!
Sep 15 23:16:33 server smbd[11663]: [2013/09/15 23:16:33.177629,  0] param/loadparm.c:3154(lp_do_parameter)
Sep 15 23:16:33 server smbd[11663]:   Global parameter guest account found in service section!
Sep 16 01:51:44 server smbd[18492]: [2013/09/16 01:51:44.481494,  0] param/loadparm.c:3154(lp_do_parameter)
Sep 16 01:51:44 server smbd[18492]:   Global parameter guest account found in service section!
Sep 16 01:51:44 server smbd[18492]: [2013/09/16 01:51:44.550725,  0] param/loadparm.c:3154(lp_do_parameter)
Sep 16 01:51:44 server smbd[18492]:   Global parameter guest account found in service section!
Sep 16 01:51:45 server smbd[18492]: [2013/09/16 01:51:45.851775,  0] param/loadparm.c:3154(lp_do_parameter)
Sep 16 01:51:45 server smbd[18492]:   Global parameter guest account found in service section!
Sep 16 01:51:56 server smbd[18492]: [2013/09/16 01:51:56.573100,  0] param/loadparm.c:3154(lp_do_parameter)
Sep 16 01:51:56 server smbd[18492]:   Global parameter guest account found in service section!
Sep 16 01:51:56 server smbd[18492]: [2013/09/16 01:51:56.637311,  0] param/loadparm.c:3154(lp_do_parameter)
Sep 16 01:51:56 server smbd[18492]:   Global parameter guest account found in service section!
Sep 16 02:15:03 server smbd[2391]: [2013/09/16 02:15:03.659937,  0] ../lib/util/pidfile.c:153(pidfile_unlink)
Sep 16 02:15:03 server smbd[2391]:   Failed to delete pidfile /var/run/smbd.pid. Error was No such file or directory
Sep 16 04:56:42 server smbd[1993]: [2013/09/16 04:56:42.604811,  0] param/loadparm.c:3154(lp_do_parameter)
Sep 16 04:56:42 server smbd[1993]:   Global parameter guest account found in service section!
Sep 16 04:56:44 server smbd[2015]: [2013/09/16 04:56:44.050828,  0] printing/print_cups.c:151(cups_connect)
Sep 16 04:56:44 server smbd[2015]:   Unable to connect to CUPS server localhost:631 - Network is unreachable
Sep 16 04:56:44 server smbd[2014]: [2013/09/16 04:56:44.051398,  0] printing/print_cups.c:528(cups_async_callback)
Sep 16 04:56:44 server smbd[2014]:   failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
Sep 16 04:56:56 server smbd[1994]: [2013/09/16 04:56:56.352120,  0] ../lib/util/pidfile.c:153(pidfile_unlink)
Sep 16 04:56:56 server smbd[1994]:   Failed to delete pidfile /var/run/smbd.pid. Error was No such file or directory
Sep 16 04:56:58 server smbd[2378]: [2013/09/16 04:56:58.448744,  0] param/loadparm.c:3154(lp_do_parameter)
Sep 16 04:56:58 server smbd[2378]:   Global parameter guest account found in service section!
Sep 16 04:57:26 server smbd[2379]: [2013/09/16 04:57:26.481112,  0] ../lib/util/pidfile.c:153(pidfile_unlink)
Sep 16 04:57:26 server smbd[2379]:   Failed to delete pidfile /var/run/smbd.pid. Error was No such file or directory
Sep 16 04:58:51 server smbd[1987]: [2013/09/16 04:58:51.052340,  0] param/loadparm.c:3154(lp_do_parameter)
Sep 16 04:58:51 server smbd[1987]:   Global parameter guest account found in service section!
Sep 16 04:58:52 server smbd[2009]: [2013/09/16 04:58:52.506586,  0] printing/print_cups.c:151(cups_connect)
Sep 16 04:58:52 server smbd[2009]:   Unable to connect to CUPS server localhost:631 - Network is unreachable
Sep 16 04:58:52 server smbd[2008]: [2013/09/16 04:58:52.507163,  0] printing/print_cups.c:528(cups_async_callback)
Sep 16 04:58:52 server smbd[2008]:   failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
Sep 16 04:59:04 server smbd[1988]: [2013/09/16 04:59:04.079711,  0] ../lib/util/pidfile.c:153(pidfile_unlink)
Sep 16 04:59:04 server smbd[1988]:   Failed to delete pidfile /var/run/smbd.pid. Error was No such file or directory
Sep 16 04:59:06 server smbd[2371]: [2013/09/16 04:59:06.182221,  0] param/loadparm.c:3154(lp_do_parameter)
Sep 16 04:59:06 server smbd[2371]:   Global parameter guest account found in service section!
And the smb log is here:
Code:
Copyright Andrew Tridgell and the Samba Team 1992-2012
[2013/09/11 00:41:07, 0] nmbd/nmbd.c:57(terminate)
Got SIGTERM: going down...
[2013/09/11 00:49:08, 0] nmbd/nmbd.c:883(main)
nmbd version 4.0.0 started.
Copyright Andrew Tridgell and the Samba Team 1992-2012
[2013/09/11 00:49:08, 0] libsmb/nmblib.c:872(send_udp)
Packet send failed to 192.168.1.255(137) ERRNO=Network is unreachable
[2013/09/11 00:49:08, 0] nmbd/nmbd_packets.c:179(send_netbios_packet)
send_netbios_packet: send_packet() to IP 192.168.1.255 port 137 failed
[2013/09/11 00:49:08, 0] nmbd/nmbd_nameregister.c:522(register_name)
register_name: Failed to send packet trying to register name SERVER<20>
[2013/09/11 00:49:08, 0] libsmb/nmblib.c:872(send_udp)
Packet send failed to 192.168.1.255(137) ERRNO=Network is unreachable
[2013/09/11 00:49:08, 0] nmbd/nmbd_packets.c:179(send_netbios_packet)
send_netbios_packet: send_packet() to IP 192.168.1.255 port 137 failed
[2013/09/11 00:49:08, 0] nmbd/nmbd_nameregister.c:522(register_name)
register_name: Failed to send packet trying to register name SERVER<03>
[2013/09/11 00:49:08, 0] libsmb/nmblib.c:872(send_udp)
Packet send failed to 192.168.1.255(137) ERRNO=Network is unreachable
[2013/09/11 00:49:08, 0] nmbd/nmbd_packets.c:179(send_netbios_packet)
send_netbios_packet: send_packet() to IP 192.168.1.255 port 137 failed
[2013/09/11 00:49:08, 0] nmbd/nmbd_nameregister.c:522(register_name)
register_name: Failed to send packet trying to register name SERVER<00>
[2013/09/11 00:49:08, 0] libsmb/nmblib.c:872(send_udp)
Packet send failed to 192.168.1.255(137) ERRNO=Network is unreachable
[2013/09/11 00:49:08, 0] nmbd/nmbd_packets.c:179(send_netbios_packet)
send_netbios_packet: send_packet() to IP 192.168.1.255 port 137 failed
[2013/09/11 00:49:08, 0] nmbd/nmbd_nameregister.c:522(register_name)
register_name: Failed to send packet trying to register name WORKGROUP<00>
[2013/09/11 00:49:08, 0] libsmb/nmblib.c:872(send_udp)
Packet send failed to 192.168.1.255(137) ERRNO=Network is unreachable
[2013/09/11 00:49:08, 0] nmbd/nmbd_packets.c:179(send_netbios_packet)
send_netbios_packet: send_packet() to IP 192.168.1.255 port 137 failed
[2013/09/11 00:49:08, 0] nmbd/nmbd_nameregister.c:522(register_name)
register_name: Failed to send packet trying to register name WORKGROUP<1e>
[2013/09/11 00:49:08, 0] libsmb/nmblib.c:872(send_udp)
Packet send failed to 127.0.0.1(137) ERRNO=Network is unreachable
[2013/09/11 00:49:08, 0] nmbd/nmbd_packets.c:179(send_netbios_packet)
send_netbios_packet: send_packet() to IP 127.0.0.1 port 137 failed
[2013/09/11 00:49:08, 0] nmbd/nmbd_nameregister.c:344(multihomed_register_one)
multihomed_register_one: Failed to send packet trying to register name SERVER<20> IP 192.168.1.12
[2013/09/11 00:49:08, 0] libsmb/nmblib.c:872(send_udp)
Packet send failed to 127.0.0.1(137) ERRNO=Network is unreachable
[2013/09/11 00:49:08, 0] nmbd/nmbd_packets.c:179(send_netbios_packet)
send_netbios_packet: send_packet() to IP 127.0.0.1 port 137 failed
[2013/09/11 00:49:08, 0] nmbd/nmbd_nameregister.c:344(multihomed_register_one)
multihomed_register_one: Failed to send packet trying to register name SERVER<03> IP 192.168.1.12
[2013/09/11 00:49:08, 0] libsmb/nmblib.c:872(send_udp)
Packet send failed to 127.0.0.1(137) ERRNO=Network is unreachable
[2013/09/11 00:49:08, 0] nmbd/nmbd_packets.c:179(send_netbios_packet)
send_netbios_packet: send_packet() to IP 127.0.0.1 port 137 failed
[2013/09/11 00:49:08, 0] nmbd/nmbd_nameregister.c:344(multihomed_register_one)
multihomed_register_one: Failed to send packet trying to register name SERVER<00> IP 192.168.1.12
[2013/09/11 00:49:08, 0] libsmb/nmblib.c:872(send_udp)
Packet send failed to 127.0.0.1(137) ERRNO=Network is unreachable
[2013/09/11 00:49:08, 0] nmbd/nmbd_packets.c:179(send_netbios_packet)
send_netbios_packet: send_packet() to IP 127.0.0.1 port 137 failed
[2013/09/11 00:49:08, 0] nmbd/nmbd_nameregister.c:344(multihomed_register_one)
multihomed_register_one: Failed to send packet trying to register name WORKGROUP<00> IP 192.168.1.12
[2013/09/11 00:49:08, 0] libsmb/nmblib.c:872(send_udp)
Packet send failed to 127.0.0.1(137) ERRNO=Network is unreachable
[2013/09/11 00:49:08, 0] nmbd/nmbd_packets.c:179(send_netbios_packet)
send_netbios_packet: send_packet() to IP 127.0.0.1 port 137 failed
[2013/09/11 00:49:08, 0] nmbd/nmbd_nameregister.c:344(multihomed_register_one)
multihomed_register_one: Failed to send packet trying to register name WORKGROUP<1e> IP 192.168.1.12
[2013/09/11 00:51:02, 0] nmbd/nmbd.c:57(terminate)
Got SIGTERM: going down...
[2013/09/11 00:51:04, 0] nmbd/nmbd.c:883(main)
nmbd version 4.0.0 started.
Copyright Andrew Tridgell and the Samba Team 1992-2012
Logged
kolaloka
Member
*
Posts: 15


« Reply #3 on: September 15, 2013, 01:15:59 pm »

Ok, there seem to be two issues,

- the main point is that your samba server is probably configured as non-master. This is the issue of unresolved netbios queries. If you are a local master or a domain master, network connectivity should not matter. You will probably have those values set this way:
local master = no
domain master = no
Try to set ONE of those values as YES in your /etc/samba/smb.conf , and try it again
(if you dont have them, set them in the global section)

- then, according to the log, there is a mistake in your smb.conf file, you have one value definition in a wrong section, If you post /etc/samba/smb.conf I can help you fix that, but that is an additional issue, probably not essential to our problem.

I wonder if that helps...
Logged
bigpaws
Vectorian
****
Posts: 1847


« Reply #4 on: September 15, 2013, 04:16:50 pm »

From your video, SAmaba started successfully and then it stopped
before getting to run level 4.

Check to see that samba is started at run level 4. iirc it is
in vasm in services section.

Bigpaws
Logged
kolaloka
Member
*
Posts: 15


« Reply #5 on: September 15, 2013, 10:55:59 pm »

Hi Bigpaws,  the strange thing is when you look at Ted's listing of scripts in his post, there is :

Code:
ted:$ ls /etc/rc.d/rc4.d
K40cron@            K6transmission-daemon@  S51sshd@
K45samba@           K76firewall@            S70cron@
K48sshd@            K8gpm@                  S85samba@

Which means samba is set for starting in init 4.
Or does Vasm store config in a different way?
kolaloka
Logged
kolaloka
Member
*
Posts: 15


« Reply #6 on: September 15, 2013, 11:02:34 pm »

Ted, I have one more idea. Can you verify that samba is really not running when you boot? I watched the video two more times, and thought about what Bigpaws has written. This seems, like samba first fails, but then it starts.

So my question is, can you check in the following way just after boot?

Code:
$ ps ax |grep smb
Logged
ted_chou12
Member
*
Posts: 31



« Reply #7 on: September 16, 2013, 06:03:58 am »

Thanks for everyone's reply. Yes, I do have samba first failed to start (initiated by /etc/init.d/samba as rc4.d run level. But since it always fail to start, so I manually added samba restart to /etc/rc.d/rc.local to restart it. Yes, i understand kolaloka mentioned that since samba failed to start at the first place, why would it then be samba to successfully stop?
Here is the smb.conf (local master uncommented and set to yes):
Code:
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options (perhaps too
# many!) most of which are not shown in this example
#
# For a step to step guide on installing, configuring and using samba,
# read the Samba HOWTO Collection.
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command "testparm"
# to check that you have not made any basic syntactic errors.
#
#======================= Global Settings =====================================
[global]
   netbios name = SERVER
# workgroup = NT-Domain-Name or Workgroup-Name, eg: LINUX2
   workgroup = WORKGROUP

# server string is the equivalent of the NT Description field
   server string = SERVER

# Security mode. Defines in which mode Samba will operate. Possible
# values are share, user, server, domain and ads. Most people will want
# user level security. See the HOWTO Collection for details.
   security = user
   map to guest = Bad User

# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
   hosts allow = 192.168.

# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
   load printers = yes

# you may wish to override the location of the printcap file
;   printcap name = /etc/printcap
   printcap name = cups

# on SystemV system setting printcap name to lpstat should allow
# you to automatically obtain a printer list from the SystemV spool
# system
;   printcap name = lpstat

# It should not be necessary to specify the print system type unless
# it is non-standard. Currently supported print systems include:
# bsd, cups, sysv, plp, lprng, aix, hpux, qnx
   printing = cups

# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
  guest only = yes
  guest account = ted

# this tells Samba to use a separate log file for each machine
# that connects
   log file = /var/log/samba/sambaserver.log

# Put a capping on the size of the log files (in Kb).
   max log size = 50

# Use password server option only with security = server
# The argument list may include:
#   password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
# or to auto-locate the domain controller/s
#   password server = *
;   password server = <NT-Server-Name>

# Use the realm option only with security = ads
# Specifies the Active Directory realm the host is part of
;   realm = MY_REALM

# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
;   passdb backend = tdbsam

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting.
# Note: Consider carefully the location in the configuration file of
#       this line.  The included file is read at that point.
;   include = /usr/local/samba/lib/smb.conf.%m

# Most people will find that this option gives better performance.
# See the chapter 'Samba performance issues' in the Samba HOWTO Collection
# and the manual pages for details.
# You may want to add the following on a Linux system:
#         SO_RCVBUF=8192 SO_SNDBUF=8192

# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
   interfaces = eth0 192.168.1.12/24
   bind interfaces only = yes

# Browser Control Options:
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
   local master = yes

# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
;   os level = 33

# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
;   domain master = yes

# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
;   preferred master = yes

# Enable this if you want Samba to be a domain logon server for
# Windows95 workstations.
;   domain logons = yes

# if you enable domain logons then you may want a per-machine or
# per user logon script
# run a specific logon batch file per workstation (machine)
;   logon script = %m.bat
# run a specific logon batch file per username
;   logon script = %U.bat

# Where to store roving profiles (only for Win95 and WinNT)
#        %L substitutes for this servers netbios name, %U is username
#        You must uncomment the [Profiles] share below
;   logon path = \\%L\Profiles\%U

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
   wins support = yes

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
;   wins server = 192.168.1.12

# WINS Proxy - Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client, for this to work there must be
# at least one WINS Server on the network. The default is NO.
   wins proxy = yes

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The default is NO.
   dns proxy = no

# These scripts are used on a domain controller or stand-alone
# machine to add or delete corresponding unix accounts
;  add user script = /usr/sbin/useradd %u
;  add group script = /usr/sbin/groupadd %g
;  add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
;  delete user script = /usr/sbin/userdel %u
;  delete user from group script = /usr/sbin/deluser %u %g
;  delete group script = /usr/sbin/groupdel %g

browseable = yes
public = yes
name resolve order = wins hosts lmhosts
encrypt passwords = true
short preserve case = yes
preserve case = yes
available = yes
follow symlinks = yes
wide links = yes
unix extensions = no

#============================ Share Definitions ==============================

[main]
   comment = main
   path = /mnt/main
   writable = yes
   readonly = no

[linux]
   comment = tmp
   path = /mnt/linux
   writable = yes
   readonly = no

[removeable]
   comment = removeable
   path = /misc
   writable = yes
   readonly = no

[ted]
   comment = ted
   path = /home/ted
   writable = yes
   readonly = no

# NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
[printers]
   comment = All Printers
   path = /var/spool/samba
   guest ok = yes
   writable = yes
   printable = yes
   guest account = root
   create mode = 0700
   use client driver = yes
Let me do a restart on the system and film the results, I will post it on the next post.
Thanks,
Ted
Logged
ted_chou12
Member
*
Posts: 31



« Reply #8 on: September 16, 2013, 06:20:52 am »

Hi, I've filmed after I changed the local master and added ps aux to rc.local. But still fails.
https://www.youtube.com/watch?v=ZuBejEmdrGQ
Just posted, not sure if the video will be up soon.
Thanks,
Ted
Logged
bigpaws
Vectorian
****
Posts: 1847


« Reply #9 on: September 16, 2013, 06:33:30 am »

Samba did start successfully. It then stopped. It is right at the beginning
of the video just after the blur.

Your smb.conf has problems. Do you need samba?

Your config some questions:

# workgroup = NT-Domain-Name or Workgroup-Name, eg: LINUX2

Did you write the above?

Why is the guest account mapped to ted?

You shared /mnt did you reset the permissions on those directories?

You shared your /home/directory. Anyone who joins your network will be
able to browse, read, write and delete anything in your home.

Your printers are directed to be used as root. That should not be done either.

None of these problems above will stop samba from running. There is a command
that is being executed after iirc rc.M (usually where samba is started) that is
stopping the service.

I was not able to view your last video, permission denied from you tube.

Bigpaws




Logged
ted_chou12
Member
*
Posts: 31



« Reply #10 on: September 27, 2013, 08:56:24 pm »

Hi, this is rc.M
Code:
#!/bin/sh
# rc.M
# This file is executed by init(8) when the system is being initialized
# for one of the "multi user" run levels (i.e. levels 2 through 5).
#
# Origin: this script is a mix of rc.S, rc.M and rc.inet2 from Slackware 10.0
#
# GNU GPL (c) Eko M. Budi, 2004
#         (c) Vector Linux, 2004, Uel Archuletta(bootsplash-text)-2006
#

# load functions
. /etc/rc.d/functions-display

PATH="/bin:/sbin:/usr/bin:/usr/sbin:$PATH"

rm /var/run/wicd/wicd.pid 2>/dev/null
# bootsplash
. /etc/rc.d/rc.bootsplash
# start animation to rc.S
animate startup

# Tell the viewers what's going to happen.
/etc/rc.d/rc.text 12 'Going multiuser'
# bootsplash
progressbar 60
echocl "rc.M ==> Going multiuser" yellow

## Turn ON system logger first
if [ -x /etc/rc.d/rc.syslog ]; then
 /etc/rc.d/rc.text 13 'Starting system logger'
# bootsplash
progressbar 65
  echonl "Starting system logger"
  /etc/rc.d/rc.syslog start > /dev/null 2>&1
  evaluate_retvall
fi

## Hardware initialization
echocl "Initializing hardware" cyan
for RC in modules pnp acpid serial parallel alsa cdrom samba messagebus hald consolekit; do
   if [ -x /etc/rc.d/rc.$RC ]; then
      /etc/rc.d/rc.text 14 "Setting up $RC" 
# bootsplash
progressbar 70
      echonl "Setting up $RC"
      /etc/rc.d/rc.$RC start > /dev/null 2>&1
      evaluate_retvall
   fi
done

for RC in apm; do
   if [ -x /etc/rc.d/rc.$RC ]; then
      /etc/rc.d/rc.text 15 "Setting up $RC"
# bootsplash
progressbar 75
      echonl "Setting up $RC"
      /etc/rc.d/rc.$RC start > /dev/null 2>&1
      evaluate_retvall
   fi
done

## Setup basic networking
## Note for slackers: this replaces rc.inet1
## On Vector rc.inet? = individual network device
/etc/rc.d/rc.text 16 ' Initializing Network'
# bootsplash
progressbar 80
echocl "Initializing network" cyan

## Start Paranoid firewall
if [ -x /etc/rc.d/rc.paranoid ]; then
  /etc/rc.d/rc.text 16 'Closing up the holes'
# bootsplash
progressbar 80
  echonl "Closing up the holes"
  /etc/rc.d/rc.paranoid start > /dev/null 2>&1
  evaluate_retvall
fi

## Set hostname & name server
   
if grep -qe " *(hostname|dns)=" /proc/cmdline; then
  if [ -x /etc/rc.d/rc.boot-name ]; then
    /etc/rc.d/rc.text 17 'Setting name from boot parameters'
# bootsplash
progressbar 85
    echonl "Setting name from boot parameters ..."
    /etc/rc.d/rc.boot-name start > /dev/null 2>&1
    evaluate_retvall
  fi
fi

## Local host is always ON for multiuser mode
## So I hardcoded it here
 /etc/rc.d/rc.text 17 'Setting up localhost'
# bootsplash
progressbar 85
echonl "Setting up localhost"
ifconfig lo 127.0.0.1 netmask 255.0.0.0 && \
  route add -net 127.0.0.0 netmask 255.0.0.0 lo > /dev/null 2>&1
evaluate_retvall
# davicom nic, the tulip and dfme are in conflict.
 davicom=`lspci | grep "Davicom Semiconductor, Inc. 21x4x DEC-Tulip"`
 if [ -n "$davicom" ]; then
   modprobe -r tulip
   modprobe -r dmfe
   sleep 1
   modprobe dmfe
 fi
## set other networks
  ## Start network using boot parameter or the default inet script
  ## Boot parameter is useful for UML, e.g. you may boot linux with
  ## linux inet1=eth0,dhcp
  ## linux inet1=eth0,{IP},{NETMASK},{GATEWAY}
 /etc/rc.d/rc.network & >dev/null
# for i in 0 1 2 3 4; do
# if [ -x /etc/rc.d/rc.inet$i ]; then
#   /etc/rc.d/rc.text 17 'Setting up basic network'
# bootsplash
#progressbar 85
#   echonl "Setting up basic network"
#   /etc/rc.d/rc.inet$i start
#   evaluate_retvall
# fi
# if [ -x /etc/rc.d/rc.eth$i ]; then
#   /etc/rc.d/rc.text 17 "Starting eth$i"
# bootsplash
#progressbar 85
#    echonl "Setting up basic network"
#    /etc/rc.d/rc.eth$i start
#    evaluate_retvall
# fi
#done

## routing, gateway and firewall
## rc.route = custom routing
## rc.firewall = custom firewall
## ip_forward = enable forwarding, if not in the firewall
for RC in route wicd; do
   if [ -x /etc/rc.d/rc.$RC ]; then
      /etc/rc.d/rc.text 18 "Setting up $RC"
# bootsplash
progressbar 90
      echonl "Setting up $RC"
      /etc/rc.d/rc.$RC start > /dev/null 2>&1
      evaluate_retvall
   fi
done

## at this point, we are ready to talk to The World...
## Here comes the Network file system
## Note for slackers: this is taken from rc.inet2

NFSTAB=`grep -E "^[^#].*[[:space:]].*[[:space:]](nfs|smbfs|ncpfs)[[:space:]]" /etc/fstab`
if [ "$NFSTAB" ]; then
  echocl "Mounting network file system" cyan
  if echo $NFSTAB | grep -qw nfs; then
    # Start the RPC portmapper if we find NFS volumes defined in /etc/fstab.
    if ! /usr/sbin/rpcinfo -p 1> /dev/null 2> /dev/null ; then
      if [ -x /sbin/rpc.portmap ]; then
        /etc/rc.d/rc.text 19 'Starting RPC portmapper'
# bootsplash
progressbar 95
        echonl "Starting RPC portmapper"
        /sbin/rpc.portmap > /dev/null 2&>1
evaluate_retvall
      fi
    fi
    /etc/rc.d/rc.text 19 'Mounting remote (NFS) file systems'
# bootsplash
progressbar 95
    echonl "Mounting remote (NFS) file systems ..."
    /sbin/mount -a -t nfs  > /dev/null 2&>1
    evaluate_retvall
  fi

  if echo $NFSTAB | grep -qE "[[:space:]](smbfs|ncpfs)[[:space:]]"; then
    /etc/rc.d/rc.text 19 'Mounting remote (SMB/NCP) file systems'
# bootsplash
progressbar 96
    echonl "Mounting remote (SMB/NCP) file systems"
    /sbin/mount -a -t smbfs,ncpfs > /dev/null 2&>1
    evaluate_retvall
  fi

  ## If the new mounted FS is /tmp or /var, reset the file system again
  mount | while read LINE; do
     fsystem=`echo $LINE | cut -f5 -d ' '`
     case $fsystem in nfs|smbfs|ncpfs)
       mpoint=`echo $LINE | cut -f3 -d ' '`
       case $mpoint in
         /tmp|/tmp/*)
    rm -f /tmp/.X*lock /tmp/core /tmp/menu* /tmp/reply* /tmp/vasm.log
    [ -r /tmp/hunt -o -r /tmp/hunt.stats ] && rm -f /tmp/hunt*
    mkdir -p /tmp/.ICE-unix /tmp/.X11-unix
    chmod 1777 /tmp /tmp/.ICE-unix /tmp/.X11-unix
    ;;
/var|/var/*)
    rm -f /var/run/utmp /var/run/*pid /var/run/lpd* /var/run/ppp* /var/run/usb/* \
    /var/lock/* /var/lock/usb/* /var/spool/uucp/LCK..*
    touch /var/run/utmp
    chown root.utmp /var/run/utmp
    chmod 664 /var/run/utmp
    /etc/rc.d/rc.syslog restart
    ;;
/usr|/usr/*|/opt|/opt/*)
    ## Updating libraries
    ldconfig
           ;;
       esac
     esac
  done
fi

## avahi initialization
echocl "Initializing hardware" cyan
for RC in avahidaemon avahidnsconfd; do
   if [ -x /etc/rc.d/rc.$RC ]; then
      /etc/rc.d/rc.text 14 "Setting up $RC"

# bootsplash
progressbar 96
      echonl "Setting up $RC"
      /etc/rc.d/rc.$RC start > /dev/null 2>&1
      evaluate_retvall
   fi
done

# Set console and X fonts
# setfont &> /dev/null
if [ -x /usr/X11R6/bin/fc-cache ]; then
    /etc/rc.d/rc.text 19 'Caching fonts'
# bootsplash
progressbar 97
    echonl "Caching fonts"
    /usr/X11R6/bin/fc-cache &> /dev/null
    evaluate_retvall
fi

###uncomment next 3 lines for nice console background
#for i in 1 2 3 4 5 6 ; do
# splash -s -u $i /etc/bootsplash/themes/current/config/verbose-`fbresolution 2>/dev/null`.cfg 2>/dev/null
#done

/etc/rc.d/rc.text 19 'Starting the System'
# bootsplash
progressbar 97

I am not sure where it is causing the problems,
Thansk,
Ted
Logged
bigpaws
Vectorian
****
Posts: 1847


« Reply #11 on: September 28, 2013, 01:32:25 pm »

There maybe several causes.

First it does start and then it stops.
Internet connection has nothing to do with it.

The questions that I asked may have something to do with it.

More than likely it is being started and stopped and not restarted
at the proper time.

Please respond with answers to the questions. Your post on
Linux Questions probably will not help you. Since the start
up parameters are not the same as Slackware.


Bigpaws

 
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!