Neue Version V963

git-svn-id: svn://svn.compuextreme.de/Viitor/V963/Viitor_samba@5933 504e572c-2e33-0410-9681-be2bf7408885
This commit is contained in:
kueller 2011-01-03 10:48:06 +00:00
commit d4517233f3
11 changed files with 486 additions and 0 deletions

49
etc/init.d/samba Normal file
View File

@ -0,0 +1,49 @@
#!/bin/sh
#Start/Stop Script für Samba
#(c) Rainmaker MultiMedia OHG
#
#$Author$
#$Date$
#$Revision$
#
#$Log$
#Revision 1.2 2003/04/19 07:42:48 kueller
#Restart Option eingebaut
#
#Revision 1.1.1.1 2001/09/23 00:36:33 kueller
#Neustart wg. Datenverlust
#
#Revision 1.2 2001/09/10 11:33:19 kueller
#Korrektur im Header
#
#Revision 1.1.1.1 2001/09/10 08:51:52 kueller
#Samba AddOns
#
#
source /etc/init.d/functions
case "$1" in
start)
echo "Starting SMB NetBIOS Services"
loadproc /opt/samba/sbin/smbd -D
echo "Starting SMB Name Services"
loadproc /opt/samba/sbin/nmbd -D
;;
stop)
echo "Stopping SMB NetBIOS Services"
killproc /opt/samba/sbin/smbd
echo "Stopping SMB Name Services"
killproc /opt/samba/sbin/nmbd
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0

11
etc/init/nmbd.conf Normal file
View File

@ -0,0 +1,11 @@
description "Samba Name Deamon"
author "Harald Kueller <harald.kueller@compuextreme.de>"
version 1.0
emits none special
start on (runlevel [2345] and (started ifup))
stop on runlevel [016]
console none
exec /opt/samba/sbin/nmbd -F

11
etc/init/smbd.conf Normal file
View File

@ -0,0 +1,11 @@
description "Samba file Deamon"
author "Harald Kueller <harald.kueller@compuextreme.de>"
version 1.0
emits none special
start on (runlevel [2345] and (started ifup))
stop on runlevel [016]
console none
exec /opt/samba/sbin/smbd -F

1
etc/samba/domainuser.map Normal file
View File

@ -0,0 +1 @@
root = admin administrator

180
etc/samba/smb.conf Normal file
View File

