Tuesday, October 14, 2008

BackupPC on FreeNAS - Part 3 (Issues with Samba)

I've showed you in two posts how to install BackupPC on FreeNAS (BackupPC on FreeNAS & BackupPC on FreeNAS - Part 2)

It looks like that there is a problem with samba if you install it as I've described this in my previous posts. The FreeNAS binaries are compiled with different path-settings as the original pkg's from FreeBSD.

So if you do not need samba, don't install the packages! Skip the following steps:

freenas:~# pkg_add -r net/samba-libsmbclient-3.0.28

freenas:~# pkg_add -r net/samba-nmblookup-3.0.28.tbz

freenas:~# pkg_add -r net/samba-3.0.28,1


If you need samba, please be aware that you might see some problems!

One issue I've seen is that the /var/etc/private/smbpasswd file was not updated during the boot. My workaround is to add the following in /etc/rc.d/smbpasswd:

(/bin/echo "${_password}"; /bin/echo "${_password}") | ${command} -c /var/etc/smb.conf -s -a "${_username}" > /dev/null

Can anyone confirm similar problems?

3 Kommentare:

John said...

hey harry, i can't get my samba working either. I have the same exact problem as you do. Unfortunately, I've already installed samba and nmlookup according you previous posts. Do you know how to remove those packages?
Thanks. I love FreeNAS and BackupPC. It's the best thing out there I think.

harryd said...

Hi John,

can you please send me an email with more details. Maybe I can share some workarounds I've found out.
(harryd71@users.sourceforge,net).

Regards, harryd

John said...

When I restart the CIFS/SMB service, I get the following in /var/log/samba/log.smbd file:

[2008/10/15 18:58:42, 0] smbd/server.c:main(944)
smbd version 3.0.31 started.
Copyright Andrew Tridgell and the Samba Team 1992-2008
[2008/10/15 18:58:42, 1] smbd/files.c:file_init(193)
file_init: Information only: requested 10000 open files, 7187 are available.
[2008/10/15 18:58:42, 1] lib/util_tdb.c:tdb_log(664)
tdb(unnamed): tdb_open_ex: failed to get global lock on /var/etc/private/secre
ts.tdb: Invalid argument
[2008/10/15 18:58:42, 0] passdb/secrets.c:secrets_init(67)
Failed to open /var/etc/private/secrets.tdb
[2008/10/15 18:58:42, 0] /work/a/ports/net/samba3/work/samba-3.0.31/source/lib/p
idfile.c:pidfile_create(125)
ERROR: smbd-smb.conf : fcntl lock of file /var/run/smbd-smb.conf.pid failed. E
rror was Invalid argument

I haven't tried your workaround for the smb password update. Would it help for this situation?