I am running Samba 2.2.7 on a Red Hat 7.3 box. 1. I have some windows xp computer on my network. With the following settings the Samab can not able to win the election. local master = No preferred master = Yes domain master = No changing to local master = Yes It can. How these settings should work? 2. When samba is running (ps -ax) 1828 ? S 0:00 smbd -D 1833 ? S 0:00 nmbd -D 1834 ? S 0:00 nmbd -D When I trying to restart/stop smb I receive the following error message Shutting down SMB services: [ OK ] Shutting down NMB services: /etc/init.d/smb: kill: (1834) - No such process [ OK ] After this (ps -ax) I still have a running nmbd process 1897 ? S 0:00 nmbd -D What's wrong? How can I fix it? Any help would be appreciated. Thanx Zoltan Sutto
Solaris 2.9, Sun Forte C 6.2, UltraSparc (64 bit) environment below Using FLAGS = -O -I./popt -Iinclude -I./include -I./ubiqx -I./smbwrapper -I/usr/local//include -I/usr/local//include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DLOGFILEBASE="/usr/local/samba/var" -DCONFIGFILE="/usr/local/samba/lib/smb.conf" -DLMHOSTSFILE="/usr/local/samba/lib/lmhosts" -DSWATDIR="/usr/local/samba/swat" -DSBINDIR="/usr/local/samba/bin" -DLOCKDIR="/usr/local/samba/var/locks" -DCODEPAGEDIR="/usr/local/samba/lib/codepages" -DDRIVERFILE="/usr/local/samba/lib/printers.def" -DBINDIR="/usr/local/samba/bin" -DPIDDIR="/usr/local/samba/var/locks" -DLIBDIR="/usr/local/samba/lib" -DHAVE_INCLUDES_H -DPASSWD_PROGRAM="/usr/bin/passwd" -DSMB_PASSWD_FILE="/usr/local/samba/private/smbpasswd" -DTDB_PASSWD_FILE="/usr/local/samba/private/smbpasswd.tdb" Using FLAGS32 = -O -I./popt -Iinclude -I./include -I./ubiqx -I./smbwrapper -I/usr/local//include -I/usr/local//include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DLOGFILEBASE="/usr/local/samba/var" -DCONFIGFILE="/usr/local/samba/lib/smb.conf" -DLMHOSTSFILE="/usr/local/samba/lib/lmhosts" -DSWATDIR="/usr/local/samba/swat" -DSBINDIR="/usr/local/samba/bin" -DLOCKDIR="/usr/local/samba/var/locks" -DCODEPAGEDIR="/usr/local/samba/lib/codepages" -DDRIVERFILE="/usr/local/samba/lib/printers.def" -DBINDIR="/usr/local/samba/bin" -DPIDDIR="/usr/local/samba/var/locks" -DLIBDIR="/usr/local/samba/lib" -DHAVE_INCLUDES_H -DPASSWD_PROGRAM="/usr/bin/passwd" -DSMB_PASSWD_FILE="/usr/local/samba/private/smbpasswd" -DTDB_PASSWD_FILE="/usr/local/samba/private/smbpasswd.tdb" Using LIBS = -lsec -lgen -lsocket -lnsl -ldl Errors below: - Compiling rpc_parse/parse_spoolss.c "rpc_parse/parse_spoolss.c", line 1209: warning: assignment type mismatch: pointer to unsigned char "=" pointer to char "rpc_parse/parse_spoolss.c", line 6666: warning: assignment type mismatch: pointer to unsigned char "=" pointer to char Compiling passdb/secrets.c "passdb/secrets.c", line 291: warning: argument #2 is incompatible with prototype: prototype: pointer to char : "include/proto.h", line 5018 argument : pointer to const char Compiling lib/util.c "lib/util.c", line 62: warning: initializer does not fit or is out of range: -1 Compiling tdb/tdbutil.c "tdb/tdbutil.c", line 46: warning: argument #1 is incompatible with prototype: prototype: pointer to int : "include/../tdb/tdb.h", line 130 argument : pointer to volatile int Compiling smbd/quotas.c "smbd/quotas.c", line 404: warning: argument #2 is incompatible with prototype: prototype: pointer to int : "/usr/include/rpc/xdr.h", line 386 argument : pointer to unsigned int "smbd/quotas.c", line 408: warning: argument #2 is incompatible with prototype: prototype: pointer to int : "/usr/include/rpc/xdr.h", line 386 argument : pointer to unsigned int "smbd/quotas.c", line 412: warning: argument #2 is incompatible with prototype: prototype: pointer to int : "/usr/include/rpc/xdr.h", line 386 argument : pointer to unsigned int Compiling client/client.c "client/client.c", line 678: warning: argument #4 is incompatible with prototype: prototype: pointer to unsigned long long : "include/proto.h", line 1191 argument : pointer to unsigned int Compiling libsmb/libsmbclient.c with -KPIC "libsmb/libsmbclient.c", line 1118: warning: argument #4 is incompatible with prototype: prototype: pointer to unsigned long long : "include/proto.h", line 1191 argument : pointer to unsigned int "libsmb/libsmbclient.c", line 1356: warning: argument #4 is incompatible with prototype: prototype: pointer to unsigned long long : "include/proto.h", line 1191 argument : pointer to unsigned int Compiling lib/util.c with -KPIC "lib/util.c", line 62: warning: initializer does not fit or is out of range: -1 Compiling tdb/tdbutil.c with -KPIC "tdb/tdbutil.c", line 46: warning: argument #1 is incompatible with prototype: prototype: pointer to int : "include/../tdb/tdb.h", line 130 argument : pointer to volatile int Steve -- home steve at gbnet.org NetTek Ltd tel/fax +44-(0)207 483 2455 Email to SMS steve - pager (at) gbnet dot net
On Mon, Mar 03, 2003 at 06:40:49PM +0000, Steve Kennedy wrote:> Solaris 2.9, Sun Forte C 6.2, UltraSparc (64 bit)And still the libsmbclient problem (i.e. cant find it to install and then chmod). Steve p.s. cvs 2_2 branch as of about 4pm UK time. -- home steve at gbnet.org NetTek Ltd tel/fax +44-(0)207 483 2455 Email to SMS steve - pager (at) gbnet dot net
Nothing has changed. I still get the error message. Zoltan Sutto ----- Original Message ----- From: "Michael G. Noble" <mnoble@rfmagic.com> To: "Sutto Zoltan" <suttozoltan@chello.hu> Sent: Monday, March 03, 2003 7:35 PM Subject: Re: [Samba] Samba 2.2.7 problem> have you tried to kill the process: > > pkill -9 smbd > pkill -9 nmbd > > make sure the pocesses are gone. > > then try: > > /etc/init.d/smb start > > the processes should be running. > > then try: > > /etc/init.d/smb restart > > Mike > > On Mon, 2003-03-03 at 10:16, Sutto Zoltan wrote: > > I am running Samba 2.2.7 on a Red Hat 7.3 box. > > > > 1. I have some windows xp computer on my network. > > With the following settings the Samab can not able to win the election. > > local master = No > > preferred master = Yes > > domain master = No > > > > changing to > > local master = Yes > > It can. How these settings should work? > > > > 2. When samba is running (ps -ax) > > 1828 ? S 0:00 smbd -D > > 1833 ? S 0:00 nmbd -D > > 1834 ? S 0:00 nmbd -D > > > > When I trying to restart/stop smb I receive the following error message > > Shutting down SMB services: [ OK ] > > Shutting down NMB services: /etc/init.d/smb: kill: (1834) - No suchprocess> > [ OK ] > > > > After this (ps -ax) I still have a running nmbd process > > 1897 ? S 0:00 nmbd -D > > > > What's wrong? How can I fix it? > > > > > > > > Any help would be appreciated. > > > > > > > > Thanx > > > > Zoltan Sutto > > > > -- > > To unsubscribe from this list go to the following URL and read the > > instructions: http://lists.samba.org/mailman/listinfo/samba > -- > Michael G. Noble RF Magic, Inc. > Senior System Administrator 10182 Telesis Ct., 4th Floor > San Diego, CA. 92121 > email: mnoble@rfmagic.com voice: (858) 546-2401 x207 > fax: (858) 546-2402 > -- > There is Sanity in my Madness! >
I checked the /etc/init.d/smb script file it tries to kill it's running processes using killproc function in /etc/init.d/functions file. killproc calls pidofproc function to find pids of given program (nmbd) and it gives back all the PID related to nmbd. 1834 1833 in my earlier example 1833 is nmbd main process 1834 is nmbd child process the killproc tries to kill 1834 first and after that 1833. Killing nmbd's child process first makes a new nmbd process (not a child one). That is why I get the error message. Killing the child process first by hand (kill -TERM $nmbdchildpid) cause the same effect. Killing the parent nmbd process kills the child too as smb script should have to. Is there anybody who can able to help me to fix it? Thanx Zoltan Sutto ps.: PID files are in /var/run/samba/(s/n)nmbd.pid Killproc function in /etc/init/function does not use these files to kill processes. ----- Original Message ----- From: "Michael G. Noble" <mnoble@rfmagic.com> To: "Sutto Zoltan" <suttozoltan@chello.hu> Sent: Monday, March 03, 2003 8:41 PM Subject: Re: [Samba] Samba 2.2.7 problem> When you kill off samba processes, check the pid file and see if there > is a process id number still sitting around. If there is, clear out the > file, the best way is to do the following: > > cat /dev/null > smbd.pid or nmbd.pid which ever one needs it. > > Not really sure where RH keeps these files, I have samba running on > Solaris8 out of /opt/samba and it keeps the files in > /opt/samba/var/locks > > On Mandrake 9.0 the samba .pid files are located in /var/run/samba/. > > Sounds like it never removed the entry and thinks that it is still > there. > > Mike > > On Mon, 2003-03-03 at 10:47, Sutto Zoltan wrote: > > Nothing has changed. > > I still get the error message. > > > > > > > > Zoltan Sutto > > > > > > ----- Original Message ----- > > From: "Michael G. Noble" <mnoble@rfmagic.com> > > To: "Sutto Zoltan" <suttozoltan@chello.hu> > > Sent: Monday, March 03, 2003 7:35 PM > > Subject: Re: [Samba] Samba 2.2.7 problem > > > > > > > have you tried to kill the process: > > > > > > pkill -9 smbd > > > pkill -9 nmbd > > > > > > make sure the pocesses are gone. > > > > > > then try: > > > > > > /etc/init.d/smb start > > > > > > the processes should be running. > > > > > > then try: > > > > > > /etc/init.d/smb restart > > > > > > Mike > > > > > > On Mon, 2003-03-03 at 10:16, Sutto Zoltan wrote: > > > > I am running Samba 2.2.7 on a Red Hat 7.3 box. > > > > > > > > 1. I have some windows xp computer on my network. > > > > With the following settings the Samab can not able to win theelection.> > > > local master = No > > > > preferred master = Yes > > > > domain master = No > > > > > > > > changing to > > > > local master = Yes > > > > It can. How these settings should work? > > > > > > > > 2. When samba is running (ps -ax) > > > > 1828 ? S 0:00 smbd -D > > > > 1833 ? S 0:00 nmbd -D > > > > 1834 ? S 0:00 nmbd -D > > > > > > > > When I trying to restart/stop smb I receive the following errormessage> > > > Shutting down SMB services: [ OK ] > > > > Shutting down NMB services: /etc/init.d/smb: kill: (1834) - No such > > process > > > > [ OK ] > > > > > > > > After this (ps -ax) I still have a running nmbd process > > > > 1897 ? S 0:00 nmbd -D > > > > > > > > What's wrong? How can I fix it? > > > > > > > > > > > > > > > > Any help would be appreciated. > > > > > > > > > > > > > > > > Thanx > > > > > > > > Zoltan Sutto > > > > > > > > -- > > > > To unsubscribe from this list go to the following URL and read the > > > > instructions: http://lists.samba.org/mailman/listinfo/samba > > > -- > > > Michael G. Noble RF Magic, Inc. > > > Senior System Administrator 10182 Telesis Ct., 4th Floor > > > San Diego, CA. 92121 > > > email: mnoble@rfmagic.com voice: (858) 546-2401 x207 > > > fax: (858) 546-2402 > > > -- > > > There is Sanity in my Madness! > > > > > > > -- > > To unsubscribe from this list go to the following URL and read the > > instructions: http://lists.samba.org/mailman/listinfo/samba > -- > Michael G. Noble RF Magic, Inc. > Senior System Administrator 10182 Telesis Ct., 4th Floor > San Diego, CA. 92121 > email: mnoble@rfmagic.com voice: (858) 546-2401 x207 > fax: (858) 546-2402 > -- > There is Sanity in my Madness! > >
A possible fix for No such process error message when stopping/restarting Samba services using /etc/init.d/smb script file on Red Hat 7.3/8.0 distribs. /etc/init.d/smb: #!/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/smbd.pid # pidfile: /var/run/samba/nmbd.pid # config: /etc/samba/smb.conf NMBDPIDFILE=/var/run/samba/nmbd.pid SMBDPIDFILE=/var/run/samba/smbd.pid # 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 0 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 0 # Check that smb.conf exists. [ -f /etc/samba/smb.conf ] || exit 0 # Check that we can write to it... so non-root users stop here [ -w /etc/samba/smb.conf ] || exit 0 RETVAL=0 start() { KIND="SMB" echo -n $"Starting $KIND services: " daemon smbd $SMBDOPTIONS RETVAL=$? echo KIND="NMB" echo -n $"Starting $KIND services: " daemon nmbd $NMBDOPTIONS RETVAL2=$? echo [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && touch /var/lock/subsys/smb || \ RETVAL=1 return $RETVAL } stop() { KIND="SMB" echo -n $"Shutting down $KIND services: " killproc smbd RETVAL=$? echo KIND="NMB" echo -n $"Shutting down $KIND services: " if [ -s $NMBDPIDFILE ]; then pid=`cat $NMBDPIDFILE` kill -TERM $pid RETVAL2=$? else RETVAL2=1 fi if [ $RETVAL2 = "0" ]; then rm -f $NMBDPIDFILE success else failure fi [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && rm -f /var/lock/subsys/smb echo "" return $RETVAL } restart() { stop start } reload() { echo -n $"Reloading smb.conf file: " killproc smbd -HUP RETVAL=$? echo return $RETVAL } rhstatus() { status smbd status nmbd } case "$1" in start) start ;; stop) stop ;; restart) restart ;; reload) reload ;; status) rhstatus ;; condrestart) [ -f /var/lock/subsys/smb ] && restart || : ;; *) echo $"Usage: $0 {start|stop|restart|reload|status|condrestart}" exit 1 esac exit $?