blob: d82e56ccf63052339be28f24220a5c8f0d5719fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#/bin/sh -e
#
#
# Source debconf library.
. /usr/share/debconf/confmodule
db_title "Samba Server"
# Babysit users who don't read README.Debian
db_input medium samba/log_files_moved || true
db_go
db_input medium samba/run_mode || true
db_go
# We vary the priority of the next question depending on whether
# /etc/samba/smbpasswd already exists...
if [ -f /etc/samba/smbpasswd ]; then
PRIORITY="low"
else
# If 'encrypt passwords' is true in smb.conf, and smbpasswd
# does not exist, default to yes here.
FILE=/etc/samba/smb.conf
if [ -f "$FILE" ]; then
ENCRYPT=`grep -i '^[[:space:]]*encrypt passwords[[:space:]]*=' $FILE \
| sed -e's/^[[:space:]]*encrypt passwords[[:space:]]*=[[:space:]]*//i' \
| tail -1`
if [ "$ENCRYPT" ]; then
ENCRYPT=`echo $ENCRYPT | tr '[A-Z]' '[a-z]'`
if [ "$ENCRYPT" = "yes" ]; then
ENCRYPT=true
fi
if [ "$ENCRYPT" = "no" ]; then
ENCRYPT=false
fi
fi
db_set samba/generate_smbpasswd "$ENCRYPT"
fi
PRIORITY="medium"
fi
db_input $PRIORITY samba/generate_smbpasswd || true
db_go
|