Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 10-28-2002, 12:38 AM   #1
Registered: May 2002
Location: Toronto, ON, Canada
Distribution: Ubuntu, Debian, RedHat/CentOS
Posts: 624

Rep: Reputation: 31
Lightbulb SAMBA UNIX password synchronization

Hiya all!!

I've been trying to solve this particular mystery for months (hey, stop laughing!!! :P), and I have finally succeeded (about 2 months ago). So now, I want to share my findings with you:

The "passwd chat" directive in smb.conf is very picky. The smb.conf manpage is misleading when it comes to that particular directive! It had me going in circles for months!!!

Here's the full passwd chat manpage URL:

This manpage example is misleading:
Example: passwd chat = "*Enter OLD password*" %o\n "*Enter NEW password*" %n\n "*Reenter NEW password*" %n\n "*Password changed*"
In fact, it is just plain wrong because SAMBA will treat those asterisks as literals. I discovered that when I set the "passwd chat debug" setting to "yes" and "debug level" to its highest (100). The log file actually suggested the asterisks as being literal parts of the chat.

Here's my old passwd chat setting (inspired by the manpage):
passwd chat = "*password*" %n\n "*password*" %n\n "*updated*"
It never worked, even though it is very general, as you can see. This updated setting, however, works fine, and as you can see it is very specific:
passwd chat = New*password: %n\n Retype*new*password: %n\n passwd:*all*authentication*tokens*updated*successfully
As you can see in the smb.conf manpage, the format used for the "default" setting of the chat, i.e.:
Default: passwd chat = *new*password* %n\n *new*password* %n\n *changed*
the asterisks will actually be interpreted the way they are supposed to be interpreted (i.e. wildcards), whereas in the example line (see the very first quoted example), the asterisks were interpreted as literals.

I am just hopeful that this helps someone out there struggling to get UNIX password synchronization going under SAMBA. Worked for me!!

Any comments are welcome (did I miss anything?).

P.S. I wasn't sure if this forum is appropriate for information like this (i.e. answers instead of questions), so if I made a boo-boo please forgive me.
Old 10-30-2002, 12:56 AM   #2
Registered: Jul 2001
Location: Fort Wayne
Distribution: Redhat 9.0, Fedora2
Posts: 87

Rep: Reputation: 15
Ugh... has long as you dont feel its inappropriate for me to copy the whole post and use it later Thanks!!!
Old 10-30-2002, 12:38 PM   #3
Registered: May 2002
Location: Toronto, ON, Canada
Distribution: Ubuntu, Debian, RedHat/CentOS
Posts: 624

Original Poster
Rep: Reputation: 31
LOL! No probz at all! You can consider my post licensed under the OPL.


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
Samba access without unix username/password? mdkelly069 Linux - Networking 0 09-13-2004 06:05 PM
windows + pop3 password synchronization MrSmee Linux - Networking 0 05-26-2004 10:35 AM
samba and nis password synchronization? preetam Linux - Networking 1 02-10-2004 08:05 PM
sychronize samba and unix password at user creation JohanLingen Programming 1 10-10-2003 08:34 PM
Just change Samba password, not Unix password? sorrodos Linux - Networking 1 08-14-2003 08:52 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:56 AM.

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