Samba not working anymore
|
10th May, 2015, 11:36 PM
Post: #1
|
|||
|
|||
Samba not working anymore
Hello,
I had a samba share set up correctly before on my media hdd. Now (after my last upgrade I think), I have some troubles with samba : First, I cant find a way to control the samba deamon/service : I have no samba service nor /etc/init.d/samba or anything of that kind. I only have a smbd command that doesn't seem to do anything and has no restart command option, and a smbd service which by default is stopped and doesn't seem to do anything either. How can I restart the samba server to apply newly entered settings ? (Or even make sure it's correctly running) Second, if I browse the network from a windows computer, I can see the "XBIAN" server (not share) and if I try to connect to it with the right credentials, the connection is refused. On the other hand, I can connect to the smb server by directly entering the pi's IP into the explorer. Any idea about that ? Thanks. Regards. |
|||
11th May, 2015, 09:33 AM
(This post was last modified: 11th May, 2015 09:35 AM by deHakkelaar.)
Post: #2
|
|||
|
|||
RE: Samba not working anymore
Samba is not running as a daemon but kickstarted by the 'inetd' daemon, for example:
Terminal $ netstat -plnt tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 668/inetd tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 668/inetd $ cat /etc/inetd.conf # SAMBA NetBIOS services (for PC file and print sharing) netbios-ssn stream tcp nowait root /usr/sbin/smbd smbd microsoft-ds stream tcp nowait root /usr/sbin/smbd smbd $ update-inetd --disable netbios-ssn $ update-inetd --disable microsoft-ds $ netstat -plnt $ update-inetd --enable netbios-ssn $ update-inetd --enable microsoft-ds $ netstat -plnt tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 668/inetd tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 668/inetd Ps. I did not need to enter any credentials to connect to the shares on XBian (out of the box). There are only 10 types of people in the world: those who understand binary, and those who don't |
|||
11th May, 2015, 04:21 PM
Post: #3
|
|||
|
|||
RE: Samba not working anymore
Thanks for your answer, I'll look in this way to restart the server.
For the shares, I set up one share on my media hdd with the parameters guest ok = no and force user = xbian which previously worked as expected. But this is one of the 3 shares provided by Samba (the other ones are the original xbian-backup share and the last one is the automatic usbmount share even if I disabled it in the usbmount.conf. As the security settings are set for each share and not globally, it shouldn't ask me for credentials when entering the server but when entering on of the shares. Any idea on this? Thanks. Regards. |
|||
12th May, 2015, 12:38 AM
(This post was last modified: 12th May, 2015 01:06 AM by deHakkelaar.)
Post: #4
|
|||
|
|||
RE: Samba not working anymore
There is no Samba "server" active/running, just an on/off switch to tell inetd to start listening (or not) on ports 139 & 445 TCP and spawn smbd sessions on demand when a client tries to connect.
These smbd sessions will time-out/close after while of inactivity. watch 'ps -e | grep smbd' http://en.wikipedia.org/wiki/Inetd Better check the Samba man page again for "force user = xbian": https://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html There are only 10 types of people in the world: those who understand binary, and those who don't |
|||
17th May, 2015, 08:23 PM
Post: #5
|
|||
|
|||
RE: Samba not working anymore
Thanks, I finally got it to work by looking up the manual.
I was really looking for "valid users" instead of force user. Then I created the right user with smbpasswd and it was ok. |
|||
17th May, 2015, 11:59 PM
Post: #6
|
|||
|
|||
RE: Samba not working anymore
Another Samba expert
There are only 10 types of people in the world: those who understand binary, and those who don't |
|||
« Next Oldest | Next Newest »
|