The Samba-Bugzilla – Attachment 1504 Details for
Bug 3115
Calling Wbinfo too soon after winbindd start causes terminally confused winbind
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Script to join domain, verify join, start winbind, perform operation
stay-broken.sh (text/plain), 2.70 KB, created by
Brian Moran
on 2005-10-12 18:23:35 UTC
(
hide
)
Description:
Script to join domain, verify join, start winbind, perform operation
Filename:
MIME Type:
Creator:
Brian Moran
Created:
2005-10-12 18:23:35 UTC
Size:
2.70 KB
patch
obsolete
>#! /bin/bash ># test to see if once wbinfo is broken, it stays broken ># ># Number of tests to make for each time interval >NTRIES=100 ># How many tries we'll make to get info via wbinfo: >MAXRECOVER=50 ># Generate a new hostname and join it to the domain? >RANDOMHOST=1 ># number of attempts to make to test the domain join >JOINTRIES=30 ># >for (( SECS=1 ; SECS<10; SECS+=1 )) ; do >rm -rf /tmp/wbresults${SECS} >for (( tries=${NTRIES} ; tries>0; tries-- )) ; do >killall winbindd >killall smbd ># /etc/init.d/smb stop >bin/net ads leave >rm /var/log/samba/* > ># -- only change hostname and rejoin if RANDOMHOST nonzero >if [[ $RANDOMHOST -gt 0 ]] ; then > HOSTNAME=tsthost${RANDOM} > hostname ${HOSTNAME} > echo Hostname is ${HOSTNAME} > bin/net ads join -U join%join > JOINMSG=`bin/net ads testjoin` > echo "JOIN MSG IS ${JOINMSG}" > tjtries=0 > while [[ "${JOINMSG}" != "Join is OK" ]] && [[ ${tjtries} -lt ${JOINTRIES} ]] ; do > ((tjtries++)) > JOINMSG=`bin/net ads testjoin` > echo "JOIN MSG ${tjtries} IS ${JOINMSG}" > sleep 1 > done > if [[ ${JOINTRIES} -gt 0 ]] ; then > echo "JOIN ${HOSTNAME} ${tjtries} seconds" > echo "JOIN ${HOSTNAME} ${tjtries} seconds" >>/tmp/wbresults${SECS} > else > echo "FAILJOIN ${HOSTNAME} ${tjtries}" > fi > sleep ${SECS} >fi >bin/smbd -d 10 ># /etc/init.d/smb start >echo "Starting winbindd" && bin/winbindd -d 10 >sleep ${SECS} >FOO=`bin/wbinfo -n Administrator | grep S-1` >echo $FOO >if [[ -z ${FOO} ]] ; then > echo "FAIL" > # echo "fail" ${HOSTNAME} >>/tmp/wbresults${SECS} ; > STT="fail" > # see if it stays broken... > SID="" > btries=0 > > while [[ ${btries} -lt ${MAXRECOVER} ]] && [[ -z ${SID} ]] ; do > echo "Failed - attempting recover..." ${btries} of ${MAXRECOVER} > ((btries++)) > SID=`bin/wbinfo -n Administrator | grep S-1` > echo ${SID} > sleep 1 > done > if [[ -n ${SID} ]] ; then > echo "RECOVERED " ${btries} ${SID} >>/tmp/wbresults${SECS} ; > STT="recovered" > else > echo "NOTRECOVERED " ${btries} ${HOSTNAME} ${SID} >>/tmp/wbresults${SECS} ; > fi >else > echo "PASS" ${FOO} ${HOSTNAME} >>/tmp/wbresults${SECS} ; > STT="pass" >fi ># for i in `bin/wbinfo -u` ; do bin/wbinfo -n $i ; done ># for i in `bin/wbinfo -g` ; do bin/wbinfo -n $i ; done >killall winbindd ># save all of the logs... >tar -j -cvf /tmp/winbind-log[${HOSTNAME}]-${STT}.tar.bz2 /var/log/samba/log.w* >bin/winbindd -d 10 >done ; ># --- these statistics are broken for >PASSRAW=`grep PASS /tmp/wbresults${SECS} | wc -l` >#DENOM=`wc -l /tmp/wbresults${SECS}` >DEMON=${NTRIES} >PASSRATE=`dc -e "6 k ${PASSRAW} ${NTRIES} / 100 * p" ` >echo "Sleep of ${SECS} seconds: Succeeded " ${PASSRATE}% ${PASSRAW} / ${DENOM} >echo "Sleep of ${SECS} seconds: Succeeded " ${PASSRATE}% ${PASSRAW} / ${DENOM} >>/tmp/allresults >done ;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 3115
:
1502
| 1504 |
1505
|
1510