Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

Samba not working anymore
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Samba not working anymore
10th May, 2015, 11:36 PM
Post: #1
mindless Offline
Registered
Posts: 4
Joined: Apr 2015
Reputation: 0
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.
Find all posts by this user
Quote this message in a reply
11th May, 2015, 09:33 AM (This post was last modified: 11th May, 2015 09:35 AM by deHakkelaar.)
Post: #2
deHakkelaar Offline
Administrator
******
Posts: 360
Joined: Dec 2012
Reputation: 23
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
Find all posts by this user
Quote this message in a reply
11th May, 2015, 04:21 PM
Post: #3
mindless Offline
Registered
Posts: 4
Joined: Apr 2015
Reputation: 0
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.
Find all posts by this user
Quote this message in a reply
12th May, 2015, 12:38 AM (This post was last modified: 12th May, 2015 01:06 AM by deHakkelaar.)
Post: #4
deHakkelaar Offline
Administrator
******
Posts: 360
Joined: Dec 2012
Reputation: 23
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
Find all posts by this user
Quote this message in a reply
17th May, 2015, 08:23 PM
Post: #5
mindless Offline
Registered
Posts: 4
Joined: Apr 2015
Reputation: 0
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.
Find all posts by this user
Quote this message in a reply
17th May, 2015, 11:59 PM
Post: #6
deHakkelaar Offline
Administrator
******
Posts: 360
Joined: Dec 2012
Reputation: 23
RE: Samba not working anymore
Another Samba expert Wink

There are only 10 types of people in the world: those who understand binary, and those who don't
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 10th May, 2025, 04:42 AM Powered By MyBB, © 2002-2025 MyBB Group.