Fedora Linux Support Community & Resources Center
  #1  
Old 26th October 2011, 10:13 AM
toys19 Offline
Registered User
 
Join Date: Apr 2008
Posts: 94
linuxchrome
nmb not starting at boot

I'm using f15 and tryign to get samba working to share files forwards and backwards with my windows boxes. After boot samba does not seem to work so if I check smb status its running fine, but if I check nmb its says inactive?

Quote:
[root@localhost ~]# service nmb status
nmb.service - SYSV: Starts and stops the Samba smbd and nmbd daemons used to provide SMB network services.
Loaded: loaded (/etc/rc.d/init.d/nmb)
Active: inactive (dead)
CGroup: name=systemd:/system/nmb.service
So I can start it easily, and then my samba works..

Quote:
[root@localhost ~]# service nmb start
Starting nmb (via systemctl): [ OK ]
Now I am starting to get beyond my abilities, but I had a look in here /etc/rc.d/init.d/nmb as that location was indicated in the message above and the contents of the file are below? Doesn't this file tell fedora if it should start nmb on boot or not? There seems to be a command to start nmb and then one which stops it? (highlighted in bold by me) Does this make sense to anyone? (I'm way beyond my circle of knowledge here...)

Quote:
#!/bin/sh
#
# chkconfig: - 91 35
# description: Starts and stops the Samba smbd and nmbd daemons \
# used to provide SMB network services.
#
# pidfile: /var/run/samba/nmbd.pid
# config: /etc/samba/smb.conf


# Source function library.
if [ -f /etc/init.d/functions ] ; then
. /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ] ; then
. /etc/rc.d/init.d/functions
else
exit 1
fi

# Avoid using root's TMPDIR
unset TMPDIR

# Source networking configuration.
. /etc/sysconfig/network

if [ -f /etc/sysconfig/samba ]; then
. /etc/sysconfig/samba
fi

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 1

# Check that smb.conf exists.
[ -f /etc/samba/smb.conf ] || exit 6

RETVAL=0


start() {
KIND="NMB"
echo -n $"Starting $KIND services: "
daemon nmbd $NMBDOPTIONS
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/nmb || \
RETVAL=1
return $RETVAL
}

stop() {
KIND="NMB"
echo -n $"Shutting down $KIND services: "
killproc nmbd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/nmb
return $RETVAL
}

restart() {
stop
start
}

reload() {
echo -n $"Reloading smb.conf file: "
killproc nmbd -HUP
RETVAL=$?
echo
return $RETVAL
}

rhstatus() {
status -l nmb nmbd
return $?
}


# Allow status as non-root.
if [ "$1" = status ]; then
rhstatus
exit $?
fi

uid=`id | cut -d\( -f1 | cut -d= -f2`

# Check that we stop here for non-root users
[ $uid -ne 0 ] && exit 4


case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
reload
;;
status)
rhstatus
;;
condrestart)
[ -f /var/lock/subsys/nmb ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|status|condrestart}"
exit 2
esac

exit $?

Last edited by toys19; 26th October 2011 at 10:52 AM.
Reply With Quote
  #2  
Old 26th October 2011, 12:53 PM
smr54 Online
Registered User
 
Join Date: Jan 2010
Posts: 4,980
linuxopera
Re: nmb not starting at boot

Try


chkconfig nmb on


That's actually the old way but I haven't done the reading on systemd and that way still works. The chkconfig command used to list what is running at at start and do some other things--now, there is a different systemd syntax but all the chkconfig commands except --list should still work.


There's a systemd cheatsheet around somewhere, not sure where.
Reply With Quote
  #3  
Old 26th October 2011, 02:50 PM
bbfuller Offline
Registered User
 
Join Date: Jun 2005
Location: UK
Posts: 4,345
linuxopera
Re: nmb not starting at boot

Hello toys19

If you wish to do it using systemd commands they are:

Code:
systemctl enable nmb.service
systemctl enable smb.service
and

Code:
systemctl start nmb.service
systemctl start smb.service
but in F15 at least you'll see that it calls the chkconfig scripts.
Reply With Quote
  #4  
Old 26th October 2011, 03:27 PM
smr54 Online
Registered User
 
Join Date: Jan 2010
Posts: 4,980
linuxopera
Re: nmb not starting at boot

Ah sorry, I'm in F16.

Here's the cheatsheet

http://fedoraproject.org/wiki/SysVin...emd_Cheatsheet


Thanks bbfuller, for the correct syntax.
Reply With Quote
  #5  
Old 26th October 2011, 03:31 PM
toys19 Offline
Registered User
 
Join Date: Apr 2008
Posts: 94
linuxchrome
Re: nmb not starting at boot

ok thanks. I'm having samba issues still..
Reply With Quote
Reply

Tags
boot, nmb, starting

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
D-Bus not starting on boot MikeyCarter F16 Development 20 26th March 2011 02:17 PM
Starting anacron & then no boot samrat_rao Using Fedora 1 23rd December 2008 08:51 AM
Gaim Starting at Boot FC6 gotmonkey Using Fedora 2 8th February 2007 11:00 AM
GDM not starting on boot. Gonesolo Using Fedora 2 8th November 2006 05:28 PM
network not starting on boot stryderjzw Servers & Networking 27 16th April 2006 01:05 AM


Current GMT-time: 06:05 (Saturday, 25-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat