[Samba] Two attempts required to join domain (SOLVED)

Bill Arlofski waa-samba at revpol.com
Tue Jun 19 06:04:23 MDT 2012

On 06/18/12 16:03, Miguel Medalha wrote:
>> add machine script = /usr/sbin/smbldap-useradd -t 0 -w "%u"
> Shouldn't that be "-W" (uppercase W)?
> From smbldap-useradd:
> -w    is a Windows Workstation (otherwise, Posix stuff only)
> -W    is a Windows Workstation, with Samba atributes (otherwise, Posix stuff
> only)

Hi Miguel, Thanks for the reply.

In regards to your question, I'd say:  You would think so.

And reading through the smbldap-useradd code it is clear that -W (upper) does
add the extra Samba attributes on account creation, whereas -w (lower) does not.

Also that can be seen/proven that those two options are working as expected
when manually running the smbldap-useradd with -w and then again with -W, then
running slapcat, or ldapsearch to see the entries.

When -w (lower) is used in smb.conf it appears that after the add machine
script is run and the machine account is created, Samba automatically adds the
Samba attributes when it finds the machine account in the directory - just
before the "welcome to the domain" pop-up is displayed on the workstation.

Also, when I use -W (upper) in smb.conf, instead of a "Welcome to the domain"
pop-up, I get "A device attached to the system is not functioning" pop-up on
first join attempt, followed by a successful join on second join attempt.

So, the -w works, while the -W does not (for me at least). I am not 100% sure
why, but I am not going to fight with this any longer.


Bill Arlofski
Reverse Polarity, LLC

More information about the samba mailing list