LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 02-16-2013, 09:48 PM   #1
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 421
Blog Entries: 28

Rep: Reputation: 2
samba doesn't start properly on boot up


Hi, recently I upgraded samba from 3.67 to 4.00, I am not sure why it doesn't start as it usually does in the past. Here is the syslog on startup:
Code:
Feb 17 11:38:40 server kernel: [    4.814794] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
Feb 17 11:38:40 server kernel: [    8.602683] i2c-core: driver [msp3400] using legacy suspend method
Feb 17 11:38:40 server kernel: [    8.602689] i2c-core: driver [msp3400] using legacy resume method
Feb 17 11:38:40 server kernel: [    8.694856] bttv0: audio absent, no audio device found!
Feb 17 11:38:40 server kernel: [    8.705530] i2c-core: driver [tuner] using legacy suspend method
Feb 17 11:38:40 server kernel: [    8.705537] i2c-core: driver [tuner] using legacy resume method
Feb 17 11:38:45 server smbd[1967]: [2013/02/17 11:38:45.961509,  0] param/loadparm.c:3154(lp_do_parameter) 
Feb 17 11:38:45 server smbd[1967]:   Global parameter guest account found in service section! 
Feb 17 11:38:47 server smbd[1988]: [2013/02/17 11:38:47.429649,  0] printing/print_cups.c:151(cups_connect) 
Feb 17 11:38:47 server smbd[1988]:   Unable to connect to CUPS server localhost:631 - Network is unreachable 
Feb 17 11:38:47 server smbd[1987]: [2013/02/17 11:38:47.430262,  0] printing/print_cups.c:528(cups_async_callback) 
Feb 17 11:38:47 server smbd[1987]:   failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL 
Feb 17 11:38:48 server avahi-daemon[2103]: WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
Feb 17 11:38:52 server rpc.mountd[2186]: Kernel does not have pseudo root support.
Feb 17 11:38:52 server rpc.mountd[2186]: NFS v4 mounts will be disabled unless fsid=0
Feb 17 11:38:52 server rpc.mountd[2186]: is specfied in /etc/exports file.
Feb 17 11:38:52 server kernel: [   26.769467] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
Feb 17 11:38:52 server kernel: [   26.769508] NFSD: unable to find recovery directory /var/lib/nfs/v4recovery
I believe this is the directory for initiation procedures, my rc3.d looks exactly the same anyways. The original order for samba for S was 52, I delayed it as far as possible:
Code:
ted:$ ls /etc/rc.d/rc4.d
K40cron@   K69portmap@             S30portmap@  S91gpm@
K45samba@  K6transmission-daemon@  S39cups@     S92samba@
K48sshd@   K76firewall@            S50inetd@    S93transmission-daemon@
K49inetd@  K8gpm@                  S51sshd@
K60cups@   S23firewall@            S70cron@
my samba script has stayed the same:
Code:
ted:$ cat /etc/init.d/samba
#!/bin/sh
# description: SAMBA daemon
#
# GNU GPL (c) Eko M. Budi, 2004
#         (c) Vector Linux. 2004

# Include the functions declared in the /etc/rc.d/functions file
source /etc/rc.d/functions

#server name & description
SMBSERVER="SAMBA Network File/Printer sharing server"
NMBSERVER="SAMBA Netbios name server"

SMBD=/usr/sbin/smbd
NMBD=/usr/sbin/nmbd

case "$1" in
        start)
                echon "Starting $SMBSERVER....."
                loadproc $SMBD -D
                echon "Starting $NMBSERVER....."
                loadproc $NMBD -D
                ;;
        stop)
                echon "Stopping $NMBSERVER....."
                killproc $NMBD
                echon "Stopping $SMBSERVER....."
                killproc $SMBD
                ;;
        reload)
                echon "Reloading $SMBSERVER....."
                reloadproc $SMBD
                echon "Reloading $NMBSERVER....."
                reloadproc $NMBD
                ;;
        restart)
                $0 stop
                /bin/sleep 2
                $0 start
                ;;
        *)
                echo "Usage: $0 {start|stop|reload|restart}"
                exit 1
        ;;
