Compare commits

...

24 Commits

Author SHA1 Message Date
50005d8897 automatic version update by autodist [release 4.22.1-1mamba;Fri Apr 18 2025] 2025-04-19 01:18:36 +02:00
568932b8b8 automatic version update by autodist [release 4.22.0-1mamba;Sun Mar 09 2025] 2025-03-10 11:32:03 +01:00
3aed671657 automatic version update by autodist [release 4.21.4-1mamba;Tue Feb 18 2025] 2025-02-18 14:20:59 +01:00
0e7a594656 automatic version update by autodist [release 4.21.3-1mamba;Tue Jan 07 2025] 2025-01-07 10:06:38 +01:00
a2624d6db8 samba-server: call tmpfiles_create in post script to fix file not existing when called in pre script [release 4.21.2-2mamba;Fri Dec 06 2024] 2024-12-06 19:25:17 +01:00
8ab1bba673 automatic version update by autodist [release 4.21.2-1mamba;Tue Nov 26 2024] 2024-11-26 18:16:14 +01:00
d212a772ca fixed various problems in pre/post scripts [release 4.21.1-2mamba;Wed Oct 16 2024] 2024-10-17 11:39:11 +02:00
3f86435390 automatic version update by autodist [release 4.21.1-1mamba;Tue Oct 15 2024] 2024-10-15 17:10:42 +02:00
cc01928d00 samba-server.sysusers: create guest group to fix user creation [release 4.21.0-3mamba;Sat Sep 21 2024] 2024-09-22 02:51:08 +02:00
95c1f192e4 don't require python-ldb from obsolete ldb package [release 4.21.0-2mamba;Mon Sep 16 2024] 2024-09-19 20:17:23 +02:00
29586d2636 automatic version update by autodist [release 4.20.4-1mamba;Tue Aug 06 2024] 2024-08-09 09:52:29 +02:00
98c7f7c4b2 automatic version update by autodist [release 4.20.3-1mamba;Fri Aug 02 2024] 2024-08-03 10:26:05 +02:00
d906ee9d66 automatic version update by autodist [release 4.20.2-1mamba;Thu Jun 20 2024] 2024-06-22 13:47:06 +02:00
4bfb423bcd automatic version update by autodist [release 4.20.1-1mamba;Sun May 19 2024] 2024-05-22 10:10:09 +02:00
4c3ff0dc92 rebuilt with system ldb 2.9.0 [release 4.20.0-2mamba;Sat Apr 06 2024] 2024-04-06 15:21:13 +02:00
332b3691f7 automatic version update by autodist [release 4.20.0-1mamba;Fri Mar 29 2024] 2024-04-01 20:27:13 +02:00
caca509548 enable support for user shares by default and add sambashares group as expected by kde plasma
use systemd sysusers file to create groups and users [release 4.19.4-2mamba;Fri Jan 26 2024]
2024-01-27 09:56:59 +01:00
883f43dbba automatic version update by autodist [release 4.19.4-1mamba;Tue Jan 09 2024] 2024-01-09 14:02:04 +01:00
82921fa9d7 automatic version update by autodist [release 4.19.3-1mamba;Tue Nov 28 2023] 2024-01-05 17:37:46 +01:00
14555a8ac7 automatic version update by autodist [release 4.19.2-1mamba;Tue Oct 17 2023] 2024-01-05 17:37:42 +01:00
29d51bc15d automatic version update by autodist [release 4.19.1-1mamba;Wed Oct 11 2023] 2024-01-05 17:37:41 +01:00
40d5f4eb64 rebuilt with python3 == 3.11 [release 4.19.0-2mamba;Sun Oct 01 2023] 2024-01-05 17:37:39 +01:00
fc1b156686 automatic version update by autodist [release 4.19.0-1mamba;Sat Sep 09 2023] 2024-01-05 17:37:38 +01:00
80f842c79f automatic version update by autodist [release 4.18.6-1mamba;Thu Aug 17 2023] 2024-01-05 17:37:37 +01:00
22 changed files with 179 additions and 1206 deletions

View File

@ -1,57 +0,0 @@
--- samba-3.0.23/examples/LDAP/smbldap-tools-0.9.2/smbldap_tools.pm 2006-01-03 11:57:41.000000000 +0100
+++ samba-3.0.23/examples/LDAP/smbldap-tools-0.9.2/smbldap_tools.pm.fix 2006-10-10 10:12:42.000000000 +0200
@@ -32,15 +32,15 @@
# ugly funcs using global variables and spawning openldap clients
my $smbldap_conf;
-if (-e "/etc/smbldap-tools/smbldap.conf") {
- $smbldap_conf="/etc/smbldap-tools/smbldap.conf";
+if (-e "/etc/samba/smbldap-tools/smbldap.conf") {
+ $smbldap_conf="/etc/samba/smbldap-tools/smbldap.conf";
} else {
$smbldap_conf="/etc/opt/IDEALX/smbldap-tools/smbldap.conf";
}
my $smbldap_bind_conf;
-if (-e "/etc/smbldap-tools/smbldap_bind.conf") {
- $smbldap_bind_conf="/etc/smbldap-tools/smbldap_bind.conf";
+if (-e "/etc/samba/smbldap-tools/smbldap_bind.conf") {
+ $smbldap_bind_conf="/etc/samba/smbldap-tools/smbldap_bind.conf";
} else {
$smbldap_bind_conf="/etc/opt/IDEALX/smbldap-tools/smbldap_bind.conf";
}
@@ -51,6 +51,10 @@
$samba_conf="/usr/local/samba/lib/smb.conf";
}
+# system-wide LDAP configuration files
+my $ldap_conf="/etc/ldap.conf";
+my $ldap_secret="/etc/ldap.secret";
+
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
use Exporter;
$VERSION = 1.00;
@@ -168,7 +172,22 @@
$conf{$parameter}=$value;
}
close (CONFIGFILE);
- } else {
+
+ if (open (CONFIGFILE, "$ldap_secret")) {
+ $conf{masterPw} = <CONFIGFILE>;
+ chomp($conf{masterPw});
+ close (CONFIGFILE);
+
+ open (CONFIGFILE, "$ldap_conf") || die "Unable to open $ldap_conf for reading !\n";
+ while (<CONFIGFILE>) {
+ chomp($_);
+ next if ( ! /^\s*rootbinddn\s*.*/ );
+ $_ =~ s/^\s*rootbinddn\s*(.*)$/$1/;
+ $conf{masterDN}=$_;
+ }
+ close (CONFIGFILE);
+ }
+ } else {
$conf{slaveDN}=$conf{slavePw}=$conf{masterDN}=$conf{masterPw}="";
}
# automatically find SID

View File

@ -1,48 +0,0 @@
diff -Nru samba-3.2.4.orig/source/client/mount.cifs.c samba-3.2.4/source/client/mount.cifs.c
--- samba-3.2.4.orig/source/client/mount.cifs.c 2008-09-18 08:49:02.000000000 +0200
+++ samba-3.2.4/source/client/mount.cifs.c 2008-10-02 12:30:24.000000000 +0200
@@ -89,44 +89,6 @@
char * domain_name = NULL;
char * prefixpath = NULL;
-/* glibc doesn't have strlcpy, strlcat. Ensure we do. JRA. We
- * don't link to libreplace so need them here. */
-
-/* like strncpy but does not 0 fill the buffer and always null
- * terminates. bufsize is the size of the destination buffer */
-static size_t strlcpy(char *d, const char *s, size_t bufsize)
-{
- size_t len = strlen(s);
- size_t ret = len;
- if (bufsize <= 0) return 0;
- if (len >= bufsize) len = bufsize-1;
- memcpy(d, s, len);
- d[len] = 0;
- return ret;
-}
-
-/* like strncat but does not 0 fill the buffer and always null
- * terminates. bufsize is the length of the buffer, which should
- * be one more than the maximum resulting string length */
-static size_t strlcat(char *d, const char *s, size_t bufsize)
-{
- size_t len1 = strlen(d);
- size_t len2 = strlen(s);
- size_t ret = len1 + len2;
-
- if (len1+len2 >= bufsize) {
- if (bufsize < (len1+1)) {
- return ret;
- }
- len2 = bufsize - (len1+1);
- }
- if (len2 > 0) {
- memcpy(d+len1, s, len2);
- d[len1+len2] = 0;
- }
- return ret;
-}
-
/* BB finish BB
cifs_umount

View File

@ -1,22 +0,0 @@
Files a/client/.mount.cifs.c.swp and b/client/.mount.cifs.c.swp differ
diff -Nur a/client/mount.cifs.c b/client/mount.cifs.c
--- a/client/mount.cifs.c 2010-04-01 15:26:22.000000000 +0200
+++ b/client/mount.cifs.c 2010-04-15 13:20:41.997470980 +0200
@@ -97,7 +97,7 @@
* error if it is. If you wish to disable this check, then set the following
* #define to 1, but please realize that you do so at your own peril.
*/
-#define CIFS_DISABLE_SETUID_CHECK 0
+#define CIFS_DISABLE_SETUID_CHECK 1
/*
* By default, mount.cifs follows the conventions set forth by /bin/mount
@@ -112,7 +112,7 @@
* The legacy behavior is now disabled by default. To reenable it, set the
* following #define to true.
*/
-#define CIFS_LEGACY_SETUID_CHECK 0
+#define CIFS_LEGACY_SETUID_CHECK 1
/*
* When an unprivileged user runs a setuid mount.cifs, we set certain mount

View File

@ -1,10 +0,0 @@
--- samba-4.0.0/source3/wscript_build.bero 2012-12-14 16:47:47.124053374 +0100
+++ samba-4.0.0/source3/wscript_build 2012-12-14 16:49:54.517558570 +0100
@@ -977,6 +977,7 @@ bld.SAMBA3_LIBRARY('smbd_base',
NDR_SMB_ACL
netapi
''' + bld.env['dmapi_lib'],
+ ldflags='-ltirpc',
private_library=True,
vars=locals())

View File

@ -1,13 +0,0 @@
diff -Nru samba-4.1.14.orig/wscript samba-4.1.14/wscript
--- samba-4.1.14.orig/wscript 2014-12-01 13:48:32.000000000 +0100
+++ samba-4.1.14/wscript 2014-12-19 16:39:08.460000000 +0100
@@ -155,9 +155,6 @@
# allows us to find problems on our development hosts faster.
# It also results in faster load time.
- if not sys.platform.startswith("openbsd"):
- conf.env.asneeded_ldflags = conf.ADD_LDFLAGS('-Wl,--as-needed', testflags=True)
-
if not conf.CHECK_NEED_LC("-lc not needed"):
conf.ADD_LDFLAGS('-lc', testflags=False)

View File

@ -1,13 +0,0 @@
--- a/lib/replace/system/network.h 2019-01-15 21:07:00.000000000 +1100
+++ b/lib/replace/system/network.h.new 2019-08-27 23:28:56.106742843 +1000
@@ -87,10 +87,6 @@
#include <sys/uio.h>
#endif
-#ifdef HAVE_STROPTS_H
-#include <stropts.h>
-#endif
-
#ifndef HAVE_SOCKLEN_T
#define HAVE_SOCKLEN_T
typedef int socklen_t;

View File

@ -0,0 +1,15 @@
--- samba-4.19.4/examples/smb.conf.default.orig 2024-01-26 18:01:53.376647291 +0100
+++ samba-4.19.4/examples/smb.conf.default 2024-01-26 18:05:15.617045920 +0100
@@ -112,6 +112,12 @@
idmap config * : backend = tdb
idmap config * : range = 3000-7999
+# Enable support for user configurable shares
+usershare path = /var/lib/samba/usershares
+usershare max shares = 100
+usershare allow guests = yes
+usershare owner only = yes
+
#============================ Share Definitions ==============================
[homes]
comment = Home Directories

View File

@ -1,86 +0,0 @@
[global]
unix charset = UTF-8
netbios name = %HOSTNAME
server string =
workgroup = %DOMAIN
os level = 64
preferred master = no
domain master = no
local master = no
security = user
guest account = guest
passdb backend = smbpasswd
encrypt passwords = yes
domain logons = no
log file = /var/log/samba/log.%m
log level = 1
logon path = \\%L\profiles\%U
logon drive = H:
logon home = \\%N\home\%u
logon script = logon.cmd
# ldap machine suffix = ou=Machines
# ldap user suffix = ou=People
# ldap group suffix = ou=Groups
# ldap idmap suffix = ou=Idmap
load printers = yes
printing = cups
printcap name = cups
# add user script= /usr/lib/samba/sbin/smbldap-useradd -a -m '%u'
# delete user script = /usr/lib/samba/sbin/smbldap-userdel %u
# add group script = /usr/lib/samba/sbin/smbldap-groupadd -p '%g'
# delete group script = /usr/lib/samba/sbin/smbldap-groupdel '%g'
# add user to group script = /usr/lib/samba/sbin/smbldap-groupmod -m '%u' '%g'
# delete user from group script = /usr/lib/samba/sbin/smbldap-groupmod -x '%u' '%g'
# set primary group script = /usr/lib/samba/sbin/smbldap-usermod -g '%g' '%u'
# add machine script = /usr/lib/samba/sbin/smbldap-useradd -w '%u'
map acl inherit = Yes
winbind separator = /
[netlogon]
comment = Network Logon Service
path = /var/lib/samba/netlogon
guest ok = Yes
locking = no
[profiles]
comment = Profile Share
path = /var/lib/samba/profiles
read only = no
profile acls = Yes
create mask = 0600
directory mask = 0700
[profdata]
comment = Profile Data Share
path = /var/lib/samba/profdata
read only = No
profile acls = Yes
[homes]
comment = Home Directory for : %u
path = /home/%u
read only = No
browseable = No
root preexec = /usr/lib/samba/sbin/mkhomedir.sh %u
[shared]
comment = Shared files for user %u
path = /home/%u/shared
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
browseable = yes
guest ok = no
read only = yes
write list = Administrator
[printers]
comment = SMB Print spool
path = /var/spool/samba
browseable = no
public = yes
guest ok = yes
writable = no
printable = yes
printer admin = Administrator, @ntadmins

View File

@ -1,57 +0,0 @@
#!/bin/sh
# Copyright (c) 2003-2007 Silvan Calarco <ilvan.calarco@mambasotf@org>
# Copyright (c) 2007 Davide Madrisan <davide.madrisan@gmail.com>
#
# chkconfig: 2345 55 15
# description: start Samba daemons (nmbd and smbd)
. /etc/sysconfig/rc
. $rc_functions
NAME=samba
NMBD=/usr/sbin/nmbd
SMBD=/usr/sbin/smbd
NMBDPID=/run/nmbd.pid
SMBDPID=/run/smbd.pid
[ -x $SMBD -a -x $NMBD ] || exit 0
[ -r /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME
case "$1" in
start)
echo -n "Starting nmbd: "
daemon --pidfile=$NMBDPID $NMBD -D
evaluate_retval; echo
echo -n "Starting smbd: "
daemon --pidfile=$SMBDPID $SMBD -D
evaluate_retval; echo
;;
stop)
echo -n "Stopping nmbd: "
killproc -p $NMBDPID $NMBD -TERM
echo
sleep 1
echo -n "Stopping smbd: "
killproc -p $SMBDPID $SMBD -TERM
echo
;;
reload)
echo -n "Reloading smbd: "
reloadproc $SMBD
echo
;;
restart|force-reload)
$0 stop
sleep 1
$0 start
;;
status)
statusproc $NMBD
statusproc $SMBD
;;
*)
echo "Usage: /etc/init.d/$NAME {start|stop|reload|restart|force-reload|status}"
exit 1
;;
esac

View File

@ -1 +0,0 @@
/usr/lib/samba

View File

@ -1,7 +0,0 @@
# This file provides the same function that the lmhosts file does for
# Windows. It's another way to map netbios names to ip addresses.
#
# Cf. section 'name resolve order' in the manual page of smb.conf for
# more information.
127.0.0.1 localhost

View File

@ -1,34 +0,0 @@
#!/bin/sh
# mkhomedir.sh -- automatically create user homedirs for Samba DC users
# Copyright (C) 2005 Silvan Calarco <silvan.calarco@qilinux.it>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License version 2 as published by the
# Free Software Foundation. There is NO warranty; not even for MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.
#
# me=${0##*/}
[ "$1" ] || {
echo "Usage: $0 <user>"
exit 1;
}
getent passwd $1 >/dev/null || {
echo "Error: user $1 does not exits. Exiting."
exit 1;
}
[ -e "/home" ] || {
echo "Error: directory /home does not exits. Exiting."
exit 1;
}
HOMEUSER=$1
HOMEDIR=/home/$1
[ -e "$HOMEDIR" ] && exit 0;
cp -a /etc/skel $HOMEDIR
chown -R "$HOMEUSER":"Domain Users" $HOMEDIR

