initial commit of file from CVS for e-smith-samba on Sat Mar 23 16:28:38 AEDT 2024
This commit is contained in:
parent
83e7d8b945
commit
d602d07ac3
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
*.rpm
|
||||
*.log
|
||||
*spec-20*
|
||||
*.tar.xz
|
21
Makefile
Normal file
21
Makefile
Normal file
@ -0,0 +1,21 @@
|
||||
# Makefile for source rpm: e-smith-samba
|
||||
# $Id: Makefile,v 1.1 2016/02/05 17:16:29 stephdl Exp $
|
||||
NAME := e-smith-samba
|
||||
SPECFILE = $(firstword $(wildcard *.spec))
|
||||
|
||||
define find-makefile-common
|
||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||
|
||||
ifeq ($(MAKEFILE_COMMON),)
|
||||
# attept a checkout
|
||||
define checkout-makefile-common
|
||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||
endef
|
||||
|
||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||
endif
|
||||
|
||||
include $(MAKEFILE_COMMON)
|
16
README.md
16
README.md
@ -1,3 +1,15 @@
|
||||
# e-smith-samba
|
||||
# <img src="https://www.koozali.org/images/koozali/Logo/Png/Koozali_logo_2016.png" width="25%" vertical="auto" style="vertical-align:bottom"> e-smith-samba
|
||||
|
||||
SMEServer Koozali developed git repo for e-smith-samba smeserver
|
||||
SMEServer Koozali developed git repo for e-smith-samba smeserver
|
||||
|
||||
## Wiki
|
||||
<br />https://wiki.koozali.org/
|
||||
|
||||
## Bugzilla
|
||||
Show list of outstanding bugs: [here](https://bugs.koozali.org/buglist.cgi?component=e-smith-samba&product=SME%20Server%2010.X&query_format=advanced&limit=0&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CONFIRMED)
|
||||
|
||||
## Description
|
||||
|
||||
<br />*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.*
|
||||
*Once it has been checked, then this comment will be deleted*
|
||||
<br />
|
||||
|
340
additional/COPYING
Normal file
340
additional/COPYING
Normal file
@ -0,0 +1,340 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it 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
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
1
contriborbase
Normal file
1
contriborbase
Normal file
@ -0,0 +1 @@
|
||||
sme10
|
123
createlinks
Normal file
123
createlinks
Normal file
@ -0,0 +1,123 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
use esmith::Build::CreateLinks qw(:all);
|
||||
|
||||
my $panel = "manager";
|
||||
panel_link("workgroup", $panel);
|
||||
|
||||
foreach (qw(samba/smb.conf samba/smbusers))
|
||||
{
|
||||
templates2events("/etc/$_", qw(
|
||||
console-save
|
||||
bootstrap-console-save
|
||||
ibay-create
|
||||
ibay-delete
|
||||
ibay-modify
|
||||
ibay-modify-servers
|
||||
network-delete
|
||||
network-create
|
||||
post-install
|
||||
post-upgrade
|
||||
workgroup-update
|
||||
e-smith-samba-update
|
||||
));
|
||||
}
|
||||
|
||||
foreach my $file (qw(
|
||||
/etc/pam.d/samba
|
||||
/etc/krb5.conf
|
||||
))
|
||||
{
|
||||
templates2events($file, qw(console-save bootstrap-console-save e-smith-samba-update));
|
||||
}
|
||||
|
||||
foreach (qw(console-save bootstrap-console-save bootstrap-ldap-save
|
||||
post-install post-upgrade workgroup-update e-smith-samba-update))
|
||||
{
|
||||
event_link('store-ldap-smbpasswd', $_, "06");
|
||||
}
|
||||
|
||||
my $event = "console-save";
|
||||
|
||||
$event = "bootstrap-ldap-save";
|
||||
templates2events("/etc/samba/smb.conf", $event);
|
||||
event_link("update-domain-group-maps", $event, "56");
|
||||
|
||||
$event = "group-create";
|
||||
event_link("update-domain-group-maps", $event, "56");
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "group-delete";
|
||||
event_link("update-domain-group-maps", $event, "14");
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "group-modify";
|
||||
event_link("update-domain-group-maps", $event, "56");
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "ibay-create";
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "ibay-delete";
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "ibay-modify";
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "ibay-modify-servers";
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "network-create";
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "network-delete";
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "post-install";
|
||||
|
||||
$event = "post-upgrade";
|
||||
event_link("user-create-profiledir", $event, "20");
|
||||
|
||||
$event = "user-create";
|
||||
event_link("user-create-profiledir", $event, "20");
|
||||
event_link("update-domain-group-maps", $event, "56");
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "user-delete";
|
||||
event_link("update-domain-group-maps", $event, "14");
|
||||
event_link("user-delete-profiledir", $event, "20");
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "user-modify";
|
||||
event_link("update-domain-group-maps", $event, "56");
|
||||
safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "workgroup-update";
|
||||
event_link("update-domain-group-maps", $event, "56");
|
||||
event_link("cleanup-domains", $event, "65");
|
||||
safe_symlink("sigterm", "root/etc/e-smith/events/$event/services2adjust/dhcpd");
|
||||
safe_symlink("sigterm", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
safe_symlink("sigterm", "root/etc/e-smith/events/$event/services2adjust/nmbd");
|
||||
|
||||
$event = "printer-create";
|
||||
safe_symlink("sigterm", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "printer-delete";
|
||||
event_link("delete_printer_tdb", $event, 15);
|
||||
safe_symlink("sigterm", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
|
||||
$event = "machine-account-create";
|
||||
event_link("create-machine-account", $event, "10");
|
||||
|
||||
$event = "pre-restore";
|
||||
event_link("delete-smbpasswd", $event, "90");
|
||||
|
||||
$event = "e-smith-samba-update";
|
||||
event_link("user-create-profiledir", $event, "20");
|
||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/smbd");
|
||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/nmbd");
|
||||
# systemd-specific action mandatory for this package-update event
|
||||
event_link("systemd-reload", $event, "89");
|
||||
event_link("systemd-default", $event, "88");
|
||||
templates2events("/etc/rsyslog.conf",$event);
|
||||
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/rsyslog");
|
1352
e-smith-samba.spec
Normal file
1352
e-smith-samba.spec
Normal file
File diff suppressed because it is too large
Load Diff
1
root/etc/e-smith/db/accounts/defaults/netlogon/Comment
Normal file
1
root/etc/e-smith/db/accounts/defaults/netlogon/Comment
Normal file
@ -0,0 +1 @@
|
||||
placeholder for netlogon share
|
1
root/etc/e-smith/db/accounts/defaults/netlogon/type
Normal file
1
root/etc/e-smith/db/accounts/defaults/netlogon/type
Normal file
@ -0,0 +1 @@
|
||||
netlogon
|
@ -0,0 +1 @@
|
||||
true
|
@ -0,0 +1 @@
|
||||
false
|
1
root/etc/e-smith/db/configuration/defaults/krb5/type
Normal file
1
root/etc/e-smith/db/configuration/defaults/krb5/type
Normal file
@ -0,0 +1 @@
|
||||
configuration
|
1
root/etc/e-smith/db/configuration/defaults/nmbd/UDPPorts
Normal file
1
root/etc/e-smith/db/configuration/defaults/nmbd/UDPPorts
Normal file
@ -0,0 +1 @@
|
||||
137,138
|
1
root/etc/e-smith/db/configuration/defaults/nmbd/access
Normal file
1
root/etc/e-smith/db/configuration/defaults/nmbd/access
Normal file
@ -0,0 +1 @@
|
||||
private
|
1
root/etc/e-smith/db/configuration/defaults/nmbd/status
Normal file
1
root/etc/e-smith/db/configuration/defaults/nmbd/status
Normal file
@ -0,0 +1 @@
|
||||
enabled
|
1
root/etc/e-smith/db/configuration/defaults/nmbd/type
Normal file
1
root/etc/e-smith/db/configuration/defaults/nmbd/type
Normal file
@ -0,0 +1 @@
|
||||
service
|
1
root/etc/e-smith/db/configuration/defaults/smb/DeadTime
Normal file
1
root/etc/e-smith/db/configuration/defaults/smb/DeadTime
Normal file
@ -0,0 +1 @@
|
||||
10080
|
@ -0,0 +1 @@
|
||||
disabled
|
1
root/etc/e-smith/db/configuration/defaults/smb/OpLocks
Normal file
1
root/etc/e-smith/db/configuration/defaults/smb/OpLocks
Normal file
@ -0,0 +1 @@
|
||||
enabled
|
1
root/etc/e-smith/db/configuration/defaults/smb/OsLevel
Normal file
1
root/etc/e-smith/db/configuration/defaults/smb/OsLevel
Normal file
@ -0,0 +1 @@
|
||||
35
|
@ -0,0 +1 @@
|
||||
disabled
|
@ -0,0 +1 @@
|
||||
no
|
@ -0,0 +1 @@
|
||||
WS
|
@ -0,0 +1 @@
|
||||
10
|
1
root/etc/e-smith/db/configuration/defaults/smb/ShadowDir
Normal file
1
root/etc/e-smith/db/configuration/defaults/smb/ShadowDir
Normal file
@ -0,0 +1 @@
|
||||
/home/e-smith/files/.shadow
|
@ -0,0 +1 @@
|
||||
UTF8
|
@ -0,0 +1 @@
|
||||
yes
|
1
root/etc/e-smith/db/configuration/defaults/smb/Workgroup
Normal file
1
root/etc/e-smith/db/configuration/defaults/smb/Workgroup
Normal file
@ -0,0 +1 @@
|
||||
sme-server
|
1
root/etc/e-smith/db/configuration/defaults/smb/status
Normal file
1
root/etc/e-smith/db/configuration/defaults/smb/status
Normal file
@ -0,0 +1 @@
|
||||
enabled
|
1
root/etc/e-smith/db/configuration/defaults/smb/type
Normal file
1
root/etc/e-smith/db/configuration/defaults/smb/type
Normal file
@ -0,0 +1 @@
|
||||
service
|
1
root/etc/e-smith/db/configuration/defaults/smbd/TCPPorts
Normal file
1
root/etc/e-smith/db/configuration/defaults/smbd/TCPPorts
Normal file
@ -0,0 +1 @@
|
||||
139,445
|
1
root/etc/e-smith/db/configuration/defaults/smbd/access
Normal file
1
root/etc/e-smith/db/configuration/defaults/smbd/access
Normal file
@ -0,0 +1 @@
|
||||
private
|
1
root/etc/e-smith/db/configuration/defaults/smbd/status
Normal file
1
root/etc/e-smith/db/configuration/defaults/smbd/status
Normal file
@ -0,0 +1 @@
|
||||
enabled
|
1
root/etc/e-smith/db/configuration/defaults/smbd/type
Normal file
1
root/etc/e-smith/db/configuration/defaults/smbd/type
Normal file
@ -0,0 +1 @@
|
||||
service
|
@ -0,0 +1,9 @@
|
||||
{
|
||||
# Set ServerName to SystemName after inital configuration.
|
||||
my $smb = $DB->get('smb') || return;
|
||||
my $srvName = $smb->prop('ServerName') || 'sme-server';
|
||||
my $sysName = $DB->get('SystemName') || return;
|
||||
|
||||
return unless $srvName =~ m#sme-server#;
|
||||
$smb->set_prop('ServerName', $sysName->value);
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
# Display Charset has been dropped in Samba 4
|
||||
my $a = $DB->get("smb") or return;
|
||||
return unless (exists $smb{'DisplayCharSet'});
|
||||
$DB->get_prop_and_delete('smb', 'DisplayCharSet');
|
||||
}
|
||||
|
56
root/etc/e-smith/events/actions/cleanup-domains
Normal file
56
root/etc/e-smith/events/actions/cleanup-domains
Normal file
@ -0,0 +1,56 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
package esmith;
|
||||
|
||||
use strict;
|
||||
use Errno;
|
||||
use esmith::ConfigDB;
|
||||
use esmith::util;
|
||||
use Net::LDAP;
|
||||
|
||||
my $c = esmith::ConfigDB->open_ro;
|
||||
|
||||
# Don't attempt to update ldap unles master
|
||||
exit(0) unless ($c->get('ldap')->prop('Authentication') || 'disabled') eq 'enabled';
|
||||
|
||||
my $l = $c->get('ldap');
|
||||
my $status = $l->prop('status') || "disabled";
|
||||
unless ($status eq "enabled" )
|
||||
{
|
||||
warn "Not running action script $0, LDAP service not enabled!\n";
|
||||
exit(0);
|
||||
}
|
||||
|
||||
my $domain = $c->get('DomainName')
|
||||
|| die("Couldn't determine domain name");
|
||||
$domain = $domain->value;
|
||||
|
||||
my $base = esmith::util::ldapBase ($domain);
|
||||
my $pw = esmith::util::LdapPassword();
|
||||
|
||||
my $ldap = Net::LDAP->new('localhost')
|
||||
or die "$@";
|
||||
|
||||
$ldap->bind(
|
||||
dn => "cn=root,$base",
|
||||
password => $pw
|
||||
);
|
||||
|
||||
my $smb = $c->get('smb');
|
||||
my $domName = $smb->prop('Workgroup') || 'sme-server';
|
||||
if ( ($smb->prop('ServerRole') || 'WS') eq 'WS' )
|
||||
{
|
||||
$domName = $smb->prop('ServerName') || 'sme-server';
|
||||
}
|
||||
|
||||
my $result = $ldap->search( base => $base,
|
||||
filter => "(&(objectClass=sambaDomain)(!(sambaDomainName=$domName)))",
|
||||
scope => 'one'
|
||||
);
|
||||
die "failed looking up sambaDomainName entry: ", $result->error if $result->code;
|
||||
|
||||
foreach ($result->entries)
|
||||
{
|
||||
$_->delete;
|
||||
$_->update($ldap);
|
||||
}
|
140
root/etc/e-smith/events/actions/create-machine-account
Normal file
140
root/etc/e-smith/events/actions/create-machine-account
Normal file
@ -0,0 +1,140 @@
|
||||
#!/usr/bin/perl -w
|
||||
#----------------------------------------------------------------------
|
||||
# copyright (C) 2001 Mitel Networks Corporation
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it 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
|
||||
#
|
||||
# Technical support for this program is available from Mitel Networks
|
||||
# Please visit our web site www.e-smith.com for details.
|
||||
#----------------------------------------------------------------------
|
||||
package esmith;
|
||||
|
||||
use strict;
|
||||
use Errno;
|
||||
use esmith::ConfigDB;
|
||||
use esmith::AccountsDB;
|
||||
use esmith::util;
|
||||
|
||||
my $a = esmith::AccountsDB->open || die "Couldn't open accounts db\n";
|
||||
my $c = esmith::ConfigDB->open_ro || die "Could not open Config DB";
|
||||
|
||||
my $ldapauth = $c->get('ldap')->prop('Authentication') || 'disabled';
|
||||
my $x = 0; # exit value
|
||||
|
||||
my $domain = $c->get('DomainName')->value();
|
||||
my $base = esmith::util::ldapBase ($domain);
|
||||
|
||||
my $event = $ARGV [0];
|
||||
my $machineName = $ARGV [1];
|
||||
|
||||
die "machine name $machineName is not a valid machine account name"
|
||||
unless ( $machineName =~ /\$$/ );
|
||||
|
||||
my $m = $a->get($machineName);
|
||||
if ($m)
|
||||
{
|
||||
my $type = $m->prop('type');
|
||||
die "$machineName is not a machine account"
|
||||
unless ($type eq "machine");
|
||||
}
|
||||
else
|
||||
{
|
||||
# Auto-create the accounts database entry. This is bad form, but
|
||||
# the Samba "add user script" is called as the user "admin", who
|
||||
# does not currently have permissions to write to the config database
|
||||
$m = $a->new_record($machineName, {type => "machine"});
|
||||
}
|
||||
|
||||
my $lock = undef;
|
||||
my $uid;
|
||||
unless ($uid = $m->prop('Uid'))
|
||||
{
|
||||
use esmith::lockfile;
|
||||
|
||||
$lock = esmith::lockfile::LockFileOrWait("/home/e-smith/db/accounts");
|
||||
$uid = $a->get_next_uid;
|
||||
$m->set_prop('Uid', $uid);
|
||||
}
|
||||
my $gid = $m->prop('Gid') || $uid;
|
||||
|
||||
# We really, really need to be root to run "passwd -l"
|
||||
esmith::util::setRealToEffective();
|
||||
|
||||
warn "create-machine-account $machineName: Creating Unix user and group\n";
|
||||
|
||||
if ($ldapauth ne 'enabled')
|
||||
{
|
||||
# Create the machine's unique group first
|
||||
system(
|
||||
"/usr/sbin/groupadd",
|
||||
"-g",
|
||||
$gid,
|
||||
$machineName
|
||||
) == 0 or ( $x = 255, warn "Failed to create (unix) group $machineName.\n" );
|
||||
|
||||
# Now create the machine account
|
||||
system(
|
||||
"/usr/sbin/useradd",
|
||||
"-u", $uid,
|
||||
"-g", $gid,
|
||||
"-c", "Hostname account for $machineName",
|
||||
"-M",
|
||||
"-d", "/noexistingpath",
|
||||
"-s", "/bin/false",
|
||||
"$machineName"
|
||||
) == 0 or ( $x = 255, warn "Failed to create (unix) account $machineName.\n" );
|
||||
|
||||
system("/usr/bin/passwd", "-l", "$machineName") == 0
|
||||
or ( $x = 255, warn "Failed locking (unix) password for $machineName\n" );
|
||||
}
|
||||
|
||||
# Create the machine's unique group first (in ldap)
|
||||
system(
|
||||
"/usr/sbin/cpu", "-C/etc/cpu-system.conf", "groupadd",
|
||||
"-g", $gid,
|
||||
"-o",
|
||||
"$machineName"
|
||||
) == 0 or ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed to create (ldap) group $machineName.\n" );
|
||||
|
||||
# Now create the machine account (in ldap)
|
||||
system(
|
||||
"/usr/sbin/cpu", "-C/etc/cpu-system.conf", "useradd",
|
||||
"-u", $uid,
|
||||
"-g", $gid,
|
||||
"--userbase=ou=Computers,$base",
|
||||
"-c", "Hostname account for $machineName",
|
||||
"-o",
|
||||
"-d", "/noexistingpath",
|
||||
"-s", "/bin/false",
|
||||
"$machineName"
|
||||
) == 0 or ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed to create (ldap) account $machineName.\n" );
|
||||
|
||||
warn "create-machine-account $machineName: Locking account\n";
|
||||
|
||||
system("/usr/sbin/cpu", "-C/etc/cpu-system.conf", "usermod",
|
||||
"--userbase=ou=Computers,$base",
|
||||
"-o",
|
||||
"-L",
|
||||
"$machineName"
|
||||
) == 0 or ( $x = $ldapauth ne 'enabled' ? $x : 255, warn "Failed locking (ldap) password for $machineName\n" );
|
||||
|
||||
if ($ldapauth ne 'enabled')
|
||||
{
|
||||
warn "create-machine-account $machineName: Creating smbpasswd account\n";
|
||||
|
||||
system("/usr/bin/smbpasswd", "-a", "-m", "$machineName") == 0
|
||||
or warn "Could not create smb password entry for $machineName\n";
|
||||
}
|
||||
exit ($x);
|
2
root/etc/e-smith/events/actions/delete-smbpasswd
Normal file
2
root/etc/e-smith/events/actions/delete-smbpasswd
Normal file
@ -0,0 +1,2 @@
|
||||
#! /bin/sh
|
||||
exec rm -f /etc/samba/smbpasswd
|
6
root/etc/e-smith/events/actions/delete_printer_tdb
Normal file
6
root/etc/e-smith/events/actions/delete_printer_tdb
Normal file
@ -0,0 +1,6 @@
|
||||
#! /bin/sh
|
||||
|
||||
ACTION=$1
|
||||
PRINTER=$2
|
||||
|
||||
exec rm -f /var/cache/samba/printing/$PRINTER.tdb
|
130
root/etc/e-smith/events/actions/shadow-copy-rotate
Normal file
130
root/etc/e-smith/events/actions/shadow-copy-rotate
Normal file
@ -0,0 +1,130 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use POSIX qw(strftime);
|
||||
use File::Path;
|
||||
use File::Basename;
|
||||
use esmith::ConfigDB;
|
||||
use esmith::AccountsDB;
|
||||
|
||||
# Routines taken from powershift of rlbackup
|
||||
sub stagger;
|
||||
sub powershift;
|
||||
sub shadowdir;
|
||||
sub rmshadow;
|
||||
|
||||
my $cdb = esmith::ConfigDB->open_ro;
|
||||
my $adb = esmith::AccountsDB->open_ro();
|
||||
|
||||
my $smb = $cdb->get('smb') or die "No smb db entry found\n";
|
||||
my $shadowdir = $smb->prop('ShadowDir') || '/home/e-smith/files/.shadow';
|
||||
my $shadowcopy = $smb->prop('ShadowCopy') || 'disabled';
|
||||
my $offset = ($smb->prop('ShadowCount') || 2) - 2;
|
||||
$offset = 0 if $offset < 0;
|
||||
|
||||
exit unless -d $shadowdir;
|
||||
exit if $shadowcopy eq 'disabled';
|
||||
|
||||
my $filesdir = '/home/e-smith/files';
|
||||
my $snapfmt = '@GMT-%Y.%m.%d-%H.%M.%S';
|
||||
|
||||
# Switch old shadow directories to new format
|
||||
opendir(SHADOW, $shadowdir);
|
||||
foreach my $s ( grep { /^\d/ && ! -l "$shadowdir/$_" && -d "$shadowdir/$_" } readdir SHADOW ) {
|
||||
my @stat = stat("$shadowdir/$s");
|
||||
rename "$shadowdir/$s", "$shadowdir/".strftime($snapfmt, gmtime($stat[9]));
|
||||
symlink strftime($snapfmt, gmtime($stat[9])), "$shadowdir/$s";
|
||||
}
|
||||
closedir(SHADOW);
|
||||
|
||||
# remove old symlinks in ibays
|
||||
foreach my $ibay ($adb->ibays()) {
|
||||
my $ibaydir = 'ibays/' . $ibay->key . ( $ibay->prop('PublicAccess') eq 'none' ? '/files' : '' );
|
||||
|
||||
opendir(IBAY, "$filesdir/$ibaydir") || next;
|
||||
unlink "$filesdir/$ibaydir/$_" foreach (grep /^\@GMT-/, readdir(IBAY));
|
||||
closedir(IBAY);
|
||||
}
|
||||
|
||||
# remove old symlinks in ibays
|
||||
foreach my $user ($adb->users()) {
|
||||
my $userdir = 'users/' . $user->key . '/home';
|
||||
|
||||
opendir(USER, "$filesdir/$userdir") || next;
|
||||
unlink "$filesdir/$userdir/$_" foreach (grep /^\@GMT-/, readdir(USER));
|
||||
closedir(USER);
|
||||
}
|
||||
|
||||
# Create sync point if it doesn't already exist
|
||||
my $snapdir = strftime($snapfmt, gmtime(time));
|
||||
if ( -d "$shadowdir/0" ) {
|
||||
rename "$shadowdir/".readlink("$shadowdir/0"), "$shadowdir/$snapdir";
|
||||
unlink "$shadowdir/0";
|
||||
} else {
|
||||
mkdir "$shadowdir/$snapdir";
|
||||
}
|
||||
symlink "$snapdir", "$shadowdir/0";
|
||||
|
||||
# Create list of ibays and users to shadow
|
||||
my ($ibays, $users, $link) = ('','','');
|
||||
my @ibays = grep { ($_->prop('ShadowCopy') || 'enabled') ne 'disabled' } $adb->ibays();
|
||||
$ibays = "$filesdir/./ibays/{" . join(',', map { $_->key } @ibays) . "}/" if scalar @ibays > 1;
|
||||
$ibays = "$filesdir/./ibays/" . $ibays[0]->key . "/" if scalar @ibays == 1;
|
||||
my @users = grep { ($_->prop('ShadowCopy') || 'enabled') ne 'disabled' } $adb->users();
|
||||
$users = "$filesdir/./users/{" . join(',', map { $_->key } @users) . "}/home/" if scalar @users > 1;
|
||||
$users = "$filesdir/./users/" . $users[0]->key . "/home/" if scalar @users == 1;
|
||||
$link = "--link-dest ../1" if -d "$shadowdir/1";
|
||||
|
||||
# Sync directories to shadow directory
|
||||
if ( $ibays || $users) {
|
||||
system("rsync -aHmR --partial --delete --delete-excluded --exclude 'aquota.*' $link $ibays $users $shadowdir/0/") == 0
|
||||
or die "Couldn't sync directories";
|
||||
}
|
||||
|
||||
# Shift directories using geometric roll-off (only if different)
|
||||
if ( -d "$shadowdir/1" ) {
|
||||
if (system("diff -qr $shadowdir/0 $shadowdir/1 &> /dev/null") == 0) {
|
||||
rmshadow("$shadowdir/0");
|
||||
} else {
|
||||
powershift(2) if -d shadowdir(-$offset);
|
||||
for (my $i=2; $i >= -$offset; $i--) {
|
||||
rename shadowdir($i), shadowdir($i+1)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
rename "$shadowdir/0", "$shadowdir/1";
|
||||
}
|
||||
|
||||
sub rmshadow {
|
||||
my $d = shift;
|
||||
if ( -l "$d" ) {
|
||||
rmtree dirname($d)."/".readlink($d);
|
||||
unlink "$d";
|
||||
} elsif ( -d "$d" ) {
|
||||
rmtree "$d"
|
||||
}
|
||||
}
|
||||
|
||||
sub shadowdir {
|
||||
my $i = shift;
|
||||
return "$shadowdir/".($i+$offset);
|
||||
}
|
||||
|
||||
sub stagger {
|
||||
my $i = shift;
|
||||
return $i + ($i >> 1);
|
||||
}
|
||||
|
||||
sub powershift {
|
||||
my $i = shift;
|
||||
if ( -d shadowdir(stagger($i)) ) {
|
||||
my $n = powershift($i << 1);
|
||||
$i = $n >> 1;
|
||||
rename shadowdir(stagger($i)), shadowdir($n) if -d shadowdir(stagger($i));
|
||||
rmshadow(shadowdir($i));
|
||||
} else {
|
||||
rename shadowdir($i), shadowdir(stagger($i)) if -d shadowdir($i);
|
||||
}
|
||||
return $i;
|
||||
}
|
40
root/etc/e-smith/events/actions/store-ldap-smbpasswd
Normal file
40
root/etc/e-smith/events/actions/store-ldap-smbpasswd
Normal file
@ -0,0 +1,40 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# copyright (C) 2010 Firewall Services
|
||||
# daniel@firewall-services.com
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it 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
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
use esmith::ConfigDB;
|
||||
use esmith::util;
|
||||
|
||||
my $c = esmith::ConfigDB->open_ro;
|
||||
my $l = $c->get('ldap') || die "ldap service not found\n";
|
||||
my $s = $l->prop('status') || 'disabled';
|
||||
unless ( $s eq 'enabled' ){
|
||||
warn "Not running action script $0, LDAP service not enabled!\n";
|
||||
exit(0);
|
||||
}
|
||||
exit(0) unless ($l->prop('Authentication') || 'disabled') eq 'enabled';
|
||||
|
||||
my $domain = $c->get("DomainName")
|
||||
|| die("Could not determine domain name");
|
||||
my $base = esmith::util::ldapBase ($domain->value);
|
||||
my $pw = esmith::util::LdapPassword();
|
||||
|
||||
die "Error storing LDAP password in secret.tdb\n" unless
|
||||
system('/usr/bin/smbpasswd', '-w', "$pw") == 0;
|
106
root/etc/e-smith/events/actions/update-domain-group-maps
Normal file
106
root/etc/e-smith/events/actions/update-domain-group-maps
Normal file
@ -0,0 +1,106 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
package esmith;
|
||||
|
||||
use strict;
|
||||
use Errno;
|
||||
use esmith::AccountsDB;
|
||||
use esmith::ConfigDB;
|
||||
use esmith::util;
|
||||
|
||||
# events: console-save, bootstrap-console-save, group-modify-samba, group-create
|
||||
# post-install, post-upgrade, workgroup-update
|
||||
my $debug = "--debuglevel=1";
|
||||
|
||||
my $a = esmith::AccountsDB->open_ro or die "Couldn't open accounts db\n";
|
||||
my $c = esmith::ConfigDB->open_ro or die "Could not open Config DB";
|
||||
|
||||
my $ldapauth = $c->get('ldap')->prop('Authentication') || 'disabled';
|
||||
my $pw = esmith::util::LdapPassword();
|
||||
|
||||
my $g = `/usr/bin/net getlocalsid`;
|
||||
unless ($g =~ /SID.*is: (.+)/) {
|
||||
warn "Unable to determine SID. Clearning cache to see if it helps.";
|
||||
rename '/etc/samba/secrets.tdb','/etc/samba/secrets.'.time;
|
||||
rename '/var/cache/samba/gencache.tdb','/var/cache/samba/gencache.'.time;
|
||||
rename '/var/cache/samba/wins.dat','/var/cache/samba/wins.'.time;
|
||||
$g = `/usr/bin/net getlocalsid`;
|
||||
$g =~ /SID.*is: (.+)/ or die "Could not get current sid\n";
|
||||
if ($ldapauth eq 'enabled')
|
||||
{
|
||||
# Add the LDAP admin password in secret.tdb
|
||||
warn "Couldn't add LDAP password in secret.tdb\n" unless
|
||||
system("/usr/bin/smbpasswd", "-w", "$pw") == 0;
|
||||
}
|
||||
}
|
||||
my $local_sid = $1;
|
||||
|
||||
my %mappings = (
|
||||
'Domain Admins' => 'admin',
|
||||
'Domain Users' => 'shared',
|
||||
'Domain Guests' => 'nobody',
|
||||
(map { $_->prop('FirstName')." ".$_->prop('LastName'), $_->key } $a->users()),
|
||||
(map { $_->prop('Description'), $_->key } $a->groups()));
|
||||
|
||||
$mappings{$a->get_prop('admin','FirstName')." ".$a->get_prop('admin','LastName')} = 'admin' unless $mappings{'Domain Admins'} eq 'admin';
|
||||
|
||||
my %ridmap = (
|
||||
'Domain Admins' => '512',
|
||||
'Domain Users' => '513',
|
||||
'Domain Guests' => '514');
|
||||
|
||||
my %sidmap = ();
|
||||
foreach (`/usr/bin/net groupmap list`)
|
||||
{
|
||||
chomp;
|
||||
if (/^(.*?) \((S-.*-(\d+))\) -> (.*)$/)
|
||||
{
|
||||
my ($nt, $sid, $rid, $group) = ($1, $2, $3, $4);
|
||||
|
||||
# Skip local groups
|
||||
next if ($sid =~ /^S-1-5-32-\d+$/);
|
||||
|
||||
if (exists $mappings{$nt})
|
||||
{
|
||||
if ($ridmap{$nt} && $ridmap{$nt} ne $rid)
|
||||
{
|
||||
# Wrong (old?) sid
|
||||
system('/usr/bin/net','groupmap','delete',"sid=$sid");
|
||||
}
|
||||
elsif ($sid =~ /^$local_sid-/)
|
||||
{
|
||||
my $ug = $mappings{$nt};
|
||||
if ($group eq $ug)
|
||||
{
|
||||
$sidmap{$nt} = 'done';
|
||||
}
|
||||
else
|
||||
{
|
||||
system('/usr/bin/net','groupmap','delete',"sid=$sid");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
# Wrong (old?) sid
|
||||
system('/usr/bin/net','groupmap','delete',"sid=$sid");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
# Non existant group
|
||||
system('/usr/bin/net','groupmap','delete',"sid=$sid");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach (keys %mappings)
|
||||
{
|
||||
next if $sidmap{$_} && $sidmap{$_} eq 'done';
|
||||
system('/usr/bin/net',$debug,
|
||||
'groupmap','add',
|
||||
"ntgroup=$_",
|
||||
"unixgroup=" . $mappings{$_},
|
||||
$ridmap{$_} ? "rid=$ridmap{$_}" : (),
|
||||
$sidmap{$_} && ! $ridmap{$_} ? "sid=$sidmap{$_}" : (),
|
||||
'type=d');
|
||||
}
|
59
root/etc/e-smith/events/actions/user-create-profiledir
Normal file
59
root/etc/e-smith/events/actions/user-create-profiledir
Normal file
@ -0,0 +1,59 @@
|
||||
#!/usr/bin/perl -w
|
||||
#----------------------------------------------------------------------
|
||||
# copyright (C) 2001-2005 Mitel Networks Corporation
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it 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
|
||||
#
|
||||
#----------------------------------------------------------------------
|
||||
package esmith;
|
||||
|
||||
use strict;
|
||||
use Errno;
|
||||
use esmith::util;
|
||||
|
||||
use esmith::AccountsDB;
|
||||
my $adb = esmith::AccountsDB->open_ro();
|
||||
|
||||
my $event = $ARGV [0];
|
||||
|
||||
my @users = ('admin', map { $_->key } $adb->users);
|
||||
|
||||
my @newusers = ( not defined $ARGV[1] ) ? @users : $ARGV[1] ;
|
||||
|
||||
foreach my $user ( @newusers )
|
||||
{
|
||||
die "$user is not a user account\n"
|
||||
unless ( grep /^$user$/, @users );
|
||||
|
||||
my @dirs = ("/home/e-smith/files/samba/profiles/$user","/home/e-smith/files/samba/profiles/${user}.V2",
|
||||
"/home/e-smith/files/samba/profiles/${user}.V3","/home/e-smith/files/samba/profiles/${user}.V4",
|
||||
"/home/e-smith/files/samba/profiles/${user}.V5","/home/e-smith/files/samba/profiles/${user}.V6");
|
||||
|
||||
foreach my $dir (@dirs)
|
||||
{
|
||||
my $pre_existing = ( -d $dir );
|
||||
|
||||
$pre_existing || mkdir $dir, 700 || die "Couldn't create directory $dir\n";
|
||||
|
||||
chmod 0700, $dir; # Remove setgid bit
|
||||
|
||||
next if $pre_existing;
|
||||
|
||||
esmith::util::chownFile($user, $user, $dir) ||
|
||||
die "Couldn't change ownership of $dir\n";
|
||||
}
|
||||
}
|
||||
|
||||
exit (0);
|
50
root/etc/e-smith/events/actions/user-delete-profiledir
Normal file
50
root/etc/e-smith/events/actions/user-delete-profiledir
Normal file
@ -0,0 +1,50 @@
|
||||
#!/usr/bin/perl -w
|
||||
#----------------------------------------------------------------------
|
||||
# copyright (C) 1999-2005 Mitel Networks Corporation
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it 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
|
||||
#
|
||||
#----------------------------------------------------------------------
|
||||
package esmith;
|
||||
|
||||
use strict;
|
||||
use Errno;
|
||||
use File::Path;
|
||||
|
||||
use esmith::AccountsDB;
|
||||
my $adb = esmith::AccountsDB->open_ro();
|
||||
|
||||
my $event = $ARGV [0];
|
||||
my $account = $ARGV [1];
|
||||
|
||||
$a = $adb->get($account) || undef;
|
||||
unless ( defined $a && $a->prop('type') eq "user-deleted" )
|
||||
{
|
||||
warn "$account is not a user account\n";
|
||||
exit (0);
|
||||
}
|
||||
|
||||
my @dirs = ("/home/e-smith/files/samba/profiles/$account","/home/e-smith/files/samba/profiles/$account.V2",
|
||||
"/home/e-smith/files/samba/profiles/$account.V3","/home/e-smith/files/samba/profiles/$account.V4",
|
||||
"/home/e-smith/files/samba/profiles/$account.V5","/home/e-smith/files/samba/profiles/$account.V6");
|
||||
|
||||
foreach (@dirs) {
|
||||
|
||||
next unless -d $_;
|
||||
rmtree( $_ ) || die "Couldn't remove tree $_\n";
|
||||
|
||||
}
|
||||
|
||||
exit (0);
|
0
root/etc/e-smith/events/bootstrap-console-save/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/bootstrap-console-save/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/console-save/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/console-save/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/group-create/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/group-create/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/group-delete/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/group-delete/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/group-modify/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/group-modify/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/ibay-create/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/ibay-create/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/ibay-delete/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/ibay-delete/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/ibay-modify-servers/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/ibay-modify-servers/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/ibay-modify/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/ibay-modify/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/machine-account-create/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/machine-account-create/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/network-create/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/network-create/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/network-delete/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/network-delete/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/post-install/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/post-install/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/post-upgrade/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/post-upgrade/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/printer-create/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/printer-create/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/printer-delete/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/printer-delete/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/user-create/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/user-create/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/user-delete/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/user-delete/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/user-modify/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/user-modify/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/workgroup-update/.gitignore
vendored
Normal file
0
root/etc/e-smith/events/workgroup-update/.gitignore
vendored
Normal file
@ -0,0 +1,85 @@
|
||||
<!-- vim: ft=xml:
|
||||
-->
|
||||
<lexicon lang="en-us">
|
||||
<entry>
|
||||
<base>FORM_TITLE</base>
|
||||
<trans>Change workgroup settings</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>DESC_WORKGROUP</base>
|
||||
<trans>
|
||||
<![CDATA[
|
||||
Enter the name of the Windows workgroup that this server should appear in.
|
||||
]]>
|
||||
</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>LABEL_WORKGROUP</base>
|
||||
<trans>Windows workgroup</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>DESC_SERVERNAME</base>
|
||||
<trans>Enter the name that this server should use for
|
||||
Windows and Macintosh file sharing.</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>LABEL_SERVERNAME</base>
|
||||
<trans>Server Name</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>DESC_PDC</base>
|
||||
<trans><![CDATA[Should this server act as the workgroup
|
||||
and domain controller on your Windows network? You should leave
|
||||
this set to <b>No</b> if another server is already performing this
|
||||
role on your network.]]>
|
||||
</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>LABEL_PDC</base>
|
||||
<trans>Workgroup and Domain Controller</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>DESC_ROAM</base>
|
||||
<trans><![CDATA[
|
||||
Should this server support roaming profiles?
|
||||
You should leave this set to the default of <b>No</b> unless you have
|
||||
experience administering server-based Windows roaming profiles and
|
||||
know that this feature is required.
|
||||
]]>
|
||||
</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>LABEL_ROAM</base>
|
||||
<trans>Roaming profiles</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>SUCCESS</base>
|
||||
<trans>
|
||||
The new workgroup settings have been saved
|
||||
</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>INVALID_WORKGROUP</base>
|
||||
<trans>The workgroup name must begin with a letter (upper or lower
|
||||
case), followed by any combination of letters, numbers,
|
||||
underscores, periods and hyphens.
|
||||
</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>INVALID_SERVERNAME</base>
|
||||
<trans>The server name must begin with a letter (upper or lower case),
|
||||
followed by any combination of letters, numbers, underscores and
|
||||
hyphens.
|
||||
</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>INVALID_WORKGROUP_MATCHES_SERVERNAME</base>
|
||||
<trans>The server and workgroup names match, when compared in lower case.
|
||||
These values must be different in order for filesharing to be turned on.
|
||||
</trans>
|
||||
</entry>
|
||||
<entry>
|
||||
<base>Workgroup</base>
|
||||
<trans>Workgroup</trans>
|
||||
</entry>
|
||||
</lexicon>
|
2
root/etc/e-smith/templates.metadata/etc/samba/smb.conf
Normal file
2
root/etc/e-smith/templates.metadata/etc/samba/smb.conf
Normal file
@ -0,0 +1,2 @@
|
||||
TEMPLATE_PATH="/etc/smb.conf"
|
||||
OUTPUT_FILENAME="/etc/samba/smb.conf"
|
2
root/etc/e-smith/templates.metadata/etc/smb.conf
Normal file
2
root/etc/e-smith/templates.metadata/etc/smb.conf
Normal file
@ -0,0 +1,2 @@
|
||||
TEMPLATE_PATH="/etc/smb.conf"
|
||||
OUTPUT_FILENAME="/etc/samba/smb.conf"
|
3
root/etc/e-smith/templates/etc/krb5.conf/00usedb
Normal file
3
root/etc/e-smith/templates/etc/krb5.conf/00usedb
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
use esmith::db;
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
# Configuration snippets may be placed in this directory as well
|
||||
# See https://bugs.contribs.org/show_bug.cgi?id=11093
|
||||
#includedir /etc/krb5.conf.d/
|
4
root/etc/e-smith/templates/etc/krb5.conf/05logging
Normal file
4
root/etc/e-smith/templates/etc/krb5.conf/05logging
Normal file
@ -0,0 +1,4 @@
|
||||
[logging]
|
||||
default = FILE:/var/log/krb5libs.log
|
||||
kdc = FILE:/var/log/krb5kdc.log
|
||||
admin_server = FILE:/var/log/kadmind.log
|
1
root/etc/e-smith/templates/etc/krb5.conf/10libdefaults
Normal file
1
root/etc/e-smith/templates/etc/krb5.conf/10libdefaults
Normal file
@ -0,0 +1 @@
|
||||
[libdefaults]
|
6
root/etc/e-smith/templates/etc/krb5.conf/15settings
Normal file
6
root/etc/e-smith/templates/etc/krb5.conf/15settings
Normal file
@ -0,0 +1,6 @@
|
||||
ticket_lifetime = 24h
|
||||
renew_lifetime = 7d
|
||||
forwardable = true
|
||||
rdns = false
|
||||
default_ccache_name = KEYRING:persistent:%{uid}
|
||||
|
8
root/etc/e-smith/templates/etc/krb5.conf/20default_realm
Normal file
8
root/etc/e-smith/templates/etc/krb5.conf/20default_realm
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
my $workgroup = $smb{Workgroup} || 'sme-server';
|
||||
my $realm = $smb{realm} || $workgroup . "." . $DomainName;
|
||||
|
||||
my $default_realm = $smb{realm} || $workgroup . "." .$DomainName;
|
||||
|
||||
"default_realm = $default_realm";
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
my $dns_lookup_realm = $krb5{DNSLookupRealm} || 'false';
|
||||
|
||||
"dns_lookup_realm = $dns_lookup_realm";
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
my $dns_lookup_kdc = $krb5{DNSLookupKDC} || 'true';
|
||||
|
||||
"dns_lookup_kdc = $dns_lookup_kdc";
|
||||
}
|
5
root/etc/e-smith/templates/etc/krb5.conf/40realms
Normal file
5
root/etc/e-smith/templates/etc/krb5.conf/40realms
Normal file
@ -0,0 +1,5 @@
|
||||
[realms]
|
||||
# EXAMPLE.COM = {
|
||||
# kdc = kerberos.example.com
|
||||
# admin_server = kerberos.example.com
|
||||
# }
|
3
root/etc/e-smith/templates/etc/krb5.conf/50domain_realm
Normal file
3
root/etc/e-smith/templates/etc/krb5.conf/50domain_realm
Normal file
@ -0,0 +1,3 @@
|
||||
[domain_realm]
|
||||
# .example.com = EXAMPLE.COM
|
||||
# example.com = EXAMPLE.COM
|
@ -0,0 +1 @@
|
||||
include /etc/openldap/schema/samba.schema
|
@ -0,0 +1,4 @@
|
||||
index sambaSID eq,pres
|
||||
index sambaPrimaryGroupSID eq,pres
|
||||
index sambaDomainName eq,pres
|
||||
|
@ -0,0 +1,13 @@
|
||||
access to attrs=sambaNTPassword
|
||||
by self peername.ip="127.0.0.1" read
|
||||
by self ssf=128 read
|
||||
by anonymous peername.ip="127.0.0.1" auth
|
||||
by anonymous ssf=128 auth
|
||||
by * none
|
||||
access to attrs=sambaLMPassword
|
||||
by self peername.ip="127.0.0.1" read
|
||||
by self ssf=128 read
|
||||
by anonymous peername.ip="127.0.0.1" auth
|
||||
by anonymous ssf=128 auth
|
||||
by * none
|
||||
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
|
||||
# Sensible attributes related to sambaSamAccount
|
||||
push @users, qw/sambaAcctFlags sambaBadPasswordCount sambaBadPasswordTime sambaKickoffTime sambaLogoffTime sambaLogonHours sambaPasswordHistory sambaSID sambaPrimaryGroupSID sambaPwdCanChange sambaPwdLastSet sambaPwdMustChange sambaUserWorkstations sambaSIDList sambaGroupType/;
|
||||
|
||||
$OUT .= '';
|
||||
|
||||
}
|
4
root/etc/e-smith/templates/etc/pam.d/samba/20auth
Normal file
4
root/etc/e-smith/templates/etc/pam.d/samba/20auth
Normal file
@ -0,0 +1,4 @@
|
||||
auth required pam_nologin.so
|
||||
auth { -f "/lib/security/pam_pwdb.so" ||
|
||||
-f "/lib64/security/pam_pwdb.so" ? "required pam_stack.so service=system-auth" :
|
||||
"include system-auth" }
|
3
root/etc/e-smith/templates/etc/pam.d/samba/30account
Normal file
3
root/etc/e-smith/templates/etc/pam.d/samba/30account
Normal file
@ -0,0 +1,3 @@
|
||||
account { -f "/lib/security/pam_pwdb.so" ||
|
||||
-f "/lib64/security/pam_pwdb.so" ? "required pam_stack.so service=system-auth" :
|
||||
"include system-auth" }
|
3
root/etc/e-smith/templates/etc/pam.d/samba/40password
Normal file
3
root/etc/e-smith/templates/etc/pam.d/samba/40password
Normal file
@ -0,0 +1,3 @@
|
||||
password { -f "/lib/security/pam_pwdb.so" ||
|
||||
-f "/lib64/security/pam_pwdb.so" ? "required pam_stack.so service=system-auth" :
|
||||
"include system-auth" }
|
3
root/etc/e-smith/templates/etc/pam.d/samba/50session
Normal file
3
root/etc/e-smith/templates/etc/pam.d/samba/50session
Normal file
@ -0,0 +1,3 @@
|
||||
session { -f "/lib/security/pam_pwdb.so" ||
|
||||
-f "/lib64/security/pam_pwdb.so" ? "required pam_stack.so service=system-auth" :
|
||||
"include system-auth" }
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
$OUT = <<HERE;
|
||||
#%PAM-1.0
|
||||
HERE
|
||||
|
||||
$OUT .=
|
||||
Text::Template::_load_text("/etc/e-smith/templates-default/template-begin");
|
||||
}
|
9
root/etc/e-smith/templates/etc/rsyslog.conf/32samba
Normal file
9
root/etc/e-smith/templates/etc/rsyslog.conf/32samba
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
#smbd
|
||||
:programname, isequal, "smbd" /var/log/smbd/smbd.log
|
||||
& stop
|
||||
|
||||
#nmbd
|
||||
:programname, isequal, "nmbd" /var/log/nmbd/nmbd.log
|
||||
& stop
|
||||
|
2
root/etc/e-smith/templates/etc/rsyslog.conf/46smbAudit
Normal file
2
root/etc/e-smith/templates/etc/rsyslog.conf/46smbAudit
Normal file
@ -0,0 +1,2 @@
|
||||
local5.notice /var/log/samba/samba_audit
|
||||
local5.notice stop
|
1
root/etc/e-smith/templates/etc/samba/smbusers/10unused
Normal file
1
root/etc/e-smith/templates/etc/samba/smbusers/10unused
Normal file
@ -0,0 +1 @@
|
||||
# This file is currently unused
|
5
root/etc/e-smith/templates/etc/smb.conf/00usedb
Normal file
5
root/etc/e-smith/templates/etc/smb.conf/00usedb
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
use esmith::db;
|
||||
|
||||
$vfs = ();
|
||||
}
|
8
root/etc/e-smith/templates/etc/smb.conf/00yesno
Normal file
8
root/etc/e-smith/templates/etc/smb.conf/00yesno
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
sub _yesno
|
||||
{
|
||||
my $arg = shift;
|
||||
|
||||
return (defined $arg) ? "yes" : "no";
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
$SMB_WINSServer = $DB->wins_server;
|
||||
|
||||
"";
|
||||
}
|
17
root/etc/e-smith/templates/etc/smb.conf/10globals
Normal file
17
root/etc/e-smith/templates/etc/smb.conf/10globals
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
# This is the main Samba configuration file. You should read the
|
||||
# smb.conf(5) manual page in order to understand the options listed
|
||||
# here. Samba has a huge number of configurable options (perhaps too
|
||||
# many!) most of which are not shown in this example
|
||||
#
|
||||
# Any line which starts with a ; (semi-colon) or a # (hash)
|
||||
# is a comment and is ignored. In this example we will use a #
|
||||
# for commentry and a ; for parts of the config file that you
|
||||
# may wish to enable
|
||||
#
|
||||
# NOTE: Whenever you modify this file you should run the command "testparm"
|
||||
# to check that you have not many any basic syntactic errors.
|
||||
#
|
||||
#======================= Global Settings =====================================
|
||||
}
|
||||
[global]
|
11
root/etc/e-smith/templates/etc/smb.conf/10recyclebin
Normal file
11
root/etc/e-smith/templates/etc/smb.conf/10recyclebin
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
$OUT = "";
|
||||
return unless (($smb{'RecycleBin'} || 'disabled') eq 'enabled');
|
||||
|
||||
$vfs->{recycle}->{versions} = ($smb{'KeepVersions'} || 'disabled') eq 'enabled' ? "True" : "False";
|
||||
$vfs->{recycle}->{repository} = "Recycle Bin";
|
||||
$vfs->{recycle}->{keeptree} = "True";
|
||||
$vfs->{recycle}->{touch} = "True";
|
||||
$vfs->{recycle}->{exclude} = "*.tmp,*.temp,*.o,*.obj,~\$*";
|
||||
$vfs->{recycle}->{exclude_dir} = "tmp,temp,cache";
|
||||
}
|
8
root/etc/e-smith/templates/etc/smb.conf/10shadowcopy
Normal file
8
root/etc/e-smith/templates/etc/smb.conf/10shadowcopy
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
$OUT = "";
|
||||
return unless (($smb{'ShadowCopy'} || 'disabled') eq 'enabled');
|
||||
|
||||
$vfs->{shadow_copy2}->{snapdir} = $smb{ShadowDir} || '/home/e-smith/files/.shadow';
|
||||
$vfs->{shadow_copy2}->{basedir} = "/home/e-smith/files";
|
||||
$vfs->{shadow_copy2}->{fixinodes} = 'yes';
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
# Script to setup machine accounts
|
||||
}
|
||||
add machine script = /sbin/e-smith/signal-event machine-account-create '%u'
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
# This global parameter allows the Samba admin to limit what
|
||||
# interfaces on a machine will serve smb requests.
|
||||
}
|
||||
bind interfaces only = yes
|
4
root/etc/e-smith/templates/etc/smb.conf/11caseSensitive
Normal file
4
root/etc/e-smith/templates/etc/smb.conf/11caseSensitive
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
# Be very careful with case sensitivity - it can break things!
|
||||
}
|
||||
case sensitive = no
|
7
root/etc/e-smith/templates/etc/smb.conf/11deadtime
Normal file
7
root/etc/e-smith/templates/etc/smb.conf/11deadtime
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
$OUT = "";
|
||||
if ($smb{DeadTime})
|
||||
{
|
||||
$OUT .= "deadtime = $smb{DeadTime}";
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user