[Samba] Problem to set up an samba server
ssecherre at free.fr
Thu Nov 3 14:48:41 UTC 2022
Hello everyone !
I try since two weeks to share a directory using samba.
The server is a Linux Manjaro (Arch) distribution, IP = 192.168.1.16.
The shared directory is /data.
The clients are Linux Debian and Android. On the main Debian client, the
mounted directory is /media/partage.
I want to share files (r+w) without any identification on every devices
of the local network.
Here is my /etc/samba/smb.conf file on the server:
workgroup = WORKGROUP
server string = sylvain-serv
security = user
hosts allow = 192.168. 127.
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
invalid users = root
usershare allow guests = yes
map to guest = bad user
log file = /var/log/samba/%m.log
max log size = 50
dns proxy = no
comment = Data
path = /data
force user = sylvain
force group = sylvain
public = yes
guest ok = yes
read only = no
browseable = yes
The mount command on the client (mount -t cifs //192.168.1.16/data
/media/partage -o guest) is successful, but when I try to list (ls) the
mounted directory, I am told that the permission is not given. Here is
the mtab line :
//192.168.1.16/data /media/partage cifs
I have no network problem, I use to connect to the server in ssh. I
tried to stop iptables and fail2ban on both server and client without
success. Here is a nmap dialog:
# nmap 192.168.1.16
Starting Nmap 7.80 ( https://nmap.org ) at 2022-11-03 15:33 CET
Nmap scan report for minus.home (192.168.1.16)
Host is up (0.035s latency).
Not shown: 993 filtered ports
PORT STATE SERVICE
22/tcp open ssh
25/tcp closed smtp
80/tcp closed http
139/tcp open netbios-ssn
443/tcp closed https
445/tcp open microsoft-ds
3306/tcp closed mysql
But when I look at the log files (/var/log/samba) there is no entry
except the start of the daemons (smb and nmb).
Here is another issue:
# smbclient -NL 192.168.1.16
Anonymous login successful
Sharename Type Comment
--------- ---- -------
SMB1 disabled -- no workgroup available
No samba server seems to be running.
Here is a ls -l in the /media directory of the client:
- before mounting :
drwxrwxr-x 2 root root 4096 20 oct. 16:22 partage
- after mounting :
drwxr-xr-x 2 root root 0 2 nov. 15:39 partage
The same on the server:
drwxrwxr-x 2 root root 4096 2 nov. 15:39 data
The rights of the file in the server shared directory (/data):
-rw-rw-r-- 1 root root 7 23 oct. 13:24 test.txt
I am near a nervous breakdown... I don't know what to do.
Anyone can help me ?
More information about the samba