Thank you for filing this bug, and sorry for the lack of responses. The problem is that there are two secrets.tdb databases: Preparing to unpack 
/samba-libs_2%3a4.1.6+dfsg-1ubuntu2_amd64.deb ... secrets.tdb exists in /var/lib/samba and /var/lib/samba/private, aborting samba-libs preinst rename one of them to allow the install/upgrade to continue http://bugs.debian.org/726472 /var/lib/samba: ОтПгП 716 drwxr-xr-x 10 root root 4096 апр. 20 08:01 . drwxr-xr-x 78 root root 4096 апр. 20 08:13 .. -rw------- 1 root root 36864 сеМт. 3 2012 account_policy.tdb -rw------- 1 root root 696 сеМт. 3 2012 group_mapping.tdb drwxr-xr-x 2 root root 4096 апр. 5 00:26 netlogon drwxr-x--- 2 root root 4096 апр. 4 15:35 ntp_signd -rw------- 1 root root 36864 апр. 12 00:24 passdb.tdb drwxr-xr-x 6 root root 4096 апр. 4 15:35 private drwxr-xr-t 4 root root 4096 апр. 5 00:30 profiles -rw------- 1 root root 106496 апр. 5 00:59 registry.tdb drwxr-xr-x 2 root root 4096 апр. 5 00:26 root -rw------- 1 root root 45056 апр. 5 00:26 secrets.tdb -rw------- 1 root root 36864 Ќарта 4 16:14 share_info.tdb drwxrwx---+ 3 root 3000000 4096 апр. 2 13:07 sysvol drwxrwx--T 2 root sambashare 4096 яМв. 28 2013 usershares -rw-r--r-- 1 root root 421888 апр. 5 01:22 winbindd_idmap.tdb drwxr-x--- 2 root root 4096 апр. 4 15:35 winbindd_privileged /var/lib/samba/private: ОтПгП 10904 drwxr-xr-x 6 root root 4096 апр. 4 15:35 . drwxr-xr-x 10 root root 4096 апр. 20 08:01 .. -rw-r--r-- 1 root root 2270 апр. 2 13:08 dns_update_list -rw------- 1 root root 1286144 апр. 2 13:07 hklm.ldb -rw------- 1 root root 1286144 апр. 2 13:07 idmap.ldb -rw-r--r-- 1 root root 92 апр. 2 13:08 krb5.conf srwxrwxrwx 1 root root 0 апр. 4 15:35 ldapi drwxr-x--- 2 root root 4096 апр. 4 15:35 ldap_priv -r--r--r-- 1 root root 223 апр. 2 13:08 named.conf.update -rw------- 1 root root 1286144 апр. 2 13:07 privilege.ldb -rw------- 1 root root 696 апр. 2 13:08 randseed.tdb -rw------- 1 root root 4251648 апр. 2 13:08 sam.ldb drwx------ 2 root root 4096 апр. 2 13:08 sam.ldb.d -rw------- 1 root root 696 апр. 4 15:35 schannel_store.tdb -rw------- 1 root root 1102 апр. 2 13:08 secrets.keytab -rw------- 1 root root 1286144 апр. 2 13:08 secrets.ldb -rw------- 1 root root 430080 апр. 2 13:08 secrets.tdb -rw------- 1 root root 1286144 апр. 2 13:07 share.ldb drwxr-xr-x 3 root root 4096 апр. 2 13:08 smbd.tmp -rw-r--r-- 1 root root 955 апр. 2 13:08 spn_update_list drwxr-xr-x 2 root root 4096 апр. 2 13:08 tls dpkg: error processing archive /var/cache/apt/archives/samba-libs_2%3a4.1.6+dfsg-1ubuntu2_amd64.deb (--unpack): ,.. The upstream debian bug http://bugs.debian.org/726472 has a lot of details about this problem. Are you still affected by this? It looks like both secrets.tdb databases should be compared and a decision be made about which one to use. The current and expected location is in /var/lib/samba/private.