Installing samba gives spurious "account_policy_get failed" messages

Bug #24741 reported by Troy Thomas Hall on 2005-10-29
24
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Server papercuts
Medium
Thierry Carrez
samba (Ubuntu)
Wishlist
Thierry Carrez

Bug Description

I got the following error while trying to install samba tonight.
Setting up samba (3.0.14a-6ubuntu1) ...
Generating /etc/default/samba...
TDBSAM version too old (0), trying to convert it.
TDBSAM converted successfully.
account_policy_get: tdb_fetch_uint32 failed for field 1 (min password length),
returning 0
account_policy_get: tdb_fetch_uint32 failed for field 2 (password history),
returning 0
account_policy_get: tdb_fetch_uint32 failed for field 3 (user must logon to
change password), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 4 (maximum password age),
returning 0
account_policy_get: tdb_fetch_uint32 failed for field 5 (minimum password age),
returning 0
account_policy_get: tdb_fetch_uint32 failed for field 6 (lockout duration),
returning 0
account_policy_get: tdb_fetch_uint32 failed for field 7 (reset count minutes),
returning 0
account_policy_get: tdb_fetch_uint32 failed for field 8 (bad lockout attempt),
returning 0
account_policy_get: tdb_fetch_uint32 failed for field 9 (disconnect time),
returning 0
account_policy_get: tdb_fetch_uint32 failed for field 10 (refuse machine
password change), returning 0
 * Starting Samba daemons..

I had updated my system to the latest files earlier today so it shouldn't be an
"out-of-date" issue with my cache

Corey Burger (corey.burger) wrote :

Troy, do you still see this issue?

Changed in samba:
status: Unconfirmed → Needs Info
Graham Williamson (gjwill) wrote :

I got the same failed messages on installation of samba3.0.22-1ubuntu3.1 (current latest dapper package). What further information would be useful?

Robert Penz (robert-penz-name) wrote :

Hi!

I can confirm this bug. I've installed 2 machines in the last 2 weeks and got the same. I did an ubuntu server 6.06.1 install and after that I installed ssh and the next command was already following:

# apt-get install samba
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  libcupsys2 samba-common
Recommended packages:
  smbldap-tools
The following NEW packages will be installed:
  libcupsys2 samba samba-common
0 upgraded, 3 newly installed, 0 to remove and 25 not upgraded.
Need to get 5041kB of archives.
After unpacking 12.6MB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://security.ubuntu.com dapper-security/main samba-common 3.0.22-1ubuntu3.1 [2075kB]
Get:2 http://de.archive.ubuntu.com dapper-updates/main libcupsys2 1.2.2-0ubuntu0.6.06 [121kB]
Get:3 http://security.ubuntu.com dapper-security/main samba 3.0.22-1ubuntu3.1 [2845kB]
Fetched 5041kB in 46s (109kB/s)
Preconfiguring packages ...
Selecting previously deselected package libcupsys2.
(Reading database ... 13422 files and directories currently installed.)
Unpacking libcupsys2 (from .../libcupsys2_1.2.2-0ubuntu0.6.06_i386.deb) ...
Selecting previously deselected package samba-common.
Unpacking samba-common (from .../samba-common_3.0.22-1ubuntu3.1_i386.deb) ...
Selecting previously deselected package samba.
Unpacking samba (from .../samba_3.0.22-1ubuntu3.1_i386.deb) ...
Setting up libcupsys2 (1.2.2-0ubuntu0.6.06) ...

Setting up samba-common (3.0.22-1ubuntu3.1) ...

