[Samba] Winbind and space in username

Michael Pellegrino mikepell at pellegq.com
Sat Nov 2 15:55:01 GMT 2002


I have winbind & samba (2.2.5) set up to provide home shares to users of our
Windows NT domain.  I have also gotten pam_mkhomedir to work properly to
automatically create their home directory.  Connecting to
\\sambaserver\homes works well for this.

However, I have a problem if an NT Domain username contains a space.  I
cannot figure out how to work around this.  Their home directory gets
created in "/homedir/domain/userfirst userlast" with the space.  When
connecting, they are always prompted for a password and cannot connect, no
matter what they type.

I ran ' winbindd -d3 -i' and the output is similar to:

getpwnam domain+userfirst userlast
..
..
..
lookupname domain+userfirst

Notice the lookupname does not include the last name.  Is this possibly the
problem?  Does anyone have any workaround, other that recreating all the
problem usernames without any spaces?

By the way, users without spaces in their username work exactly as they are
supposed to.

One other question, although this is not a huge issue.  Win 9x clients
cannot browse share names longer than 12 characters.  It just gets
truncated.  You can, however, connect to the share using "net use", and
typing the entire share name.  I work around this by just using "net use
\\server\homes".  The question is, are there any macro substitutions or
mangling to have HOMES only produce "legal" share names, no matter what the
user name is?  I suppose this would be rather difficult to make sure they
are always unique and consistent.

Thanks in advance,

Mike





More information about the samba mailing list