clsmoothe
asked on
NMB has stopped working
I cannot get nmb to start or restart on my RedHat 6.0, it used to work, the other day I had to reboot my system and when I issued the command /etc/rc.d/init.d/smb start; only smb started. I can see the Linux box in NetNeighborhood but I can't map a drive to it(Error:Network Path not found). I can still however run smbclient and transfer files between my NT box and the Linux box
did you check the /etc/rc.d/init.d/smb script if it really starts nmbd too?
Do you have /etc/rc.d/init.d/nmb ?
Do you have /etc/rc.d/init.d/nmb ?
ASKER
I do not see /etc/rc.d/init.d/nmb in that directory
Here is my script exactly as it appears in /etc/rc.d/init.d/smb. I transferred the file by using smbclient to move it from my Linux box to my NT Workstation.
#!/bin/sh
#
# chkconfig: 345 91 35
# description: Starts and stops the Samba smbd and nmbd daemons \
# used to provide SMB network services.
# Source function library.
.. /etc/rc.d/init.d/functions
# Source networking configuration.
.. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
# Check that smb.conf exists.
[ -f /etc/smb.conf ] || exit 0
# See how we were called.
case "$1" in
start)
echo -n "Starting SMB services: "
daemon smbd -D
daemon nmbd -D
echo
touch /var/lock/subsys/smb
;;
stop)
echo -n "Shutting down SMB services: "
killproc smbd
killproc nmbd
rm -f /var/lock/subsys/smb
echo ""
;;
status)
status smbd
status nmbd
;;
restart)
echo -n "Restarting SMB services: "
$0 stop
$0 start
echo "done."
;;
*)
echo "Usage: smb {start|stop|restart|status }"
exit 1
esac
Here is my script exactly as it appears in /etc/rc.d/init.d/smb. I transferred the file by using smbclient to move it from my Linux box to my NT Workstation.
#!/bin/sh
#
# chkconfig: 345 91 35
# description: Starts and stops the Samba smbd and nmbd daemons \
# used to provide SMB network services.
# Source function library.
.. /etc/rc.d/init.d/functions
# Source networking configuration.
.. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
# Check that smb.conf exists.
[ -f /etc/smb.conf ] || exit 0
# See how we were called.
case "$1" in
start)
echo -n "Starting SMB services: "
daemon smbd -D
daemon nmbd -D
echo
touch /var/lock/subsys/smb
;;
stop)
echo -n "Shutting down SMB services: "
killproc smbd
killproc nmbd
rm -f /var/lock/subsys/smb
echo ""
;;
status)
status smbd
status nmbd
;;
restart)
echo -n "Restarting SMB services: "
$0 stop
$0 start
echo "done."
;;
*)
echo "Usage: smb {start|stop|restart|status
exit 1
esac
/etc/rc.d/init.d/smb
try changing
# See how we were called.
case "$1" in
start)
echo -n "Starting SMB services: "
smbd -D
nmbd -D
echo
touch /var/lock/subsys/smb
******
remove the word daemon from daemon smbd -D and daemon nmbd -D
on my sys I can manually start both of them as root with
smbd -D
nmbd -D
try changing
# See how we were called.
case "$1" in
start)
echo -n "Starting SMB services: "
smbd -D
nmbd -D
echo
touch /var/lock/subsys/smb
******
remove the word daemon from daemon smbd -D and daemon nmbd -D
on my sys I can manually start both of them as root with
smbd -D
nmbd -D
what did you get with:
nmbd -D;echo "echo $? $status"; ps -ef|grep nmbd
nmbd -D;echo "echo $? $status"; ps -ef|grep nmbd
ASKER
I tried to start nmbd -D from the command line but nothing seemed to happen
I deleted the word "daemon" out of the smb script and now when I issue the command /etc/rc.d/init.d/smb restart it says:
Restarting SMB services: Shutting down SMB services [OK]
Starting SMB services:
done
Note that it no longer says [OK], it used to give output like this:
Starting SMB service [OK]
Starting NMB service [OK]
ahoffman: I am not sure how you would like me to use the command nmbd -D; echo "echo $? $status"; ps -ef | grep nmbd
should I try it inside the script?, because when I did it from the command line it didn't do anything. Sort of like I needed to input more info. This is what it looked like
[root@server root]$ nmbd -D; echo "echo $? $status"; ps -ef | grep nmbd
> (I did not know what to put here)
Do you guys want to see the log files in /var/log/samba/log.nmb and log.smb?
I deleted the word "daemon" out of the smb script and now when I issue the command /etc/rc.d/init.d/smb restart it says:
Restarting SMB services: Shutting down SMB services [OK]
Starting SMB services:
done
Note that it no longer says [OK], it used to give output like this:
Starting SMB service [OK]
Starting NMB service [OK]
ahoffman: I am not sure how you would like me to use the command nmbd -D; echo "echo $? $status"; ps -ef | grep nmbd
should I try it inside the script?, because when I did it from the command line it didn't do anything. Sort of like I needed to input more info. This is what it looked like
[root@server root]$ nmbd -D; echo "echo $? $status"; ps -ef | grep nmbd
> (I did not know what to put here)
Do you guys want to see the log files in /var/log/samba/log.nmb and log.smb?
ok, sounds that you're using sh (or similar), then try:
nmbd -D; echo "echo $?"; ps -ef | grep nmbd
if you get the > prompt, you probably missed a "
Log.smb would be a nice idea
nmbd -D; echo "echo $?"; ps -ef | grep nmbd
if you get the > prompt, you probably missed a "
Log.smb would be a nice idea
ASKER
root 860 1 0 Sep30 ? 00:00:40 nmbd -D
root 4545 4537 0 15:14 ttyp0 00:00:00 grep nmbd
that is the output, now it seems to be working, the server is back in NetNeighborhood. Do you have any idea what could have caused the problem? and why didn't the script /etc/rc.d...work?
root 4545 4537 0 15:14 ttyp0 00:00:00 grep nmbd
that is the output, now it seems to be working, the server is back in NetNeighborhood. Do you have any idea what could have caused the problem? and why didn't the script /etc/rc.d...work?
Your orginal script did not start the nmb only smb
(oops, my comment got lost somehow)
> .. any idea what could have caused the problem?
probably you have errors in smb.conf, please check the log files (from samba and system)
Or you may put a
sleep 10
right after the smbd call, so that nmbd shurely starts after smbd (if it works, you may reduce the sleep time).
Looking at your posted script I've seen:
.. /etc/rc.d/init.d/functions
# note the 2 dots at the beginning
IMHO, it should be:
. /etc/rc.d/init.d/functions
# only one dot
> .. any idea what could have caused the problem?
probably you have errors in smb.conf, please check the log files (from samba and system)
Or you may put a
sleep 10
right after the smbd call, so that nmbd shurely starts after smbd (if it works, you may reduce the sleep time).
Looking at your posted script I've seen:
.. /etc/rc.d/init.d/functions
# note the 2 dots at the beginning
IMHO, it should be:
. /etc/rc.d/init.d/functions
# only one dot
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, this seems to work fine
Hmm, confused about the solution
clsmoothe, did nmbd start after the changes on your PDC?
Or did this just solve the problem of name resolution?
clsmoothe, did nmbd start after the changes on your PDC?
Or did this just solve the problem of name resolution?
I just need it to stop e-mail notification
This question was awarded, but never cleared due to the JSP-500 errors of that time. It was "stuck" against userID -1 versus the intended expert whom you awarded. This corrects the problem and the expert will now receive these points; points verified.
Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them. If you are an EE Pro user, you can also choose Power Search to find all your open questions.
This is the Community Support link, if help is needed, along with the link to All Topics which reflects many TAs recently added.
https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
https://www.experts-exchange.com/jsp/zonesAll.jsp
In efforts to help all Members maintain their open questions, this is a reminder to click your Member Profile, expand your question history and find/update all your Open and Locked questions.
Thank you,
Moondancer
Moderator @ Experts Exchange
Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them. If you are an EE Pro user, you can also choose Power Search to find all your open questions.
This is the Community Support link, if help is needed, along with the link to All Topics which reflects many TAs recently added.
https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
https://www.experts-exchange.com/jsp/zonesAll.jsp
In efforts to help all Members maintain their open questions, this is a reminder to click your Member Profile, expand your question history and find/update all your Open and Locked questions.
Thank you,
Moondancer
Moderator @ Experts Exchange
ASKER