5 # Source debconf library.
6 . /usr/share/debconf/confmodule
8 db_title "Samba Server"
10 # Babysit users who don't read README.Debian
11 db_input medium samba/log_files_moved || true
14 db_input medium samba/run_mode || true
17 # We vary the priority of the next question depending on whether
18 # /etc/samba/smbpasswd already exists...
19 if [ -f /etc/samba/smbpasswd ]; then
22 # If 'encrypt passwords' is true in smb.conf, and smbpasswd
23 # does not exist, default to yes here.
24 FILE=/etc/samba/smb.conf
25 if [ -f "$FILE" ]; then
26 ENCRYPT=`grep -i '^[[:space:]]*encrypt passwords[[:space:]]*=' $FILE \
27 | sed -e's/^[[:space:]]*encrypt passwords[[:space:]]*=[[:space:]]*//i' \
29 if [ "$ENCRYPT" ]; then
30 ENCRYPT=`echo $ENCRYPT | tr '[A-Z]' '[a-z]'`
31 if [ "$ENCRYPT" = "yes" ]; then
34 if [ "$ENCRYPT" = "no" ]; then
38 db_set samba/generate_smbpasswd "$ENCRYPT"
43 db_input $PRIORITY samba/generate_smbpasswd || true