@ -0,0 +1,180 @@
;Minimale Beispiel Konfiguration eines NT Servers unter Samba
;(c) Rainmaker MultiMedia OHG
;
;$Author$
;$Date$
;$Revision$
;
;$Log$
;Revision 1.2 2006/10/31 08:23:48 segler
;viruscheck within share activated
;
;Revision 1.1 2006/10/30 15:47:05 segler
;opt/smaba/etc/* and opt/samba/lib/smb.conf moved to etc/samba
;Serverstring in smb.conf now cleared (Customer removed)
;
;Revision 1.3 2002/01/26 02:47:13 kueller
;Grupid 105 ist zu statisch - wird nun als winclient verwendet.
;winclient group wird durch postinstallscript (neu) erzeugt
;
;Revision 1.2 2002/01/26 02:34:16 kueller
;Diverse Änderungen. Kommentare nun in Deutsch - ausserdem erweitert.
;Funktionalität für die WinNT Administration tools weitestgehend hergestellt
;(add user, del user, passwd sync, add share)
;
;Revision 1.1 2001/10/17 08:54:13 kueller
;smb.conf von etc/smb.conf nach lib/smb.conf umbenannt - samba sucht config
;immer noch unter lib
;
;Revision 1.1.1.1 2001/09/23 00:36:33 kueller
;Neustart wg. Datenverlust
;
;Revision 1.2 2001/09/10 08:58:05 kueller
;samba Path in profile Umgebung eingefügt. Korrektur des Headers für smb.conf
;
;Revision 1.1.1.1 2001/09/10 08:51:52 kueller
;Samba AddOns
;
;
[global]
;minimales debugging - logfiles klein halten
debug level = 1
;einige wichtige details fürs allgemeine Netzwerkeln des Sambas
guest account = nobody
;interfaces = <Put your Interfaces here>
;diverse Einstellungen die Printer betreffend
load printers = no
;Folgende Zeilen sind für den vollständigen printersupport
;notwendig:
;load printers = yes
;printer driver file = /opt/samba/lib/printers.def
;printing = plp
;printcap name = /etc/printcap
;Grundeinstellung SAMBA
workgroup = DOMAIN
protocol = NT1
security = user
password level = 9
os level = 65
server string = "UNIX SMB SERVICE"
character set = iso8859-15
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter new UNIX* %n\n *Retype new UNIX* %n\n
;Die folgende Zeile aktiviert die Passwort Synchonisation unter NIS
; ACHTUNG: Hier wird das ROOT Password plain eingetragen -
; File Security beachten!
;passwd chat = *root*passwd* <Put your Root Password here>\n *new*password* %n\n *new*password* %n\n *changed*
;Wins Support und einstellungen
wins support = yes
wins proxy = yes
dns proxy = yes
name resolve order = host bcast lmhost wins
;config file = /opt/samba/etc/smb%a.conf
;Samba wird zum Domain Controller
domain master = yes
preferred master = yes
local master = yes
domain logons = yes
logon drive = h:
logon home = \\%N\%U
logon path = \\%N\%U\%aprofile
logon script = logon.bat
; Um unter verschiedenen OS unterschieliche logonscripte
; verwenden zu können die obige zeile auskommentieren,
; und die Zeile unten aktivieren
; Folgende OS werden erkannt: Win95, WinNT, UNKNOWN
;logon script = %a.bat
;Gruppe admin muß noch angelegt werden!!
;Alle User der Gruppe Admin erhalten automatisch Administrations
;Rechte auf den NT-Workstations!
domain admin group = @admin
;domain guest group = @users
username map = /opt/samba/etc/domainuser.map
;Encryption muss eingeschaltet sein (WinNT laesst gruessen!)
encrypt passwords = yes
smb passwd file = /opt/samba/etc/smbpasswd
;und jetzt zum aufspeeden:
oplocks = yes
fake oplocks = no
read raw = yes
write raw = yes
socket options = TCP_NODELAY
getwd cache = yes
dead time = 15
;Aktivierung der Windows NT Management Tools
add share command = /opt/samba/scripts/addshare
add user script = /usr/sbin/useradd -d /dev/null -g winclient -c WINCLIENT -s /bin/false %u
delete user script = /usr/sbin/userdel %u
;Der folgende share wird benötigt, wenn Samba Druckertreiber
;zur verfuegung stellen soll
;Installation der Treiber ist allerdings aufwendig!
;[printer$]
#path = /opt/samba/lib/printerlib
#public = yes
#writeable = no
#browsable = yes
;Über den folgenden Share kann ein Drucker freigegeben werden
;Es sollte jeweils ein RAW Druckerport (ohne weitere Interpretation/filter
;der Daten) verwendet werden!
;[YOURLPRPRINTERNAME]
; comment = <Commet for your Printer>
; path = /usr/var/smb
; browsable = yes
; printable = yes
; public = yes
; writeable = yes
; create mode = 0700
; printer driver = <Windows PrinterDriverName>
; printer driver location = \\%h\PRINTER$
;Automatisches zur Verfügungstellen des Homeverzeichnisses
;eines angeloggten Users
[homes]
comment = Its your home - use it!
browsable = no
read only = no
hide dot files = yes
create mode = 0750
;Virenscan im Share aktivieren
; vfs object = vscan-clamav
; vscan-clamav: config-file = /etc/samba/vscan-clamav.conf
;Netlogon/logon script (siehe entsprechenden Parameter)
;wird automatisch beim Login in einen Client auf diesem ausgeführt
;hier kann über net use/net date kommandos die Netzwerkumgebung
;hergestellt werden
;z.B.: net use f: \\server\pub # um ein Laufwerk [pub] des servers
;als Laufwerk f: anzumelden
; oder: net date \\server /set /y um die Uhrzeit vom Server auf
; dem Client zu setzen
[netlogon]
comment = The logon.bat scripts - for Admin only
path = /opt/samba/etc/netlogon
writeable = yes
guest ok = no
;Und so können shares eingerichtet werden:
;[Filebase]
; comment = Some Archives for different Systems
; path = /pub/Filebase
; writable = yes
; printable = no
; create mode = 0770
;Virenscan im Share aktivieren
; vfs object = vscan-clamav
; vscan-clamav: config-file = /etc/samba/vscan-clamav.conf

View File

@ -0,0 +1,24 @@
#!/bin/bash
#PATH Initialisierung für samba
#Script Framework - Automatisiertes Erzeugen der Monsum Linux Distribution
#(c) Rainmaker MultiMedia OHG
#
#$Author$
#$Date$
#$Revision$
#
#$Log$
#Revision 1.2 2002/01/11 03:07:56 kueller
#Manpath wird nun fuer samba passend erweitert
#
#Revision 1.1.1.1 2001/09/23 00:36:33 kueller
#Neustart wg. Datenverlust
#
#Revision 1.1 2001/09/10 08:58:05 kueller
#samba Path in profile Umgebung eingefügt. Korrektur des Headers für smb.conf
#
#
PATH=$PATH:/opt/samba/bin
MANPATH=$MANPATH:/opt/samba/man
export PATH MANPATH

11
etc/xinetd.d/swat Normal file
View File

@ -0,0 +1,11 @@
service swat
{
disable = no
socket_type = stream
protocol = tcp
wait = no
user = root
server = /opt/samba/sbin/swat
}

40
init/genpkg Normal file
View File

@ -0,0 +1,40 @@
#!/bin/bash
#genpkg script für samba
#(c) Rainmaker MultiMedia OHG
#
#$Author$
#$Date$
#$Revision$
#
#$Log$
#Revision 1.3 2002/01/26 02:48:18 kueller
#Sicherstellen das die Scripts im scripts verzeichniss die passenden
#berechtigungen bekommen
#
#Revision 1.2 2001/10/17 08:30:32 kueller
#Rechtekorrektur für init script
#
#Revision 1.1.1.1 2001/09/23 00:36:33 kueller
#Neustart wg. Datenverlust
#
#
if [ -d /var/install/sysvinit* ]; then
WDIR=`pwd`
cd etc/init.d
chmod 755 samba
mkdir rc{0,1,2,3,4,5,6}.d
for i in 0 1 2 6; do
cd rc$i.d
ln -s ../samba K40samba
cd ..
done
for i in 3 4 5; do
cd rc$i.d
ln -s ../samba S60samba
cd ..
done
cd ../../opt/samba/scripts
chmod 755 *
cd $WDIR
fi

View File

@ -0,0 +1,29 @@
#!/bin/bash
#Samba Add On Script - dient zum Anlegen neuer Shares
#von Windows Clients aus
#(c) Rainmaker MultiMedia OHG
#
#$Author$
#$Date$
#$Revision$
#
#$Log$
#Revision 1.1 2002/01/26 02:37:06 kueller
#Neue Scripts - werden von der neuen smb.conf benötigt, und dienen zur
#Unterstützung der NT-Server Tools
#
#
configfile=$1
sharename=$2
pathname=$3
comment=$4
echo "" >>$configfile
echo "[$sharename]" >>$configfile
echo "comment = $comment" >>$configfile
echo "path = $pathname" >>$configfile
echo "writeable = yes" >>$configfile
echo "printable = no" >>$configfile
echo "create mask = 0770" >>$configfile

67
tmp/postinstall Normal file
View File

@ -0,0 +1,67 @@
#!/bin/bash
#Framework, welches ein komplettes Linux System aus den Sourcen erstellt
#dieses Framework wird im CVS Repository
#:pserver:cvs.rainmaker-mm.de/RMM/cvs zur Verfügung gestellt
#
#Lage dieser Datei im Archiv: $Source$
#
#(c) Rainmaker MultiMedia OHG
#This program is free software; you can redistribute it and/or
#modify ist under the terms of the GNU General Public License
#as published by the Free Software Foundation; either version
#2 of the License, or (at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#See the GNU General Public License for more details.
#
#You should have received a copy of the GNU General Public License
#along with this program; if not write to the Free Software Foundation,
#Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
#Beschreibung:
#postinstall für das samba packet. Es werden die gruppen winclient
#und admin angelegt.
#
#Aufrufparameter:
#keine
#
#Letzte Änderung von: $Author$
#Datum der letzten Änderung: $Date$
#Version der Datei: $Revision$
#
#$Log$
#Revision 1.5 2007/05/30 11:40:26 kueller
#Anpassung der GID fuer winclient und admin, sowie eintrag in ViitorMake/sysuserdb
#
#Revision 1.4 2006/10/20 09:05:10 kueller
#Anpassung an 32/64 Bit Viitor
#
#Revision 1.3 2006/05/18 09:14:06 kueller
#/opt/samba/lib wird nun in /etd/ld.so.conf eingetragen
#
#Revision 1.2 2002/10/09 08:47:56 kueller
#Einsatz des neuen GPL Monsum Projekt Headers.
#
#
#Revision 1.1 2002/01/26 02:47:50 kueller
#postinstall legt die von samba benötigten gruppen an
#
#
#/opt/samba/lib in ldconfig aufnehmen
LIBINST=`grep "/opt/samba/lib" /etc/ld.so.conf`
if [ ! "$LIBINST" ]; then
echo "/opt/samba/lib" >>/etc/ld.so.conf
if [ -d /opt/samba/lib64 ]; then
echo "/opt/samba/lib64" >>/etc/ld.so.conf
fi
fi
if ! getent group winclient &>/dev/null; then
/usr/sbin/groupadd -g 31 winclient
fi
if ! getent group winclient &>/dev/null; then
/usr/sbin/groupadd -g 32 admin
fi

63
tmp/postremove Normal file
View File

@ -0,0 +1,63 @@
#!/bin/bash
#Framework, welches ein komplettes Linux System aus den Sourcen erstellt
#dieses Framework wird im CVS Repository
#:pserver:cvs.rainmaker-mm.de/RMM/cvs zur Verfügung gestellt
#
#Lage dieser Datei im Archiv: $Source$
#
#(c) Rainmaker MultiMedia OHG
#This program is free software; you can redistribute it and/or
#modify ist under the terms of the GNU General Public License
#as published by the Free Software Foundation; either version
#2 of the License, or (at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#See the GNU General Public License for more details.
#
#You should have received a copy of the GNU General Public License
#along with this program; if not write to the Free Software Foundation,
#Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
#Beschreibung:
#postinstall für das samba packet. Es werden die gruppen winclient
#und admin angelegt.
#
#Aufrufparameter:
#keine
#
#Letzte Änderung von: $Author$
#Datum der letzten Änderung: $Date$
#Version der Datei: $Revision$
#
#$Log$
#Revision 1.5 2007/05/30 11:40:26 kueller
#Anpassung der GID fuer winclient und admin, sowie eintrag in ViitorMake/sysuserdb
#
#Revision 1.4 2006/10/20 09:05:10 kueller
#Anpassung an 32/64 Bit Viitor
#
#Revision 1.3 2006/05/18 09:14:06 kueller
#/opt/samba/lib wird nun in /etd/ld.so.conf eingetragen
#
#Revision 1.2 2002/10/09 08:47:56 kueller
#Einsatz des neuen GPL Monsum Projekt Headers.
#
#
#Revision 1.1 2002/01/26 02:47:50 kueller
#postinstall legt die von samba benötigten gruppen an
#
#
#/opt/samba/lib in ldconfig aufnehmen
sed -i -e "/\/opt\/samba\/lib/d" /etc/ld.so.conf
sed -i -e "/\/opt\/samba\/lib64/d" /etc/ld.so.conf
if getent group winclient &>/dev/null; then
/usr/sbin/groupdel admin
fi
if getent group winclient &>/dev/null; then
/usr/sbin/groupdel winclient
fi