登不上查了很久发现是防火墙导致的
sudo firewall-cmd --list-all
//查看所有的防火墙信息
sudo firewall-cmd --permanent --zone=public --add-service=samba
//service里添加samba
firewall-cmd --reload
//重启
便可以登录了,小问题
samba报错
sdk@ubuntu:~$ samba
[2023/09/10 17:18:47, 0] ../../lib/util/debug.c:1100(reopen_one_log)
reopen_one_log: Unable to open new log file '/var/log/samba/log.samba': Permission denied
[2023/09/10 17:18:47, 0] ../../lib/util/debug.c:1100(reopen_one_log)
reopen_one_log: Unable to open new log file '/var/log/samba/log.%m': Permission denied
[2023/09/10 17:18:47.261269, 0] ../../lib/util/debug.c:1100(reopen_one_log)
reopen_one_log: Unable to open new log file '/var/log/samba/log.%m': Permission denied
[2023/09/10 17:18:47.261309, 0] ../../source4/samba/server.c:626(binary_smbd_main)
samba version 4.15.13-Ubuntu started.
Copyright Andrew Tridgell and the Samba Team 1992-2021
[2023/09/10 17:18:47.262408, 0] ../../lib/util/become_daemon.c:119(exit_daemon)
exit_daemon: daemon failed to start: Failed to cleanup temporary files, error code 22
sudo apt-get install daemon
重启服务
sudo service smbd restart
sudo /etc/init.d/smbd restart