esac
server:/~
Here is my smb.conf:
Code:
ted:$ testparm /etc/samba/smb.conf
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[main]"
Processing section "[linux]"
Processing section "[removeable]"
Processing section "[printers]"
Global parameter guest account found in service section!
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
        server string = SERVER
        interfaces = eth0, 192.168.1.12/24
        bind interfaces only = Yes
        map to guest = Bad User
        guest account = ted
        log file = /var/log/samba/sambaserver.log
        max log size = 50
        name resolve order = wins, hosts, lmhosts
        printcap name = cups
        dns proxy = No
        wins proxy = Yes
        wins support = Yes
        idmap config * : backend = tdb
        force user = ted
        force group = ted
        guest only = Yes
        guest ok = Yes
        hosts allow = 192.168.

[main]
        comment = main
        path = /mnt/main
        read only = No

[linux]
        comment = tmp
        path = /mnt/linux
        read only = No

[removeable]
        comment = removeable
        path = /misc
        read only = No

[printers]
        comment = All Printers
        path = /var/spool/samba
        read only = No
        create mask = 0700
        printable = Yes
        print ok = Yes
        use client driver = Yes
        browseable = No
Samba would appear as if it was started, but when I access it from another machine, the shared directories arent available.
Thanks,
Ted

Last edited by ted_chou12; 02-16-2013 at 09:50 PM.
 
Old 02-18-2013, 06:58 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,923

Rep: Reputation: 747Reputation: 747Reputation: 747Reputation: 747Reputation: 747Reputation: 747Reputation: 747
These declarations below are not allowed in the global section as indicated by the error message "Global parameter guest account found in service section!" It also it appears that cups is not starting.
Quote:
force user = ted
force group = ted
guest only = Yes
guest ok = Yes
Does the output of ps indicate the smbd and nmbd daemons are running? Also the following command will show if samba is running as well as the viewable shares. Just press return when it asks for a password.
smbclient -L localhost
 
1 members found this post helpful.
Old 02-18-2013, 08:55 AM   #3
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 421
Blog Entries: 28

Original Poster
Rep: Reputation: 2
Thanks michaelk, I did realize that cups did not start before samba. As I added this code to my init.d/samba start script:
Code:
 timeout=20
                while ! /sbin/ifconfig | grep -q '192.168.' ; do
                       sleep 1
                       timeout=$(($timeout - 1))
                       if [ $timeout -lt 1 ] ; then
                             echon "timeout waiting for network"
                             exit
	      fi
                done
