收起左侧

1.1.20/23修复SMB与备份

1
回复
66
查看
[ 复制链接 ]

2

主题

3

回帖

0

牛值

fnOS系统内测组

不知道为什么这个账号没有在BUG区回复的权限。。运行官方的脚本没用,把自己的解决方案发出来分享一下。

主要问题

最后有提示以下报错无法修复的。

E: Held packages were changed and -y was used without --allow-change-held-packages.

解决方案

  1. 先下载官方的脚本到本地。
  2. 找到最后 apt install -y ./\*.deb 改为 apt install -y ./\*.deb --allow-change-held-packages
#!/usr/bin/env
apt update
apt-mark unhold   samba   samba-common   samba-common-bin   samba-dsdb-modules   samba-libs   samba-vfs-modules
apt --fix-broken install

apt-get install -y samba=2:4.17.12+dfsg-0+deb12u1 samba-common=2:4.17.12+dfsg-0+deb12u1 samba-common-bin=2:4.17.12+dfsg-0+deb12u1 samba-libs=2:4.17.12+dfsg-0+deb12u1 samba-dsdb-modules=2:4.17.12+dfsg-0+deb12u1 samba-vfs-modules=2:4.17.12+dfsg-0+deb12u1 python3-samba=2:4.17.12+dfsg-0+deb12u1 libldb2=2:2.6.2+samba4.17.12+dfsg-0+deb12u1 python3-ldb=2:2.6.2+samba4.17.12+dfsg-0+deb12u1 winbind=2:4.17.12+dfsg-0+deb12u1 libwbclient0=2:4.17.12+dfsg-0+deb12u1 libavahi-common-data=0.8-10+deb12u1 libsmbclient=2:4.17.12+dfsg-0+deb12u1 avahi-daemon=0.8-10+deb12u1 avahi-utils=0.8-10+deb12u1 libavahi-core7=0.8-10+deb12u1 libavahi-common3=0.8-10+deb12u1 libavahi-client3=0.8-10+deb12u1 --allow-change-held-packages --allow-downgrades

TMPDIR=$(mktemp -d /tmp/samba-fix-XXXX)
cd "$TMPDIR"

URLS=(
https://static2.fnnas.com/aptfix/sambadeb/libavahi-common-data_0.8-11_deb12u1_amd64.deb
https://static2.fnnas.com/aptfix/sambadeb/libavahi-core7_0.8-11_deb12u1_amd64.deb
https://static2.fnnas.com/aptfix/sambadeb/avahi-daemon_0.8-11_deb12u1_amd64.deb
https://static2.fnnas.com/aptfix/sambadeb/libavahi-client3_0.8-11_deb12u1_amd64.deb
https://static2.fnnas.com/aptfix/sambadeb/avahi-utils_0.8-11_deb12u1_amd64.deb
https://static2.fnnas.com/aptfix/sambadeb/libavahi-common3_0.8-11_deb12u1_amd64.deb
http://static2.fnnas.com/aptfix/sambadeb/libnm0_1.42.4-02-deb12u1_amd64.deb
http://static2.fnnas.com/aptfix/sambadeb/network-manager_1.42.4-02-deb12u1_amd64-new.deb
http://static2.fnnas.com/aptfix/sambadeb/libldb2_2.6.2-samba4.17.12-dfsg-0-deb12u2_amd64.deb
http://static2.fnnas.com/aptfix/sambadeb/ldb-tools_2.6.2-samba4.17.12-dfsg-0-deb12u2_amd64.deb
http://static2.fnnas.com/aptfix/sambadeb/libwbclient0_4.17.12-dfsg-0-deb12u2_amd64.deb
http://static2.fnnas.com/aptfix/sambadeb/samba-libs_4.17.12-dfsg-0-deb12u2_amd64.deb
http://static2.fnnas.com/aptfix/sambadeb/libsmbclient_4.17.12-dfsg-0-deb12u2_amd64.deb
http://static2.fnnas.com/aptfix/sambadeb/python3-ldb_2.6.2-samba4.17.12-dfsg-0-deb12u2_amd64.deb
http://static2.fnnas.com/aptfix/sambadeb/python3-samba_4.17.12-dfsg-0-deb12u2_amd64.deb
http://static2.fnnas.com/aptfix/sambadeb/registry-tools_4.17.12-dfsg-0-deb12u2_amd64.deb
http://static2.fnnas.com/aptfix/sambadeb/samba-common_4.17.12-dfsg-0-deb12u2_all.deb
http://static2.fnnas.com/aptfix/sambadeb/samba-common-bin_4.17.12-dfsg-0-deb12u2_amd64.deb
http://static2.fnnas.com/aptfix/sambadeb/samba-dsdb-modules_4.17.12-dfsg-0-deb12u2_amd64.deb
http://static2.fnnas.com/aptfix/sambadeb/samba-vfs-modules_4.17.12-dfsg-0-deb12u2_amd64.deb
http://static2.fnnas.com/aptfix/sambadeb/samba_4.17.12-dfsg-0-deb12u2_amd64.deb
http://static2.fnnas.com/aptfix/sambadeb/winbind_4.17.12-dfsg-0-deb12u2_amd64.deb
http://static2.fnnas.com/aptfix/sambadeb/samba-ad-dc_4.17.12-dfsg-0-deb12u2_all.deb
http://static2.fnnas.com/aptfix/sambadeb/libnss-winbind_4.17.12-dfsg-0-deb12u2_amd64.deb
http://static2.fnnas.com/aptfix/sambadeb/libpam-winbind_4.17.12-dfsg-0-deb12u2_amd64.deb
http://static2.fnnas.com/aptfix/sambadeb/smbclient_4.17.12-dfsg-0-deb12u2_amd64.deb
http://static2.fnnas.com/aptfix/sambadeb/samba-ad-provision_4.17.12-dfsg-0-deb12u2_all.deb
)

for u in "${URLS[@]}"; do
echo "Downloading $u"
wget -c "$u"
done

apt install -y ./*.deb --allow-change-held-packages

apt-mark hold   samba   samba-common   samba-common-bin   samba-dsdb-modules   samba-libs   samba-vfs-modules
rm -rf "$TMPDIR"
  1. sudo -i提权,执行修改后的脚本。
  2. 正常情况会运行到Samba配置界面,选择No,修复完成。
收藏
送赞
分享

0

主题

7

回帖

0

牛值

江湖小虾

非常好 执行以后成功修复windows的客户端登录不上去的问题 修复好后就是登录是直接登录没有在验证账户密码了

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则