Setting up samba (3.0.22-1ubuntu3.1) ...
Generating /etc/default/samba...
TDBSAM version too old (0), trying to convert it.
TDBSAM converted successfully.
account_policy_get: tdb_fetch_uint32 failed for field 1 (min password length), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 2 (password history), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 3 (user must logon to change password), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 4 (maximum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 5 (minimum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 6 (lockout duration), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 7 (reset count minutes), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 8 (bad lockout attempt), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 9 (disconnect time), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 10 (refuse machine password change), returning 0
 * Starting Samba daemons

Ketil (ketil-froyn) wrote :

I can confirm this bug. I have an Ubuntu 6.06.1 LTS system, and I have updated it just now (30 Jan 2007 09:49AM GMT) with:

apt-get update
apt-get upgrade

and then I ran

apt-get install samba

and get the same account_policy_get errors as in the description.

Status of this bug is "needs info", what do you need? Right now this is a showstopper for me, so anything to get the fix out faster is good.

Ketil (ketil-froyn) wrote :
Download full text (3.5 KiB)

I tried again on an ubuntu 6.10 system, and I get the same error. When I installed I ran:

sudo strace -f -o /tmp/strace.txt -s 1024 apt-get install samba

and in the output I see this (edited slightly to remove long strings):

11388 stat64("/var/lib/samba/passdb.tdb", 0xbff1f12c) = -1 ENOENT (No such file or directory)
...
11395 open("/var/lib/samba/passdb.tdb", O_RDWR|O_CREAT|O_LARGEFILE, 0600) = 8
11395 fcntl64(8, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=1}, 0xbfefede4) = 0
11395 read(8, "", 168) = 0
11395 _llseek(8, 0, [0], SEEK_SET) = 0
11395 ftruncate64(8, 0) = 0
11395 write(8, "TDB file\n\0\0"..., 696) = 696
...
11395 open("/var/lib/samba/passdb.tdb", O_RDWR|O_CREAT|O_LARGEFILE, 0600) = 8
11395 fcntl64(8, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=1}, 0xbfefede4) = 0
11395 read(8, "", 168) = 0
11395 _llseek(8, 0, [0], SEEK_SET) = 0
11395 ftruncate64(8, 0) = 0
11395 write(8, "TDB file\n\0\0\0\0\0"..., 696) = 696
11395 fstat64(8, {st_mode=S_IFREG|0600, st_size=696, ...}) = 0
11395 mmap2(NULL, 696, PROT_READ|PROT_WRITE, MAP_SHARED, 8, 0) = 0xb7a8d000
11395 fcntl64(8, F_SETLKW64, {type=F_UNLCK, whence=SEEK_SET, start=0, len=1}, 0xbfefede4) = 0
11395 fcntl64(8, F_SETLKW64, {type=F_RDLCK, whence=SEEK_SET, start=580, len=1}, 0xbfefedc4) = 0
11395 fcntl64(8, F_SETLKW64, {type=F_UNLCK, whence=SEEK_SET, start=580, len=1}, 0xbfefedc4) = 0
11395 write(1, "TDBSAM version too old (0), trying to convert it.\n", 50) = 50

so it appears that the file /var/lib/samba/passdb.tdb is first created, then there are complaints that it is too old, and then it is converted. This isn't directly related to the problem reported about account_policy_get, but still seems a bit odd.

The account_policy_get errors look like this:

11395 open("/var/lib/samba/account_policy.tdb", O_RDWR|O_CREAT|O_LARGEFILE, 0600) = 9
11395 fcntl64(9, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=0, len=1}, 0xbfefe894) = 0
11395 read(9, "", 168) = 0
11395 _llseek(9, 0, [0], SEEK_SET) = 0
11395 ftruncate64(9, 0) = 0
11395 write(9, "TDB file\n\0\0\0\0\0\0\0"..., 696) = 696
...
11395 mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_SHARED, 9, 0) = 0xb7a8a000
11395 fcntl64(9, F_SETLKW64, {type=F_UNLCK, whence=SEEK_SET, start=164, len=1}, 0xbfefe3d4) = 0
11395 fcntl64(9, F_SETLKW64, {type=F_RDLCK, whence=SEEK_SET, start=420, len=1}, 0xbfefe734) = 0
11395 fcntl64(9, F_SETLKW64, {type=F_UNLCK, whence=SEEK_SET, start=420, len=1}, 0xbfefe734) = 0
11395 write(1, "account_policy_get: tdb_fetch_uint32 failed for field 1 (min password length), returning 0\n", 91) = 91
11395 fcntl64(9, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=420, len=1}, 0xbfefe724) = 0
11395 fcntl64(9, F_SETLKW64, {type=F_WRLCK, whence=SEEK_SET, start=164, len=1}, 0xbfefe294) = 0
11395 fcntl64(9, F_SETLKW64, {type=F_UNLCK, whence=SEEK_SET, start=164, len=1}, 0xbfefe294) = 0
11395 fcntl64(9, F_SETLKW64, {type=F_UNLCK, whence=SEEK_SET, start=420, len=1}, 0xbfefe724) = 0
11395 fcntl64(9, F_SETLKW64, {type=F_RDLCK, whence=SEEK_SET, start=376, len=1}, 0xbfefe734) = 0
11395 fcntl64(9, F_SET...

Read more...

Ketil (ketil-froyn) wrote :

I don't mean to be impatient, but when will this be looked into? Status for this bug is still "Needs Info". If that is still the case, please specify what is needed. I will start migrating away from Ubuntu because of this issue shortly if it remains unchanged.

seems to be assigned to infinity.

Changed in samba:
status: Needs Info → Confirmed
Adam Conrad (adconrad) wrote :

The error messages on install are harmless, really, the fix here on a packaging level would be to hide them, and upstream the fix should be to be a bit smarter about how the DB is created/converted.

Changed in samba:
importance: Medium → Low
Changed in samba:
assignee: adconrad → ubuntu-server

Just an update; installing package samba on 8.04 still gives

    Setting up samba (3.0.28a-1ubuntu4.4) ...
    Generating /etc/default/samba...
    tdbsam_open: Converting version 0 database to version 3.
    account_policy_get: tdb_fetch_uint32 failed for field 1 (min password length), returning 0
    account_policy_get: tdb_fetch_uint32 failed for field 2 (password history), returning 0
    account_policy_get: tdb_fetch_uint32 failed for field 3 (user must logon to change password), returning 0
    account_policy_get: tdb_fetch_uint32 failed for field 4 (maximum password age), returning 0
    account_policy_get: tdb_fetch_uint32 failed for field 5 (minimum password age), returning 0
    account_policy_get: tdb_fetch_uint32 failed for field 6 (lockout duration), returning 0
    account_policy_get: tdb_fetch_uint32 failed for field 7 (reset count minutes), returning 0
    account_policy_get: tdb_fetch_uint32 failed for field 8 (bad lockout attempt), returning 0
    account_policy_get: tdb_fetch_uint32 failed for field 9 (disconnect time), returning 0
    account_policy_get: tdb_fetch_uint32 failed for field 10 (refuse machine password change), returning 0
    Importing account for nobody...ok
    Importing account for peter...ok
    Importing account for ralph...ok
    Adding group `sambashare' (GID 126) ...
    Done.
    Adding user `peter' to group `sambashare' ...
    Adding user peter to group sambashare
    Done.
    Adding user `ralph' to group `sambashare' ...
    Adding user ralph to group sambashare
    Done.
     * Starting Samba daemons [ OK ]

It would be nice to tidy this up a bit since anyone who sees the messages, harmless though they may be, has to then investigate (and hopefully end up here).

Paul Dufresne (paulduf) wrote :

Still an issue in Jaunty.
Dépaquetage de samba (à partir de .../samba_2%3a3.3.1-1ubuntu1_i386.deb) ...
Traitement des actions différées (« triggers ») pour « man-db »...
Traitement des actions différées (« triggers ») pour « ufw »...
Paramétrage de samba (2:3.3.1-1ubuntu1) ...
Generating /etc/default/samba...
tdbsam_open: Converting version 0 database to version 4.
account_policy_get: tdb_fetch_uint32 failed for field 1 (min password length), returning 0
...
account_policy_get: tdb_fetch_uint32 failed for field 10 (refuse machine password change), returning 0
Importing account for nobody...ok
Importing account for paul...ok
 * Starting Samba daemons

bigge (birger-pckart) wrote :

Still the same when installing samba in Karmic Koala:
...
Generating /etc/default/samba...
tdbsam_open: Converting version 0.0 database to version 4.0.
tdbsam_convert_backup: updated /var/lib/samba/passdb.tdb file.
account_policy_get: tdb_fetch_uint32 failed for field 1 (min password length), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 2 (password history), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 3 (user must logon to change password), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 4 (maximum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 5 (minimum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 6 (lockout duration), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 7 (reset count minutes), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 8 (bad lockout attempt), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 9 (disconnect time), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 10 (refuse machine password change), returning 0
Importing account for nobody...ok
...

Those are not harmful, but getting rid of them in the output wouldn't hurt.

summary: - samba account_policy_get fails on install
+ Spurious "account_policy_get failed" messages on install
Changed in samba (Ubuntu):
assignee: Ubuntu Server Team (ubuntu-server) → nobody
importance: Low → Wishlist
status: Confirmed → Triaged
tags: added: server-papercut
Thierry Carrez (ttx) on 2010-01-19
tags: removed: server-papercut
Thierry Carrez (ttx) on 2010-02-11
Changed in server-papercuts:
status: New → Confirmed
importance: Undecided → Medium
summary: - Spurious "account_policy_get failed" messages on install
+ Installing samba gives spurious "account_policy_get failed" messages
Thierry Carrez (ttx) on 2010-03-02
Changed in server-papercuts:
milestone: none → lucid-beta-1
Thierry Carrez (ttx) on 2010-03-10
tags: added: bugzapping-target
Thierry Carrez (ttx) on 2010-03-11
Changed in samba (Ubuntu):
assignee: nobody → Thierry Carrez (ttx)
status: Triaged → In Progress
Changed in server-papercuts:
assignee: nobody → Thierry Carrez (ttx)
status: Confirmed → In Progress
Changed in samba (Ubuntu):
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2010-03-17
Changed in server-papercuts:
status: In Progress → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package samba - 2:3.4.6~dfsg-1ubuntu3

---------------
samba (2:3.4.6~dfsg-1ubuntu3) lucid; urgency=low

  [Thierry Carrez]
  * debian/samba.postinst: Avoid scary pdbedit warnings on first import
    (LP: #24741)

  [Chuck Short]
  * debian/samba.logrotate: Make it upstart compatible (LP: #529290)
  * debian/samba-common.dhcp: Fix typo to get a proper parsing in /etc/samba/dhcp. (LP: #507374)
 -- Thierry Carrez <email address hidden> Thu, 11 Mar 2010 13:57:06 +0100

Changed in samba (Ubuntu):
status: Fix Committed → Fix Released
Mistofelees (ptmusta) wrote :

Setting up samba (2:3.4.0-3ubuntu5.5) ...
It has not yet reached Ubuntu depos.

Thierry Carrez (ttx) wrote :

The fix is in the development release (Lucid), not backported to Karmic.

>>The fix is in the development release (Lucid), not backported to Karmic.

Making it useless to the majority of Ubuntu users, who are not all on Lucid and many of whom will not be upgrading to Lucid for some time... (need to wait for bugfxes to be released, wontfixes to be worked aroud, and spuriously removed hardware support to be added back in...etc)

> > The fix is in the development release (Lucid), not backported to
> > Karmic.
>
> Making it useless to the majority of Ubuntu users, who are not all on
> Lucid and many of whom will not be upgrading to Lucid for some time...
> (need to wait for bugfxes to be released, wontfixes to be worked
> aroud, and spuriously removed hardware support to be added back
> in...etc)

You could apply your argument to the fix of every bug, not just this
one. It's not practical in terms of manpower to fix a bug for all the
versions. The tone of your comment suggests you know this.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.