# Samba - failed to load configuration file

**URL:** <https://rebornos.discourse.group/t/samba-failed-to-load-configuration-file/634>\
**Category:** Issues & Assistance\
**Created:** [December 27, 2021, 8:02pm UTC](https://rebornos.discourse.group/t/samba-failed-to-load-configuration-file/634 "2021-12-27T20:02:02Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![rebornosday](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@rebornosday](https://rebornos.discourse.group/u/rebornosday)\
**Post date:** [December 27, 2021, 8:02pm UTC](https://rebornos.discourse.group/t/samba-failed-to-load-configuration-file/634/1 "2021-12-27T20:02:02Z")

</div>

Hello,

Merry Christmas everyone!

I am trying to get Samba working and I have it installed but not sure what to do next. When I try to check the status I get:

```auto
[~]$ samba
[2021/12/27 15:00:15, 0] ../../lib/util/debug.c:1100(reopen_one_log)
  reopen_one_log: Unable to open new log file '/var/log/samba/log.samba': Permission denied
Can't load /etc/samba/smb.conf - run testparm to debug it
samba - Failed to load config file!
[~]$

```

I then run testparm and get:

```auto
[~]$ testparm
Load smb config files from /etc/samba/smb.conf
Error loading services.
[~]$

```

Any ideas? Thanks!

---

<div class="post-metadata">

**Author:** ![rebornosday](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@rebornosday](https://rebornos.discourse.group/u/rebornosday)\
**Post date:** [December 27, 2021, 8:41pm UTC](https://rebornos.discourse.group/t/samba-failed-to-load-configuration-file/634/2 "2021-12-27T20:41:40Z")

</div>

Ok so I just created a blank smb.conf file and I got passed the above. That seemed to be the issue for the above. But now I’m stuck at:

```auto
samba
[2021/12/27 15:40:22, 0] ../../lib/util/debug.c:1100(reopen_one_log)
  reopen_one_log: Unable to open new log file '/var/log/samba/log.samba': Permission denied
[2021/12/27 15:40:22.737805, 0] ../../source4/samba/server.c:626(binary_smbd_main)
  samba version 4.15.3 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2021
[2021/12/27 15:40:22.739235, 0] ../../lib/util/become_daemon.c:119(exit_daemon)
  exit_daemon: daemon failed to start: Failed to cleanup temporary files, error code 22
[~]$

```

---

<div class="post-metadata">

**Author:** ![shivanandvp](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/shivanandvp/32/10_2.png) [@shivanandvp](https://rebornos.discourse.group/u/shivanandvp)\
**Post date:** [December 27, 2021, 8:43pm UTC](https://rebornos.discourse.group/t/samba-failed-to-load-configuration-file/634/3 "2021-12-27T20:43:27Z")

</div>

@rebornosday One of the problems is that while creating the `conf` ( **not** the log yet) file, it seems like the permissions weren’t set correctly. After extending the permissions of the `/etc/samba/smb.conf` file to `770`, try running `testparm`. Check if it still says that it cannot open the conf file.

---

<div class="post-metadata">

**Author:** ![shivanandvp](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/shivanandvp/32/10_2.png) [@shivanandvp](https://rebornos.discourse.group/u/shivanandvp)\
**Post date:** [December 27, 2021, 8:47pm UTC](https://rebornos.discourse.group/t/samba-failed-to-load-configuration-file/634/4 "2021-12-27T20:47:55Z")

</div>

Perhaps also try extending the permissions of the `/var/log/samba/log.samba` file after that.

---

<div class="post-metadata">

**Author:** ![rebornosday](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@rebornosday](https://rebornos.discourse.group/u/rebornosday)\
**Post date:** [December 27, 2021, 8:54pm UTC](https://rebornos.discourse.group/t/samba-failed-to-load-configuration-file/634/5 "2021-12-27T20:54:40Z")

</div>

Thanks permissions updated and now when running “samba” in terminal there is no longer any output. I checked the logs and now its just outputting this there now:

```auto
[2021/12/27 15:49:17.378724, 0] ../../source4/samba/server.c:626(binary_smbd_main)
  samba version 4.15.3 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2021
[2021/12/27 15:49:17.380038, 0] ../../lib/util/become_daemon.c:119(exit_daemon)
  exit_daemon: daemon failed to start: Failed to cleanup temporary files, error code 22

```

Also, in the attached image this is what I get when I try to set a share via the GUI. Thanks!

 ![Screenshot-from-2021-12-27-15-49-58](https://global.discourse-cdn.com/free1/uploads/rebornos/original/1X/8164503d29886eedf811e6a97074d5714e049b90.jpeg)

---

<div class="post-metadata">

**Author:** ![shivanandvp](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/shivanandvp/32/10_2.png) [@shivanandvp](https://rebornos.discourse.group/u/shivanandvp)\
**Post date:** [December 27, 2021, 9:20pm UTC](https://rebornos.discourse.group/t/samba-failed-to-load-configuration-file/634/6 "2021-12-27T21:20:41Z")

</div>

@rebornosday Enabling `usershare`s requires [this procedure](https://wiki.archlinux.org/title/Samba#Enable_Usershares) to be completed.

---

<div class="post-metadata">

**Author:** ![rebornosday](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@rebornosday](https://rebornos.discourse.group/u/rebornosday)\
**Post date:** [December 27, 2021, 10:04pm UTC](https://rebornos.discourse.group/t/samba-failed-to-load-configuration-file/634/7 "2021-12-27T22:04:37Z")

</div>

Thanks, I followed the article here but still I get the same errors as before: [How to add and enable users for Samba share - TechRepublic](https://www.techrepublic.com/article/how-to-add-and-enable-users-for-samba-share/)

---

<div class="post-metadata">

**Author:** ![shivanandvp](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/shivanandvp/32/10_2.png) [@shivanandvp](https://rebornos.discourse.group/u/shivanandvp)\
**Post date:** [December 27, 2021, 10:06pm UTC](https://rebornos.discourse.group/t/samba-failed-to-load-configuration-file/634/8 "2021-12-27T22:06:56Z")

</div>

What does your `/etc/samba/smb.conf` look like?

---

<div class="post-metadata">

**Author:** ![rebornosday](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@rebornosday](https://rebornos.discourse.group/u/rebornosday)\
**Post date:** [December 27, 2021, 10:13pm UTC](https://rebornos.discourse.group/t/samba-failed-to-load-configuration-file/634/9 "2021-12-27T22:13:39Z")

</div>

All I have in it is:

`usershare owner only = false`

---

<div class="post-metadata">

**Author:** ![shivanandvp](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/shivanandvp/32/10_2.png) [@shivanandvp](https://rebornos.discourse.group/u/shivanandvp)\
**Post date:** [December 27, 2021, 10:18pm UTC](https://rebornos.discourse.group/t/samba-failed-to-load-configuration-file/634/10 "2021-12-27T22:18:39Z")

</div>

> [@shivanandvp](#):
>
> @rebornosday Enabling `usershare`s requires [this procedure](https://wiki.archlinux.org/title/Samba#Enable_Usershares) to be completed.

The link I shared here has other things. I don’t have enough information to know what’s wrong on your end. Did you want to check the steps here?

---

<div class="post-metadata">

**Author:** ![rebornosday](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@rebornosday](https://rebornos.discourse.group/u/rebornosday)\
**Post date:** [December 27, 2021, 10:20pm UTC](https://rebornos.discourse.group/t/samba-failed-to-load-configuration-file/634/11 "2021-12-27T22:20:12Z")

</div>

Ahh sorry, missed the link in your text. Checking now.

---

<div class="post-metadata">

**Author:** ![rebornosday](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@rebornosday](https://rebornos.discourse.group/u/rebornosday)\
**Post date:** [December 27, 2021, 10:31pm UTC](https://rebornos.discourse.group/t/samba-failed-to-load-configuration-file/634/12 "2021-12-27T22:31:48Z")

</div>

Ran through it all. Its saying I don’t have permission in the GUI to add a share. So I checked what groups I’m in and its not showing I am in the “sambashare” group. So I tried to re-add it below but when I check again, I’m not in it?

```auto
[~]$ sudo gpasswd sambashare -a main
Adding user main to group sambashare
[~]$ groups
wheel main
[~]$

```

---

<div class="post-metadata">

**Author:** ![rebornosday](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@rebornosday](https://rebornos.discourse.group/u/rebornosday)\
**Post date:** [December 27, 2021, 10:37pm UTC](https://rebornos.discourse.group/t/samba-failed-to-load-configuration-file/634/13 "2021-12-27T22:37:10Z")

</div>

Hmm I found this command it shows I am apart of the sambashare group:

```auto
[~]$ getent group sambashare
sambashare:x:964:main
[~]$

```

Not sure what to do as in the GUI when I try to add a share its saying:

```auto
net usershare: cannot open usershare directory /var/lib/samba/usershares. Error Permission denied
You do not have permission to create a usershare. Ask your administrator to grant you permissions to create a share.

```

---

<div class="post-metadata">

**Author:** ![shivanandvp](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/shivanandvp/32/10_2.png) [@shivanandvp](https://rebornos.discourse.group/u/shivanandvp)\
**Post date:** [December 28, 2021, 5:17pm UTC](https://rebornos.discourse.group/t/samba-failed-to-load-configuration-file/634/14 "2021-12-28T17:17:46Z")

</div>

Your user account has to be added to the group. Here is an example on how to do it: [samba - local network share error, no permission to create - Ask Ubuntu](https://askubuntu.com/a/1230843)

---

<div class="post-metadata">

**Author:** ![rebornosday](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@rebornosday](https://rebornos.discourse.group/u/rebornosday)\
**Post date:** [December 28, 2021, 5:46pm UTC](https://rebornos.discourse.group/t/samba-failed-to-load-configuration-file/634/15 "2021-12-28T17:46:30Z")

</div>

Yeah I tried this on my second to last post above but it doesn’t fix it. I ran Nautilus with sudo and then I get this error:

 ![Screenshot-from-2021-12-28-12-43-56](https://global.discourse-cdn.com/free1/uploads/rebornos/original/1X/2fb920090a4037a031b2238cbdc50738fc480c65.jpeg)

---

<div class="post-metadata">

**Author:** ![rebornosday](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@rebornosday](https://rebornos.discourse.group/u/rebornosday)\
**Post date:** [January 12, 2022, 10:09pm UTC](https://rebornos.discourse.group/t/samba-failed-to-load-configuration-file/634/16 "2022-01-12T22:09:59Z")

</div>

Anyone have any idea why its saying invalid characters on this? Seems like its stuck on that but I have no idea why. Thanks

---

<div class="post-metadata">

**Author:** ![shivanandvp](https://yyz2.discourse-cdn.com/free1/user_avatar/rebornos.discourse.group/shivanandvp/32/10_2.png) [@shivanandvp](https://rebornos.discourse.group/u/shivanandvp)\
**Post date:** [January 14, 2022, 10:43pm UTC](https://rebornos.discourse.group/t/samba-failed-to-load-configuration-file/634/17 "2022-01-14T22:43:52Z")

</div>

My guess is that the sharename probably shouldn’t be a path.
