Safe netbios characters

Alexander Bokovoy a.bokovoy at sam-solutions.net
Fri Jan 18 01:12:12 GMT 2002


On Fri, Jan 18, 2002 at 07:50:55AM +1100, Tim Potter wrote:
> On Thu, Jan 17, 2002 at 02:07:54PM -0600, Jason Holland wrote:
> 
> > hello,
> >   i appologize if this post is inappropriate, but i was unable to get an 
> > answer on samba users list.  i'm trying to change the source to samba to 
> > allow a ! in the usernames.  would this code modification be the only one 
> > needed to accomplish this???  if not, where else would i look??
> > 
> > *** reply.c     Thu Jan 17 13:49:00 2002
> > --- reply-1.c   Thu Jan 17 13:55:11 2002
> > ***************
> > *** 857,863 ****
> >     }
> >   
> >     /* don't allow strange characters in usernames or domains */
> > -   alpha_strcpy(user, user, ". _-$", sizeof(user));
> > +   alpha_strcpy(user, user, "!. _-$", sizeof(user));
> >     alpha_strcpy(domain, domain, ". _-", sizeof(domain));
> >     if (strstr(user, "..") || strstr(domain,"..")) {
> >           return ERROR_BOTH(NT_STATUS_LOGON_FAILURE,ERRSRV,ERRbadpw);
> > 
> > anyone able to help out?  please cc me as i'm not subscribed to the list, 
> > or cc the samba users list.  thank for your help in this matter.
> I'm not sure whether this patch is complete.  According to the User Manager 
> the following characters can't be present in a username: "/\[]:;|=,+*?<> 
> 
> Not sure about domain names though.  Also the space character is specifically
> allowed in both domain and usernames!
BTW, it is allowed in passwords as well but I haven't seen this (password
with space in it) working when logining from samba client to samba server
and authorizing via winbind against NT. This is a bug, I think.
-- 
/ Alexander Bokovoy
$ cat /proc/identity >~/.signature
  `Senior software developer and analyst for SaM-Solutions Ltd.`
---
Nov 21 20:58:58 alconost kernel: VFS: Busy inodes after unmount. 
		    Self-destruct in 5 seconds.  Have a nice day...




More information about the samba-technical mailing list