Problem connecting to Samba file server

I am trying to setup a Linux Samba file server to replace a Netware 3.12 box, using openSUSE 12.1. I thought that everything was O.K. when I tested the setup with the boxes connected through a wired connection to a wireless router. I could read and write to the shared directory from Windows XP. However, when I attempted to put it in service with the connections through a Linksys SE1500 switch, I could not make a connection. Neither side could see the other.

Can anyone help?

The /etc/samba/smb.conf makes a lot of difference and would be good to post here to see. Also, the permissions of the folders you are trying toi share makes lots of difference, When trying to use password protection, all external users must be eneterd into the local samba database in order to get access. There are lots of considerations. I have a couple of solutions to look at here:

Samba S.W.A.T. - Samba Web Administration Tool Setup for openSUSE - Blogs - openSUSE Forums

AND

SWAT - Samba Web Administration Tool - Setup & Creation Script - 1.03 - Blogs - openSUSE Forums

AND

openSUSE SuSE Linux HOWTOs and Tutorials by Swerdna

Thank You,

Thanks for the reply. What is confusing to me, is that as long as the boxes are connected through a router, everything works as planned. The problem connecting is only when connecting with the switch. Smb.conf file follows.

smb.conf is the main Samba configuration file. You find a full commented

version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the

samba-doc package is installed.

Date: 2011-11-02

[global]
workgroup = WORKGROUP
passdb backend = tdbsam
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = Bad User
logon path = \%L\profiles.msprofile
logon home = \%L%U.9xprofile
logon drive = P:
usershare allow guests = Yes
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
domain logons = No
domain master = No
netbios name = chaneylumber
security = user
usershare max shares = 100
wins server =
wins support = No
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes
[profiles]
comment = Network Profiles Service
path = %H
read only = No
store dos attributes = Yes
create mask = 0600
directory mask = 0700
[users]
comment = All users
path = /home
read only = No
inherit acls = Yes
veto files = /aquota.user/groups/shares/
[groups]
comment = All groups
path = /home/groups
read only = No
inherit acls = Yes
[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775

[Share]
path = /home/jerry/share
available = yes
browsable = yes
public = yes
writable = yes
guest ok = yes
read only = no

So here is an example smb.conf file. The less you use the better and everything has a default which will be used unless you override it. In this case, the PC Hostname will be used and netbios name is not needed in the smb.conf file unless you want them (netbios name and Hostname) to be different for some reason.

# smb.conf is the main Samba configuration file. 
# You find a full commented version at 
# /usr/share/doc/packages/samba/examples/smb.conf.SUSE 
# if the samba-doc package is installed.
# Samba config file created using SWAT 
# from $netbios_name (127.0.0.1)
# Date: $(date)

[global]
  workgroup = $Workgroup
  passdb backend = tdbsam
  name resolve order = bcast host lmhosts wins
  server string = ""
  printing = cups
  printcap name = cups
  printcap cache time = 750
  cups options = raw
  use client driver = yes
  map to guest = Bad User
  local master = yes
  os level = 33
  usershare allow guests = Yes
  usershare max shares = 100
  usershare owner only = False

[homes]
  comment = Home Directories
  valid users = %S, %D%w%S
  browseable = No
  read only = No
  inherit acls = Yes

[printers]
  comment = All Printers
  path = /var/tmp
  printable = Yes
  create mask = 0700
  browseable = No
  guest OK = Yes

[print$]
  comment = Printer Drivers
  path = /var/lib/samba/drivers
  write list = @ntadmin root
  force group = ntadmin
  create mask = 0664
  directory mask = 0775

You would have a hidden /home share, you would need to enter all remote users into the local Samba Database with user name and password. In the case of your share at path = /home/jerry/share, who has rights to write to this folder on the local PC? If it is only jerry or root, its not going to work. Basically you can share /home/username where user name has been entered into the Samba user name and password database remotely if you use the right username and password remotely. If you want anyone to use it, stop shearing /home, create a share folder outside of the /home area and give it rights so anyone can write to it.

Now, I can’t say for sure what you mean between a switch and a router. Most network concentrators these days are switches and you can buy a /home router that includes a switch. If the /hosts had different sub nets, a router would be required, but really, a lot more about your network setup and the router setup would be required to determine the issue. Consider that when you have Samba setup properly and networking setup properly, it will work as advertised, but otherwise, strange things that make no sense can and will occur.

Now take a look at the two blog posts I provided as good info is contained within.

Thank You,

Thank you for your patience. I probably should explain exactly what I am trying to accomplish. The Linux Samba server will have no operator; its sole function will be to serve data files to three workstations running Visual Foxpro 6.0. I am preparing the setup in my office, where I have a home wireless router. The computers are wired into the ports of the router, and I can connect with no problem. It is when I attempt to attach the server to the network using a 5 port switch, I can’t make a connection. The lights on the switch blink, like something is happening, but neither side can see the other.
Another thing. I have searched and searched for the command to restart samba from the command line, but everything I have tried results in “command not found”. It is really annoying to have to restart the computer for every change made.

To restart Samba, there are two parts in openSUSE 12.1 normally used, smb (provides file sharing and printing services to Windows clients) and nmb (understands and replies to NetBIOS name service requests) and excluding windbind (only needed for working with Windows Domains). In the pre-systemd era now used in openSUSE, the daemon’s were called smbd, nmbd and windbindd. To restart smb and nmb you would use the commands:

sudo /etc/init.d/smb restart

AND

sudo /etc/init.d/nmb restart

These still work, but the correct syntax under systemd is:

sudo systemctl restart smb.service

AND

sudo systemctl restart nmb.service

And could even be placed on a single line as:

sudo systemctl restart smb.service ; sudo systemctl restart nmb.service

Thank You,

I have trimmed the smb.conf file, but I still can’t connect using an ethernet switch. The smb.conf file follows>


# smb.conf is the main Samba configuration file. 
# You find a full commented version at 
# /usr/share/doc/packages/samba/examples/smb.conf.SUSE 
# if the samba-doc package is installed.
# Samba config file created using SWAT 
# from MY-PC (127.0.0.1)
# Date: Wed Apr 18 21:20:15 EDT 2012

[global]
  workgroup = WORKGROUP
  passdb backend = tdbsam
  name resolve order = bcast host lmhosts wins
  server string = ""
  printing = cups
  printcap name = cups
  printcap cache time = 750
  cups options = raw
  use client driver = yes
  map to guest = Bad User
  local master = yes
  os level = 33
  usershare allow guests = Yes
  usershare max shares = 100
  usershare owner only = False

[homes]
  comment = Home Directories
  valid users = %S, %D%w%S
  browseable = No
  read only = No
  inherit acls = Yes 

I have a bash script called netinfo you can find here:

http://forums.opensuse.org/english/development/programming-scripting/448072-netinfo-read-network-pc-information-into-local-text-file.html

The output could be posted into SuSE Paste here:

SUSE Paste

Make sure to remove any sensitive data it might include and remember to set the Delete After to Never.

Thank You,

I tried to use the script, but got this error.


/bin/bash^M:  bad interpreter: no such file or directory

On 04/24/2012 09:36 AM, jerrychaney wrote:
>
> jdmcdaniel3;2457985 Wrote:
>> I have a bash script called netinfo you can find here:
>>
>> http://tinyurl.com/2cgsmj6
>>
>> The output could be posted into SuSE Paste here:
>>
>> ‘SUSE Paste’ (http://paste.opensuse.org/)
>>
>> Make sure to remove any sensitive data it might include and remember to
>> set the Delete After to Never.
>>
>> Thank You,
>
> I tried to use the script, but got this error.
>
> Code:
> --------------------
>
> /bin/bash^M: bad interpreter: no such file or directory

That ^M means that you have windows-type line endings of <CR><LF> rather than
the <LF> used by Linux. Open the script with vi. If it says [dos] in the status
line, then use the command ‘:set ff=unix’. If does not say [dos], then enter the
command ‘:%s/\r//’. After eiter command, then type ZZ to save the modified
result and exit.

Thanks. That fixed it.

I got the script to work and pasted the result into SUSE paste. SUSE Paste

I have though, stumbled onto a solution. Disabling DCHP and giving each computer a static IP address has allowed me to connect using a switch. Can someone verify that is the correct way of doing it?

On 2012-04-24 20:06, jerrychaney wrote:

> I have though, stumbled onto a solution. Disabling DCHP and giving each
> computer a static IP address has allowed me to connect using a switch.
> Can someone verify that is the correct way of doing it?

Both methods should work, but is better to give a fixed IP to a server.
That switch of yours is probably interfering something.

Did you try if other protocols would connect?


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)