Package: samba
Version: 2:4.6.5+dfsg-3

I noticed that these files (samba-ad-dc.*) in the samba package appear
to be unused and out of date.  For example, samba3upgrade has been
classicupgrade for some time. 

Before we rush to restore it, I don't think it is a good idea to run it
from debconf in any case.  Perhaps we could restore running provision,
but even that I think is better done manually.

(untested)

Andrew Bartlett

-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba
From 4185e1ef720b99395a20b7b79a491f697c6cb689 Mon Sep 17 00:00:00 2001
From: Andrew Bartlett <[email protected]>
Date: Wed, 28 Jun 2017 05:29:13 +1200
Subject: [PATCH] Remove unused samba-ad-dc scripts, this package is no longer
 produced

---
 debian/samba-ad-dc.config    | 69 --------------------------------------------
 debian/samba-ad-dc.postinst  | 67 ------------------------------------------
 debian/samba-ad-dc.postrm    | 12 --------
 debian/samba-ad-dc.templates | 54 ----------------------------------
 4 files changed, 202 deletions(-)
 delete mode 100755 debian/samba-ad-dc.config
 delete mode 100644 debian/samba-ad-dc.postinst
 delete mode 100644 debian/samba-ad-dc.postrm
 delete mode 100644 debian/samba-ad-dc.templates

