You are not logged in.
Samba is disabled in my system at startup.
# systemctl status smbd
* smbd.service - Samba SMB/CIFS server
Loaded: loaded (/usr/lib/systemd/system/smbd.service; disabled)
Active: inactive (dead)
#When I try to start samba, I get an error message on the log that says that samba can start because port 445 is in use. If I change samba's configuration to use another port it starts fine.
However I would like to know why I can't use port 445. Running netstat after a fresh boot shows this:
# netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp6 0 0 :::445 :::* LISTEN 1/init
#Why does it say that init is listening on port 445? Do you think it's related to some misconfiguration with samba or an issue with systemd? I can confirm that smbd is not running via ps ax.
I use samba to connect from a mac laptop and even if I change the default port the connection fails. I have tried nfs as an alternative but didn't really like the fact it uses no password.
This is samba's message log:
May 25 17:35:43 lynn systemd[1]: Starting Samba SMB/CIFS server...
May 25 17:35:43 lynn systemd[1]: Started Samba SMB/CIFS server.
May 25 17:35:43 lynn smbd[617]: [2014/05/25 17:35:43.385357, 0] ../source3/lib/util_sock.c:485(open_socket_in)
May 25 17:35:43 lynn smbd[617]: bind failed on port 445 socket_addr = ::.
May 25 17:35:43 lynn smbd[617]: Error = Address already in use
May 25 17:35:43 lynn smbd[617]: [2014/05/25 17:35:43.397483, 0] ../source3/smbd/server.c:691(smbd_open_one_socket)
May 25 17:35:43 lynn smbd[617]: smbd_open_once_socket: open_socket_in: Address already in use
May 25 17:35:43 lynn smbd[617]: [2014/05/25 17:35:43.397616, 0] ../source3/smbd/server.c:691(smbd_open_one_socket)
May 25 17:35:43 lynn smbd[617]: smbd_open_once_socket: open_socket_in: Address already in useMy system is up to date and my samba version is Version 4.1.7. Thanks in advance to everyone that took the time to read my question.
Last edited by denn1s (2014-05-26 01:07:44)
--
Running: Arch - x86_64 - KDE
On: Intel i5 - Nvidia 9600
Offline
Have you enabled smbd.socket?
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Thank you. I hadn't tried enabling smdb.socket but it seems samba still can't start
# systemctl status smbd.socket
* smbd.socket - Samba SMB/CIFS server socket
Loaded: loaded (/usr/lib/systemd/system/smbd.socket; enabled)
Active: active (listening) since Sun 2014-05-25 18:01:54 CST; 3min 19s ago
Listen: [::]:445 (Stream)
Accepted: 2; Connected: 0
May 25 18:01:54 lynn systemd[1]: Starting Samba SMB/CIFS server socket.
May 25 18:01:54 lynn systemd[1]: Listening on Samba SMB/CIFS server socket.
# systemctl start smbd
# systemctl status smbd
* smbd.service - Samba SMB/CIFS server
Loaded: loaded (/usr/lib/systemd/system/smbd.service; disabled)
Active: active (running) since Sun 2014-05-25 18:05:53 CST; 3s ago
Process: 887 ExecStart=/usr/bin/smbd -D (code=exited, status=0/SUCCESS)
Main PID: 888 (smbd)
CGroup: /system.slice/smbd.service
|-888 /usr/bin/smbd -D
`-889 /usr/bin/smbd -D
May 25 18:05:53 lynn systemd[1]: Started Samba SMB/CIFS server.
May 25 18:05:53 lynn smbd[888]: [2014/05/25 18:05:53.951756, 0] ../source3/lib/util_sock.c:485(open_socket_in)
May 25 18:05:53 lynn smbd[888]: bind failed on port 445 socket_addr = ::.
May 25 18:05:53 lynn smbd[888]: Error = Address already in use
May 25 18:05:53 lynn smbd[888]: [2014/05/25 18:05:53.951981, 0] ../source3/smbd/server.c:691(smbd_open_one_socket)
May 25 18:05:53 lynn smbd[888]: smbd_open_once_socket: open_socket_in: Address already in use
May 25 18:05:53 lynn smbd[888]: [2014/05/25 18:05:53.952106, 0] ../source3/smbd/server.c:691(smbd_open_one_socket)
May 25 18:05:53 lynn smbd[888]: smbd_open_once_socket: open_socket_in: Address already in useOn a side note, nmbd runs fine with no issues.
--
Running: Arch - x86_64 - KDE
On: Intel i5 - Nvidia 9600
Offline
You misunderstood what I meant; if smbd.socket is enabled, that would explain why port 445 is in use -- systemd is listening on the port so that it can start up smbd when it is called for. This is what a .socket unit does.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
I see, that was precisely the problem, thank you. I must have enabled the socket without realizing it at some point, disabling smbd.socket solves the issue. I still can't connect from my laptop but it's surely a different issue, marking the thread as solved.
--
Running: Arch - x86_64 - KDE
On: Intel i5 - Nvidia 9600
Offline