From: Volker Lendecke on
On Mon, Jan 04, 2010 at 01:43:32PM +0300, Сергей wrote:
> When I run smbstatus as usual user I got error:
> smbstatus
> ERROR: Failed to initialise messages database: Permission denied
> messaging_tdb_init failed: NT_STATUS_ACCESS_DENIED
> messaging_init failed
>
> ll /var/db/samba/messages.tdb
> -rw------- 1 root wheel 16384 4 янв 12:58 /var/db/samba/messages.tdb
>
> Does this permissions correctly?
>
>
> smbclient -V
> Version 3.3.9
>
> sudo tdbbackup -v /var/db/samba/messages.tdb
> /var/db/samba/messages.tdb : 0 records

This has already been fixed for 3.4. The attached patch
should apply to 3.3.

Volker
From: Volker Lendecke on
On Mon, Jan 04, 2010 at 11:53:17AM +0100, Volker Lendecke wrote:
> This has already been fixed for 3.4. The attached patch
> should apply to 3.3.

Forgot that the list strips attachments.

Volker

From bf9e0688143142ee0f0899882aded63b748333cc Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl(a)samba.org>
Date: Fri, 18 Sep 2009 18:27:16 +0200
Subject: [PATCH] s3:smbstatus: Fix bug 6703, allow smbstatus as non-root

We only require a ctdb connection when clustering is enabled. This limits the
restriction for only-root smbstatus to the clustering case.
---
source/utils/status.c | 24 +++++++++++++-----------
1 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/source/utils/status.c b/source/utils/status.c
index 1a66af9..58cc349 100644
--- a/source/utils/status.c
+++ b/source/utils/status.c
@@ -367,18 +367,20 @@ static int traverse_sessionid(struct db_record *db, void *state)
goto done;
}

- /*
- * This implicitly initializes the global ctdbd connection, usable by
- * the db_open() calls further down.
- */

- msg_ctx = messaging_init(NULL, procid_self(),
- event_context_init(NULL));
-
- if (msg_ctx == NULL) {
- fprintf(stderr, "messaging_init failed\n");
- ret = -1;
- goto done;
+ if (lp_clustering()) {
+ /*
+ * This implicitly initializes the global ctdbd
+ * connection, usable by the db_open() calls further
+ * down.
+ */
+ msg_ctx = messaging_init(NULL, procid_self(),
+ event_context_init(NULL));
+ if (msg_ctx == NULL) {
+ fprintf(stderr, "messaging_init failed\n");
+ ret = -1;
+ goto done;
+ }
}

if (!lp_load(get_dyn_CONFIGFILE(),False,False,False,True)) {
--
1.6.0.4

--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba