Forum

Full Version: Samba not working anymore
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
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).
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.
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
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.
Another Samba expert Wink
Reference URL's