The Surgery | The doctor is IN

TAG | fedora

Another self-indulgent blog post, so next time I have this problem, I don’t waste hours trying to fix something I’ve successfully tackled in the past. Hopefully this helps someone else.

The mysterious, magical Samba service is great when it works. When it doesn’t, it can be extraordinarily frustrating.

Problem

You can’t add Samba users at your Linux console. You get this error; for example, by issuing an “smbpasswd -a” command:

Unable to modify TDB passwd: NT_STATUS_UNSUCCESSFUL!
Failed to add entry for user xyz.
Failed to modify password entry for user xyz

The username is a valid Linux user, and the account is unlocked.

I also tried deleting the Samba user with an “smbpasswd -x”, but to no avail. Stopping and starting the SMB and NMB services does not resolve the problem.

My system details

OS / Kernel: Fedora 9 – 2.6.27.25-78.2.56.fc9.i686
Samba package: samba-3.2.11-0.28.fc9.i386

Solution

** WARNING **!!  This solution worked for me, but obviously, no warranties are made  for any other systems. Make backups and proceed at own risk.

A post on a Debian forum suggested that the Samba password file might be corrupt. The password file is a binary called “passdb.tdb” and will be re-created, if it doesn’t exist, when SMB and NMB are restarted.

Note that you’ll need to re-add all your Samba users and passwords!

  • Locate passdb.tdb
  • Make a backup of passdb.tdb
  • Remove passdb.tdb
  • Stop the SMB and NMB daemons
  • Start the SMB and NMB daemons

At this point you should see that a new, much smaller passdb.tdb has been created.

Try adding your user again with an “smbpasswd -a” command. Add your other Samba users with the same command.

It worked for me. Good luck.

· · · · ·

Woooaah … truckloads.

There are 1001 blog-worthy things to blog in my blog about.

Sadly, time (lusty and blithe) is at his apogee.

In brief, I have:

  • Had a shave, since the last blog post;
  • Upgraded The Surgery WordPress blog from 2.8.3 to 2.9;
  • Moved WordPress blog from Fedora 9 machine with crappy dynamic IP address (it was killing me) to shiny Fedora 11 machine with static IP address;
  • Marveled at my ability to upgrade WordPress, SQL databases and move them across Linux machines, AND make grown-up changes to DNS zone files – am surely a guru of such things now and legend in my own lunchbox;
  • Undertaken 2 of 8 Tech Talk Radio Summer Series productions, time-consuming but rewarding;
  • Upgraded the HTC Dream / Google phone to the next Android operating system, very successful;
  • Teetered on the brink of e-mail bankruptcy;
  • Ordered a new PC for Christmas;
  • Ventured inside an Apple Store for the very first time, and escaped by making only a minor purchase (a new iPod Touch); and
  • Just today, assisted Mrs Dr Ron in restoring her iTunes library, after she deleted all the music files from her PC’s hard disk  - successfully achieved restoration by using a third-party app called iRip which we’ve spoken about on Tech Talk in the past (thanks JD, saviour of Dr Ron’s marriage).

I have also Tweeted mercilessly about our well-intentioned (yet incompetent, foolish and mis-informed) Senator for Communications and the Digital Economy, Stephen Conroy.  In case you hadn’t caught up with the news (which the good Senator saved until after the last live episode of Tech Talk for 2009), Australia will be ranked highly with the United Arab Emirates, Iran and China in its foolish deployment of an ISP-based Net Filter.

Adam Turner has had a lot to say about this, and made a clever analogy with a different type of infrastructure.  His blog posts here and here in The Age last week should be mandatory reading.

I’ll blog in more detail about these and other things soon.

I hope you have a great Chrissy and a safe and prosperous New Year.

· · · · · · · · · · · · · · · · · · · · ·

Theme Design by devolux.nh2.me