diff --git a/debian/samba-ad-dc.config b/debian/samba-ad-dc.config
deleted file mode 100755
index aef1cf0..0000000
--- a/debian/samba-ad-dc.config
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/sh
-
-set -e
-
-. /usr/share/debconf/confmodule
-
-db_title "Samba Server"
-
-SERVER_ROLE=`samba-tool testparm --parameter-name="server role"  2>/dev/null | tail -1`
-if [ ! -z "$SERVER_ROLE" ]; then
-	db_set samba4/server-role "$SERVER_ROLE"
-fi
-
-REALM=`samba-tool testparm --parameter-name=realm  2>/dev/null | tail -1`
-if [ -z "$REALM" ]; then
-	REALM=`hostname -d | tr 'a-z' 'A-Z'`
-fi
-if [ -z "$REALM" ]; then
-	# Default to localdomain if there are no good alternatives.
-	REALM=localdomain
-fi
-db_set samba4/realm "$REALM"
-
-#
-# Are we upgrading from Samba 3, and already have a configuration file?
-# If so, the user might want to try the automatic upgrading.
-#
-if [ -n "$2" ] && dpkg --compare-versions "$2" lt "3.9.0"; then
-	if [ -f /etc/samba/smb.conf ]; then
-		db_input medium samba4/upgrade-from-v3 || true
-	fi
-fi
-
-db_input high samba4/server-role || true
-db_go
-db_get samba4/server-role
-if [ "$RET" != "none" ]; then
-	db_input medium samba4/realm || true
-	db_go || true
-fi
-
-# only ask this question on installs that require provisioning
-if [ "$1" = "configure" ] && ([ -z "$2" ] && [ ! -e "/var/lib/samba/private/sam.ldb" ] ) || [ "$1" = "reconfigure" ]; then
-	while :; do
-		RET=""
-		db_input high samba4/admin_password || true
-		db_go
-		db_get samba4/admin_password
-		# if password isn't empty we ask for password verification
-		if [ -z "$RET" ]; then
-			db_fset samba4/admin_password seen false
-			db_fset samba4/admin_password_again seen false
-			break
-		fi
-		ADMIN_PW="$RET"
-		db_input high samba4/admin_password_again || true
-		db_go
-		db_get samba4/admin_password_again
-		if [ "$RET" = "$ADMIN_PW" ]; then
-			ADMIN_PW=''
-			break
-		fi
-		db_fset samba4/password_mismatch seen false
-		db_input critical samba4/password_mismatch
-		db_set samba4/admin_password ""
-		db_set samba4/admin_password_again ""
-		db_go
-	done
-fi
diff --git a/debian/samba-ad-dc.postinst b/debian/samba-ad-dc.postinst
deleted file mode 100644
index 1f8921f..0000000
--- a/debian/samba-ad-dc.postinst
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/sh -e
-
-. /usr/share/debconf/confmodule
-
-if [ "$1" = "configure" ]; then
-	db_get samba4/server-role || true
-	SERVER_ROLE="$RET"
-fi
-
-if [ "$1" = "configure" -a "$SERVER_ROLE" != "none" ]; then
-	db_get samba-common/workgroup || true
-	DOMAIN="$RET"
-	db_get samba4/realm || true
-	REALM="$RET"
-	# FIXME: Urgh.. ideally samba-tool would be able to update this:
-	# Update realm setting and server role setting
-	if [ -f "/etc/samba/smb.conf" ]; then
-		/usr/share/samba/setoption.py "realm" "${REALM}"
-		/usr/share/samba/setoption.py "server role" "${SERVER_ROLE}"
-		if [ "$SERVER_ROLE" = "domain controller" ]; then
-			/usr/share/samba/addshare.py sysvol /var/lib/samba/sysvol
-			/usr/share/samba/addshare.py netlogon "/var/lib/samba/sysvol/$REALM/scripts"
-		fi
-	fi
-
-	# See if we're upgrading from Samba 3
-	if [ ! -z "$2" ] && dpkg --compare-versions "$2" lt "3.9.0"; then
-		db_get samba4/upgrade-from-v3 || true
-		if [ "$RET" = "true" ]; then
-			samba-tool domain samba3upgrade --dbdir=/var/lib/samba
-		fi
-	elif [ ! -z "$2" ] && dpkg --compare-versions "$2" lt "4.0.0~alpha12"; then
-		# Upgrade from previous Samba 4 installation
-		if [ -f /etc/samba/smb.conf ]; then
-			samba-tool domain upgradeprovision --full
-		fi
-	elif [ -e /var/lib/samba/private/sam.ldb ]; then
-		# Upgrade from previous Samba 4 installation
-		if [ -f /etc/samba/smb.conf ]; then
-			samba-tool dbcheck --fix --yes
-		fi
-	fi
-	# Provision from scratch if we need to
-	if [ ! -e /var/lib/samba/private/sam.ldb ]; then
-		db_get samba4/admin_password
-		if [ -z "$RET" ]; then
-			PASSOPTION=" "
-		else
-			PASSOPTION="--adminpass='$RET' "
-		fi
-
-		# Install from scratch
-		# samba-common.postinst takes care of setting the work group.
-		samba-tool domain provision --realm="$REALM" --domain="$DOMAIN" \
-		    --server-role="$SERVER_ROLE" --use-ntvfs $PASSOPTION
-
-		# Forget we ever saw the password
-		db_set samba4/admin_password ""
-		db_set samba4/admin_password_again ""
-	fi
-fi
-
-#DEBHELPER#
-
-db_stop
-
-exit 0
diff --git a/debian/samba-ad-dc.postrm b/debian/samba-ad-dc.postrm
deleted file mode 100644
index 91f4b1b..0000000
--- a/debian/samba-ad-dc.postrm
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /bin/sh -e
-
-set -e
-
-if [ "$1" = purge ]; then
-	if [ -e /usr/share/debconf/confmodule ]; then
-		. /usr/share/debconf/confmodule
-		db_purge
-	fi
-fi
-
-#DEBHELPER#
diff --git a/debian/samba-ad-dc.templates b/debian/samba-ad-dc.templates
deleted file mode 100644
index af24031..0000000
--- a/debian/samba-ad-dc.templates
+++ /dev/null
@@ -1,54 +0,0 @@
-Template: samba4/upgrade-from-v3
-Type: boolean
-Default: true
-_Description: Upgrade from Samba 3?
- It is possible to migrate the existing configuration files from Samba 3 to
- Samba 4. This is likely to fail for complex setups, but should provide a
- good starting point for most existing installations.
-
-Template: samba4/server-role
-Type: select
-Choices: domain controller, member, standalone, none
-Default: domain controller
-_Description: Server role
- Domain controllers manage NT4-style or Active Directory domains and
- provide services such as identity management and domain logons. Each
- domain needs to have a at least one domain controller.
- .
- Member servers can be part of a NT4-style or Active Directory domain but
- do not provide any domain services. Workstations and file or print servers
- are usually regular domain members.
- .
- A standalone server can not be used in a domain and only supports file
- sharing and Windows for Workgroups-style logins.
- .
- If no server role is specified, the Samba server will not be provisioned,
- so this can be done manually by the user.
-
-Template: samba4/realm
-Type: string
-Default: REALM
-_Description: Realm name:
- Please specify the Kerberos realm for the domain that this domain controller
- controls.
- .
- Usually this is the a capitalized version of your DNS hostname.
-
-Template: samba4/admin_password
-Type: password
-#flag:translate!:4
-_Description: New password for the Samba "administrator" user:
- If this field is left blank, a random password will be generated.
- .
- A password can be set later by running, as root:
- .
-  $ samba-tool user setpassword administrator
-
-Template: samba4/admin_password_again
-Type: password
-_Description: Repeat password for the Samba "administrator" user:
-
-Template: samba4/password_mismatch
-Type: error
-_Description: Password input error
- The two passwords you entered were not the same. Please try again.
-- 
2.9.4

Reply via email to