LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 04-27-2013, 12:06 PM   #1
d420
LQ Newbie
 
Registered: Feb 2012
Posts: 17

Rep: Reputation: Disabled
Question No smbpasswd in CentOS 6.4?


I am in the process of migrating a Fedora Core 4 based Samba (3.0.23a-1.fc4.1) server to a CentOS 6.4 based Samba server (3.5.4-68.el6_0.2).

I thought that copying the config files in /etc/samba from the old server to the new one would suffice, but it turned out that the new server doesn't recognize the users/passwords in those files (smbpasswd, smbusers, secrets.tdb).

Once I started adding users manually (e.g. 'smbpasswd -a dfour'), all is well and I am able to connect from a remote client.

But... I also noticed that 'smbpasswd -a' operation did not touch any of the files in /etc/samba, nor created a new file.

So I'm curious: Where does 'smbpasswd -a' do the magic (of storing user information) now?
 
Old 04-27-2013, 12:14 PM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Philly, PA
Distribution: Kubuntu x64, RHEL, Fedora Core, FreeBSD, Windows x64
Posts: 1,417
Blog Entries: 33

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
As root user I ran the following commands on my system.

Code:
yum provides $(which smbpasswd)
rpm -q --filesbypkg samba-common
cd /var/lib/samba/
ls
Looks like your user database is in /var/lib/samba. That is the case on my system. /var is normally used for variable data (such as databases).

SAM
 
Old 04-27-2013, 12:24 PM   #3
d420
LQ Newbie
 
Registered: Feb 2012
Posts: 17

Original Poster
Rep: Reputation: Disabled
Arrow

Quote:
Originally Posted by sag47 View Post
Looks like your user database is in /var/lib/samba.
Thanks for reminding me about that directory. I just checked it and there are files with current timestamps:

Code:
-rw-r--r--. 1 root root   110592 Apr 27 13:15 connections.tdb
-rw-r--r--. 1 root root   204800 Apr 27 13:15 sessionid.tdb
-rw-r--r--. 1 root root     8192 Apr 27 13:15 serverid.tdb
-rw-------. 1 root root    12288 Apr 27 13:12 messages.tdb
-rw-r--r--. 1 root root    12288 Apr 27 13:12 printer_list.tdb
-rw-r--r--. 1 root root   425984 Apr 27 12:57 gencache_notrans.tdb
-rw-r--r--. 1 root root   425984 Apr 27 12:57 gencache.tdb
-rw-r--r--. 1 root root      696 Apr 27 11:03 notify_onelevel.tdb
-rw-r--r--. 1 root root      696 Apr 27 11:03 notify.tdb
-rw-r--r--. 1 root root    40200 Apr 27 11:03 locking.tdb
-rw-r--r--. 1 root root    40200 Apr 27 11:03 brlock.tdb
-rw-r--r--. 1 root root      258 Apr 27 08:54 browse.dat
But none seem to be updated when I run another 'smbpasswd -a` command.

So, I am still looking for the elusive users/password database.
 
Old 04-27-2013, 12:26 PM   #4
d420
LQ Newbie
 
Registered: Feb 2012
Posts: 17

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by d420 View Post
So, I am still looking for the elusive users/password database.
Update: I found passdb.tdb in /var/lib/samba/private.

Mystery solved.

Thank you.
 
  


Reply

Tags
centos, samba, smbpasswd


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding users using smbpasswd, or synchronise passwd/smbpasswd gyodai Linux - Networking 2 03-11-2009 02:47 PM
SMBPASSWD issue metallica1973 Linux - Networking 3 01-03-2007 07:55 PM
smbpasswd leiw Linux - General 3 07-25-2006 05:55 PM
smbpasswd -a ... smbpasswd: Command not found Lleb_KCir Linux - Software 7 08-11-2004 11:27 AM
smbpasswd whaase Linux - Networking 3 11-02-2003 03:48 PM


All times are GMT -5. The time now is 10:24 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration