# Swat not updating smb.conf

## BvdA

L.S,

I've started on a clean box, latest gentoo.

After emerging samba with use-flag swat I find that swat does not update smb.conf.

Global settings do not persist. Shares cannot be selected.

Pretty annoying, this is.

Probably it is something small. Could anyone show me the right direction?

Thanks in advance,

Bart.

----------

## 666threesixes666

my setup does not use swat....  this will get you up and running quick...

this is my /etc/samba/smb.conf

```

[global]

# workgroup = NT-Domain-Name or Workgroup-Name, eg: LINUX2

   workgroup = WORKGROUP

# name your computer shows up as

   netbios name = MK

# server string is the equivalent of the NT Description field

   server string = the share of the century

# Security mode. Defines in which mode Samba will operate. Possible

# values are share, user, server, domain and ads. Most people will want

# user level security. See the HOWTO Collection for details.

 security = share

# DONT LET IT FOOL YOU, YOU NEED SECURITY = SHARE!!!!  IT IS NOT DEPRECATED!!

# Unix users can map to different SMB User names

  username map = /etc/samba/smbusers

# nautilus sharing goodies

usershare allow guests = yes

usershare max shares = 100

usershare owner only = False

# write to unix back end using this user:group

# read only share

[Broadcast]

        comment = Guest access share

   public = yes

        path = /home/samba/broadcast

        browseable = yes

        read only = yes

        guest ok = yes

# read/write share

[Dropbox]

   path = /home/samba/dropbox

   public = yes

        browseable = yes

        read only = no

        guest ok = yes

#might be able to change the users or comment out entirely

force user = mkultra

force group = mkultra

```

are you running swat as root?

last lines are mkultra because....  

```

lrwxrwxrwx  1 root    root      20 Dec 14 19:13 samba -> /home/mkultra/samba/

```

----------

## BvdA

Thanks for the reply,

I would like to use swat. 

Things are as default as can be. 

- /etc/xinetd.d/swat adapted to be invoked from other box (only_from and disable=no)

- with smbpasswd added user root 

The last action is required to log in in the gui. I do not remember doing this on older installs, but my memory is not as good as it used to be...

I configured some more logging, and in the log there is some complaining:

...

[2013/05/24 17:56:57.782286,  0] passdb/secrets.c:76(secrets_init)

  Failed to open /var/lib/samba/private/secrets.tdb

[2013/05/24 17:56:57.782590,  1] ../lib/util/tdb_wrap.c:65(tdb_wrap_log)

  tdb(/var/lib/samba/private/secrets.tdb): tdb_open_ex: /var/lib/samba/private/secrets.tdb (2051,791123) is already open in this process

[2013/05/24 17:56:57.782740,  3] lib/dbwrap_tdb.c:359(db_open_tdb)

  Could not open tdb: Device or resource busy

...

but as I can use the webinterface this seems unrelated.

Bart.

----------

## 666threesixes666

another good question is what version of samba do you have installed?  have you tried another version?

----------

## BvdA

Latest version: 3.6.12

----------

## werner.v

i think i'm having a similar problem here. i've made a clean install, and samba works fine (using the old smb.conf), but no button on the swat interface has any effect (like changing from basic to advanced view). starting and stopping smbd does not work either. in the old system, swat works fine (using samba 3.6.9).

from the log files i get

[2013/08/18 10:17:06.902230,  0] passdb/secrets.c:76(secrets_init)

  Failed to open /var/lib/samba/private/secrets.tdb

repeated over and over again.

permissions on the files are the same as in the old system.

i've read about problems with pam, but re-emerging world without pam support did not change anything.

ok, it`s just an annoyance since i can write smb.conf by hand, but does someone have a clue what's happening here?

cheers

werner

----------

## drumpaul

Me too: same identical problem!a bug?

----------

