LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-16-2011, 03:24 AM   #1
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Migrating a Samba server from CentOS to Slackware... where's the 'smbpassd' file?


Hi,

I'm currently migrating a Samba file server from CentOS to Slackware (because the latter has a more convenient release policy). I'm experimenting a lot with a Sandbox network consisting of a Slackware server, two Windows XP clients as well as a Slack+KDE client.

Let's say I want to setup a simple no-frills password-protected share for the LAN. Here's my very simple smb.conf file for this:

Code:
[global]
  workgroup = MICROLINUX
  netbios name = BERNADETTE
  server string = Serveur de fichiers BERNADETTE
  security = user
  encrypt passwords = yes
  browseable = yes
  hosts allow = 192.168.2. 127.

[confidentiel]
  path = /export/confidentiel
  comment = Microlinux Partage Confidentiel
  read only = no
Now I want to have one 'microlinux' user for that. Here's how I go about it:

Code:
# useradd -g users -s /bin/false -c "Samba User" microlinux
# smbpasswd -a microlinux
I tested this setup, and on both Windows and Linux clients, the 'microlinux' user can connect to the share with his password. (I didn't setup a system password, only a Samba password, BTW.)

Now the first obvious difference between Samba on CentOS 5.7 and Samba on Slackware 13.37 is the missing /etc/samba/smbpasswd file. On the CentOS server, when I wanted to list my Samba users, it boiled down to this:

Code:
# cat /etc/samba/smbpasswd
This file is not present on Slackware, so I think Samba on Slackware stores user information differently.

Now what would I have to do to simply list my Samba users? The 'smbpasswd' manpage doesn't have this option.

Any suggestion?
 
Old 10-16-2011, 03:29 AM   #2
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Original Poster
Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
I'll partially answer that myself. Still don't know where Samba keeps user information, but it looks like I've just found the command to list valid Samba users:

Code:
# pdbedit -L
 
Old 10-16-2011, 03:51 AM   #3
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
Code:
ls /etc/samba/private/
passdb.tdb  secrets.tdb  smbpasswd
 
Old 10-16-2011, 04:04 AM   #4
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Original Poster
Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Quote:
Originally Posted by dive View Post
Code:
ls /etc/samba/private/
passdb.tdb  secrets.tdb  smbpasswd
I haven't got that file.
 
Old 10-16-2011, 04:27 AM   #5
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 231Reputation: 231Reputation: 231
That's the right place but the files won't exist until you create your first user.
 
Old 10-16-2011, 04:49 AM   #6
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Apparently your old CentOS server is using an old version of Samba, or it carries some legacy from earlier installations.
The smbpasswd file has been deprecated and accounts are now stored either in LDAP or in a TDB database.
Comment in the /etc/smb.conf file:
Code:
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
;   passdb backend = tdbsam
Your new server uses tdbsam and therefore you can not find a smbpasswd file. That is all in order.
Samba users can still be added through smbpasswd but pdbedit is newer and better suited.

Eric
 
Old 10-16-2011, 05:42 AM   #7
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Original Poster
Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Thanks for the clarification, Eric. By the way, I discovered your Samba HOWTO, but it's not dated. Before I dive into what looks like a nice tutorial (thanks again!), I wonder if the information contained in it still applies to Slackware 13.37.
 
Old 10-16-2011, 06:20 AM   #8
hen770
Member
 
Registered: Oct 2010
Distribution: Arch
Posts: 136

Rep: Reputation: 7
What about the smbpasswd utility, is there a new one too?
 
  


Reply



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
Migrating Samba-3 to a New Server Sum1 Linux - Software 0 01-06-2011 12:59 AM
CentOS /Samba server- XP Windows client file sharing issue 3phoenix Linux - Server 7 11-06-2009 11:05 AM
Migrating File Server to VM jpc82 Linux - General 1 09-30-2009 08:11 AM
Migrating Samba accounts to new server kkolehma Linux - Networking 0 10-14-2005 03:39 AM
migrating BSD to Slackware passwd file bgovoni Linux - General 0 04-22-2004 05:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:55 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration