Samba setup error: unable to find a suitable server for domain <domainname>

My first install of openSUSE so forgive me if I have missed something obvious.

Summary of what I have done so far below:
[ul]
[li]fresh install of openSUSE 12.1 + ‘File Server’ software installed + others
[/li][li]Network services -> Swat: enabled
[/li][li]Services enabled:
[/li][LIST]
[li][]nmb
[/li][li][
]smb
[/li][li][]xinitd
[/li][li][
]cifs (smbfs not present appears to have been replaced by cifs)
[/li][li]
[/li][/ul]
[li]Network services -> Samba Server
[/li][ul]
[li][]start-up: during boot
[/li][li][
]Identity - configure workgroup & NetBIOS hostname
[/li][li][]Firewall - allow services
[/li][LIST]
[li][
][]Samba server
[/li][li][
][]Samba client
[/li][li][
][*]NetBIOS Server
[/li][/ul]
[/LIST]
[/LIST]
Problem is when I try and save the Samba Server configuration I get the error: ‘unable to find a suitable server for domain <domainname>’

Any suggestions what I might have done wrong?

Thanks,
Nick

AFAIK this is caused by setting samba as the primary domain controller. Sure you need that?

Didn’t know I had, mind you I have been clicking around and looking so might have inadvertantly done something I shouldn’t have. Where do I find the option to stop samba being a PDC?

In Yast - Network services - Windows domain membership

To check:


cat /etc/samba/smb.conf

Is there a backup copy of smb.conf laying around anywhere that I can restore from and start again?

Found it; smb.conf had the line

security = domain

Deleted that and error has gone away. Don’t know how that got in there though.
Thanks for your help Knurpt.

AFAIK from memory there’s three options for this param: domain, users, share.

But, good it’s working for you now.

Here’s an original for 12.1 if you want to start again:

# 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: 2012-02-16
[global]
	workgroup = WORKGROUP
	passdb backend = tdbsam
	printing = cups
	printcap name = cups
	printcap cache time = 750
	cups options = raw
	map to guest = Bad User
	include = /etc/samba/dhcp.conf
	logon path = \\%L\profiles\.msprofile
	logon home = \\%L\%U\.9xprofile
	logon drive = P:
	usershare allow guests = Yes
[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

Also, very important to note this bug for openSUSE 12.1: http://forums.opensuse.org/english/get-technical-help-here/network-internet/468521-problem-samba-opensuse-12-1-re-systemd.html

All working now, thanks for your help.

Only remaining issue is that I had to setup the user in Samba with:
smbpasswd -a <username>
which is ok for testing but not suitable for lots of users.

Is there some way to get Samba to use the Windows ACLs to authenticate connections?

Cheers,
Nick

Don’t know about Windows ACLs but it is possible to use LDAP.
Learn Linux, 302 (Mixed environments): Managing user accounts and groups

Or You could try identity mapping. It’s also described in the link.

Best regards,
Greg

Looks like I was a little previous when I said all working now, it’s not today.

smb.conf replaced with the one from swerdna, systemd-sysvinit now replaced with sysvinit-init, Samber server config edited again from Yast, server rebooted.

Attempt to diagnose the problem using the small amount of experience I have on this subject but problem is findsmb returns:

dhcppc5:/home/nick # findsmb
Scalar value @t1[3] better written as $t1[3] at /usr/bin/findsmb line 45.
Scalar value @t2[3] better written as $t2[3] at /usr/bin/findsmb line 45.
Scalar value @name[0] better written as $name[0] at /usr/bin/findsmb line 79.
Scalar value @info[0] better written as $info[0] at /usr/bin/findsmb line 114.
Scalar value @name[0] better written as $name[0] at /usr/bin/findsmb line 122.
Use of uninitialized value $_ in pattern match (m//) at /usr/bin/findsmb line 27.
Use of uninitialized value $_ in pattern match (m//) at /usr/bin/findsmb line 29.
Use of uninitialized value $_ in pattern match (m//) at /usr/bin/findsmb line 27.
Use of uninitialized value $_ in pattern match (m//) at /usr/bin/findsmb line 29.
Use of uninitialized value $BCAST in concatenation (.) or string at /usr/bin/findsmb line 51.
*=DMB
+=LMB
Use of uninitialized value $BCAST in concatenation (.) or string at /usr/bin/findsmb line 62, <NMBLOOKUP> line 2.

Any idea what I have done wrong?

Thanks,
Nick

A quick health check on Samba should be useful. Please run these commands and return the terminal dialogues here:

  1. cat /etc/samba/smb.conf
  2. cat /etc/sysconfig/SuSEfirewall2 | egrep “FW_CONFIGURATIONS_EXT=|FW_DEV_EXT=”
  3. rpm -qa | egrep “sysvinit-init|systemd-sysvinit”
  4. su -c “service nmb status; service smb status”
  5. smbtree -N
  6. sudo pdbedit -L

And importantly: please tell us what the Samba server is supposed to be doing for you.

Err something seems to have gone wrong here I thought I had replied to this yesterday.

I just had this happen to me on 13.1. It seems that I had selected “Windows Domain Membership” in YaST and it populated the domain = line in smb.conf I confirmed that by running it twice and removing it from smb.conf.

I hope this helps. It took me a while to figure this out:)