Univention Bugzilla – Attachment 7395 Details for
Bug 40379
Proposal: univention-samba-debug script
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
samba_debug.sh
samba_debug.sh (text/x-sh), 1.86 KB, created by
Arvid Requate
on 2016-01-06 21:16 CET
(
hide
)
Description:
samba_debug.sh
Filename:
MIME Type:
Creator:
Arvid Requate
Created:
2016-01-06 21:16 CET
Size:
1.86 KB
patch
obsolete
>#!/bin/bash >SAMBA_DEBUG_LEVEL=12 >timestamp=$(date +%Y%m%d%H%M%S) > >univention-install tcpdump > > >eval "$(ucr shell)" > >TDIR=$(mktemp -d --tmpdir=/var/tmp) >chmod 700 "${TDIR}" > >echo -e "\n\nNOTE: Output goes to ${TDIR}\n\n" > >samba-tool domain exportkeytab "${TDIR}/domain.keytab" > >restore_ucr() { > current_samba_debug_level=$(ucr get samba/debug/level) > if [ "$current_samba_debug_level" != "$samba_debug_level" ]; then > ucr set samba/debug/level="$samba_debug_level" > service samba restart > fi >} >trap restore_ucr EXIT > >ucr set samba/debug/level="$SAMBA_DEBUG_LEVEL" >service samba restart >samba-tool processes -d1 > "${TDIR}/samba-tool-processes.log" >ps fax >> "${TDIR}/samba-tool-processes.log" > >tcpdump_file="${TDIR}/univention-samba-debug-${timestamp}.pcap" >tcpdump -p -s 0 -n -w "$tcpdump_file" & >tcpdumppid=$! > >mkdir "${TDIR}/samba.0" >cp /var/log/samba/log.{nmbd,smbd,samba,wb-*,winbindd*} "${TDIR}/samba.0" >read -p "Please perform the action triggering the issue and after that hit return: " > >restore_ucr; trap '' EXIT > >mkdir "${TDIR}/samba.1" >cp /var/log/samba/log.{nmbd,smbd,samba,wb-*,winbindd*} "${TDIR}/samba.1" > >kill "$tcpdumppid" > >cd "${TDIR}" && diff -Nuar samba.0 samba.1 > diff01 >[ -s diff01 ] && rm -rf samba.0 >cd - >/dev/null > >echo -e "\n\nNOTE: Output is in ${TDIR}\n" >echo "That directory contains sensitive information, please consult http://sdb.univention.de/1344" > >## wireshark -K "${TDIR}/domain.keytab" "$tcpdump_file" > > >## To strip timestamps: ># sed -i 's/\[[0-9]*\/[0-9]*\/[0-9]* [0-9]*:[0-9]*:[0-9]*,\s*[0-9]*, pid=[0-9]*, effective([0-9]*, [0-9]*), real([0-9]*, [0-9]*)\]/\[\]/' diff01 >## sed -i 's/\[[0-9]*\/[0-9]*\/[0-9]* [0-9]*:[0-9]*:[0-9]*.[0-9]*,\s*[0-9]*, pid=[0-9]*, effective([0-9]*, [0-9]*), real([0-9]*, [0-9]*)\]/\[\]/' diff01 > >## To get NTACLs: ># find /var/lib/samba/sysvol -printf '# File: %p\n' -exec samba-tool ntacl get --as-sddl {} \; > "${TDIR}/sysvol.ntacl"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
Attachments on
bug 40379
: 7395