View File

@ -1,8 +0,0 @@
#%PAM-1.0
auth sufficient pam_unix.so
auth include system-auth
account include system-auth
password include system-auth
session include system-auth
session required pam_limits.so
#session optional pam_console.so

View File

@ -1,285 +0,0 @@
#!/bin/bash
#
# qilinux_samba_ldap.sh :
# Configures LDAP directory for use with SAMBA as a PDC
# as well as Idealx SMB-LDAP scripts
#
# Copyright (c) 2004 by Silvan Calarco <silvan.calarco@qilinux.it>
#
source /etc/rc.d/init.d/ldap-functions
source /etc/sysconfig/defaults
test $UID = 0 ||
{ echo "error: $0: must be superuser" >&2
{ (exit 1); exit 1; }; }
set_ldap_environment
case $? in
0) ;;
1) echo "error: $0: cannot read base dn from /etc/ldap.conf; aborting.";
exit 1 ;;
*) echo "error: $0: cannot find host DN. Check HOSTDC in /etc/sysconfig/
ldap." ;;
esac
argc=$#
for ((i=1; i<=argc; i++)); do
case ${!i} in
*) if test -z "$LDAPPASSWORD"; then LDAPPASSWORD=${!i}
fi
esac
done
tempfile=`tempfile 2>/dev/null` || tempfile=/tmp/qilinux_samba_ldap.ldif
trap "rm -f $tempfile" 0 1 2 5 15
echo "Configuring Samba"
# this must be done before any other thing or net getlocalsid won't work
grep "ldap suffix" /etc/samba/smb.conf > /dev/null
if [ $? -eq 1 ]; then
sed -i "/.*logon script.*/a\\
ldap admin dn = $LDAPBINDDN\\
ldap server = 127.0.0.1\\
ldap port = 636\\
ldap ssl = start tls\\
ldap suffix = $LDAPHOSTDN" /etc/samba/smb.conf
fi
grep "ldap machine suffix" /etc/samba/smb.conf > /dev/null
if [ $? -eq 1 ]; then
sed -i "/.*ldap suffix.*/a\\
ldap user suffix = ou=People\\
ldap group suffix = ou=Groups\\
ldap machine suffix = ou=Domain Computers\\
ldap idmap suffix = ou=Idmap" /etc/samba/smb.conf
fi
sed -i "s|passdb backend =.*)|passdb backend = ldapsam|" /etc/samba/smb.conf
echo "Setting samba password for LDAP"
smbpasswd -w "`cat /etc/ldap.secret`"
echo "Adding LDAP entries"
DESTHOME="/home"
DN=$LDAPHOSTDN
STSID="`net getlocalsid 2>/dev/null`" || { echo "Error getting localsid. Aborting."; exit 1; }
SID=${STSID#*: }
sed -i "s|\$SID=.*|\$SID=\'$SID\';|
s|\$suffix = .*|\$suffix = \"$DN\";|
s|\$binddn = .*|\$binddn = \"$LDAPBINDDN\";|
s|\$UID_START = .*|\$UID_START = $MINUID;|
s|\$GID_START = .*|\$GID_START = $MINUID;|" \
/etc/samba/smbldap-tools/smbldap.conf
cat > $tempfile << _EOF
#
# $DN: LDAP base DN
# $DESTHOME: /home
# $_userSmbHome (optional)
# $_userHomeDrive (optional)
# $_userProfile (optional)
# $SID: machine SID
dn: ou=Groups,$LDAPHOSTDN
objectClass: organizationalUnit
ou: Groups
dn: ou=Machines,$LDAPHOSTDN
objectClass: organizationalUnit
ou: Machines
dn: uid=Administrator,ou=People,$LDAPHOSTDN
cn: Administrator
sn: Administrator
objectClass: inetOrgPerson
objectClass: sambaSamAccount
objectClass: posixAccount
gidNumber: 65400
uid: Administrator
uidNumber: 65400
homeDirectory: $DESTHOME/Administrator
sambaPwdLastSet: 0
sambaLogonTime: 0
sambaLogoffTime: 2147483647
sambaKickoffTime: 2147483647
sambaPwdCanChange: 0
sambaPwdMustChange: 2147483647
sambaPrimaryGroupSID: $SID-65400
sambaLMPassword: XXX
sambaNTPassword: XXX
sambaAcctFlags: [U ]
sambaSID: $SID-2996
loginShell: /bin/false
gecos: Netbios Domain Administrator
dn: uid=guest,ou=People,$LDAPHOSTDN
cn: guest
sn: guest
objectClass: inetOrgPerson
objectClass: sambaSamAccount
objectClass: posixAccount
gidNumber: 65401
uid: guest
uidNumber: 65401
homeDirectory: /dev/null
sambaPwdLastSet: 0
sambaLogonTime: 0
sambaLogoffTime: 2147483647
sambaKickoffTime: 2147483647
sambaPwdCanChange: 0
sambaPwdMustChange: 2147483647
sambaPrimaryGroupSID: $SID-514
sambaLMPassword: NO PASSWORDXXXXXXXXXXXXXXXXXXXXX
sambaNTPassword: NO PASSWORDXXXXXXXXXXXXXXXXXXXXX
sambaAcctFlags: [NU ]
sambaSID: $SID-2998
loginShell: /bin/false
dn: cn=Domain Admins,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65400
cn: Domain Admins
memberUid: Administrator
description: Netbios Domain Administrators
sambaSID: $SID-65400
sambaGroupType: 2
displayName: Domain Admins
dn: cn=Domain Users,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65401
cn: Domain Users
description: Netbios Domain Users
sambaSID: $SID-65401
sambaGroupType: 2
displayName: Domain Users
dn: cn=Domain Guests,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65402
cn: Domain Guests
description: Netbios Domain Guests Users
sambaSID: $SID-65402
sambaGroupType: 2
displayName: Domain Guests
dn: cn=Administrators,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65403
cn: Administrators
description: Netbios Domain Members can fully administer the computer/sambaDomainName
sambaSID: $SID-65403
sambaGroupType: 2
displayName: Administrators
dn: cn=Users,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65404
cn: Users
description: Netbios Domain Ordinary users
sambaSID: $SID-65404
sambaGroupType: 2
displayName: users
dn: cn=Guests,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65405
cn: Guests
memberUid: guest
description: Netbios Domain Users granted guest access to the computer/sambaDomainName
sambaSID: $SID-65405
sambaGroupType: 2
displayName: Guests
dn: cn=Power Users,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65406
cn: Power Users
description: Netbios Domain Members can share directories and printers
sambaSID: $SID-65406
sambaGroupType: 2
displayName: Power Users
dn: cn=Account Operators,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65407
cn: Account Operators
description: Netbios Domain Users to manipulate users accounts
sambaSID: $SID-65407
sambaGroupType: 2
displayName: Account Operators
dn: cn=Server Operators,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65408
cn: Server Operators
description: Netbios Domain Server Operators
sambaSID: $SID-65408
sambaGroupType: 2
displayName: Server Operators
dn: cn=Print Operators,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65409
cn: Print Operators
description: Netbios Domain Print Operators
sambaSID: $SID-65409
sambaGroupType: 2
displayName: Print Operators
dn: cn=Backup Operators,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65410
cn: Backup Operators
description: Netbios Domain Members can bypass file security to back up files
sambaSID: $SID-65410
sambaGroupType: 2
displayName: Backup Operators
dn: cn=Replicator,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65411
cn: Replicator
description: Netbios Domain Supports file replication in a sambaDomainName
sambaSID: $SID-65411
sambaGroupType: 2
displayName: Replicator
dn: cn=Domain Computers,ou=Groups,$LDAPHOSTDN
objectClass: posixGroup
objectClass: sambaGroupMapping
gidNumber: 65412
cn: Domain Computers
description: Netbios Domain Computers accounts
sambaSID: $SID-65412
sambaGroupType: 2
displayName: Domain Computers
dn: ou=Idmap,$LDAPHOSTDN
objectClass: organizationalUnit
ou: idmap
#structuralObjectClass: organizationalUnit
_EOF
echo $LDAPBINDDN $LDAPPASSWORD
if test -z "$LDAPPASSWORD"; then
ldapadd -x -c -D $LDAPBINDDN -W -h localhost -f $tempfile
else
ldapadd -x -c -D $LDAPBINDDN -w $LDAPPASSWORD -h localhost -f $tempfile
fi
rm -f $tempfile
exit 0

3
samba-server.sysusers Normal file
View File

@ -0,0 +1,3 @@
g sambashares -
g guest 65413
u guest 65401:guest "Samba guest user" /dev/null /bin/false

View File

@ -1,198 +0,0 @@
# $Source: /opt/cvs/samba/smbldap-tools/smbldap.conf,v $
# $Id: smbldap.conf,v 1.17 2005/01/29 15:00:54 jtournier Exp $
#
# smbldap-tools.conf : Q & D configuration file for smbldap-tools
# This code was developped by IDEALX (http://IDEALX.org/) and
# contributors (their names can be found in the CONTRIBUTORS file).
#
# Copyright (C) 2001-2002 IDEALX
#
# 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.
# Purpose :
# . be the configuration file for all smbldap-tools scripts
##############################################################################
#
# General Configuration
#
##############################################################################
# Put your own SID
# to obtain this number do: net getlocalsid
SID="S-1-5-21-4054337095-2523087664-1495155603"
##############################################################################
#
# LDAP Configuration
#
##############################################################################
# Notes: to use to dual ldap servers backend for Samba, you must patch
# Samba with the dual-head patch from IDEALX. If not using this patch
# just use the same server for slaveLDAP and masterLDAP.
# Those two servers declarations can also be used when you have
# . one master LDAP server where all writing operations must be done
# . one slave LDAP server where all reading operations must be done
# (typically a replication directory)
# Ex: slaveLDAP=127.0.0.1
slaveLDAP="127.0.0.1"
slavePort="389"
# Master LDAP : needed for write operations
# Ex: masterLDAP=127.0.0.1
masterLDAP="127.0.0.1"
masterPort="389"
# Use TLS for LDAP
# If set to 1, this option will use start_tls for connection
# (you should also used the port 389)
ldapTLS="0"
# How to verify the server's certificate (none, optional or require)
# see "man Net::LDAP" in start_tls section for more details
verify="require"
# CA certificate
# see "man Net::LDAP" in start_tls section for more details
cafile="/etc/samba/smbldap-tools/ca.pem"
# certificate to use to connect to the ldap server
# see "man Net::LDAP" in start_tls section for more details
clientcert="/etc/samba/smbldap-tools/smbldap-tools.pem"
# key certificate to use to connect to the ldap server
# see "man Net::LDAP" in start_tls section for more details
clientkey="/etc/samba/smbldap-tools/smbldap-tools.key"
# LDAP Suffix
# Ex: suffix=dc=IDEALX,dc=ORG
suffix="dc=idealx,dc=org"
# Where are stored Users
# Ex: usersdn="ou=Users,dc=IDEALX,dc=ORG"
usersdn="ou=People,${suffix}"
# Where are stored Computers
# Ex: computersdn="ou=Computers,dc=IDEALX,dc=ORG"
computersdn="ou=Machines,${suffix}"
# Where are stored Groups
# Ex groupsdn="ou=Groups,dc=IDEALX,dc=ORG"
groupsdn="ou=Groups,${suffix}"
# Where are stored Idmap entries (used if samba is a domain member server)
# Ex groupsdn="ou=Idmap,dc=IDEALX,dc=ORG"
idmapdn="ou=Idmap,${suffix}"
# Where to store next uidNumber and gidNumber available
sambaUnixIdPooldn="ou=Idmap,${suffix}"
# Default scope Used
scope="sub"
# Unix password encryption (CRYPT, MD5, SMD5, SSHA, SHA, CLEARTEXT)
hash_encrypt="SSHA"
# if hash_encrypt is set to CRYPT, you may set a salt format.
# default is "%s", but many systems will generate MD5 hashed
# passwords if you use "$1$%.8s". This parameter is optional!
crypt_salt_format="%s"
##############################################################################
#
# Unix Accounts Configuration
#
##############################################################################
# Login defs
# Default Login Shell
# Ex: userLoginShell="/bin/bash"
userLoginShell="/bin/false"
# Home directory
# Ex: userHome="/home/%U"
userHome="/dev/null"
# Gecos
userGecos="System User"
# Default User (POSIX and Samba) GID
defaultUserGid="65401"
# Default Computer (Samba) GID
defaultComputerGid="65412"
# Skel dir
skeletonDir="/etc/skel"
# Default password validation time (time in days) Comment the next line if
# you don't want password to be enable for defaultMaxPasswordAge days (be
# careful to the sambaPwdMustChange attribute's value)
defaultMaxPasswordAge="99"
##############################################################################
#
# SAMBA Configuration
#
##############################################################################
# The UNC path to home drives location (%U username substitution)
# Ex: \\My-PDC-netbios-name\homes\%U
# Just set it to a null string if you want to use the smb.conf 'logon home'
# directive and/or disable roaming profiles
userSmbHome="\\PDC-SMB3\homes\%U"
# The UNC path to profiles locations (%U username substitution)
# Ex: \\My-PDC-netbios-name\profiles\%U
# Just set it to a null string if you want to use the smb.conf 'logon path'
# directive and/or disable roaming profiles
userProfile="\\PDC-SMB3\profiles\%U"
# The default Home Drive Letter mapping
# (will be automatically mapped at logon time if home directory exist)
# Ex: H: for H:
userHomeDrive="H:"
# The default user netlogon script name (%U username substitution)
# if not used, will be automatically username.cmd
# make sure script file is edited under dos
# Ex: %U.cmd
# userScript="startup.cmd" # make sure script file is edited under dos
userScript="%U.cmd"
# Domain appended to the users "mail"-attribute
# when smbldap-useradd -M is used
mailDomain="idealx.com"
##############################################################################
#
# SMBLDAP-TOOLS Configuration (default are ok for a RedHat)
#
##############################################################################
# Allows not to use smbpasswd (if with_smbpasswd == 0 in smbldap_conf.pm) but
# prefer Crypt::SmbHash library
with_smbpasswd="0"
smbpasswd="/usr/bin/smbpasswd"
# Allows not to use slappasswd (if with_slappasswd == 0 in smbldap_conf.pm)
# but prefer Crypt:: libraries
with_slappasswd="0"
slappasswd="/usr/sbin/slappasswd"

View File

@ -1 +0,0 @@
root = Administrator

View File

@ -1,15 +0,0 @@
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=SWAT
GenericName=Samba Web Administration tool
GenericName[fr]=Interface de configuration Web de samba
GenericName[it]=Interfaccia di amministrazione di Samba
Comment=Configure Samba via Swat Web interface
Comment[fr]=Configure Samba depuis l'interface Web Swat
Comment[it]=Configura Samba con l'interfaccia Web Swat
Exec=konqueror http://localhost:901
Type=Application
Icon=samba
Terminal=false
Categories=Application;System;

View File

@ -1,15 +0,0 @@
# default: off
# description: SWAT is the Samba Web Admin Tool. Use swat \
# to configure your Samba server. To use SWAT, \
# connect to port 901 with your favorite web browser.
service swat
{
port = 901
socket_type = stream
wait = no
only_from = 127.0.0.1
user = root
server = /usr/sbin/swat
log_on_failure += USERID
disable = no
}

View File

@ -1,12 +1,5 @@
%define guest_uid 65401
%define guest_gid 65413
#%define squid_groupid 65010
%define filesharing_gid 14
%define smbldap_tools_ver 0.9.2
Name: samba
Version: 4.18.5
Version: 4.22.1
Release: 1mamba
Summary: Samba provides seamless file and print services to SMB/CIFS clients
Group: System/Servers
@ -15,29 +8,11 @@ Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://www.samba.org
Source0: http://us1.samba.org/samba/ftp/stable/samba-%{version}.tar.gz
Source1: samba-conf
Source2: samba-initscript
Source3: samba-xinetd-swat
Source4: samba-pam
Source5: samba-lmhosts
Source6: samba-qilinux_smbldap_conf.sh
Source7: winbind-initscript
Source8: samba-smbusers
Source9: samba-smbldap_conf.pm
Source10: samba-mkhomedir.sh
Source11: samba-swat_desktopfile
Source12: samba-ld.so.conf
Source1: samba.sysusers
Source2: samba-server.sysusers
Source13: winbind-nm-dispatcher
# official patches (http://us1.samba.org/samba/ftp/patches/):
#
Patch0: samba-4.0.6-libtirpc.patch
Patch1: samba-4.1.14-no-as-needed.patch
# openmamba patches:
Patch2: samba-4.9.4-conf-idmap.patch
Patch10: %{name}-3.0.23-smbldaptools-rootbinddn.patch
Patch11: %{name}-3.2.4-remove_strlcpy_strlcat.patch
Patch12: %{name}-3.5.8-mount_disable_setuid_check.patch
Patch13: samba-4.11.4-glibc-2.30.patch
Patch0: samba-4.9.4-conf-idmap.patch
Patch1: samba-4.19.4-conf-enable-usershares.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
@ -53,7 +28,8 @@ BuildRequires: libgnutls-devel
BuildRequires: libgpgme-devel
BuildRequires: libicu-devel
BuildRequires: libjansson-devel
BuildRequires: libldb-devel
BuildRequires: libkeyutils-devel
BuildRequires: liblmdb-devel
BuildRequires: liblttng-ust-devel
BuildRequires: libncurses-devel
BuildRequires: libnscd-devel
@ -61,6 +37,7 @@ BuildRequires: libopenldap-devel
BuildRequires: libpam-devel
BuildRequires: libpopt-devel
BuildRequires: libpython3-devel
BuildRequires: libpython311-devel
BuildRequires: libreadline-devel
BuildRequires: libsystemd-devel
BuildRequires: libtalloc-devel
@ -68,31 +45,26 @@ BuildRequires: libtasn1-devel
BuildRequires: libtdb-devel
BuildRequires: libtevent-devel
BuildRequires: libtirpc-devel
BuildRequires: libxcrypt-devel
BuildRequires: libz-devel
BuildRequires: python-talloc-py3
BuildRequires: setup
## AUTOBUILDREQ-END
BuildRequires: liblttng-ust-devel >= 2.13.0
BuildRequires: libsystemd-devel >= 2:230-1mamba
BuildRequires: libopenssl-devel
BuildRequires: valgrind
BuildRequires: libldb-devel
BuildRequires: python-ldb
BuildRequires: python-tdb
BuildRequires: python-tevent
BuildRequires: python-dnspython-py3
BuildRequires: python-tevent
BuildRequires: perl-Parse-Yapp
BuildRequires: valgrind
Requires: perl
Requires: pam >= 0.78-10
Requires: libldb >= 1:1.4
Requires: perl-Unicode-MapUTF8
Requires(pre): setup
Requires(post):libwbclient = %{?epoch:%epoch:}%{version}-%{release}
Requires(post):lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: cifs-utils
Requires: python-ldb
Requires: python-tdb
Requires: python-tevent
Requires: python-dnspython-py3
Obsoletes: samba-common < 4.14.4
Obsoletes: ldb <= 1:2.9.1-1mamba
%systemd_requires
%description
@ -120,6 +92,7 @@ This package contains the Samba 4 server files.
%package -n lib%{name}
Group: System/Libraries
Summary: Samba 4 libraries
Obsoletes: libldb <= 1:2.9.1-1mamba
%description -n lib%{name}
Samba provides seamless file and print services to SMB/CIFS clients.
@ -129,6 +102,7 @@ This package contains Samba 4 library files.
Group: Development/Libraries
Summary: Devel Samba 4 server files
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
Obsoletes: libldb-devel <= 1:2.9.1-1mamba
%description -n lib%{name}-devel
Samba provides seamless file and print services to SMB/CIFS clients.
@ -232,16 +206,13 @@ Requires: samba-server = %{?epoch:%epoch:}%{version}-%{release}
%description winbind
This package contains the winbind daemon and the wbinfo tool.
%debug_package
%prep
%setup -q
#-D -T
#:<< _EOF
#%patch0 -p1
#%patch1 -p1
%patch 2 -p1
#%patch13 -p1
%patch 0 -p1
%patch 1 -p1
%build
#:<< _EOF
@ -271,27 +242,16 @@ PATH=/usr/bin:$PATH \
--systemd-install-services \
--with-systemddir=%{_unitdir} \
--enable-cups \
--bundled-libraries=auto \
--private-libraries='!ldb' \
--bundled-libraries=!tdb,!talloc,!pytalloc-util,!tevent,!popt,!pyldb-util \
--systemd-nmb-extra "TimeoutStartSec=300" \
%ifarch arm
--with-experimental-mit-ad-dc \
--with-system-mitkrb5 \
%endif
--python=%{__python3} \
PYTHON=%{__python3}
# --bundled-libraries=wind,roken,hx509,asn1,heimbase,hcrypto,krb5,gssapi,heimntlm,hdb,\
#kdc,ntdb,subunit
# --with-pam_smbpass \
# --with-rootsbindir=/sbin \
# --enable-shared \
# --enable-static
# --with-libsmbclient \
# --with-libsmbsharemodes \
# --without-cisupcall \
# --with-ldapsam \
# --with-swat-dir=%{_datadir}/samba/swat \
# --with-python
#waf %{?_smp_mflags} build
#export LIBS="-ltirpc -ltermcap"
%make
%install
@ -305,31 +265,12 @@ install -d %{buildroot}/var/spool/samba
install -d %{buildroot}%{_sysconfdir}/samba/private
##% makeinstall -C %{_builddir}/%{name}-%{version}/source3
#waf --destdir=%{buildroot} install
#
#rm -rf %{buildroot}/usr/private
#
install -D -m 0664 examples/smb.conf.default %{buildroot}%{_sysconfdir}/samba/smb.conf
sed -i "s|/usr/local/samba/var/log|/var/log/samba/log|;\
s|/usr/local/samba/lib/|/var/lib/samba/|;\
s|/usr/spool/samba|/var/spool/samba|;" \
%{buildroot}%{_sysconfdir}/samba/smb.conf
#
#install -D -m 0755 %{S:2} %{buildroot}%{_initrddir}/samba
#install -D -m 0755 %{S:7} %{buildroot}%{_initrddir}/winbind
#
#install -D -m 0644 %{S:3} %{buildroot}%{_sysconfdir}/xinetd.d/swat
#install -D -m 0644 %{S:4} %{buildroot}%{_sysconfdir}/pam.d/samba
#install -D -m 0644 %{S:5} %{buildroot}%{_sysconfdir}/samba/lmhosts
#install -D -m 0644 %{S:8} %{buildroot}%{_sysconfdir}/samba/smbusers
##install -D -m 0644 %{S:12} %{buildroot}%{_sysconfdir}/ld.so.conf.d/samba.conf
#
#systemd
#for f in samba nmb smb winbind; do
# install -D -m0644 packaging/systemd/$f.service %{buildroot}%{_unitdir}/$f.service
#done
#sed -i "s|/var/run/|/run/|" packaging/systemd/samba.conf.tmp
install -D -m0644 packaging/systemd/samba.conf.tmp %{buildroot}%{_tmpfilesdir}/samba.conf
sed -i "s|/var/run/samba|/run/samba|" %{buildroot}%{_tmpfilesdir}/samba.conf
@ -339,6 +280,9 @@ install -D -m 0644 examples/LDAP/samba.schema \
install -d %{buildroot}%{_prefix}/lib/cups/backend
ln -s %{_bindir}/smbspool %{buildroot}%{_prefix}/lib/cups/backend/smb
install -D -m0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/samba.conf
install -D -m0644 %{SOURCE2} %{buildroot}%{_sysusersdir}/samba-server.conf
install -D -m0755 %{S:13} %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d/10_winbind
# cifs.upcall is installed in arm build; --without-cisupcall seems uneffective
@ -353,55 +297,34 @@ enable smb
disable winbind
_EOF
# Usershares folder
mkdir %{buildroot}%{_localstatedir}/lib/samba/usershares
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%pre
if [ $1 -ge 1 ]; then
# new install or update
getent group filesharing >/dev/null || \
groupadd filesharing -g %{filesharing_gid}
fi
%sysusers_create_package samba %{SOURCE1}
:
%preun server
%systemd_preun smb
%systemd_preun nmb
:
%pre server
if [ $1 -ge 1 ]; then
# new install or update
getent group guest > /dev/null || groupadd guest -g %{guest_gid}
getent passwd guest >/dev/null ||
useradd guest -c "Samba guest user" -d /dev/null \
-s /bin/false -u %{guest_uid} -g %{guest_gid} > /dev/null
fi
%systemd_pre nmb
%systemd_pre smb
%sysusers_create_package samba-server %{SOURCE2}
:
%post server
%systemd_post nmb
%systemd_post smb
if [ $1 -ge 1 ]; then
%tmpfiles_create samba.conf
# clean old sysv broken links
find /etc/rc[0-6].d/ -type l -xtype l -exec rm -f {} \;
[ -e %{_initrddir}/nmb ] && {
systemctl -q enable nmb
systemctl -q restart nmb
}
[ -e %{_initrddir}/smb ] && {
systemctl -q enable smb
systemctl -q restart smb
}
fi
%tmpfiles_create samba.conf
if [ $1 -gt 1 ]; then
# remove UTF-8 unix charset definition (leave default) to fix smb4k
sed -i "/unix charset = LOCALE/d" %{_sysconfdir}/samba/smb.conf
sed -i "/unix charset = UTF-8/d" %{_sysconfdir}/samba/smb.conf
fi
exit 0
%preun server
%systemd_preun smb
%systemd_preun nmb
%systemd_post nmb
%systemd_post smb
:
%postun server
@ -409,84 +332,49 @@ exit 0
%systemd_postun_with_restart smb
:
%post winbind
%systemd_post winbind
if [ $1 -ge 1 ]; then
# clean old sysv broken links
find /etc/rc[0-6].d/ -type l -xtype l -exec rm -f {} \;
fi
%preun winbind
%systemd_preun winbind
:
%postun winbind
%systemd_postun_with_restart winbind
%post winbind
if [ $1 -ge 1 ]; then
# new install or update
# new install or update
grep "^auth.*pam_winbind.so" %{_sysconfdir}/pam.d/system-auth >/dev/null || sed -i -e '/^auth.*pam_unix.so/a\
auth sufficient pam_winbind.so use_first_pass' %{_sysconfdir}/pam.d/system-auth
grep "^account.*pam_winbind.so" %{_sysconfdir}/pam.d/system-auth >/dev/null || sed -i -e '/^account.*pam_unix/i\
account sufficient pam_winbind.so' %{_sysconfdir}/pam.d/system-auth
fi
%systemd_post winbind
:
%preun winbind
%systemd_preun winbind
%postun winbind
%systemd_postun_with_restart winbind
if [ $1 -eq 0 ]; then
# remove package
systemctl -q stop winbind
# remove package
sed -i "/.*pam_winbind.so/d" %{_sysconfdir}/pam.d/system-auth
fi
:
%pre -n samba4-server
%systemd_pre samba
%preun -n samba4-server
%systemd_preun samba
:
%post -n samba4-server
/sbin/ldconfig
%systemd_post samba
if [ $1 -ge 1 ]; then
%tmpfiles_create samba
fi
:
%preun -n samba4-server
%systemd_preun_with_restart samba
:
%postun -n samba4-server
/sbin/ldconfig
%systemd_postun samba
%systemd_postun_with_restart samba
:
%post -n libsamba -p /sbin/ldconfig
%postun -n libsamba -p /sbin/ldconfig
%post -n libsmbclient -p /sbin/ldconfig
%postun -n libsmbclient -p /sbin/ldconfig
%post -n libsmbsharemodes -p /sbin/ldconfig
%postun -n libsmbsharemodes -p /sbin/ldconfig
%post -n libnetapi -p /sbin/ldconfig
%postun -n libnetapi -p /sbin/ldconfig
%post -n libwbclient -p /sbin/ldconfig
%postun -n libwbclient -p /sbin/ldconfig
%files
%defattr(-,root,root)
%config %dir %{_sysconfdir}/samba
%config %dir %{_sysconfdir}/samba/private
#%config(noreplace) %{_sysconfdir}/samba/lmhosts
#%config(noreplace) %{_sysconfdir}/samba/smbusers
%attr(664,root,filesharing) %config(noreplace) %{_sysconfdir}/samba/smb.conf
%attr(644,root,root) %{_sysconfdir}/openldap/schema/samba.schema
#%{_bindir}/async_connect_send_test
#%{_bindir}/smbta-util
%{_bindir}/dumpmscat
#%{_bindir}/findsmb
#%{_bindir}/mdfind
%{_bindir}/ldb*
%{_bindir}/mdsearch
%{_bindir}/mvxattr
%{_bindir}/net
@ -494,6 +382,7 @@ fi
%{_bindir}/pdbedit
%{_bindir}/profiles
%{_bindir}/rpcclient
%{_bindir}/samba-log-parser
%{_bindir}/samba-regedit
%{_bindir}/sharesec
%{_bindir}/smbcacls
@ -503,15 +392,15 @@ fi
%{_bindir}/smbget
%{_bindir}/smbpasswd
%{_bindir}/smbspool
#%{_bindir}/smbspool_krb5_wrapper
%{_bindir}/smbstatus
%{_bindir}/smbtar
%{_bindir}/smbtree
%{_bindir}/testparm
%{_bindir}/wspsearch
%{_sbindir}/eventlogadm
%{_sysusersdir}/samba.conf
%{_presetdir}/50-samba.preset
%dir %{_libdir}/samba
#%dir %{_libdir}/samba/auth
#%{_libdir}/samba/auth/*.so
%dir %{_libdir}/samba/krb5
%{_libdir}/samba/krb5/*.so
%dir %{_libdir}/samba/idmap
@ -529,46 +418,36 @@ fi
%{_datadir}/samba/mdssvc/elasticsearch_mappings.json
%dir %{_datadir}/samba/setup
%{_datadir}/samba/setup/*
%{_presetdir}/50-samba.preset
%dir %{python3_sitelib}/samba
%{python3_sitelib}/samba/*
%dir %{python3_sitearch}/samba
%{python3_sitearch}/samba/*
%dir /var/log/samba
%{_mandir}/man1/*
%exclude %{_mandir}/man1/wbinfo.*
%exclude %{_mandir}/man1/ntlm_auth.*
%doc COPYING
%files -n lib%{name}
%defattr(-,root,root)
#%{_libdir}/libdcerpc-atsvc.so.*
%{_libdir}/libdcerpc-binding.so.*
%{_libdir}/libdcerpc-server.so.*
%{_libdir}/libdcerpc-server-core.so.*
%{_libdir}/libdcerpc.so.*
%{_libdir}/libdcerpc-samr.so.*
%{_libdir}/libdcerpc*.so.*
%{_libdir}/libldb.so.*
%{_libdir}/libndr-krb5pac.so.*
#%{_libdir}/libgensec.so.*
%{_libdir}/libndr-nbt.so.*
%{_libdir}/libndr-standard.so.*
%{_libdir}/libndr.so.*
%{_libdir}/libsamba-credentials.so.*
%{_libdir}/libsamba-errors.so.*
%{_libdir}/libsamba-hostconfig.so.*
#%{_libdir}/libpdb.so.*
#%{_libdir}/libregistry.so.*
%{_libdir}/libsamba-passdb.so.*
%{_libdir}/libsamba-policy.cpython-*.so.*
%{_libdir}/libsamba-util.so.*
%{_libdir}/libsamba-*.so.*
%{_libdir}/libsamdb.so.*
%{_libdir}/libsmbconf.so.*
%{_libdir}/libsmbldap.so.*
#%{_libdir}/libtevent-unix-util.so.*
%{_libdir}/libtevent-util.so.*
#%{_libdir}/libtorture.so.*
#%{_libdir}/samba/lib*-samba4.so.*
%{_libdir}/samba/lib*-samba4.so
%{_libdir}/samba/lib*-samba.so
%ifarch arm
%{_libdir}/krb5/plugins/kdb/samba.so
%endif
%{_libexecdir}/samba/rpcd_*
%{_libexecdir}/samba/samba-bgqd
%{_libexecdir}/samba/samba-dcerpcd
%{python3_sitearch}/_ldb_text.py
%{python3_sitearch}/ldb.cpython-*.so
%files -n lib%{name}-devel
%defattr(-,root,root)
@ -577,58 +456,41 @@ fi
%exclude %{_includedir}/samba-4.0/libsmbclient.h
%exclude %{_includedir}/samba-4.0/netapi.h
%exclude %{_includedir}/samba-4.0/wbclient.h
#%{_libdir}/libdcerpc-atsvc.so
%{_libdir}/libdcerpc-binding.so
%{_libdir}/libdcerpc-samr.so
%{_libdir}/libdcerpc-server.so
%{_libdir}/libdcerpc-server-core.so
%{_libdir}/libdcerpc.so
#%{_libdir}/libgensec.so
%{_libdir}/libdcerpc*.so
%{_libdir}/libldb.so
%{_libdir}/libndr-krb5pac.so
%{_libdir}/libndr-nbt.so
%{_libdir}/libndr-standard.so
%{_libdir}/libndr.so
#%{_libdir}/libpdb.so
#%{_libdir}/libregistry.so
%{_libdir}/libsamba-credentials.so
%{_libdir}/libsamba-errors.so
%{_libdir}/libsamba-hostconfig.so
%{_libdir}/libsamba-passdb.so
%{_libdir}/libsamba-policy.cpython-*.so
%{_libdir}/libsamba-util.so
%{_libdir}/libsamba-*.so
%{_libdir}/libsamdb.so
%{_libdir}/libsmbconf.so
%{_libdir}/libsmbldap.so
#%{_libdir}/libtevent-unix-util.so
%{_libdir}/libtevent-util.so
#%{_libdir}/libtorture.so
#%{_libdir}/mit_samba.so
%{_libdir}/pkgconfig/dcerpc.pc
#%{_libdir}/pkgconfig/dcerpc_atsvc.pc
%{_libdir}/pkgconfig/dcerpc_samr.pc
%{_libdir}/pkgconfig/dcerpc_server.pc
#%{_libdir}/pkgconfig/gensec.pc
%{_libexecdir}/samba/smbspool_krb5_wrapper
%{_libdir}/pkgconfig/dcerpc*.pc
%{_libdir}/pkgconfig/ldb.pc
%{_libdir}/pkgconfig/ndr.pc
%{_libdir}/pkgconfig/ndr_krb5pac.pc
%{_libdir}/pkgconfig/ndr_nbt.pc
%{_libdir}/pkgconfig/ndr_standard.pc
#%{_libdir}/pkgconfig/registry.pc
%{_libdir}/pkgconfig/samba-credentials.pc
%{_libdir}/pkgconfig/samba-hostconfig.pc
%{_libdir}/pkgconfig/samba-policy.cpython-*.pc
%{_libdir}/pkgconfig/samba-util.pc
%{_libdir}/pkgconfig/samba-*.pc
%{_libdir}/pkgconfig/samdb.pc
#%{_libdir}/pkgconfig/torture.pc
#%{_libdir}/winbind_krb5_locator.so
%{_libexecdir}/samba/smbspool_krb5_wrapper
%{_mandir}/man3/ldb.3*
%files server
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/sysconfig/samba
#/etc/pam.d/samba
%{_sbindir}/nmbd
%{_sbindir}/smbd
%{_prefix}/lib/cups/backend/smb
%dir %attr(1770,root,sambashares) %{_localstatedir}/lib/samba/usershares
%{_sysusersdir}/samba-server.conf
%{_tmpfilesdir}/samba.conf
%{_unitdir}/nmb.service
%{_unitdir}/smb.service
%{_libdir}/libnss_wins.so.2
%dir %attr(755,root,root) /var/lib/samba/netlogon
%dir %attr(2775,root,users) /var/lib/samba/profiles
%dir %attr(755,root,root) /var/lib/samba/profdata
@ -637,12 +499,6 @@ fi
%dir %attr(1777,root,root) /var/spool/samba
%dir %attr(755,root,root) /var/lock/samba
%dir %attr(755,root,root) /var/lock/samba/msg.lock
#/%{_lib}/security/pam_smbpass.so
%{_tmpfilesdir}/samba.conf
%{_unitdir}/nmb.service
%{_unitdir}/smb.service
#%{_libdir}/libnss_wins.so
%{_libdir}/libnss_wins.so.2
%{_mandir}/man5/*
%{_mandir}/man7/*
%{_mandir}/man8/*
@ -656,12 +512,7 @@ fi
%{_bindir}/locktest
%{_bindir}/masktest
%{_bindir}/ndrdump
#%{_bindir}/ntdbbackup
#%{_bindir}/ntdbdump
#%{_bindir}/ntdbrestore
#%{_bindir}/ntdbtool
%{_bindir}/oLschema2ldif
#%{_bindir}/pidl
%{_bindir}/regdiff
%{_bindir}/regpatch
%{_bindir}/regshell
@ -676,6 +527,7 @@ fi
%{_sbindir}/samba_spnupdate
%{_sbindir}/samba_upgradedns
%{_unitdir}/samba.service
%{_unitdir}/samba-bgqd.service
%dir %{_libdir}/samba/bind9
%{_libdir}/samba/bind9/*.so
%dir %{_libdir}/samba/gensec
@ -689,36 +541,18 @@ fi
%dir %{_libdir}/samba/service
%{_libdir}/samba/service/*.so
%dir /var/cache/samba
#%dir %{perl_vendorlib}/Parse
#%{perl_vendorlib}/Parse/*
#%{_mandir}/man3/Parse::Pidl::*.3pm*
#%{_mandir}/man3/ntdb.3*
%files -n libsmbclient
%defattr(-,root,root)
%{_libdir}/libsmbclient.so.*
#%{_libdir}/libsmbclient-raw.so.*
%files -n libsmbclient-devel
%defattr(-,root,root)
%{_includedir}/samba-*/libsmbclient.h
%{_libdir}/libsmbclient.so
#%{_libdir}/libsmbclient-raw.so
#%{_libdir}/pkgconfig/smbclient-raw.pc
%{_libdir}/pkgconfig/smbclient.pc
#%files -n libsmbsharemodes
#%defattr(-,root,root)
#%{_libdir}/libsmbsharemodes.so.*
#%files -n libsmbsharemodes-devel
#%defattr(-,root,root)
#%{_includedir}/samba-*/smb_share_modes.h
#%{_libdir}/libsmbsharemodes.so
#%{_libdir}/pkgconfig/smbsharemodes.pc
%files -n libnetapi
#-f net.lang
%defattr(-,root,root)
%{_libdir}/libnetapi.so.*
@ -738,32 +572,97 @@ fi
%{_libdir}/libwbclient.so
%{_libdir}/pkgconfig/wbclient.pc
#%files swat
#%defattr(-,root,root)
#%{_sbindir}/swat
#%config(noreplace) /etc/xinetd.d/swat
#%dir %{_datadir}/samba/swat
#%{_datadir}/samba/swat/*
#%{_datadir}/applications/samba-swat.desktop
%files winbind
#-f pam_winbind.lang
%defattr(-,root,root)
%{_sysconfdir}/NetworkManager/dispatcher.d/10_winbind
%config(noreplace) %{_sysconfdir}/security/pam_winbind.conf
%{_bindir}/ntlm_auth
%{_bindir}/wbinfo
%{_sbindir}/winbindd
#%{_libdir}/libnss_winbind.so
%{_libdir}/libnss_winbind.so.*
%{_libdir}/security/pam_winbind.so
%{_unitdir}/winbind.service
#%dir %attr(750,root,%{squid_groupid}) /var/lib/samba/winbindd_privileged
%{_mandir}/man1/ntlm_auth.*
%{_mandir}/man1/wbinfo.*
%{_mandir}/man8/winbindd.*
%changelog
* Fri Apr 18 2025 Automatic Build System <autodist@openmamba.org> 4.22.1-1mamba
- automatic version update by autodist
* Sun Mar 09 2025 Automatic Build System <autodist@openmamba.org> 4.22.0-1mamba
- automatic version update by autodist
* Tue Feb 18 2025 Automatic Build System <autodist@openmamba.org> 4.21.4-1mamba
- automatic version update by autodist
* Tue Jan 07 2025 Automatic Build System <autodist@openmamba.org> 4.21.3-1mamba
- automatic version update by autodist
* Fri Dec 06 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 4.21.2-2mamba
- samba-server: call tmpfiles_create in post script to fix file not existing when called in pre script
* Tue Nov 26 2024 Automatic Build System <autodist@openmamba.org> 4.21.2-1mamba
- automatic version update by autodist
* Wed Oct 16 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 4.21.1-2mamba
- fixed various problems in pre/post scripts
* Tue Oct 15 2024 Automatic Build System <autodist@openmamba.org> 4.21.1-1mamba
- automatic version update by autodist
* Sat Sep 21 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 4.21.0-3mamba
- samba-server.sysusers: create guest group to fix user creation
* Mon Sep 16 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 4.21.0-2mamba
- don't require python-ldb from obsolete ldb package
* Mon Sep 09 2024 Automatic Build System <autodist@openmamba.org> 4.21.0-1mamba
- automatic version update by autodist
* Tue Aug 06 2024 Automatic Build System <autodist@openmamba.org> 4.20.4-1mamba
- automatic version update by autodist
* Fri Aug 02 2024 Automatic Build System <autodist@openmamba.org> 4.20.3-1mamba
- automatic version update by autodist
* Thu Jun 20 2024 Automatic Build System <autodist@openmamba.org> 4.20.2-1mamba
- automatic version update by autodist
* Sun May 19 2024 Automatic Build System <autodist@openmamba.org> 4.20.1-1mamba
- automatic version update by autodist
* Sat Apr 06 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 4.20.0-2mamba
- rebuilt with system ldb 2.9.0
* Fri Mar 29 2024 Automatic Build System <autodist@openmamba.org> 4.20.0-1mamba
- automatic version update by autodist
* Fri Jan 26 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 4.19.4-2mamba
- enable support for user shares by default and add sambashares group as expected by kde plasma
- use systemd sysusers file to create groups and users
* Tue Jan 09 2024 Automatic Build System <autodist@openmamba.org> 4.19.4-1mamba
- automatic version update by autodist
* Tue Nov 28 2023 Automatic Build System <autodist@mambasoft.it> 4.19.3-1mamba
- automatic version update by autodist
* Tue Oct 17 2023 Automatic Build System <autodist@mambasoft.it> 4.19.2-1mamba
- automatic version update by autodist
* Wed Oct 11 2023 Automatic Build System <autodist@mambasoft.it> 4.19.1-1mamba
- automatic version update by autodist
* Sun Oct 01 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 4.19.0-2mamba
- rebuilt with python3 == 3.11
* Sat Sep 09 2023 Automatic Build System <autodist@mambasoft.it> 4.19.0-1mamba
- automatic version update by autodist
* Thu Aug 17 2023 Automatic Build System <autodist@mambasoft.it> 4.18.6-1mamba
- automatic version update by autodist
* Thu Jul 20 2023 Automatic Build System <autodist@mambasoft.it> 4.18.5-1mamba
- automatic version update by autodist

1
samba.sysusers Normal file
View File

@ -0,0 +1 @@
g filesharing 14

View File

@ -1,75 +0,0 @@
#!/bin/sh
#
# chkconfig: 345 91 35
# description: Starts and stops the Samba winbind daemon
#
# pidfile: /run/winbindd.pid
# config: /etc/samba/smb.conf
# source function library
. /etc/sysconfig/rc
. $rc_functions
NAME=winbindd
DAEMON=/usr/sbin/$NAME
DAEMONPID=/run/$NAME.pid
DAEMONCONF=/etc/samba/smb.conf
OPTIONS=""
[ -x $DAEMON ] || exit 0
# source networking configuration
. /etc/sysconfig/network
# check that networking is up
[ ${NETWORKING} = "no" ] && exit 0
# avoid using root's TMPDIR
unset TMPDIR
[ -r /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME
# check that smb.conf exists
[ -r $DAEMONCONF ] || exit 0
RETVAL=0
case "$1" in
start)
echo -n $"Starting $NAME: "
daemon --pidfile=$DAEMONPID $DAEMON $OPTIONS
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$NAME
;;
stop)
echo -n $"Stopping $NAME: "
killproc -p $DAEMONPID $DAEMON
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$NAME $DAEMONPID
;;
restart|force-reload)
$0 stop
sleep 1
$0 start
;;
reload)
echo -n "Reloading $NAME: "
reloadproc $DAEMON
echo
;;
condrestart)
[ -e /var/lock/subsys/$NAME ] && $0 restart || :
;;
status)
statusproc $DAEMON
RETVAL=$?
;;
*)
echo $"Usage: ""/etc/init.d/$NAME {start|stop|status|reload|restart|condrestart}"
exit 1
;;
esac
exit $?