And I saw that CUPS printers are not properly shared. But a restart of samba after boot manually did help to solve all the problems. (This probably means that samba started before cups at boot)I believe that adding samba restart to rc.local would probably solve the problem. But I hope to solve this directly as possible.
Code:
ted:$ smbclient -L localhost
Enter ted's password:
Connection to localhost failed (Error NT_STATUS_CONNECTION_REFUSED)
server://etc/init.d
And this is right after booting, samba not restarted:
Code:
root      1010  0.0  0.0      0     0 ?        S    05:41   0:00 [cciss_scan]
root      1028  0.0  0.0      0     0 ?        S<   05:41   0:00 [iscsi_eh]
root      1035  0.0  0.0      0     0 ?        S<   05:41   0:00 [fc_exch_workq]
root      1036  0.0  0.0      0     0 ?        S<   05:41   0:00 [fc_rport_eq]
root      1037  0.0  0.0      0     0 ?        S<   05:41   0:00 [fcoethread/0]
root      1040  0.0  0.0      0     0 ?        S<   05:41   0:00 [fnic_event_wq]
root      1128  0.0  0.0      0     0 ?        S    05:41   0:00 [scsi_eh_2]
root      1131  0.0  0.0      0     0 ?        S    05:41   0:00 [scsi_eh_3]
root      1134  0.0  0.0      0     0 ?        S    05:41   0:00 [kworker/u:2]
root      1135  0.0  0.0      0     0 ?        S    05:41   0:00 [kworker/u:3]
root      1142  0.0  0.0      0     0 ?        S    05:41   0:00 [scsi_eh_4]
root      1145  0.0  0.0      0     0 ?        S    05:41   0:00 [scsi_eh_5]
root      1148  0.0  0.0      0     0 ?        S    05:41   0:00 [kworker/u:4]
root      1149  0.0  0.0      0     0 ?        S    05:41   0:00 [kworker/u:5]
root      1207  0.0  0.0      0     0 ?        S<   05:41   0:00 [exec-osm]
root      1213  0.0  0.0      0     0 ?        S<   05:41   0:00 [block-osm]
root      1273  0.0  0.0      0     0 ?        S    05:41   0:00 [kworker/0:2]
root      1277  0.0  0.0      0     0 ?        S    05:41   0:00 [kworker/u:6]
root      1303  0.0  0.0      0     0 ?        S<   05:41   0:00 [kpsmoused]
root      1333  0.0  0.0      0     0 ?        S    05:41   0:00 [scsi_eh_6]
root      1334  0.0  0.0      0     0 ?        S    05:41   0:00 [usb-storage]
root      1343  0.0  0.0      0     0 ?        S    05:41   0:00 [kjournald]
root      1424  0.0  0.0      0     0 ?        S    05:41   0:00 [flush-8:0]
root      1444  0.3  0.1   2904  1352 ?        S<s  05:41   0:00 /sbin/udevd --d
root      1768  0.0  0.0      0     0 ?        S    05:41   0:00 [kjournald]
root      1773  0.1  0.1   2980  1152 ?        Ss   05:41   0:00 /sbin/mount.ntf
root      1848  0.0  0.0   1864   576 ?        Ss   05:41   0:00 /usr/sbin/syslo
root      1851  0.0  0.0   1812   376 ?        Ss   05:41   0:00 /usr/sbin/klogd
root      1923  0.0  0.0   1820   608 ?        Ss   05:41   0:00 /usr/sbin/acpid
root      1974  0.0  0.4  16884  3732 ?        Ss   05:41   0:00 /usr/sbin/smbd
root      1976  0.0  0.2  10660  2128 ?        Ss   05:41   0:00 /usr/sbin/nmbd
root      1993  0.0  0.2  16884  1536 ?        S    05:41   0:00 /usr/sbin/smbd
81        1998  0.0  0.0   2640   640 ?        Ss   05:41   0:00 /usr/bin/dbus-d
avahi     2110  0.0  0.1   3140  1436 ?        S    05:41   0:00 avahi-daemon: r
avahi     2111  0.0  0.0   2996   408 ?        S    05:41   0:00 avahi-daemon: c
root      2134  0.0  0.0   1980   508 ?        S    05:41   0:00 /usr/sbin/avahi
root      2150  0.3  0.9  20632  6848 ?        S    05:41   0:00 /usr/bin/python
root      2155  0.7  1.0  11344  7636 ?        S    05:41   0:00 /usr/bin/python
bin       2190  0.0  0.0   1908   500 ?        Ss   05:41   0:00 /sbin/rpc.portm
root      2194  0.0  0.0   2248   396 ?        Ss   05:41   0:00 /usr/sbin/rpc.m
root      2200  0.0  0.0      0     0 ?        S    05:41   0:00 [lockd]
root      2201  0.0  0.0      0     0 ?        S<   05:41   0:00 [nfsd4]
root      2202  0.0  0.0      0     0 ?        S<   05:41   0:00 [nfsd4_callbac]
root      2203  0.0  0.0      0     0 ?        S    05:41   0:00 [nfsd]
root      2212  0.0  0.3   6244  2876 ?        Ss   05:41   0:00 /usr/sbin/cupsd
root      2221  0.0  0.0   1852   536 ?        Ss   05:41   0:00 /usr/sbin/inetd
root      2226  0.0  0.1   4152  1020 ?        Ss   05:41   0:00 /usr/sbin/sshd
root      2231  0.0  0.0   2028   692 ?        Ss   05:41   0:00 /usr/sbin/crond
root      2241  0.0  0.0   2032   368 ?        Ss   05:41   0:00 /usr/sbin/gpm -
root      2246  3.8  1.2  36860  9168 ?        Ssl  05:41   0:02 /usr/bin/transm
root      2267  0.0  0.2   6980  1928 ?        Ss   05:41   0:00 sendmail: accep
smmsp     2272  0.0  0.2   6624  1660 ?        Ss   05:41   0:00 sendmail: Queue
root      2281  0.0  0.1  21960  1260 ?        Ssl  05:41   0:00 automount
root      2301  0.0  0.0   2004   316 ?        Ss   05:41   0:00 dhcpcd -t 10 -h
root      2310  0.0  0.1   4212   908 ?        S    05:41   0:00 /usr/sbin/light
root      2312  0.2  1.1  61496  8408 ?        Ss   05:41   0:00 /usr/bin/php-cg
root      2313  0.0  0.3   4924  2728 ?        Ss   05:41   0:00 fetchmail -f /r
root      2315  0.2  1.1  61496  8404 ?        Ss   05:41   0:00 /usr/bin/php-cg
root      2316  0.2  1.1  61496  8408 ?        Ss   05:41   0:00 /usr/bin/php-cg
root      2317  0.2  1.1  61496  8408 ?        Ss   05:41   0:00 /usr/bin/php-cg
root      2318  0.1  0.2  20852  2048 ?        Ssl  05:41   0:00 minidlna
root      2335  0.0  0.0   1800   440 tty1     Ss+  05:41   0:00 /sbin/mingetty
root      2336  0.0  0.0   1800   440 tty2     Ss+  05:41   0:00 /sbin/mingetty
root      2337  0.0  0.0   1800   436 tty3     Ss+  05:41   0:00 /sbin/mingetty
root      2338  0.0  0.0   1800   440 tty4     Ss+  05:41   0:00 /sbin/mingetty
root      2339  0.0  0.0   1800   440 tty5     Ss+  05:41   0:00 /sbin/mingetty
root      2340  0.0  0.0   1800   440 tty6     Ss+  05:41   0:00 /sbin/mingetty
root      2341  0.0  0.1   2900  1128 ?        S<   05:41   0:00 /sbin/udevd --d
root      2342  0.0  0.1   2900  1268 ?        S<   05:41   0:00 /sbin/udevd --d
root      2350  0.0  0.2   6712  2080 ?        Ss   05:42   0:00 sshd: ted [priv
ted       2353  0.0  0.1   6864  1436 ?        S    05:42   0:00 sshd: ted@notty
ted       2354  0.0  0.1   3768  1212 ?        Ss   05:42   0:00 /usr/libexec/sf
root      2355  0.0  0.4  61496  3176 ?        S    05:42   0:00 /usr/bin/php-cg
root      2356  0.0  0.4  61496  3176 ?        S    05:42   0:00 /usr/bin/php-cg
root      2357  0.0  0.4  61496  3176 ?        S    05:42   0:00 /usr/bin/php-cg
root      2358  0.0  0.4  61496  3172 ?        S    05:42   0:00 /usr/bin/php-cg
root      2432  0.0  0.0      0     0 ?        S    05:42   0:00 [flush-8:16]
root      2496  0.1  0.2   6712  2116 ?        Ss   05:42   0:00 sshd: ted [priv
ted       2529  0.1  0.1   6712  1288 ?        S    05:42   0:00 sshd: ted@pts/0
ted       2530  0.2  0.2   4848  1896 pts/0    Ss   05:42   0:00 -bash
ted       2607  0.0  0.1   2848  1104 pts/0    R+   05:42   0:00 ps aux
Thanks,
Ted

Last edited by ted_chou12; 02-18-2013 at 03:44 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Debian 5.0 doesn't boot properly on HP Laptop Shashank_Rashpa Linux - Newbie 7 08-29-2010 07:22 AM
Program doesn't run properly on boot KenPem Programming 8 12-27-2007 04:42 PM
Xfce4 suddenly doesn't start properly trevelluk Linux - Software 1 10-23-2005 12:50 PM
System won't boot properly knoppix doesn't initialize properly rodewan Linux - Software 0 01-23-2005 03:35 PM
Installed the wrong SAMBA packages.Now samba doesn't start Terrence Hinds Linux - Networking 3 10-11-2004 03:40 AM


All times are GMT -5. The time now is 03:36 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration